Process labels in bulk and receive a large number of labels and customs forms in bulk responses. Batching is ideal for workflows that need to process hundreds or thousands of labels quickly.
The possible batch status values
Return a specific page of results. Defaults to the first page. If set to a number that's greater than the number of pages of results, an empty page is returned.
The number of results to return per response.
curl -i -X GET \ 'https://docs.shipstation.com/_mock/openapi/v2/batches?batch_number=string&page=1&page_size=25&sort_by=ship_date&sort_dir=desc&status=open' \ -H 'api-key: YOUR_API_KEY_HERE'
The request was a success.
Batch List
The available layouts (sizes) in which shipping labels can be downloaded. The label format determines which sizes are supported. 4x6
is supported for all label formats, whereas letter
(8.5" x 11") is only supported for pdf
format.
The possible file formats in which shipping labels can be downloaded. We recommend pdf
format because it is supported by all carriers, whereas some carriers do not support the png
or zpl
formats.
Label Format | Supported Carriers |
---|---|
pdf | All carriers |
png | fedex stamps_com ups usps |
zpl | access_worldwide apc asendia dhl_global_mail dhl_express dhl_express_australia dhl_express_canada dhl_express_worldwide dhl_express_uk dpd endicia fedex fedex_uk firstmile imex newgistics ontrac rr_donnelley stamps_com ups usps |
A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.
A string that uniquely identifies the external batch
Custom notes you can add for each created batch
An ISO 8601 string that represents a date and time.
An ISO 8601 string that represents a date and time.
The number of errors that occurred while generating the batch
The errors associated with the failed API call
The source of the error, as indicated by the name this informs us if the API call failed because of the carrier, the order source, or the ShipStation API itself.
The type of error
The error code specified for the failed API Call
The number of warnings that occurred while generating the batch
The number of labels generated in the batch
The number of forms for customs that are available for download
The total of errors, warnings, and completed properties
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
Reference to the various downloadable file formats for the generated label
A URL
A URL
A URL
A link to a related resource, or an empty object if there is no resource to link to
The paperless details which may contain elements like href
, instructions
and handoff_code
.
A URL
The instructions for the paperless download.
The total number of batches the API call returned
The total number of batch pages the API call returned
Helpful links to other pages of results
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
{ "batches": [ { … } ], "total": 10, "page": 1, "pages": 10, "links": { "first": { … }, "last": { … }, "prev": { … }, "next": { … } } }
A create batch request body
A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.
curl -i -X POST \ https://docs.shipstation.com/_mock/openapi/v2/batches \ -H 'Content-Type: application/json' \ -H 'api-key: YOUR_API_KEY_HERE' \ -d '{ "external_batch_id": "se-28529731", "batch_notes": "This is my batch", "shipment_ids": [ "se-28529731" ], "rate_ids": [ "se-28529731" ] }'
The requested object creation was a success.
The available layouts (sizes) in which shipping labels can be downloaded. The label format determines which sizes are supported. 4x6
is supported for all label formats, whereas letter
(8.5" x 11") is only supported for pdf
format.
The possible file formats in which shipping labels can be downloaded. We recommend pdf
format because it is supported by all carriers, whereas some carriers do not support the png
or zpl
formats.
Label Format | Supported Carriers |
---|---|
pdf | All carriers |
png | fedex stamps_com ups usps |
zpl | access_worldwide apc asendia dhl_global_mail dhl_express dhl_express_australia dhl_express_canada dhl_express_worldwide dhl_express_uk dpd endicia fedex fedex_uk firstmile imex newgistics ontrac rr_donnelley stamps_com ups usps |
A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.
A string that uniquely identifies the external batch
Custom notes you can add for each created batch
An ISO 8601 string that represents a date and time.
An ISO 8601 string that represents a date and time.
The number of errors that occurred while generating the batch
The errors associated with the failed API call
The source of the error, as indicated by the name this informs us if the API call failed because of the carrier, the order source, or the ShipStation API itself.
The type of error
The error code specified for the failed API Call
The number of warnings that occurred while generating the batch
The number of forms for customs that are available for download
The total of errors, warnings, and completed properties
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
Reference to the various downloadable file formats for the generated label
A URL
A URL
A URL
A link to a related resource, or an empty object if there is no resource to link to
The paperless details which may contain elements like href
, instructions
and handoff_code
.
A URL
The instructions for the paperless download.
{ "label_layout": "4x6", "label_format": "pdf", "batch_id": "se-28529731", "batch_number": "123456", "external_batch_id": "12323aaaar", "batch_notes": "Batch for morning shipment", "created_at": "2018-09-23T15:00:00.000Z", "processed_at": "2018-09-23T15:00:00.000Z", "errors": 2, "process_errors": [ { … } ], "warnings": 1, "completed": 1, "forms": 3, "count": 2, "batch_shipments_url": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "batch_labels_url": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "batch_errors_url": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "label_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "pdf": "http://api.shipstation.com/v2/labels/se-28529731", "png": "http://api.shipstation.com/v2/labels/se-28529731", "zpl": "http://api.shipstation.com/v2/labels/se-28529731" }, "form_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "paperless_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "instructions": "any instructions", "handoff_code": "122334" }, "status": "open" }
curl -i -X GET \ 'https://docs.shipstation.com/_mock/openapi/v2/batches/external_batch_id/{external_batch_id}' \ -H 'api-key: YOUR_API_KEY_HERE'
The request was a success.
The available layouts (sizes) in which shipping labels can be downloaded. The label format determines which sizes are supported. 4x6
is supported for all label formats, whereas letter
(8.5" x 11") is only supported for pdf
format.
The possible file formats in which shipping labels can be downloaded. We recommend pdf
format because it is supported by all carriers, whereas some carriers do not support the png
or zpl
formats.
Label Format | Supported Carriers |
---|---|
pdf | All carriers |
png | fedex stamps_com ups usps |
zpl | access_worldwide apc asendia dhl_global_mail dhl_express dhl_express_australia dhl_express_canada dhl_express_worldwide dhl_express_uk dpd endicia fedex fedex_uk firstmile imex newgistics ontrac rr_donnelley stamps_com ups usps |
A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.
A string that uniquely identifies the external batch
Custom notes you can add for each created batch
An ISO 8601 string that represents a date and time.
An ISO 8601 string that represents a date and time.
The number of errors that occurred while generating the batch
The errors associated with the failed API call
The source of the error, as indicated by the name this informs us if the API call failed because of the carrier, the order source, or the ShipStation API itself.
The type of error
The error code specified for the failed API Call
The number of warnings that occurred while generating the batch
The number of forms for customs that are available for download
The total of errors, warnings, and completed properties
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
Reference to the various downloadable file formats for the generated label
A URL
A URL
A URL
A link to a related resource, or an empty object if there is no resource to link to
The paperless details which may contain elements like href
, instructions
and handoff_code
.
A URL
The instructions for the paperless download.
{ "label_layout": "4x6", "label_format": "pdf", "batch_id": "se-28529731", "batch_number": "123456", "external_batch_id": "12323aaaar", "batch_notes": "Batch for morning shipment", "created_at": "2018-09-23T15:00:00.000Z", "processed_at": "2018-09-23T15:00:00.000Z", "errors": 2, "process_errors": [ { … } ], "warnings": 1, "completed": 1, "forms": 3, "count": 2, "batch_shipments_url": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "batch_labels_url": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "batch_errors_url": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "label_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "pdf": "http://api.shipstation.com/v2/labels/se-28529731", "png": "http://api.shipstation.com/v2/labels/se-28529731", "zpl": "http://api.shipstation.com/v2/labels/se-28529731" }, "form_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "paperless_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "instructions": "any instructions", "handoff_code": "122334" }, "status": "open" }
curl -i -X DELETE \ 'https://docs.shipstation.com/_mock/openapi/v2/batches/{batch_id}' \ -H 'api-key: YOUR_API_KEY_HERE'
No response example
curl -i -X GET \ 'https://docs.shipstation.com/_mock/openapi/v2/batches/{batch_id}' \ -H 'api-key: YOUR_API_KEY_HERE'
The request was a success.
The available layouts (sizes) in which shipping labels can be downloaded. The label format determines which sizes are supported. 4x6
is supported for all label formats, whereas letter
(8.5" x 11") is only supported for pdf
format.
The possible file formats in which shipping labels can be downloaded. We recommend pdf
format because it is supported by all carriers, whereas some carriers do not support the png
or zpl
formats.
Label Format | Supported Carriers |
---|---|
pdf | All carriers |
png | fedex stamps_com ups usps |
zpl | access_worldwide apc asendia dhl_global_mail dhl_express dhl_express_australia dhl_express_canada dhl_express_worldwide dhl_express_uk dpd endicia fedex fedex_uk firstmile imex newgistics ontrac rr_donnelley stamps_com ups usps |
A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.
A string that uniquely identifies the external batch
Custom notes you can add for each created batch
An ISO 8601 string that represents a date and time.
An ISO 8601 string that represents a date and time.
The number of errors that occurred while generating the batch
The errors associated with the failed API call
The source of the error, as indicated by the name this informs us if the API call failed because of the carrier, the order source, or the ShipStation API itself.
The type of error
The error code specified for the failed API Call
The number of warnings that occurred while generating the batch
The number of forms for customs that are available for download
The total of errors, warnings, and completed properties
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
Reference to the various downloadable file formats for the generated label
A URL
A URL
A URL
A link to a related resource, or an empty object if there is no resource to link to
The paperless details which may contain elements like href
, instructions
and handoff_code
.
A URL
The instructions for the paperless download.
{ "label_layout": "4x6", "label_format": "pdf", "batch_id": "se-28529731", "batch_number": "123456", "external_batch_id": "12323aaaar", "batch_notes": "Batch for morning shipment", "created_at": "2018-09-23T15:00:00.000Z", "processed_at": "2018-09-23T15:00:00.000Z", "errors": 2, "process_errors": [ { … } ], "warnings": 1, "completed": 1, "forms": 3, "count": 2, "batch_shipments_url": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "batch_labels_url": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "batch_errors_url": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "label_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "pdf": "http://api.shipstation.com/v2/labels/se-28529731", "png": "http://api.shipstation.com/v2/labels/se-28529731", "zpl": "http://api.shipstation.com/v2/labels/se-28529731" }, "form_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "paperless_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "instructions": "any instructions", "handoff_code": "122334" }, "status": "open" }
curl -i -X PUT \ 'https://docs.shipstation.com/_mock/openapi/v2/batches/{batch_id}' \ -H 'api-key: YOUR_API_KEY_HERE'
No response example
A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.
curl -i -X POST \ 'https://docs.shipstation.com/_mock/openapi/v2/batches/{batch_id}/add' \ -H 'Content-Type: application/json' \ -H 'api-key: YOUR_API_KEY_HERE' \ -d '{ "external_batch_id": "se-123456", "batch_notes": "This is my batch", "shipment_ids": [ "se-28529731" ], "rate_ids": [ "se-28529731" ], "process_labels": { "create_batch_and_process_labels": true, "ship_date": "2018-09-23T15:00:00.000Z", "label_layout": "4x6", "label_format": "pdf", "display_scheme": "label" } }'
No response example
curl -i -X GET \ 'https://docs.shipstation.com/_mock/openapi/v2/batches/{batch_id}/errors?page=1&pagesize=1' \ -H 'api-key: YOUR_API_KEY_HERE'
The request was a success.
The errors currently associated with the batch
Error message associated with the shipment.
A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.
Helpful links to other pages of results
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
A link to a related resource, or an empty object if there is no resource to link to
{ "errors": [], "links": { "first": { … }, "last": { … }, "prev": { … }, "next": { … } } }
An ISO 8601 string that represents a date and time.
The available layouts (sizes) in which shipping labels can be downloaded. The label format determines which sizes are supported. 4x6
is supported for all label formats, whereas letter
(8.5" x 11") is only supported for pdf
format.
The possible file formats in which shipping labels can be downloaded. We recommend pdf
format because it is supported by all carriers, whereas some carriers do not support the png
or zpl
formats.
Label Format | Supported Carriers |
---|---|
pdf | All carriers |
png | fedex stamps_com ups usps |
zpl | access_worldwide apc asendia dhl_global_mail dhl_express dhl_express_australia dhl_express_canada dhl_express_worldwide dhl_express_uk dpd endicia fedex fedex_uk firstmile imex newgistics ontrac rr_donnelley stamps_com ups usps |
curl -i -X POST \ 'https://docs.shipstation.com/_mock/openapi/v2/batches/{batch_id}/process/labels' \ -H 'Content-Type: application/json' \ -H 'api-key: YOUR_API_KEY_HERE' \ -d '{ "ship_date": "2018-09-23T15:00:00.000Z", "label_layout": "4x6", "label_format": "pdf", "display_scheme": "label" }'
No response example
The Shipment Ids to be modified on the batch
curl -i -X POST \ 'https://docs.shipstation.com/_mock/openapi/v2/batches/{batch_id}/remove' \ -H 'Content-Type: application/json' \ -H 'api-key: YOUR_API_KEY_HERE' \ -d '{ "shipment_ids": [ "se-28529731" ], "rate_ids": [ "se-28529731" ] }'
No response example
Webhooks are a powerful feature that can save you from sending repeated polling requests to check on the state of something. With webhooks, ShipStation will automatically contact your servers when the stage changes. This can include parcel tracking events, notification when a batch operation completes, and more.