v1
latestOpenAPI 3.0.32026-07-26170311887.2 KBShipments
Cancel a Shipment
Cancel a shipment after a label has been requested, as long as the shipment is not yet in transit.
Required authorization scope: public.shipment:write
Cancel vs Delete: Use Delete to remove a shipment before a label has been requested (label_state: not_created). Use Cancel after a label has been requested, as long as the shipment is not yet in transit.
When can you cancel?
The shipment's label_state must be one of: pending, generated, printed, shipping_document_generated, failed, technical_failed, or reported.
The shipment's delivery_state must be pre-transit: not_created, pending, info_received, or expired.
When can you NOT cancel?
- label_state: generating — the label is actively being generated; wait until it resolves to generated or failed before retrying
- label_state: voided or void_failed — the label has already been voided; the shipment cannot be cancelled via this endpoint
- delivery_state is in_transit_to_customer, out_for_delivery, delivered, or similar — the shipment has left the origin facility
- The label was generated more than 6 months ago (pre-paid shipments only)
post/2024-09/shipments/{easyship_shipment_id}/cancel
Path parameters
easyship_shipment_idstring required
Easyship Shipment ID provided when creating the shipment
Response
shipment successfully canceled