ShipStation API v2 (2.0.0)

Download OpenAPI description
Overview
License MIT
Languages
Servers
Mock server
https://docs.shipstation.com/_mock/openapi/
Production
https://api.shipstation.com/

Batches

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.

Operations

List batches

Request

List Batches associated with your ShipStation account

Query
statusstring(batch_status)

The possible batch status values

Enum"open""queued""processing""completed""completed_with_errors""archived""notifying""invalid"
pageinteger(int32)>= 1

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.

Default 1
Example: page=2
page_sizeinteger(int32)>= 1

The number of results to return per response.

Default 25
Example: page_size=50
sort_dirstring(sort_dir)

Controls the sort order of the query.

Default "desc"
Enum"asc""desc"
batch_numberstring

Batch Number

sort_bystring(batches_sort_by)

The possible batches sort by values

Enum"ship_date""processed_at""created_at"
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'

Responses

The request was a success.

Bodyapplication/json
batchesArray of objects(batch)>= 0 itemsread-onlyrequired

Batch List

batches[].​label_layoutstring(label_layout)read-onlyrequired

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.

Default "4x6"
Enum"4x6""letter"
batches[].​label_formatstring(label_format)read-onlyrequired

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 FormatSupported Carriers
pdfAll carriers
pngfedex
stamps_com
ups
usps
zplaccess_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
Default "pdf"
Enum"pdf""png""zpl"
batches[].​batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-onlyrequired

A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.

Example: "se-28529731"
batches[].​batch_numberstring>= 0 charactersread-onlyrequired

The batch number.

Example: "123456"
batches[].​external_batch_idstring or null>= 0 charactersread-onlyrequired

A string that uniquely identifies the external batch

Example: "12323aaaar"
batches[].​batch_notesstring or nullread-onlyrequired

Custom notes you can add for each created batch

