Cancel order
curl --request POST \
--url https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{}
{
"code": 400,
"message": "An order issue already exists for order: order_id and type: cancellation_request and status: open"
}
{
"code": 401,
"message": "Unauthorized"
}
{
"code": 404,
"message": "Order not found"
}
{
"message": "Invalid Request"
}
Orders
Cancel order
Submits a cancellation request for a specific order.
POST
/
api
/
v2
/
orders
/
{order_id}
/
cancellation
Cancel order
curl --request POST \
--url https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://live.nocnocstore.com/api/v2/orders/{order_id}/cancellation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{}
{
"code": 400,
"message": "An order issue already exists for order: order_id and type: cancellation_request and status: open"
}
{
"code": 401,
"message": "Unauthorized"
}
{
"code": 404,
"message": "Order not found"
}
{
"message": "Invalid Request"
}
Requests go to the live environment — all actions are real.
Authorization
string
required
Your seller API key. Provided by your nocnoc account manager.
Path parameters
string
required
The ID of the order to cancel.
Returns
A confirmation that the cancellation request was submitted.Example request
curl -X POST https://live.nocnocstore.com/api/v2/orders/ORD-123456/cancellation \
-H "X-Api-Key: YOUR_SELLER_KEY"
{}
{
"code": 400,
"message": "An order issue already exists for order: order_id and type: cancellation_request and status: open"
}
{
"code": 401,
"message": "Unauthorized"
}
{
"code": 404,
"message": "Order not found"
}
{
"message": "Invalid Request"
}
⌘I