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.

Run in Postman API Reference

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

  1. India
  2. North America
  3. Europe
  4. Middle East
  5. 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 NameData TypeFieldDescriptionMax LengthExample
usernameStringMandatoryUsername of your Clickpost account, provided by Clickpost team100
keyStringMandatoryUnique license key for your Clickpost account, provided by Clickpost team100
waybillStringMandatoryWaybill, which needs to be cancelled100
cp_idIntMandatoryCourier Partner ID of the courier from which shipment was dispatched. List: http://track.clickpost.in/courier_partner44
account_codeStringMandatoryCourier partner account name configured on the Clickpost dashboard100"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
    }
}