Default ""
Example: "Batch for morning shipment"
batches[].​created_atstring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-onlyrequired

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
batches[].​processed_atstring or null(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-onlyrequired

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
batches[].​errorsinteger(int32)>= 0read-onlyrequired

The number of errors that occurred while generating the batch

Example: 2
batches[].​process_errorsArray of objects(error)read-onlyrequired

The errors associated with the failed API call

batches[].​process_errors[].​error_sourcestring(error_source)required

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.

Enum"carrier""order_source""ShipStation"
batches[].​process_errors[].​error_typestring(error_type)required

The type of error

Enum"account_status""business_rules""validation""security""system""integrations"
batches[].​process_errors[].​error_codestring(error_code)required

The error code specified for the failed API Call

Enum"auto_fund_not_supported""batch_cannot_be_modified""carrier_conflict""carrier_disconnected""carrier_not_connected""carrier_not_supported""confirmation_not_supported""default_warehouse_cannot_be_deleted""field_conflict""field_value_required"
batches[].​process_errors[].​messagestringnon-emptyread-onlyrequired

An error message associated with the failed API call

Example: "Body of request cannot be null."
batches[].​warningsinteger(int32)>= 0read-onlyrequired

The number of warnings that occurred while generating the batch

Example: 1
batches[].​completedinteger(int32)>= 0read-onlyrequired

The number of labels generated in the batch

Example: 1
batches[].​formsinteger(int32)>= 0read-onlyrequired

The number of forms for customs that are available for download

Example: 3
batches[].​countinteger(int32)>= 0read-onlyrequired

The total of errors, warnings, and completed properties

Example: 2
batches[].​batch_shipments_urlobject(optional_link)required

A link to a related resource, or an empty object if there is no resource to link to

batches[].​batch_shipments_url.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batches[].​batch_shipments_url.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
batches[].​batch_labels_urlobject(optional_link)required

A link to a related resource, or an empty object if there is no resource to link to

batches[].​batch_labels_url.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batches[].​batch_labels_url.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
batches[].​batch_errors_urlobject(optional_link)read-onlyrequired

A link to a related resource, or an empty object if there is no resource to link to

batches[].​batch_errors_url.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batches[].​batch_errors_url.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
batches[].​label_downloadobject(label_download)read-onlyrequired

Reference to the various downloadable file formats for the generated label

batches[].​label_download.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batches[].​label_download.​pdfstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batches[].​label_download.​pngstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batches[].​label_download.​zplstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batches[].​form_downloadobject(optional_link)read-onlyrequired

A link to a related resource, or an empty object if there is no resource to link to

batches[].​form_download.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batches[].​form_download.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
batches[].​paperless_downloadobject(paperless_download)read-onlyrequired

The paperless details which may contain elements like href, instructions and handoff_code.

batches[].​paperless_download.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batches[].​paperless_download.​instructionsstring or null

The instructions for the paperless download.

Default null
Example: "any instructions"
batches[].​paperless_download.​handoff_codestring or null

The handoff code for the paperless download.

Default null
Example: "122334"
batches[].​statusstring(batch_status)read-onlyrequired

The possible batch status values

Enum"open""queued""processing""completed""completed_with_errors""archived""notifying""invalid"
totalinteger(int64)>= 0read-onlyrequired

The total number of batches the API call returned

Example: 10
pageinteger(int32)>= 1read-onlyrequired

The page that is currently being read

Example: 1
pagesinteger(int32)>= 1read-onlyrequired

The total number of batch pages the API call returned

Example: 10
linksobject(pagination_link)read-onlyrequired

Helpful links to other pages of results

links.​firstobject(link)required

A link to a related resource, or an empty object if there is no resource to link to

links.​first.​hrefstring(url)(url)non-emptyrequired

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
links.​first.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
links.​lastobject(link)required

A link to a related resource, or an empty object if there is no resource to link to

links.​last.​hrefstring(url)(url)non-emptyrequired

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
links.​last.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
links.​prevobject(optional_link)required

A link to a related resource, or an empty object if there is no resource to link to

links.​prev.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
links.​prev.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
links.​nextobject(optional_link)required

A link to a related resource, or an empty object if there is no resource to link to

links.​next.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
links.​next.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
Response
application/json
{ "batches": [ {} ], "total": 10, "page": 1, "pages": 10, "links": { "first": {}, "last": {}, "prev": {}, "next": {} } }

Create a batch

Request

Create a Batch

Bodyapplication/jsonrequired
One of:

A create batch request body

external_batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$

A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.

Example: "se-28529731"
batch_notesstringnon-empty

Add custom messages for a particular batch

Example: "This is my batch"
shipment_idsArray of strings(se_id)

Array of shipment IDs used in the batch

Example: ["se-28529731"]
rate_idsArray of strings(se_id)

Array of rate IDs used in the batch

Example: ["se-28529731"]
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"
    ]
  }'

Responses

The requested object creation was a success.

Bodyapplication/json
label_layoutstring(label_layout)read-onlyrequired

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.

Default "4x6"
Enum"4x6""letter"
label_formatstring(label_format)read-onlyrequired

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 FormatSupported Carriers
pdfAll carriers
pngfedex
stamps_com
ups
usps
zplaccess_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
Default "pdf"
Enum"pdf""png""zpl"
batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-onlyrequired

A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.

Example: "se-28529731"
batch_numberstring>= 0 charactersread-onlyrequired

The batch number.

Example: "123456"
external_batch_idstring or null>= 0 charactersread-onlyrequired

A string that uniquely identifies the external batch

Example: "12323aaaar"
batch_notesstring or nullread-onlyrequired

Custom notes you can add for each created batch

