Close shipment groups
Use the close shipment group endpoint to permanently close a group after its shipments are manifested or cancelled.
Overview
The Close Shipment Group endpoint permanently closes a specified shipment group. It is intended to be used when all shipments within a group have been either manifested or cancelled and the group is no longer required.
Closed groups cannot be edited.
Once closed, shipment groups cannot be re-opened. If you want to prevent a shipment group from being edited but may still need to make changes to it later, use the Lock Shipment Group endpoint. For more information on locking shipment groups, see the Lock and Unlock Shipment Groups section of the Edit Shipment Groups page.
Making a close shipment group request
To call Close Shipment Group, send a POST
request to https://api.sorted.com/pro/shipment_groups/{reference}/close
, where {reference}
is the unique reference of the shipment group you want to close. Ship closes the group, and returns a confirmation message and a link to the closed group.
For full reference information on the Close Shipment Group endpoint, see the Shipments API reference.
Close shipment group example
The example shows a successful Close Shipment Group request for shipment group sg_00684650028894794889609836494848.
https://api.sorted.com/pro/shipment_groups/sg_00684650028894794889609836494848/close
{
"reference": "sg_00684650028894794889609836494848",
"custom_reference": "01bdd7d1-48f1-4aa1-9246-42e39339f51a",
"message": "Shipment group sg_00684650028894794889609836494848 has been closed successfully",
"_links": [
{
"href": "https://beta.sorted.com/pro/shipments/groups/sg_00684650028894794889609836494848",
"rel": "self",
"reference": "sg_00684650028894794889609836494848",
"type": "shipment_group"
}
]
}
Next steps
- Learn how to retrieve existing shipment groups: Get Shipment Groups
- Learn how to add and remove shipments from groups: Edit Shipment Groups