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
| Field | Required | Data Type | Description |
|---|---|---|---|
| awb_no | Yes | String | AWB number of the shipment |
Header Example
{
"Authorization": "Bearer {{your_token}}",
"Content-Type": "application/json"
}
Request Example
{
"awb_no": "81037677184"
}
Response
| Field | Data Type | Description |
|---|---|---|
| status | Object | Object containing the status of the request |
| status.message | String | Message containing the outcome of the request |
| status.status_code | Integer | Status Code of request
|
| status.success | Boolean | Boolean 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
}
}