Default ""
Example: "Batch for morning shipment"
created_atstring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-onlyrequired

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
processed_atstring or null(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-onlyrequired

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
errorsinteger(int32)>= 0read-onlyrequired

The number of errors that occurred while generating the batch

Example: 2
process_errorsArray of objects(error)read-onlyrequired

The errors associated with the failed API call

process_errors[].​error_sourcestring(error_source)required

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.

Enum"carrier""order_source""ShipStation"
process_errors[].​error_typestring(error_type)required

The type of error

Enum"account_status""business_rules""validation""security""system""integrations"
process_errors[].​error_codestring(error_code)required

The error code specified for the failed API Call

Enum"auto_fund_not_supported""batch_cannot_be_modified""carrier_conflict""carrier_disconnected""carrier_not_connected""carrier_not_supported""confirmation_not_supported""default_warehouse_cannot_be_deleted""field_conflict""field_value_required"
process_errors[].​messagestringnon-emptyread-onlyrequired

An error message associated with the failed API call

Example: "Body of request cannot be null."
warningsinteger(int32)>= 0read-onlyrequired

The number of warnings that occurred while generating the batch

Example: 1
completedinteger(int32)>= 0read-onlyrequired

The number of labels generated in the batch

Example: 1
formsinteger(int32)>= 0read-onlyrequired

The number of forms for customs that are available for download

Example: 3
countinteger(int32)>= 0read-onlyrequired

The total of errors, warnings, and completed properties

Example: 2
batch_shipments_urlobject(optional_link)required

A link to a related resource, or an empty object if there is no resource to link to

batch_shipments_url.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batch_shipments_url.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
batch_labels_urlobject(optional_link)required

A link to a related resource, or an empty object if there is no resource to link to

batch_labels_url.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batch_labels_url.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
batch_errors_urlobject(optional_link)read-onlyrequired

A link to a related resource, or an empty object if there is no resource to link to

batch_errors_url.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batch_errors_url.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
label_downloadobject(label_download)read-onlyrequired

Reference to the various downloadable file formats for the generated label

label_download.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
label_download.​pdfstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
label_download.​pngstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
label_download.​zplstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
form_downloadobject(optional_link)read-onlyrequired

A link to a related resource, or an empty object if there is no resource to link to

form_download.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
form_download.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
paperless_downloadobject(paperless_download)read-onlyrequired

The paperless details which may contain elements like href, instructions and handoff_code.

paperless_download.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
paperless_download.​instructionsstring or null

The instructions for the paperless download.

Default null
Example: "any instructions"
paperless_download.​handoff_codestring or null

The handoff code for the paperless download.

Default null
Example: "122334"
statusstring(batch_status)read-onlyrequired

The possible batch status values

Enum"open""queued""processing""completed""completed_with_errors""archived""notifying""invalid"
Response
application/json
{ "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" }

Get batch by external id

Request

Get Batch By External ID

Path
external_batch_idstringrequired
Example: 13553d7f-3c87-4771-bae1-c49bacef11cb
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'

Responses

The request was a success.

Bodyapplication/json
label_layoutstring(label_layout)read-onlyrequired

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.

Default "4x6"
Enum"4x6""letter"
label_formatstring(label_format)read-onlyrequired

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 FormatSupported Carriers
pdfAll carriers
pngfedex
stamps_com
ups
usps
zplaccess_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
Default "pdf"
Enum"pdf""png""zpl"
batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-onlyrequired

A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.

Example: "se-28529731"
batch_numberstring>= 0 charactersread-onlyrequired

The batch number.

Example: "123456"
external_batch_idstring or null>= 0 charactersread-onlyrequired

A string that uniquely identifies the external batch

Example: "12323aaaar"
batch_notesstring or nullread-onlyrequired

Custom notes you can add for each created batch

Default ""
Example: "Batch for morning shipment"
created_atstring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-onlyrequired

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
processed_atstring or null(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-onlyrequired

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
errorsinteger(int32)>= 0read-onlyrequired

The number of errors that occurred while generating the batch

Example: 2
process_errorsArray of objects(error)read-onlyrequired

The errors associated with the failed API call

process_errors[].​error_sourcestring(error_source)required

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.

Enum"carrier""order_source""ShipStation"
process_errors[].​error_typestring(error_type)required

The type of error

Enum"account_status""business_rules""validation""security""system""integrations"
process_errors[].​error_codestring(error_code)required

The error code specified for the failed API Call

Enum"auto_fund_not_supported""batch_cannot_be_modified""carrier_conflict""carrier_disconnected""carrier_not_connected""carrier_not_supported""confirmation_not_supported""default_warehouse_cannot_be_deleted""field_conflict""field_value_required"
process_errors[].​messagestringnon-emptyread-onlyrequired

An error message associated with the failed API call

Example: "Body of request cannot be null."
warningsinteger(int32)>= 0read-onlyrequired

The number of warnings that occurred while generating the batch

Example: 1
completedinteger(int32)>= 0read-onlyrequired

The number of labels generated in the batch

Example: 1
formsinteger(int32)>= 0read-onlyrequired

The number of forms for customs that are available for download

Example: 3
countinteger(int32)>= 0read-onlyrequired

The total of errors, warnings, and completed properties

Example: 2
batch_shipments_urlobject(optional_link)required

A link to a related resource, or an empty object if there is no resource to link to

batch_shipments_url.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batch_shipments_url.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
batch_labels_urlobject(optional_link)required

A link to a related resource, or an empty object if there is no resource to link to

batch_labels_url.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batch_labels_url.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
batch_errors_urlobject(optional_link)read-onlyrequired

A link to a related resource, or an empty object if there is no resource to link to

batch_errors_url.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batch_errors_url.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
label_downloadobject(label_download)read-onlyrequired

Reference to the various downloadable file formats for the generated label

label_download.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
label_download.​pdfstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
label_download.​pngstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
label_download.​zplstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
form_downloadobject(optional_link)read-onlyrequired

A link to a related resource, or an empty object if there is no resource to link to

form_download.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
form_download.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
paperless_downloadobject(paperless_download)read-onlyrequired

The paperless details which may contain elements like href, instructions and handoff_code.

paperless_download.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
paperless_download.​instructionsstring or null

The instructions for the paperless download.

Default null
Example: "any instructions"
paperless_download.​handoff_codestring or null

The handoff code for the paperless download.

Default null
Example: "122334"
statusstring(batch_status)read-onlyrequired

The possible batch status values

Enum"open""queued""processing""completed""completed_with_errors""archived""notifying""invalid"
Response
application/json
{ "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" }

Delete batch by id

Request

Delete Batch By Id

Path
batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$required

Batch ID

Example: se-28529731
curl -i -X DELETE \
  'https://docs.shipstation.com/_mock/openapi/v2/batches/{batch_id}' \
  -H 'api-key: YOUR_API_KEY_HERE'

Responses

The request was successful.

Body
string(empty_response_body)<= 0 characters
Response
No response example

Get batch by id

Request

Get Batch By ID

Path
batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$required

Batch ID

Example: se-28529731
curl -i -X GET \
  'https://docs.shipstation.com/_mock/openapi/v2/batches/{batch_id}' \
  -H 'api-key: YOUR_API_KEY_HERE'

Responses

The request was a success.

Bodyapplication/json
label_layoutstring(label_layout)read-onlyrequired

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.

Default "4x6"
Enum"4x6""letter"
label_formatstring(label_format)read-onlyrequired

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 FormatSupported Carriers
pdfAll carriers
pngfedex
stamps_com
ups
usps
zplaccess_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
Default "pdf"
Enum"pdf""png""zpl"
batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-onlyrequired

A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.

Example: "se-28529731"
batch_numberstring>= 0 charactersread-onlyrequired

The batch number.

Example: "123456"
external_batch_idstring or null>= 0 charactersread-onlyrequired

A string that uniquely identifies the external batch

Example: "12323aaaar"
batch_notesstring or nullread-onlyrequired

Custom notes you can add for each created batch

Default ""
Example: "Batch for morning shipment"
created_atstring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-onlyrequired

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
processed_atstring or null(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-onlyrequired

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
errorsinteger(int32)>= 0read-onlyrequired

The number of errors that occurred while generating the batch

Example: 2
process_errorsArray of objects(error)read-onlyrequired

The errors associated with the failed API call

process_errors[].​error_sourcestring(error_source)required

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.

Enum"carrier""order_source""ShipStation"
process_errors[].​error_typestring(error_type)required

The type of error

Enum"account_status""business_rules""validation""security""system""integrations"
process_errors[].​error_codestring(error_code)required

The error code specified for the failed API Call

Enum"auto_fund_not_supported""batch_cannot_be_modified""carrier_conflict""carrier_disconnected""carrier_not_connected""carrier_not_supported""confirmation_not_supported""default_warehouse_cannot_be_deleted""field_conflict""field_value_required"
process_errors[].​messagestringnon-emptyread-onlyrequired

An error message associated with the failed API call

Example: "Body of request cannot be null."
warningsinteger(int32)>= 0read-onlyrequired

The number of warnings that occurred while generating the batch

Example: 1
completedinteger(int32)>= 0read-onlyrequired

The number of labels generated in the batch

Example: 1
formsinteger(int32)>= 0read-onlyrequired

The number of forms for customs that are available for download

Example: 3
countinteger(int32)>= 0read-onlyrequired

The total of errors, warnings, and completed properties

Example: 2
batch_shipments_urlobject(optional_link)required

A link to a related resource, or an empty object if there is no resource to link to

batch_shipments_url.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batch_shipments_url.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
batch_labels_urlobject(optional_link)required

A link to a related resource, or an empty object if there is no resource to link to

batch_labels_url.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batch_labels_url.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
batch_errors_urlobject(optional_link)read-onlyrequired

A link to a related resource, or an empty object if there is no resource to link to

batch_errors_url.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
batch_errors_url.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
label_downloadobject(label_download)read-onlyrequired

Reference to the various downloadable file formats for the generated label

label_download.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
label_download.​pdfstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
label_download.​pngstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
label_download.​zplstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
form_downloadobject(optional_link)read-onlyrequired

A link to a related resource, or an empty object if there is no resource to link to

form_download.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
form_download.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
paperless_downloadobject(paperless_download)read-onlyrequired

The paperless details which may contain elements like href, instructions and handoff_code.

paperless_download.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
paperless_download.​instructionsstring or null

The instructions for the paperless download.

Default null
Example: "any instructions"
paperless_download.​handoff_codestring or null

The handoff code for the paperless download.

Default null
Example: "122334"
statusstring(batch_status)read-onlyrequired

The possible batch status values

Enum"open""queued""processing""completed""completed_with_errors""archived""notifying""invalid"
Response
application/json
{ "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" }

Update batch by id

Request

Update Batch By Id

Path
batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$required

Batch ID

Example: se-28529731
curl -i -X PUT \
  'https://docs.shipstation.com/_mock/openapi/v2/batches/{batch_id}' \
  -H 'api-key: YOUR_API_KEY_HERE'

Responses

The request was successful.

Body
string(empty_response_body)<= 0 characters
Response
No response example

Add to a batch

Request

Add a Shipment or Rate to a Batch

Path
batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$required

Batch ID

Example: se-28529731
Bodyapplication/jsonrequired
external_batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$

A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.

Example: "se-28529731"
batch_notesstringnon-empty

Add custom messages for a particular batch

Example: "This is my batch"
shipment_idsArray of strings(se_id)

Array of shipment IDs used in the batch

Example: ["se-28529731"]
rate_idsArray of strings(se_id)

Array of rate IDs used in the batch

Example: ["se-28529731"]
process_labelsobject

The information used to process the batch

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"
    }
  }'

Responses

The request was successful.

Body
string(empty_response_body)<= 0 characters
Response
No response example

Get batch errors

Request

Error handling in batches are handled differently than in a single synchronous request. You must retrieve the status of your batch by [getting a batch] and getting an overview of the statuses or you can list errors directly here below to get detailed information about the errors.

Path
batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$required

Batch ID

Example: se-28529731
Query
pageinteger(int32)>= 1

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.

Default 1
Example: page=2
pagesizeinteger(int32)>= 1
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'

Responses

The request was a success.

Bodyapplication/json
errorsArray of objects(batch_response_error)read-onlyrequired

The errors currently associated with the batch

Default []
errors[].​errorstringnon-emptyread-only

Error message associated with the shipment.

Example: "Recipient address has not been verified."
errors[].​shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

A string that uniquely identifies a ShipStation resource, such as a carrier, label, shipment, etc.

Example: "se-28529731"
errors[].​external_shipment_idstringread-only

An external shipment id associated with the shipment

Example: "1234567"
linksobject(pagination_link)read-onlyrequired

Helpful links to other pages of results

links.​firstobject(link)required

A link to a related resource, or an empty object if there is no resource to link to

links.​first.​hrefstring(url)(url)non-emptyrequired

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
links.​first.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
links.​lastobject(link)required

A link to a related resource, or an empty object if there is no resource to link to

links.​last.​hrefstring(url)(url)non-emptyrequired

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
links.​last.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
links.​prevobject(optional_link)required

A link to a related resource, or an empty object if there is no resource to link to

links.​prev.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
links.​prev.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
links.​nextobject(optional_link)required

A link to a related resource, or an empty object if there is no resource to link to

links.​next.​hrefstring(url)(url)non-empty

A URL

Example: "http://api.shipstation.com/v2/labels/se-28529731"
links.​next.​typestringnon-empty

The type of resource, or the type of relationship to the parent resource

Example: "child"
Response
application/json
{ "errors": [], "links": { "first": {}, "last": {}, "prev": {}, "next": {} } }

Process batch id labels

Request

Process Batch ID Labels

Path
batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$required

Batch ID

Example: se-28529731
Bodyapplication/jsonrequired
ship_datestring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
label_layoutstring(label_layout)

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.

Default "4x6"
Enum"4x6""letter"
label_formatstring(label_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 FormatSupported Carriers
pdfAll carriers
pngfedex
stamps_com
ups
usps
zplaccess_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
Default "pdf"
Enum"pdf""png""zpl"
display_schemestring(display_scheme)

The display format that the label should be shown in.

Default "label"
Enum"label""qr_code""label_and_qr_code""paperless""label_and_paperless"
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"
  }'

Responses

The request was successful.

Body
string(empty_response_body)<= 0 characters
Response
No response example

Remove from batch

Request

Remove a shipment or rate from a batch

Path
batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$required

Batch ID

Example: se-28529731
Bodyapplication/jsonrequired
shipment_idsArray of strings(se_id)

The Shipment Ids to be modified on the batch

Example: ["se-28529731"]
rate_idsArray of strings(se_id)

Array of Rate IDs to be modifed on the batch

Example: ["se-28529731"]
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"
    ]
  }'

