Show / Hide Table of Contents

    Cancelling Shipments

    • Ship
    • api
    • cancel shipments

    This page explains how to cancel shipments in Ship.


    Cancelling Shipments

    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, Ship 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.

    Note

    For full reference information on the Cancel Shipment endpoint, see the Ship API reference.

    Cancel Shipment Example

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

    • Cancel Shipment Request
    • Cancel Shipment Response
    PUT https://api.sorted.com/pro/shipments/sp_00792815110958000332875334549504/cancel
    
    {
        "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

    • Learn how to create, clone, and update shipments: Creating Shipments
    • Learn how to retrieve shipment data: Getting Shipments
    • Learn how to allocate shipments: Allocating Shipments
    Back to top Copyright © Sorted Group 2023. Generated by DocFX