Skip to main content
A shipment can be cancelled until physical pickup, including after a driver accepted it and when no driver was found (NO_DRIVER_AVAILABLE).
The body is optional; reason matches ^[A-Z][A-Z0-9_]{1,47}$ and defaults to MERCHANT_REQUESTED. The response is 200 with the shipment, now CANCELLED, with cancellationReasonCode and the frozen deliveryFeeAmount. Cancelling an already-cancelled shipment returns the same 200.

When it is refused

Example response:
The delivery and custody history stay intact. With Accept-Language: ar, title, detail, and nextAction are Arabic.
reason did not match the pattern.
The shipment does not exist, or it belongs to another merchant.

Retrying safely

Send an Idempotency-Key (16–128 characters) to make a retry return the original outcome; see Idempotency and ETags.