Responses

The request was successful.

Body
string(empty_response_body)<= 0 characters
Response
No response example

Carriers

Retreive useful details about the carriers connected to your accounts, including carrier IDs, service IDs, advanced options, and available carrier package types.

Operations

Downloads

Download your label files in PDF, PNG, and ZPL.

Operations

Labels

Purchase and print shipping labels for any carrier active on your account. The labels endpoint also supports creating return labels, voiding labels, and getting label details like tracking.

Operations

Manifests

A manifest is a document that provides a list of the day's shipments. It typically contains a barcode that allows the pickup driver to scan a single document to register all shipments, rather than scanning each shipment individually.

Operations

Package Pickups

Scheduled pickups and manage pickup requests for supported carriers.

Operations

Package Types

Create custom package types to use for your shipments, rather than the carriers' default package types.

Operations

Rates

Quickly compare rates using the Rates endpoint. You can see and compare rates for the carriers connected to your account (as long as they support sending rates).

Operations

Shipments

Shipments are at the core of most ShipStation capabilities. Shipment objects are required for cretaing labels and manifests, as well as getting rates.

Operations

Tags

Tags are text-based identifiers you can add to shipments to help in your shipment management workflows.

Operations

Tracking

Use the tracking endpoint to stop receiving tracking updates (more dedicated tracking endpoint methods coming soon).

Operations

Warehouses

Get warehouse details like warehouse ID and related addresses using the warehouses endpoint.

Operations

Webhooks

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.

Operations