Skip to content

ShipEngine API (1.1.202604070904)

ShipEngine's easy-to-use REST API lets you manage all of your shipping needs without worrying about the complexities of different carrier APIs and protocols. We handle all the heavy lifting so you can focus on providing a first-class shipping experience for your customers at the best possible prices.

Each of ShipEngine's features can be used by itself or in conjunction with each other to build powerful shipping functionality into your application or service.

Download OpenAPI description
Languages
Servers
Mock server
https://docs.shipstation.com/_mock/apis/shipengine/openapi/
https://api.shipengine.com/

Account

For additional information about the ShipEngine account.

Operations

Addresses

No matter your shipping volume, failed deliveries and address change surcharges cut into your bottom line and damage perception with customers. Our address validation services ensure your packages make it to the right place the first time. Learn how to leverage our address validation services here.

ShipEngine supports address validation for virtually every country on Earth, including the United States, Canada, Great Britain, Australia, Germany, France, Norway, Spain, Sweden, Israel, Italy, and over 160 others.

Operations

Batches

batches

Operations

List batches

Request

List Batches associated with your Shipengine account

Security
api_key
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

created_at_startstring(date-time)

Only return batches that were created on or after a specific date/time

Example: created_at_start=2019-03-12T19:24:13.657Z
created_at_endstring(date-time)

Only return batches that were created on or before a specific date/time

Example: created_at_end=2019-03-12T19:24:13.657Z
processed_at_startstring(date-time)

Only return batches that were processed on or after a specific date/time

Example: processed_at_start=2019-03-12T19:24:13.657Z
processed_at_endstring(date-time)

Only return batches that were processed on or before a specific date/time

Example: processed_at_end=2019-03-12T19:24:13.657Z
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/apis/shipengine/openapi/v1/batches?status=open&page=2&page_size=50&sort_dir=desc&batch_number=string&created_at_start=2019-03-12T19%3A24%3A13.657Z&created_at_end=2019-03-12T19%3A24%3A13.657Z&processed_at_start=2019-03-12T19%3A24%3A13.657Z&processed_at_end=2019-03-12T19%3A24%3A13.657Z&sort_by=ship_date' \
  -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""A4""A6"
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 the batch

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

The batch number.

batches[].​external_batch_idstring or null>= 0 charactersread-onlyrequired

A string that uniquely identifies the external batch

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 ShipEngine API itself.

Enum"carrier""order_source""shipengine"
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[].​process_errors[].​carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

A string that uniquely identifies the carrier that generated the error.

Example: "se-28529731"
batches[].​process_errors[].​carrier_codestring(carrier_code)^[a-z0-9]+(_[a-z0-9]+)*$read-only

A shipping carrier, such as fedex, dhl_express, stamps_com, etc.

Example: "dhl_express"
batches[].​process_errors[].​field_namestringread-only

The name of the field that caused the error

Example: "shipment.ship_to.phone_number"
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

The batch shipments endpoint

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

The URL of the linked resource, if any

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

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

batches[].​batch_labels_urlobject(optional_link)required

Link to batch labels query

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

The URL of the linked resource, if any

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

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

batches[].​batch_errors_urlobject(optional_link)read-onlyrequired

Link to batch errors endpoint

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

The URL of the linked resource, if any

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

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

batches[].​label_downloadobject(label_download)read-onlyrequired

The label download for the batch

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

The URL of the linked resource, if any

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

The URL for the pdf generated label

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

The URL for the png generated label

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

The URL for the zpl generated label

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

The form download for any customs that are needed

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

The URL of the linked resource, if any

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

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

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

The URL of the linked resource, if any

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

The instructions for the paperless download.

Default null
batches[].​paperless_download.​handoff_codestring or null

The handoff code for the paperless download.

Default null
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(optional_link)required

The link to the first page of results. This object will always have an href field. If there are no results, then the first page will contain an empty array of items.

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

The URL of the linked resource, if any

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

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

links.​lastobject(optional_link)required

