Create a Shipment
You may have already noticed that when you Get a Shipping Rate, a new shipment object is created inside of ShipEngine. Shipments are the gatekeepers to more advanced functionality inside ShipEngine.
The Basics
When you create a shipment, we respond with a shipment_id
that is a unique identifier inside of ShipEngine. Additionally, we realize that you may have your own identifier, you can set this by setting the external_shipment_id
field in the request body.
Creating a Shipment
To create a shipment, we will use the same command as we do when we get a rate, with one small modification, we remove the rate_options
property, this tells the server not to rate the shipment.
Notice that we included a external_shipment_id
, that was then persisted back in the JSON response:
The shipment_id
that is returned is the unique identifier inside of ShipEngine. Many of our endpoints require the use of our internal shipment_id
; however, the external_shipment_id
is useful with our responses to easily match them to your own records.
Example Request
Example Response
Duplicate External Shipment IDs
We allow you to set your own external_shipment_id
; however, this ID must be unique. If you provide a duplicate ID, you receive an error message like this.