After booking
Cancellation
Cancel a booked forward shipment or a return pickup before the carrier picks it up.
Cancel a forward shipment
Cancels the booked shipment of a forward order. For returns, use Cancel a return shipment.
curl -X POST 'https://wms.shift.in/api/v1/open/outbound/shipment/cancel' \
-H 'X-API-Key: <your api key>' \
-H 'Content-Type: application/json' \
--data '{
"tracking_number": "25338212527534",
"order_number": "OB-128-100182"
}'| Field | Required | Description |
|---|---|---|
tracking_number | Required | The AWB from the shipment response. |
order_number | Required | The order that owns this tracking number. |
What happens, by order type
| Order type | What happens | Allowed when |
|---|---|---|
| SELF orders | The AWB is cancelled with the carrier immediately, the shipping charge is refunded to your wallet, and the order returns to NEW. | Before pickup: PROCESSING with SHIPMENT_PENDING, READY_TO_MANIFEST, MANIFESTED or READY_TO_SHIP. |
| WAREHOUSE orders | A cancel request is raised for the warehouse to review; nothing is cancelled until they act. | Any time; the response includes cancelRequestId. |
After a SELF cancel, the carrier, tracking number, label and invoice are cleared. The old AWB can no longer be tracked; track by order number instead. You can book the order again with a fresh quote.
Response
| Outcome | success | eligibleRefund | message | cancelRequestId |
|---|---|---|---|---|
| SELF order cancelled | true | Shipping charge | null | - |
| SELF order refused (for example, already picked up) | false | null | The reason | - |
| WAREHOUSE order, request raised | true | Shipping charge | Cancel shipment request created successfully. Warehouse will review your request. | The request ID |
Cancel a return shipment
Cancels the booked pickup of a return. Both return types are cancelled with the carrier immediately, with no warehouse review. Allowed only before pickup (PROCESSING or READY_TO_SHIP).
curl -X POST 'https://wms.shift.in/api/v1/open/return/shipment/cancel' \
-H 'X-API-Key: <your api key>' \
-H 'Content-Type: application/json' \
--data '{
"tracking_number": "62042210047633",
"order_number": "OB-306-100061"
}'| Field | Required | Description |
|---|---|---|
tracking_number | Required | tracking_number from the Create return response. |
order_number | Required | return_order_number from the Create return response, not a forward order number. |
After a cancel, the return shipping charge is refunded to your wallet and the carrier and tracking number are cleared. The return stays NEW and can't be booked again through the API; create a new return instead.
The response data has success, eligibleRefund and message.
Cancellation errors
| Situation | Response |
|---|---|
| Either field missing or blank | 422 is required |
| Unknown tracking number, or another company's order | 404 Order not found |
order_number doesn't match the tracking number | 422 does not match |
| A return sent to Cancel a forward shipment | 422 is a return; use /return/shipment/cancel |
| A forward order sent to Cancel a return shipment | 404 Return order not found |
| Shipment already picked up or in transit | 200 with success: false and a message |
| Same shipment cancelled twice | The second call fails |
Stuck on an integration?
Your account manager can put you in touch with our tech team.