Initiate Cancellation
curl --request POST \
--url https://api.zinc.io/v1/orders/{request_id}/cancel \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant_order_id": "<string>",
"webhooks": {
"request_succeeded": "<string>",
"request_failed": "<string>",
"tracking_obtained": "<string>",
"tracking_updated": "<string>",
"status_updated": "<string>",
"case_updated": "<string>"
}
}
'import requests
url = "https://api.zinc.io/v1/orders/{request_id}/cancel"
payload = {
"merchant_order_id": "<string>",
"webhooks": {
"request_succeeded": "<string>",
"request_failed": "<string>",
"tracking_obtained": "<string>",
"tracking_updated": "<string>",
"status_updated": "<string>",
"case_updated": "<string>"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchant_order_id: '<string>',
webhooks: {
request_succeeded: '<string>',
request_failed: '<string>',
tracking_obtained: '<string>',
tracking_updated: '<string>',
status_updated: '<string>',
case_updated: '<string>'
}
})
};
fetch('https://api.zinc.io/v1/orders/{request_id}/cancel', 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://api.zinc.io/v1/orders/{request_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchant_order_id' => '<string>',
'webhooks' => [
'request_succeeded' => '<string>',
'request_failed' => '<string>',
'tracking_obtained' => '<string>',
'tracking_updated' => '<string>',
'status_updated' => '<string>',
'case_updated' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zinc.io/v1/orders/{request_id}/cancel"
payload := strings.NewReader("{\n \"merchant_order_id\": \"<string>\",\n \"webhooks\": {\n \"request_succeeded\": \"<string>\",\n \"request_failed\": \"<string>\",\n \"tracking_obtained\": \"<string>\",\n \"tracking_updated\": \"<string>\",\n \"status_updated\": \"<string>\",\n \"case_updated\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.zinc.io/v1/orders/{request_id}/cancel")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_order_id\": \"<string>\",\n \"webhooks\": {\n \"request_succeeded\": \"<string>\",\n \"request_failed\": \"<string>\",\n \"tracking_obtained\": \"<string>\",\n \"tracking_updated\": \"<string>\",\n \"status_updated\": \"<string>\",\n \"case_updated\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zinc.io/v1/orders/{request_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_order_id\": \"<string>\",\n \"webhooks\": {\n \"request_succeeded\": \"<string>\",\n \"request_failed\": \"<string>\",\n \"tracking_obtained\": \"<string>\",\n \"tracking_updated\": \"<string>\",\n \"status_updated\": \"<string>\",\n \"case_updated\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>"
}Cancellations & Returns
Create Cancellation
Initiate a cancellation for an order
POST
/
v1
/
orders
/
{request_id}
/
cancel
Initiate Cancellation
curl --request POST \
--url https://api.zinc.io/v1/orders/{request_id}/cancel \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant_order_id": "<string>",
"webhooks": {
"request_succeeded": "<string>",
"request_failed": "<string>",
"tracking_obtained": "<string>",
"tracking_updated": "<string>",
"status_updated": "<string>",
"case_updated": "<string>"
}
}
'import requests
url = "https://api.zinc.io/v1/orders/{request_id}/cancel"
payload = {
"merchant_order_id": "<string>",
"webhooks": {
"request_succeeded": "<string>",
"request_failed": "<string>",
"tracking_obtained": "<string>",
"tracking_updated": "<string>",
"status_updated": "<string>",
"case_updated": "<string>"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchant_order_id: '<string>',
webhooks: {
request_succeeded: '<string>',
request_failed: '<string>',
tracking_obtained: '<string>',
tracking_updated: '<string>',
status_updated: '<string>',
case_updated: '<string>'
}
})
};
fetch('https://api.zinc.io/v1/orders/{request_id}/cancel', 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://api.zinc.io/v1/orders/{request_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchant_order_id' => '<string>',
'webhooks' => [
'request_succeeded' => '<string>',
'request_failed' => '<string>',
'tracking_obtained' => '<string>',
'tracking_updated' => '<string>',
'status_updated' => '<string>',
'case_updated' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zinc.io/v1/orders/{request_id}/cancel"
payload := strings.NewReader("{\n \"merchant_order_id\": \"<string>\",\n \"webhooks\": {\n \"request_succeeded\": \"<string>\",\n \"request_failed\": \"<string>\",\n \"tracking_obtained\": \"<string>\",\n \"tracking_updated\": \"<string>\",\n \"status_updated\": \"<string>\",\n \"case_updated\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.zinc.io/v1/orders/{request_id}/cancel")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_order_id\": \"<string>\",\n \"webhooks\": {\n \"request_succeeded\": \"<string>\",\n \"request_failed\": \"<string>\",\n \"tracking_obtained\": \"<string>\",\n \"tracking_updated\": \"<string>\",\n \"status_updated\": \"<string>\",\n \"case_updated\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zinc.io/v1/orders/{request_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_order_id\": \"<string>\",\n \"webhooks\": {\n \"request_succeeded\": \"<string>\",\n \"request_failed\": \"<string>\",\n \"tracking_obtained\": \"<string>\",\n \"tracking_updated\": \"<string>\",\n \"status_updated\": \"<string>\",\n \"case_updated\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>"
}The Zinc API supports pre-shipment order cancellation on Amazon.com and Amazon.co.uk.
This is distinct from aborting an order, which occurs while the order is still in progress. Cancellations will send a cancellation request to the retailer and attempt to stop the order from shipping and can only be initiated for order requests that were successful.
You can only cancel an order after it has been successfully placed using the API
Authorizations
Use your client token as the username. Leave the password blank.
Path Parameters
The unique identifier for the order request to cancel
Body
application/json
The merchant order id of the order that you would like to cancel. If the order has multiple merchant_order_ids you must cancel each separately.
A webhooks object including URLs that will receive POST requests after request_succeeded and request_failed
Show child attributes
Show child attributes
Response
200 - application/json
Cancellation initiated successfully
The unique identifier for the cancellation request
⌘I

