Cancel a shipment

To cancel a shipment, use the Cancel Shipment endpoint. To call Cancel Shipment, send a PUT request to https://api.sorted.com/pro/shipments/{reference}/cancel, where {reference} denotes the shipment you want to cancel. Once the request has been received, the Shipments platform changes the shipment’s {state} to cancelled and returns a confirmation message.

You can only cancel a shipment prior to that shipment being manifested. Once a shipment has been manifested it can no longer be cancelled.

Once a shipment has been cancelled, then no further changes can be made to it. In order to reinstate a cancelled shipment you would need to create a new shipment with the same details.

Cancel shipment example

The example below shows a successful Cancel Shipment request for shipment sp_00792815110958000332875334549504.

Cancel shipment request

  PUT https://api.sorted.com/pro/shipments/sp_00792815110958000332875334549504/cancel
  

Cancel shipment response

  {
    "reference": "sp_00792815110958000332875334549504",
    "custom_reference": "77d58d14-53f6-414c-876d-05c9b3cf079a",
    "message": "Shipment sp_00792815110958000332875334549504 has been cancelled",
    "_links": [
        {
            "href": "https://api-int.sorted.com/pro/shipments/sp_00792815110958000332875334549504",
            "rel": "shipment",
            "reference": "sp_00792815110958000332875334549504",
            "type": "shipment"
        }
    ]
}
  

Next steps