The link to the final page of results. This object will always have an href field. If there are no results, then the final page will contain an empty array of items.

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

The URL of the linked resource, if any

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

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

links.​prevobject(optional_link)required

The link to the previous page of results. The href field will only be set when the page is 2 or greater.

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

The URL of the linked resource, if any

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

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

links.​nextobject(optional_link)required

The link to the next page of results. The href field will only be set when the page is less than pages.

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

The URL of the linked resource, if any

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

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

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

Create a batch

Request

Create a Batch

Security
api_key
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 the external batch

Example: "se-28529731"
batch_notesstringnon-empty

Add custom messages for a particular batch

Example: "This is my batch"
shipment_idsArray of objects

Array of shipment IDs used in the batch

rate_idsArray of objects

Array of rate IDs used in the batch

curl -i -X POST \
  https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/batches \
  -H 'API-Key: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -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""A4""A6"
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 the batch

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

The batch number.

external_batch_idstring or null>= 0 charactersread-onlyrequired

A string that uniquely identifies the external batch

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 ShipEngine API itself.

Enum"carrier""order_source""shipengine"
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."
process_errors[].​carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

A string that uniquely identifies the carrier that generated the error.

Example: "se-28529731"
process_errors[].​carrier_codestring(carrier_code)^[a-z0-9]+(_[a-z0-9]+)*$read-only

A shipping carrier, such as fedex, dhl_express, stamps_com, etc.

Example: "dhl_express"
process_errors[].​field_namestringread-only

The name of the field that caused the error

Example: "shipment.ship_to.phone_number"
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

The batch shipments endpoint

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

The URL of the linked resource, if any

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

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

batch_labels_urlobject(optional_link)required

Link to batch labels query

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

The URL of the linked resource, if any

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

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

batch_errors_urlobject(optional_link)read-onlyrequired

Link to batch errors endpoint

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

The URL of the linked resource, if any

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

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

label_downloadobject(label_download)read-onlyrequired

The label download for the batch

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

The URL of the linked resource, if any

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

The URL for the pdf generated label

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

The URL for the png generated label

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

The URL for the zpl generated label

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

The form download for any customs that are needed

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

The URL of the linked resource, if any

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

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

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

The URL of the linked resource, if any

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

The instructions for the paperless download.

Default null
paperless_download.​handoff_codestring or null

The handoff code for the paperless download.

Default null
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": "string", "external_batch_id": "string", "batch_notes": "Batch for morning shipment", "created_at": "2018-09-23T15:00:00.000Z", "processed_at": "string", "errors": 2, "process_errors": [ {} ], "warnings": 1, "completed": 1, "forms": 3, "count": 2, "batch_shipments_url": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "batch_labels_url": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "batch_errors_url": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "label_download": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "pdf": "http://api.shipengine.com/v1/labels/se-28529731", "png": "http://api.shipengine.com/v1/labels/se-28529731", "zpl": "http://api.shipengine.com/v1/labels/se-28529731" }, "form_download": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "paperless_download": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "instructions": null, "handoff_code": null }, "status": "open" }

Get batch by external ID

Request

Get Batch By External ID

Security
api_key
Path
external_batch_idstringrequired
Example: 13553d7f-3c87-4771-bae1-c49bacef11cb
curl -i -X GET \
  https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/batches/external_batch_id/13553d7f-3c87-4771-bae1-c49bacef11cb \
  -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""A4""A6"
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 the batch

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

The batch number.

external_batch_idstring or null>= 0 charactersread-onlyrequired

A string that uniquely identifies the external batch

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 ShipEngine API itself.

Enum"carrier""order_source""shipengine"
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."
process_errors[].​carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

A string that uniquely identifies the carrier that generated the error.

Example: "se-28529731"
process_errors[].​carrier_codestring(carrier_code)^[a-z0-9]+(_[a-z0-9]+)*$read-only

A shipping carrier, such as fedex, dhl_express, stamps_com, etc.

