Shipments
Cancel Shipment
Cancel a shipment order
DELETE
Cancel a shipment order. This calls the logistics provider API to cancel the order and updates the shipment status to
cancelled.
Request
Path parameters
Shipment reference ID (e.g.,
P2604154821).Response
On success, the API returns200 OK with the cancelled shipment object.
Shipment reference identifier.
Shipment lifecycle status. Will be
cancelled after a successful cancellation.Logistics provider. One of
go, dhl, or tof.External tracking number from the logistics provider. May be
null.Pickup address. May be
null.Delivery address. Same structure as
origin. May be null.Scheduled pickup window. May be
null.Optional notes. May be
null.Chronological lifecycle events from the logistics provider (oldest first). Each entry has a
status (free-form provider-sourced label) and time (ISO 8601). Empty array if no events
observed yet.Appointments that were linked to this shipment before cancellation. Each entry is
{ id, added_at }; cross-reference each id against
Get Appointment.Creation timestamp (ISO 8601).
Last update timestamp (ISO 8601). May be
null.Error responses
| Status | Description |
|---|---|
403 | Forbidden — your API key does not have access to this operation or the shipment is outside your access context. |
404 | Shipment not found. |
409 | Shipment cannot be cancelled (already picked up, delivered, or cancelled). |
500 | Internal server error. |
502 | Logistics provider rejected the request (e.g., cancellation deadline exceeded). Includes the provider’s error message. |