Skip to main content
DELETE
Cancel a shipment order. This calls the logistics provider API to cancel the order and updates the shipment status to cancelled. Cancelling a shipment that is already cancelled returns 200 with that shipment, and the provider is called only once. The response carries Idempotent-Replayed: true so you can tell a repeat from the call that did the work. See Idempotency.
Shipments cannot be cancelled after pickup — that returns 409 Conflict.
A DHL return label cannot be cancelled on its own; that also returns 409 Conflict. Cancel the outbound parcel instead. Cancelling an outbound DHL parcel also cancels its pending return-leg rows. Each one becomes cancelled with a RETURN_LEG_CANCELLED entry in status_updates. See Return labels. In a box with several kits, each kit has its own outbound row and its own return label, even when the box travels on one kit’s label. Cancelling a kit’s outbound row also cancels that kit’s return label. To cancel a home-kit parcel, every linked home-kit order must be in your access context. Otherwise the call returns 403. See Access.

Request

Path parameters

string
required
Shipment reference ID (e.g., P2604154821).

Response

On success, the API returns 200 OK with the cancelled shipment object.
string
required
Shipment reference identifier.
string
required
Shipment lifecycle status. Will be cancelled after a successful cancellation.
string
required
Logistics provider. One of go, dhl_parcel, dhl_warenpost, tof, rotrunner, rapido or ups. A home-kit parcel is dhl_parcel, or dhl_warenpost when it goes abroad as Warenpost International.
string
External tracking number from the logistics provider. May be null.
string
Free-text description of what is in the parcel, as given at creation. May be null.
string
required
Who printed the label: aniva or external. Only aniva shipments accept this call.
string
Reference of the other parcel of a two-parcel consignment. null for a one-way parcel.
object
Pickup address. May be null.
object
Delivery address. Same structure as origin. May be null.
object
Scheduled pickup window. May be null.
string
Optional notes. May be null.
object[]
required
Chronological lifecycle events from the logistics provider (oldest first). Each entry has state, code, detail_code, status, description, location and time. See Get Shipment for each field. Empty array if no events observed yet.
ShipmentAppointmentLink[]
required
Appointments that were linked to this shipment before cancellation. Each entry is { id, added_at }; cross-reference each id against Get Appointment. Only the appointments in your access context are listed.
ShipmentHomeKitOrderLink[]
required
Home-kit orders linked to this shipment, oldest-link first, in the same { id, added_at } shape. Only the orders in your access context are listed. Empty array for practice parcels.
string
When the shipment was last reconciled with its carrier, as a UTC instant. null until the first sync.
string
required
Creation timestamp (ISO 8601).
string
Last update timestamp (ISO 8601). May be null.

Error responses