Example: "dhl_express"
process_errors[].​field_namestringread-only

The name of the field that caused the error

Example: "shipment.ship_to.phone_number"
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

The batch shipments endpoint

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

The URL of the linked resource, if any

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

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

batch_labels_urlobject(optional_link)required

Link to batch labels query

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

The URL of the linked resource, if any

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

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

batch_errors_urlobject(optional_link)read-onlyrequired

Link to batch errors endpoint

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

The URL of the linked resource, if any

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

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

label_downloadobject(label_download)read-onlyrequired

The label download for the batch

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

The URL of the linked resource, if any

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

The URL for the pdf generated label

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

The URL for the png generated label

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

The URL for the zpl generated label

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

The form download for any customs that are needed

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

The URL of the linked resource, if any

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

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

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

The URL of the linked resource, if any

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

The instructions for the paperless download.

Default null
paperless_download.​handoff_codestring or null

The handoff code for the paperless download.

Default null
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": "string", "external_batch_id": "string", "batch_notes": "Batch for morning shipment", "created_at": "2018-09-23T15:00:00.000Z", "processed_at": "string", "errors": 2, "process_errors": [ {} ], "warnings": 1, "completed": 1, "forms": 3, "count": 2, "batch_shipments_url": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "batch_labels_url": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "batch_errors_url": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "label_download": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "pdf": "http://api.shipengine.com/v1/labels/se-28529731", "png": "http://api.shipengine.com/v1/labels/se-28529731", "zpl": "http://api.shipengine.com/v1/labels/se-28529731" }, "form_download": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "paperless_download": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "instructions": null, "handoff_code": null }, "status": "open" }

Delete batch by ID

Request

Delete Batch By Id

Security
api_key
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/apis/shipengine/openapi/v1/batches/se-28529731 \
  -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

Security
api_key
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/apis/shipengine/openapi/v1/batches/se-28529731 \
  -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""A4""A6"
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 the batch

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

The batch number.

external_batch_idstring or null>= 0 charactersread-onlyrequired

A string that uniquely identifies the external batch

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 ShipEngine API itself.

Enum"carrier""order_source""shipengine"
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."
process_errors[].​carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

A string that uniquely identifies the carrier that generated the error.

Example: "se-28529731"
process_errors[].​carrier_codestring(carrier_code)^[a-z0-9]+(_[a-z0-9]+)*$read-only

A shipping carrier, such as fedex, dhl_express, stamps_com, etc.

Example: "dhl_express"
process_errors[].​field_namestringread-only

The name of the field that caused the error

Example: "shipment.ship_to.phone_number"
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

The batch shipments endpoint

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

The URL of the linked resource, if any

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

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

batch_labels_urlobject(optional_link)required

Link to batch labels query

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

The URL of the linked resource, if any

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

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

batch_errors_urlobject(optional_link)read-onlyrequired

Link to batch errors endpoint

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

The URL of the linked resource, if any

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

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

label_downloadobject(label_download)read-onlyrequired

The label download for the batch

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

The URL of the linked resource, if any

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

The URL for the pdf generated label

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

The URL for the png generated label

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

The URL for the zpl generated label

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

The form download for any customs that are needed

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

The URL of the linked resource, if any

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

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

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

The URL of the linked resource, if any

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

The instructions for the paperless download.

Default null
paperless_download.​handoff_codestring or null

The handoff code for the paperless download.

Default null
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": "string", "external_batch_id": "string", "batch_notes": "Batch for morning shipment", "created_at": "2018-09-23T15:00:00.000Z", "processed_at": "string", "errors": 2, "process_errors": [ {} ], "warnings": 1, "completed": 1, "forms": 3, "count": 2, "batch_shipments_url": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "batch_labels_url": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "batch_errors_url": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "label_download": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "pdf": "http://api.shipengine.com/v1/labels/se-28529731", "png": "http://api.shipengine.com/v1/labels/se-28529731", "zpl": "http://api.shipengine.com/v1/labels/se-28529731" }, "form_download": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "paperless_download": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "instructions": null, "handoff_code": null }, "status": "open" }

