Skip to main content

Cancel Order

The Cancel Order API Route will cancel an existing shipment in Openleaf.

You have to pass all the required Field at the minimum to cancel an order. You can add additional parameters as per your preference.

Request

POST REQUEST
https://api.openleaf.tech/api/v1/order/cancelOrder

FieldRequiredData TypeDescription
awb_noYesStringAWB number of the shipment
Header Example
{
"Authorization": "Bearer {{your_token}}",
"Content-Type": "application/json"
}
Request Example
{
"awb_no": "81037677184"
}

Response

FieldData TypeDescription
statusObjectObject containing the status of the request
status.messageStringMessage containing the outcome of the request
status.status_codeIntegerStatus Code of request
  • 200 if the request is successful
  • 400 if there is an error
status.successBooleanBoolean status of the request
Response Example
{
"status": {
"message": "Order Cancelled Successfully",
"status_code": 200,
"success": true
}
}
IN CASE OF FAILURE

Please note, in case of any validation failure - order will not get cancelled. Please wait for 10-15 seconds before you cancel the request for latency.

Example

Curl Command


curl --location --request POST 'https://api.openleaf.tech/api/v1/order/cancelOrder' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{token}}' \
--data-raw '{
"awb_no": "81037677184"
}'

Output:

{
"status": {
"message": "Order Cancelled Successfully",
"status_code": 200,
"success": true
}
}