Cancellation API
Cancellation API allows you to cancel the shipment in the carrier partner's system
Overview
In order to cancel placed orders, Clickpost provides an easy-to-use Cancellation API. Enterprise can cancel the shipment manifested via Clickpost , for faster returns.
Usecase
This is a standard API which applies to all MPS (Multi-Piece Shipment) and SPS (Single Piece Shipment) orders
Geography
This is a standard API which supports all shipments created and transported within
- India
- North America
- Europe
- Middle East
- South East Asia
NOTE
For tracking, after cancellation, some carrier partners do not update it in their tracking API ,so you will not see any update on Clickpost dashboard as well for these shipments.
Please note, If the carrier partner updates a status after cancellation API, it will reflect on our dashboard.
As a standard practice, if you get HTTP status code: 200 and and API response: "meta" --> "status_code" 200 / 600 [order already cancelled] in the cancellation API, you can assume that the shipment is marked void/cancelled if it is pre dispatch or has been RTOed if the order is cancelled post dispatch.
For all other cases, consider that shipment is not cancelled yet.
NOTE
Certain carrier aggregators like Shiprocket do not mark the shipment cancelled synchronously. In such cases, the API will return status 202 [HTTP status as 202 as well] in case the carrier has accepted the request for cancellation.
URL
GET https://www.clickpost.in/api/v1/cancel-order/?username=*****&key=*****&waybill=*****&account_code=*****
Query Params
This endpoint only takes URL query parameters as input.
Field Name | Data Type | Field | Description | Max Length | Example |
---|---|---|---|---|---|
username | String | Mandatory | Username of your Clickpost account, provided by Clickpost team | 100 | |
key | String | Mandatory | Unique license key for your Clickpost account, provided by Clickpost team | 100 | |
waybill | String | Mandatory | Waybill, which needs to be cancelled | 100 | |
cp_id | Int | Mandatory | Courier Partner ID of the courier from which shipment was dispatched. List: http://track.clickpost.in/courier_partner | 4 | 4 |
account_code | String | Mandatory | Courier partner account name configured on the Clickpost dashboard | 100 | "test_account" |
Response
{
"meta": {
"message": "SUCCESS",
"success": true,
"status": 200
}
}
{
"meta": {
"message": "ORDER ALREADY CANCELLED",
"success": true,
"status": 600
}
}
{
"meta": {
"message": "Invalid Waybill/ Waybill cannot be cancelled",
"success": false,
"status": 350
}
}
{
"meta": {
"status": 351,
"message": "Clickpost Account: Does not exist",
"success": false
}
}
Updated about 1 month ago