Update batch by ID

Request

Update Batch By Id

Security
api_key
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/apis/shipengine/openapi/v1/batches/se-28529731 \
  -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

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

Batch ID

Example: se-28529731
Bodyapplication/jsonrequired
shipment_idsArray of objects

The Shipment Ids to be modified on the batch

rate_idsArray of objects

Array of Rate IDs to be modifed on the batch

curl -i -X POST \
  https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/batches/se-28529731/add \
  -H 'API-Key: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -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

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.

Security
api_key
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/apis/shipengine/openapi/v1/batches/se-28529731/errors?page=2&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 the shipment

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

An external shipment id associated with the shipment

linksobject(pagination_link)read-onlyrequired

Helpful links to other pages of results

links.​firstobject(optional_link)required

The link to the first page of results. This object will always have an href field. If there are no results, then the first page will contain an empty array of items.

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

The URL of the linked resource, if any

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

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

links.​lastobject(optional_link)required

The link to the final page of results. This object will always have an href field. If there are no results, then the final page will contain an empty array of items.

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

The URL of the linked resource, if any

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

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

links.​prevobject(optional_link)required

The link to the previous page of results. The href field will only be set when the page is 2 or greater.

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

The URL of the linked resource, if any

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

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

links.​nextobject(optional_link)required

The link to the next page of results. The href field will only be set when the page is less than pages.

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

The URL of the linked resource, if any

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

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

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

Process batch ID labels

Request

Process Batch ID Labels

Security
api_key
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""A4""A6"
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""paperless""label_and_paperless"
curl -i -X POST \
  https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/batches/se-28529731/process/labels \
  -H 'API-Key: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -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

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

Batch ID

Example: se-28529731
Bodyapplication/jsonrequired
shipment_idsArray of objects

The Shipment Ids to be modified on the batch

rate_idsArray of objects

Array of Rate IDs to be modifed on the batch

curl -i -X POST \
  https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/batches/se-28529731/remove \
  -H 'API-Key: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -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

Carrier Accounts

A carrier account is a connection to a shipping carrier that allows you to create labels, track packages, and more. You can connect your own carrier accounts to ShipEngine, or use one of our built-in carrier accounts. Learn more about carrier accounts here.

Operations

Carriers

carriers

Operations

Downloads

downloads

Operations

Insurance

insurance

Operations

Labels

Print shipping labels for any of the top global carriers in minutes—instead of weeks. Simply connect your existing carrier accounts in the API dashboard, and then begin creating labels.

Operations

LTL Shipping

Less-than-truckload (LTL) shipping API endpoints for managing freight shipments. Connect LTL carriers, request quotes, schedule pickups, and track freight shipments.

Operations

Manifests

manifests

Operations

Package Pickups

Scheduled package pickups

Operations

Package Types

custom package types

Operations

Rates

Make sure you ship as cost-effectively as possible by quickly comparing rates using the ShipEngine Rates API. As long as you have the carrier connected to your account, you'll be able to see and compare different rates and services.

Operations

Service Points

Service points allow customers to pick up their packages at convenient locations.

Operations

Shipments

Shipments are at the center of the ShipEngine API. A shipment is the first step in creating a shipping label, or creating a manifest. It's also essential for getting shipping rates.

Operations

Tags

tags

Operations

Tokens

Manage authentication tokens for secure API access.

Operations

Tracking

Track packages across any of our 20+ supported carrier accounts and create tracking events to keep your customers up-to-date. Easily integrate real-time tracking information for shipments into your app, email, or SMS.

Operations

Warehouses

warehouses

Operations

Webhooks

Webhooks are a powerful feature of ShipEngine that can save you from sending repeated polling requests to check on the state of something. With webhooks, ShipEngine will automatically contact your servers when the state changes. This can include parcel tracking events, notification of the completion of a batch operation, or new sales orders.

Operations