Create a new manifest
To create a manifest for your shipments, POST to the Manifest endpoint with an array of theTransaction object IDs you are looking to create the Manifest for, along with your carrier_account , shipment_date , and address_from (required for USPS).
Each transaction in your manifest must share the same address_from, shipment_date, and carrier_account.
NOTEThe date format you use for
shipment_date must be in the format 2014-01-18T00:35:03.463Z (ISO 8601 date). See the create manifest endpoint for an example.noteThe manifest endpoint in the Shippo API supports both methods for specifying the
address_from parameter using an object ID or setting the address parameters directly in the call.status attribute in your response will be QUEUED.
cURL
status attribute in your response is ERROR, use our manifest errors list to help you debug your issue.
status attribute in your response is SUCCESS, in your response, you will find an array of links to your manifests in the documents attribute. Depending on how many shipments you’ve manifested, you may generate multiple files.
NOTEYou can create more than one manifest for a single location, but you cannot add the same label to more than one manifest.
Rejected transactions
If some of the transactions in your request can’t be added to the manifest, the request fails with a404. The detail message starts with “Invalid transactions” and lists the object IDs that were rejected.
The response also has a transactions object. Each key is a rejected transaction ID, and each value has a reason and, for most reasons, a few fields that show what we compared:
NoteWe may add new reasons over time. If you get a
reason you don’t recognize, treat it as a general failure and use the detail message.Manifest polling logic
We recommend adopting a polling logic similar to the following. Depending on your application, you may need to alter the wait times between polling. IN polling requests, we reccomend- Create your manifest.
- Wait for 3 seconds.
- Retrieve manifest status.
- If
"status": "SUCCESS", stop polling. If"status": "QUEUED"wait 10 seconds. - Retrieve manifest status.
- If
"status": "SUCCESS", stop polling. If"status": "QUEUED"wait 30 seconds. - Retrieve manifest status.
- If
"status": "SUCCESS", stop polling. If"status": "QUEUED"wait 1 minute. - Retrieve manifest status.
- If
"status": "SUCCESS", stop polling. If"status": "QUEUED"wait 5 minutes. - And so on until
"status": "SUCCESS".
NoteWe have verified this polling sequence for a number of carriers including DHL eCommerce. For a best experience, we recommend implementing the entire sequence.