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

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

Created combined label document

Request

Download a combined label file

Security
api_key
Bodyapplication/jsonrequired
label_idsArray of objects

The list of up to 30 label ids to include in the combined label document. Note that to avoid response size limits, you should only expect to be able to combine 30 single page labels similar in size to that of USPS labels.

label_formatstring

The file format for the combined label document; note that currently only "pdf" is supported.

Value"pdf"
label_download_typestring(label_download_type)

There are two different ways to download a label:

Label Download TypeDescription
urlYou will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.
inlineYou will receive the Base64-encoded label as part of the response. No need for a second request to download the label.
Default "inline"
Enum"url""inline"
curl -i -X POST \
  https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/documents/combined_labels \
  -H 'API-Key: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "label_ids": [
      "se-28529731"
    ],
    "label_format": "pdf",
    "label_download_type": "inline"
  }'

Responses

The requested object creation was a success.

Bodyapplication/json
label_downloadobject(label_download)read-only

The download for the combined label document

Response
application/json
{ "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" } }

List labels

Request

This endpoint returns a list of labels that you've created. You can optionally filter the results as well as control their sort order and the number of results returned at a time.

By default, all labels are returned, 25 at a time, starting with the most recently created ones. You can combine multiple filter options to narrow-down the results. For example, if you only want to get your UPS labels for your east coast warehouse you could query by both warehouse_id and carrier_id

Security
api_key
Query
label_statusstring(label_status)

Only return labels that are currently in the specified status

Enum"processing""completed""error""voided"
service_codestring(service_code)^[a-z0-9]+(_[a-z0-9-]+)* ?$

Only return labels for a specific carrier service

Example: service_code=usps_first_class_mail
carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$

Only return labels for a specific carrier account

Example: carrier_id=se-28529731
tracking_numberstringnon-empty

Only return labels with a specific tracking number

Example: tracking_number=9405511899223197428490
batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$

Only return labels that were created in a specific batch

Example: batch_id=se-28529731
rate_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$

Rate ID

Example: rate_id=se-28529731
shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$

Shipment ID

Example: shipment_id=se-28529731
warehouse_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$

Only return labels that originate from a specific warehouse

Example: warehouse_id=se-28529731
created_at_startstring(date-time)

Only return labels 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 labels that were created on or before a specific date/time

Example: created_at_end=2019-03-12T19:24:13.657Z
refund_statusArray of strings(refund_status)

Only return labels with specific refund status/es.

Items Enum"request_scheduled""pending""approved""rejected""excluded"
Example: refund_status=pending,approved
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"
sort_bystring

Controls which field the query is sorted by.

Default "created_at"
Enum"modified_at""created_at""voided_at"
curl -i -X GET \
  'https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/labels?label_status=processing&service_code=usps_first_class_mail&carrier_id=se-28529731&tracking_number=9405511899223197428490&batch_id=se-28529731&rate_id=se-28529731&shipment_id=se-28529731&warehouse_id=se-28529731&created_at_start=2019-03-12T19%3A24%3A13.657Z&created_at_end=2019-03-12T19%3A24%3A13.657Z&refund_status=pending%2Capproved&page=2&page_size=50&sort_dir=desc&sort_by=modified_at' \
  -H 'API-Key: YOUR_API_KEY_HERE'

Responses

The response includes a labels array containing a page of results (as determined by the page_size query parameter). It also includes other useful information, such as the total number of labels that match the query criteria, the number of pages of results, and the URLs of the first, last, next, and previous pages of results.

Bodyapplication/json
labelsArray of objects(label)>= 0 itemsrequired

The labels that matched the query criteria. If no matching labels were found, then this array is empty; otherwise, it contains one page of results. The last page of results may have fewer labels than the page_size.

labels[].​label_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created.

Example: "se-28529731"
labels[].​statusstring(label_status)read-only

The possible statuses that a shipping label can be in.

StatusDescription
processingWhen labels are created in a batch, it may take a few minutes for all of the labels in the batch to be created. During this period, they will be in processing status.
completedThe label was successfully created
errorThe label could not be created due to an error, such as an invalid delivery address
voidedThe label has been voided
Enum"processing""completed""error""voided"
labels[].​shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The shipment that this label is for. ShipEngine can create a shipment for you automatically when you create a label, or you can create your own shipment and then use it to print a label

Example: "se-28529731"
labels[].​external_shipment_idstring or null<= 50 charactersread-only

A unique user-defined key to identify a shipment. This can be used to retrieve the shipment.

labels[].​external_order_idstring or nullread-only

ID that the Order Source assigned

labels[].​ship_datestring(date-time)(date)^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?...read-only

An ISO 8601 string that represents a date, but not a specific time. The value may contain a time component, but it will be set to 00:00:00 UTC by ShipEngine.

Example: "2018-09-23T00:00:00.000Z"
labels[].​created_atstring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
labels[].​shipment_costobject(monetary_value)read-only

The cost of shipping, delivery confirmation, and other carrier charges. This amount does not include insurance costs.

labels[].​insurance_costobject(monetary_value)read-only

The insurance cost for this package. Add this to the shipment_cost field to get the total cost.

labels[].​requested_comparison_amountobject(monetary_value)read-only

The total shipping cost for the specified comparison_rate_type.

labels[].​rate_detailsArray of objects(rate_detail)read-only

A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user.

labels[].​tracking_numberstringnon-emptyread-only

The tracking number for the package. Tracking number formats vary across carriers.

Example: "782758401696"
labels[].​is_return_labelboolean

Indicates whether this is a return label. You may also want to set the rma_number so you know what is being returned.

labels[].​rma_numberstring or null

An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.

labels[].​is_internationalbooleanread-only

Indicates whether this is an international shipment. That is, the originating country and destination country are different.

labels[].​batch_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

If this label was created as part of a batch, then this is the unique ID of that batch.

Example: "se-28529731"
labels[].​carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The unique ID of the carrier account that was used to create this label

Example: "se-28529731"
labels[].​charge_eventstring(label_charge_event)

The label charge event.

Enum"carrier_default""on_creation""on_carrier_acceptance"
labels[].​service_codestring(service_code)^[a-z0-9]+(_[a-z0-9-]+)* ?$read-only

A carrier service, such as fedex_ground, usps_first_class_mail, flat_rate_envelope, etc.

Example: "usps_first_class_mail"
labels[].​package_codestring(package_code)[ 1 .. 50 ] characters^[a-z0-9]+(_[a-z0-9]+)*$read-only

A package type, such as thick_envelope, small_flat_rate_box, large_package, etc. Use the code package for custom or unknown package types.

Example: "small_flat_rate_box"
labels[].​voidedbooleanread-only

Indicates whether the label has been voided

labels[].​voided_atstring or null(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
labels[].​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"
labels[].​display_schemestring(display_scheme)

The display format that the label should be shown in.

Default "label"
Enum"label""paperless""label_and_paperless"
labels[].​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"
labels[].​trackablebooleanread-only

Indicates whether the shipment is trackable, in which case the tracking_status field will reflect the current status and each package will have a tracking_number.

labels[].​label_image_idstring or null(image_id)>= 4 characters

The label image resource that was used to create a custom label image.

Example: "img_DtBXupDBxREpHnwEXhTfgK"
labels[].​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"
labels[].​tracking_statusstring(tracking_status)read-only

The current status of the package, such as in_transit or delivered

Enum"unknown""in_transit""error""delivered"
labels[].​confirmationstring(delivery_confirmation)read-only

The type of delivery confirmation that is required for this shipment.

Enum"none""delivery""signature""adult_signature""direct_signature""delivery_mailed""verbal_confirmation""delivery_code""age_verification_16_plus"
labels[].​label_downloadobject(label_download)read-only

Reference to the various downloadable file formats for the generated label

labels[].​form_downloadobject or null(optional_link)read-only

The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it.

labels[].​qr_code_downloadobject or null(optional_link)read-only

The QR code download for the package

labels[].​paperless_downloadobject or null(paperless_download)read-only

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

labels[].​insurance_claimobject or null(optional_link)read-only

The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission.

labels[].​packagesArray of objects(alternative_identifiers)read-only

The label's package(s).

Note: Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned.

labels[].​alternative_identifiersArray of objects or null(alternative_identifier)read-only

Additional information some carriers may provide by which to identify a given label in their system.

labels[].​tracking_urlstring or nullread-only

The URL to track the package. This URL is provided by the carrier and is unique to the tracking number.

Example: "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234"
labels[].​ship_toobject(partial_shipping_address_to)read-only

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

totalinteger>= 0required

The total number of items across all pages of results

Example: 2750
pageinteger>= 1required

The current page number of results. For example, if there are 80 results, and the page size is 25, then page could be 1, 2, 3, or 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items.

Example: 1
pagesinteger>= 0required

The total number of pages of results. For example, if there are 80 results, and the page size is 25, then pages would be 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. If there are no results, then pages will be zero.

Example: 4
linksobject(pagination_link)required

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

property name*anyadditional property
Response
application/json
{ "labels": [ {} ], "total": 2750, "page": 1, "pages": 4, "links": { "first": {}, "last": {}, "prev": {}, "next": {} } }

Purchase label

Request

Purchase and print a label for shipment

Security
api_key
Bodyapplication/jsonrequired
ship_to_service_point_idstring or null

A unique identifier for a carrier service point where the shipment will be delivered by the carrier. This will take precedence over a shipment's ship to address.

Example: "614940"
ship_from_service_point_idstring or null

A unique identifier for a carrier drop off point where a merchant plans to deliver packages. This will take precedence over a shipment's ship from address.

Example: "614940"
shipmentobject(shipment_request)required

The information necessary to ship a package, such as the origin, the destination, the carrier service, and the package dimensions and weight.

Note: Either ship_from or warehouse_id must be set.

shipment.​carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$required

The carrier account that is billed for the shipping charges

Example: "se-28529731"
shipment.​service_codestring(service_code)^[a-z0-9]+(_[a-z0-9-]+)* ?$required

A carrier service, such as fedex_ground, usps_first_class_mail, flat_rate_envelope, etc.

Example: "usps_first_class_mail"
shipment.​shipping_rule_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$

ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment

Example: "se-28529731"
shipment.​external_order_idstring or null

ID that the Order Source assignedd

shipment.​itemsArray of objects(shipment_item)

Describe the packages included in this shipment as related to potential metadata that was imported from external order sources

Default []
shipment.​tax_identifiersArray of objects or null(tax_identifier)
shipment.​external_shipment_idstring or null<= 50 characters

A unique user-defined key to identify a shipment. This can be used to retrieve the shipment.

Warning: The external_shipment_id is limited to 50 characters. Any additional characters will be truncated.

shipment.​shipment_numberstring or null<= 50 characters

A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment.

Warning: The shipment_number is limited to 50 characters. Any additional characters will be truncated.

shipment.​ship_datestring(date-time)(date)^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?...

An ISO 8601 string that represents a date, but not a specific time. The value may contain a time component, but it will be set to 00:00:00 UTC by ShipEngine.

Example: "2018-09-23T00:00:00.000Z"
shipment.​ship_toobject(partial_shipping_address_to)required

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

shipment.​ship_to.​namestringnon-emptyrequired

The name of a contact person at this address. This field may be set instead of - or in addition to - the company_name field.

Example: "John Doe"
shipment.​ship_to.​phonestringnon-empty

The phone number of a contact person at this address. The format of this phone number varies depending on the country.

Example: "+1 204-253-9411 ext. 123"
shipment.​ship_to.​emailstring or null

Email for the address owner.

Example: "example@example.com"
shipment.​ship_to.​company_namestring or nullnon-empty

If this is a business address, then the company name should be specified here.

Example: "The Home Depot"
shipment.​ship_to.​address_line1stringnon-emptyrequired

The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines.

Example: "1999 Bishop Grandin Blvd."
shipment.​ship_to.​address_line2string or nullnon-empty

The second line of the street address. For some addresses, this line may not be needed.

Example: "Unit 408"
shipment.​ship_to.​address_line3string or nullnon-empty

The third line of the street address. For some addresses, this line may not be needed.

Example: "Building #7"
shipment.​ship_to.​city_localitystringnon-emptyrequired

The name of the city or locality

Example: "Winnipeg"
shipment.​ship_to.​state_provincestringnon-emptyrequired

The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation.

Example: "Manitoba"
shipment.​ship_to.​postal_codestring(postal_code)non-emptyrequired

postal code

Example: "78756-3717"
shipment.​ship_to.​country_codestring(country_code)= 2 characters
Example: "CA"
shipment.​ship_to.​address_residential_indicatorstring(address_residential_indicator)

Indicates whether this is a residential address.

Default "unknown"
Enum"unknown""yes""no"
Example: "no"
shipment.​ship_to.​instructionsstring or nullnon-empty

Additional text about how to handle the shipment at this address.

shipment.​ship_to.​geolocationArray of objects
shipment.​ship_fromobject(partial_shipping_address)

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

shipment.​warehouse_idstring or null(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$

The warehouse that the shipment is being shipped from. Either warehouse_id or ship_from must be specified.

Default null
Example: "se-28529731"
shipment.​return_toobject(partial_shipping_address)

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

shipment.​is_returnboolean or null

An optional indicator if the shipment is intended to be a return. Defaults to false if not provided.

Default false
shipment.​confirmationstring(delivery_confirmation)

The type of delivery confirmation that is required for this shipment.

Default "none"
Enum"none""delivery""signature""adult_signature""direct_signature""delivery_mailed""verbal_confirmation""delivery_code""age_verification_16_plus"
shipment.​customsobject or null(international_shipment_options)

Customs information. This is usually only needed for international shipments.

Default null
shipment.​advanced_optionsobject(advanced_shipment_options)

Advanced shipment options. These are entirely optional.

shipment.​insurance_providerstring(insurance_provider)

The insurance provider to use for any insured packages in the shipment.

Default "none"
Enum"none""shipsurance""carrier""third_party"
shipment.​order_source_codestring(order_source_name)

The order sources that are supported by ShipEngine

Enum"amazon_ca""amazon_us""brightpearl""channel_advisor""cratejoy""ebay""etsy""jane""groupon_goods""magento"
shipment.​packagesArray of objects(package)non-emptyrequired

The packages in the shipment.

Note: Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned.

shipment.​packages[].​package_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$

A string that uniquely identifies this package type

Example: "se-28529731"
shipment.​packages[].​package_codestring(package_code)[ 1 .. 50 ] characters^[a-z0-9]+(_[a-z0-9]+)*$

A package type, such as thick_envelope, small_flat_rate_box, large_package, etc. Use the code package for custom or unknown package types.

Example: "small_flat_rate_box"
shipment.​packages[].​package_namestring

The name of the of the package type

shipment.​packages[].​weightobject(weight)required

The package weight

shipment.​packages[].​weight.​valuenumber>= 0required

The weight, in the specified unit

shipment.​packages[].​weight.​unitstring(weight_unit)required

The possible weight unit values

Enum"pound""ounce""gram""kilogram"
shipment.​packages[].​dimensionsobject(dimensions)

The package dimensions

shipment.​packages[].​insured_valueobject(monetary_value)

The insured value of the package. Requires the insurance_provider field of the shipment to be set.

Default {"currency":"USD","amount":0}
shipment.​packages[].​label_messagesobject(label_messages)

Custom messages to print on the shipping label for the package. These are typically used to print invoice numbers, product numbers, or other internal reference numbers. Not all carriers support label messages. The number of lines and the maximum length of each line also varies by carrier.

CarrierMax linesMax line length
USPS (Stamps.com)360
FedEx335 for the first line. 30 for additional lines.
UPS235
OnTrac225
shipment.​packages[].​external_package_idstringnon-empty

An external package id.

shipment.​packages[].​content_descriptionstring or null[ 1 .. 35 ] characters

A short description of the package content. Required for shipments moving to, from, and through Mexico.

Example: "Hand knitted wool socks"
shipment.​packages[].​productsArray of objects(products)>= 0 items

Details about products inside packages (Information provided would be used on custom documentation)

Default []
shipment.​comparison_rate_typestring or null

Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS.

Example: "retail"
is_return_labelboolean

Indicates whether this is a return label. You may also want to set the rma_number so you know what is being returned.

rma_numberstring or null

An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.

charge_eventstring(label_charge_event)

The label charge event.

Enum"carrier_default""on_creation""on_carrier_acceptance"
outbound_label_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$write-only

The label_id of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers.

Example: "se-28529731"
validate_addressstring(validate_address)write-only

The possible validate address values

Default "no_validation"
Enum"no_validation""validate_only""validate_and_clean"
label_download_typestring(label_download_type)write-only

There are two different ways to download a label:

Label Download TypeDescription
urlYou will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.
inlineYou will receive the Base64-encoded label as part of the response. No need for a second request to download the label.
Default "url"
Enum"url""inline"
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"
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_image_idstring or null(image_id)>= 4 characters

The label image resource that was used to create a custom label image.

Example: "img_DtBXupDBxREpHnwEXhTfgK"
test_labelbooleanDeprecatedwrite-only

Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account.

Default false
curl -i -X POST \
  https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/labels \
  -H 'API-Key: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "ship_to_service_point_id": "614940",
    "ship_from_service_point_id": "614940",
    "shipment": {
      "carrier_id": "se-28529731",
      "service_code": "usps_first_class_mail",
      "shipping_rule_id": "se-28529731",
      "external_order_id": "string",
      "items": [],
      "tax_identifiers": [
        {
          "taxable_entity_type": "shipper",
          "identifier_type": "vat",
          "issuing_authority": "string",
          "value": "string"
        }
      ],
      "external_shipment_id": "string",
      "shipment_number": "string",
      "ship_date": "2018-09-23T00:00:00.000Z",
      "ship_to": {
        "name": "John Doe",
        "phone": "+1 204-253-9411 ext. 123",
        "email": "example@example.com",
        "company_name": "The Home Depot",
        "address_line1": "1999 Bishop Grandin Blvd.",
        "address_line2": "Unit 408",
        "address_line3": "Building #7",
        "city_locality": "Winnipeg",
        "state_province": "Manitoba",
        "postal_code": "78756-3717",
        "country_code": "CA",
        "address_residential_indicator": "no",
        "instructions": "string",
        "geolocation": [
          {
            "type": "what3words",
            "value": "cats.with.thumbs"
          }
        ]
      },
      "ship_from": {
        "name": "John Doe",
        "phone": "+1 204-253-9411 ext. 123",
        "email": "example@example.com",
        "company_name": "The Home Depot",
        "address_line1": "1999 Bishop Grandin Blvd.",
        "address_line2": "Unit 408",
        "address_line3": "Building #7",
        "city_locality": "Winnipeg",
        "state_province": "Manitoba",
        "postal_code": "78756-3717",
        "country_code": "CA",
        "address_residential_indicator": "no",
        "instructions": "string"
      },
      "warehouse_id": null,
      "return_to": {
        "name": "John Doe",
        "phone": "+1 204-253-9411 ext. 123",
        "email": "example@example.com",
        "company_name": "The Home Depot",
        "address_line1": "1999 Bishop Grandin Blvd.",
        "address_line2": "Unit 408",
        "address_line3": "Building #7",
        "city_locality": "Winnipeg",
        "state_province": "Manitoba",
        "postal_code": "78756-3717",
        "country_code": "CA",
        "address_residential_indicator": "no",
        "instructions": "string"
      },
      "is_return": false,
      "confirmation": "none",
      "customs": null,
      "advanced_options": {
        "bill_to_account": null,
        "bill_to_country_code": null,
        "bill_to_party": null,
        "bill_to_postal_code": null,
        "contains_alcohol": false,
        "delivered_duty_paid": false,
        "dry_ice": false,
        "dry_ice_weight": {
          "value": 0,
          "unit": "pound"
        },
        "non_machinable": false,
        "saturday_delivery": false,
        "fedex_freight": {
          "shipper_load_and_count": "string",
          "booking_confirmation": "string"
        },
        "use_ups_ground_freight_pricing": null,
        "freight_class": "77.5",
        "custom_field1": null,
        "custom_field2": null,
        "custom_field3": null,
        "origin_type": null,
        "additional_handling": null,
        "shipper_release": null,
        "collect_on_delivery": {
          "payment_type": "any",
          "payment_amount": {
            "currency": "string",
            "amount": 0
          }
        },
        "third_party_consignee": false,
        "dangerous_goods": false,
        "dangerous_goods_contact": {
          "name": "string",
          "phone": "string"
        },
        "windsor_framework_details": {
          "movement_indicator": "c2c",
          "not_at_risk": true
        },
        "license_number": "514785",
        "invoice_number": "IOC56888",
        "certificate_number": "784515",
        "fragile": true,
        "delivery-as-addressed": false,
        "return-after-first-attempt": false,
        "regulated_content_type": null
      },
      "insurance_provider": "none",
      "order_source_code": "amazon_ca",
      "packages": [
        {
          "package_id": "se-28529731",
          "package_code": "small_flat_rate_box",
          "package_name": "string",
          "weight": {
            "value": 0,
            "unit": "pound"
          },
          "dimensions": {
            "unit": "inch",
            "length": 0,
            "width": 0,
            "height": 0
          },
          "insured_value": {
            "currency": "USD",
            "amount": 0
          },
          "label_messages": {
            "reference1": null,
            "reference2": null,
            "reference3": null
          },
          "external_package_id": "string",
          "content_description": "Hand knitted wool socks",
          "products": []
        }
      ],
      "comparison_rate_type": "retail"
    },
    "is_return_label": true,
    "rma_number": "string",
    "charge_event": "carrier_default",
    "outbound_label_id": "se-28529731",
    "test_label": false,
    "validate_address": "no_validation",
    "label_download_type": "url",
    "label_format": "pdf",
    "display_scheme": "label",
    "label_layout": "4x6",
    "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK"
  }'

Responses

The requested object creation was a success.

Bodyapplication/json
label_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-onlyrequired

A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created.

Example: "se-28529731"
statusstring(label_status)read-onlyrequired

The possible statuses that a shipping label can be in.

StatusDescription
processingWhen labels are created in a batch, it may take a few minutes for all of the labels in the batch to be created. During this period, they will be in processing status.
completedThe label was successfully created
errorThe label could not be created due to an error, such as an invalid delivery address
voidedThe label has been voided
Enum"processing""completed""error""voided"
shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-onlyrequired

The shipment that this label is for. ShipEngine can create a shipment for you automatically when you create a label, or you can create your own shipment and then use it to print a label

Example: "se-28529731"
external_shipment_idstring or null<= 50 charactersread-onlyrequired

A unique user-defined key to identify a shipment. This can be used to retrieve the shipment.

external_order_idstring or nullread-onlyrequired

ID that the Order Source assigned

ship_datestring(date-time)(date)^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?...read-onlyrequired

An ISO 8601 string that represents a date, but not a specific time. The value may contain a time component, but it will be set to 00:00:00 UTC by ShipEngine.

Example: "2018-09-23T00:00:00.000Z"
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"
shipment_costobject(monetary_value)read-onlyrequired

The cost of shipping, delivery confirmation, and other carrier charges. This amount does not include insurance costs.

shipment_cost.​currencystring(currency)required

The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html

shipment_cost.​amountnumber>= 0required

The monetary amount, in the specified currency.

insurance_costobject(monetary_value)read-onlyrequired

The insurance cost for this package. Add this to the shipment_cost field to get the total cost.

insurance_cost.​currencystring(currency)required

The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html

insurance_cost.​amountnumber>= 0required

The monetary amount, in the specified currency.

requested_comparison_amountobject(monetary_value)read-only

The total shipping cost for the specified comparison_rate_type.

rate_detailsArray of objects(rate_detail)read-only

A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user.

tracking_numberstringnon-emptyread-onlyrequired

The tracking number for the package. Tracking number formats vary across carriers.

Example: "782758401696"
is_return_labelbooleanrequired

Indicates whether this is a return label. You may also want to set the rma_number so you know what is being returned.

rma_numberstring or nullrequired

An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.

is_internationalbooleanread-onlyrequired

Indicates whether this is an international shipment. That is, the originating country and destination country are different.

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

If this label was created as part of a batch, then this is the unique ID of that batch.

Example: "se-28529731"
carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-onlyrequired

The unique ID of the carrier account that was used to create this label

Example: "se-28529731"
charge_eventstring(label_charge_event)required

The label charge event.

Enum"carrier_default""on_creation""on_carrier_acceptance"
service_codestring(service_code)^[a-z0-9]+(_[a-z0-9-]+)* ?$read-onlyrequired

A carrier service, such as fedex_ground, usps_first_class_mail, flat_rate_envelope, etc.

Example: "usps_first_class_mail"
package_codestring(package_code)[ 1 .. 50 ] characters^[a-z0-9]+(_[a-z0-9]+)*$read-onlyrequired

A package type, such as thick_envelope, small_flat_rate_box, large_package, etc. Use the code package for custom or unknown package types.

Example: "small_flat_rate_box"
voidedbooleanread-onlyrequired

Indicates whether the label has been voided

voided_atstring or null(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
label_formatstring(label_format)required

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)required

The display format that the label should be shown in.

Default "label"
Enum"label""paperless""label_and_paperless"
label_layoutstring(label_layout)required

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"
trackablebooleanread-onlyrequired

Indicates whether the shipment is trackable, in which case the tracking_status field will reflect the current status and each package will have a tracking_number.

label_image_idstring or null(image_id)>= 4 charactersrequired

The label image resource that was used to create a custom label image.

Example: "img_DtBXupDBxREpHnwEXhTfgK"
carrier_codestring(carrier_code)^[a-z0-9]+(_[a-z0-9]+)*$read-onlyrequired

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

Example: "dhl_express"
tracking_statusstring(tracking_status)read-onlyrequired

The current status of the package, such as in_transit or delivered

Enum"unknown""in_transit""error""delivered"
confirmationstring(delivery_confirmation)read-only

The type of delivery confirmation that is required for this shipment.

Enum"none""delivery""signature""adult_signature""direct_signature""delivery_mailed""verbal_confirmation""delivery_code""age_verification_16_plus"
label_downloadobject(label_download)read-onlyrequired

Reference to the various downloadable file formats for the generated label

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 or null(optional_link)read-onlyrequired

The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it.

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

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

qr_code_downloadobject or null(optional_link)read-onlyrequired

The QR code download for the package

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

The URL of the linked resource, if any

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

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

paperless_downloadobject or null(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
insurance_claimobject or null(optional_link)read-onlyrequired

The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission.

insurance_claim.​hrefstring(url)(url)non-emptyrequired

The URL of the linked resource, if any

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

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

packagesArray of objects(alternative_identifiers)read-onlyrequired

The label's package(s).

Note: Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned.

packages[].​package_idinteger(int32)read-only

The shipment package id

packages[].​package_codestring(package_code)[ 1 .. 50 ] characters^[a-z0-9]+(_[a-z0-9]+)*$

A package type, such as thick_envelope, small_flat_rate_box, large_package, etc. Use the code package for custom or unknown package types.

Example: "small_flat_rate_box"
packages[].​weightobject(weight)required

The package weight

packages[].​weight.​valuenumber>= 0required

The weight, in the specified unit

packages[].​weight.​unitstring(weight_unit)required

The possible weight unit values

Enum"pound""ounce""gram""kilogram"
packages[].​dimensionsobject(dimensions)

The package dimensions

packages[].​insured_valueobject(monetary_value)

The insured value of the package. Requires the insurance_provider field of the shipment to be set.

Default {"currency":"USD","amount":0}
packages[].​tracking_numberstring(tracking_number)non-emptyread-only

The tracking number for the package. The format depends on the carrier.

Example: "1Z932R800392060079"
packages[].​label_downloadobject(label_download)read-only

The label download for the package

packages[].​form_downloadobject(optional_link)read-only

The form download for any customs that are needed

packages[].​qr_code_downloadobject(optional_link)read-only

The QR code download for the package

packages[].​paperless_downloadobject(paperless_download)read-only

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

packages[].​label_messagesobject(label_messages)

Custom messages to print on the shipping label for the package. These are typically used to print invoice numbers, product numbers, or other internal reference numbers. Not all carriers support label messages. The number of lines and the maximum length of each line also varies by carrier.

CarrierMax linesMax line length
USPS (Stamps.com)360
FedEx335 for the first line. 30 for additional lines.
UPS235
OnTrac225
packages[].​external_package_idstringnon-empty

An external package id.

packages[].​content_descriptionstring or null[ 1 .. 35 ] characters

A short description of the package content. Required for shipments moving to, from, and through Mexico.

Example: "Hand knitted wool socks"
packages[].​sequenceinteger(int32)read-only

Package sequence

packages[].​has_label_documentsboolean

Whether the package has label documents available for download

packages[].​has_form_documentsboolean

Whether the package has form documents available for download

packages[].​has_qr_code_documentsboolean

Whether the package has QR code documents available for download

packages[].​has_paperless_label_documentsboolean

Whether the package has paperless documents available for download

packages[].​alternative_identifiersArray of objects or null(alternative_identifier)read-only

Alternative identifiers associated with this package.

alternative_identifiersArray of objects or null(alternative_identifier)read-only

Additional information some carriers may provide by which to identify a given label in their system.

tracking_urlstring or nullread-only

The URL to track the package. This URL is provided by the carrier and is unique to the tracking number.

Example: "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234"
ship_toobject(partial_shipping_address_to)read-onlyrequired

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

ship_to.​namestringnon-emptyrequired

The name of a contact person at this address. This field may be set instead of - or in addition to - the company_name field.

Example: "John Doe"
ship_to.​phonestringnon-empty

The phone number of a contact person at this address. The format of this phone number varies depending on the country.

Example: "+1 204-253-9411 ext. 123"
ship_to.​emailstring or null

Email for the address owner.

Example: "example@example.com"
ship_to.​company_namestring or nullnon-empty

If this is a business address, then the company name should be specified here.

Example: "The Home Depot"
ship_to.​address_line1stringnon-emptyrequired

The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines.

Example: "1999 Bishop Grandin Blvd."
ship_to.​address_line2string or nullnon-empty

The second line of the street address. For some addresses, this line may not be needed.

Example: "Unit 408"
ship_to.​address_line3string or nullnon-empty

The third line of the street address. For some addresses, this line may not be needed.

Example: "Building #7"
ship_to.​city_localitystringnon-emptyrequired

The name of the city or locality

Example: "Winnipeg"
ship_to.​state_provincestringnon-emptyrequired

The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation.

Example: "Manitoba"
ship_to.​postal_codestring(postal_code)non-emptyrequired

postal code

Example: "78756-3717"
ship_to.​country_codestring(country_code)= 2 characters
Example: "CA"
ship_to.​address_residential_indicatorstring(address_residential_indicator)

Indicates whether this is a residential address.

Default "unknown"
Enum"unknown""yes""no"
Example: "no"
ship_to.​instructionsstring or nullnon-empty

Additional text about how to handle the shipment at this address.

ship_to.​geolocationArray of objects
void_typestring or null(void_type)read-only

Indicates how a label was voided. refund_assist means the label was voided through the Refund Assist program, while manual means it was voided manually by the user.

Enum"refund_assist""manual"
Example: "manual"
refund_detailsobject or null(refund_details)read-only

Information about the Refund Assist request for this label. This field is null if the label is not eligible for Refund Assist.

Response
application/json
{ "label_id": "se-28529731", "status": "processing", "shipment_id": "se-28529731", "external_shipment_id": "string", "external_order_id": "string", "ship_date": "2018-09-23T00:00:00.000Z", "created_at": "2018-09-23T15:00:00.000Z", "shipment_cost": { "currency": "string", "amount": 0 }, "insurance_cost": { "currency": "string", "amount": 0 }, "requested_comparison_amount": { "currency": "string", "amount": 0 }, "rate_details": [ {} ], "tracking_number": "782758401696", "is_return_label": true, "rma_number": "string", "is_international": true, "batch_id": "se-28529731", "carrier_id": "se-28529731", "charge_event": "carrier_default", "service_code": "usps_first_class_mail", "package_code": "small_flat_rate_box", "voided": true, "voided_at": "2018-09-23T15:00:00.000Z", "label_format": "pdf", "display_scheme": "label", "label_layout": "4x6", "trackable": true, "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK", "carrier_code": "dhl_express", "tracking_status": "unknown", "confirmation": "none", "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" }, "qr_code_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 }, "insurance_claim": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "packages": [ {} ], "alternative_identifiers": [ {} ], "tracking_url": "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234", "ship_to": { "name": "John Doe", "phone": "+1 204-253-9411 ext. 123", "email": "example@example.com", "company_name": "The Home Depot", "address_line1": "1999 Bishop Grandin Blvd.", "address_line2": "Unit 408", "address_line3": "Building #7", "city_locality": "Winnipeg", "state_province": "Manitoba", "postal_code": "78756-3717", "country_code": "CA", "address_residential_indicator": "no", "instructions": "string", "geolocation": [] }, "void_type": "manual", "refund_details": { "refund_status": "request_scheduled", "request_date": "2018-09-23T15:00:00.000Z", "amount_paid": {}, "amount_requested": {}, "amount_approved": {}, "amount_credited": {} } }

Get label by external shipment ID

Request

Find a label by using the external shipment id that was used during label creation

Security
api_key
Path
external_shipment_idstringrequired
Example: 0bcb569d-1727-4ff9-ab49-b2fec0cee5ae
Query
label_download_typestring(label_download_type)

There are two different ways to download a label:

Label Download TypeDescription
urlYou will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.
inlineYou will receive the Base64-encoded label as part of the response. No need for a second request to download the label.
Enum"url""inline"
Example: label_download_type=url
curl -i -X GET \
  'https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/labels/external_shipment_id/0bcb569d-1727-4ff9-ab49-b2fec0cee5ae?label_download_type=url' \
  -H 'API-Key: YOUR_API_KEY_HERE'

Responses

The requested object creation was a success.

Bodyapplication/json
label_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created.

Example: "se-28529731"
statusstring(label_status)read-only

The possible statuses that a shipping label can be in.

StatusDescription
processingWhen labels are created in a batch, it may take a few minutes for all of the labels in the batch to be created. During this period, they will be in processing status.
completedThe label was successfully created
errorThe label could not be created due to an error, such as an invalid delivery address
voidedThe label has been voided
Enum"processing""completed""error""voided"
shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The shipment that this label is for. ShipEngine can create a shipment for you automatically when you create a label, or you can create your own shipment and then use it to print a label

Example: "se-28529731"
external_shipment_idstring or null<= 50 charactersread-only

A unique user-defined key to identify a shipment. This can be used to retrieve the shipment.

external_order_idstring or nullread-only

ID that the Order Source assigned

ship_datestring(date-time)(date)^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?...read-only

An ISO 8601 string that represents a date, but not a specific time. The value may contain a time component, but it will be set to 00:00:00 UTC by ShipEngine.

Example: "2018-09-23T00:00:00.000Z"
created_atstring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
shipment_costobject(monetary_value)read-only

The cost of shipping, delivery confirmation, and other carrier charges. This amount does not include insurance costs.

insurance_costobject(monetary_value)read-only

The insurance cost for this package. Add this to the shipment_cost field to get the total cost.

requested_comparison_amountobject(monetary_value)read-only

The total shipping cost for the specified comparison_rate_type.

rate_detailsArray of objects(rate_detail)read-only

A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user.

tracking_numberstringnon-emptyread-only

The tracking number for the package. Tracking number formats vary across carriers.

Example: "782758401696"
is_return_labelboolean

Indicates whether this is a return label. You may also want to set the rma_number so you know what is being returned.

rma_numberstring or null

An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.

is_internationalbooleanread-only

Indicates whether this is an international shipment. That is, the originating country and destination country are different.

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

If this label was created as part of a batch, then this is the unique ID of that batch.

Example: "se-28529731"
carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The unique ID of the carrier account that was used to create this label

Example: "se-28529731"
charge_eventstring(label_charge_event)

The label charge event.

Enum"carrier_default""on_creation""on_carrier_acceptance"
service_codestring(service_code)^[a-z0-9]+(_[a-z0-9-]+)* ?$read-only

A carrier service, such as fedex_ground, usps_first_class_mail, flat_rate_envelope, etc.

Example: "usps_first_class_mail"
package_codestring(package_code)[ 1 .. 50 ] characters^[a-z0-9]+(_[a-z0-9]+)*$read-only

A package type, such as thick_envelope, small_flat_rate_box, large_package, etc. Use the code package for custom or unknown package types.

Example: "small_flat_rate_box"
voidedbooleanread-only

Indicates whether the label has been voided

voided_atstring or null(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
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"
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"
trackablebooleanread-only

Indicates whether the shipment is trackable, in which case the tracking_status field will reflect the current status and each package will have a tracking_number.

label_image_idstring or null(image_id)>= 4 characters

The label image resource that was used to create a custom label image.

Example: "img_DtBXupDBxREpHnwEXhTfgK"
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"
tracking_statusstring(tracking_status)read-only

The current status of the package, such as in_transit or delivered

Enum"unknown""in_transit""error""delivered"
confirmationstring(delivery_confirmation)read-only

The type of delivery confirmation that is required for this shipment.

Enum"none""delivery""signature""adult_signature""direct_signature""delivery_mailed""verbal_confirmation""delivery_code""age_verification_16_plus"
label_downloadobject(label_download)read-only

Reference to the various downloadable file formats for the generated label

form_downloadobject or null(optional_link)read-only

The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it.

qr_code_downloadobject or null(optional_link)read-only

The QR code download for the package

paperless_downloadobject or null(paperless_download)read-only

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

insurance_claimobject or null(optional_link)read-only

The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission.

packagesArray of objects(alternative_identifiers)read-only

The label's package(s).

Note: Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned.

alternative_identifiersArray of objects or null(alternative_identifier)read-only

Additional information some carriers may provide by which to identify a given label in their system.

tracking_urlstring or nullread-only

The URL to track the package. This URL is provided by the carrier and is unique to the tracking number.

Example: "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234"
ship_toobject(partial_shipping_address_to)read-only

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

void_typestring or null(void_type)read-only

Indicates how a label was voided. refund_assist means the label was voided through the Refund Assist program, while manual means it was voided manually by the user.

Enum"refund_assist""manual"
Example: "manual"
refund_detailsobject or null(refund_details)read-only

Information about the Refund Assist request for this label. This field is null if the label is not eligible for Refund Assist.

Response
application/json
{ "label_id": "se-28529731", "status": "processing", "shipment_id": "se-28529731", "external_shipment_id": "string", "external_order_id": "string", "ship_date": "2018-09-23T00:00:00.000Z", "created_at": "2018-09-23T15:00:00.000Z", "shipment_cost": { "currency": "string", "amount": 0 }, "insurance_cost": { "currency": "string", "amount": 0 }, "requested_comparison_amount": { "currency": "string", "amount": 0 }, "rate_details": [ {} ], "tracking_number": "782758401696", "is_return_label": true, "rma_number": "string", "is_international": true, "batch_id": "se-28529731", "carrier_id": "se-28529731", "charge_event": "carrier_default", "service_code": "usps_first_class_mail", "package_code": "small_flat_rate_box", "voided": true, "voided_at": "2018-09-23T15:00:00.000Z", "label_format": "pdf", "display_scheme": "label", "label_layout": "4x6", "trackable": true, "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK", "carrier_code": "dhl_express", "tracking_status": "unknown", "confirmation": "none", "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" }, "qr_code_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 }, "insurance_claim": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "packages": [ {} ], "alternative_identifiers": [ {} ], "tracking_url": "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234", "ship_to": { "name": "John Doe", "phone": "+1 204-253-9411 ext. 123", "email": "example@example.com", "company_name": "The Home Depot", "address_line1": "1999 Bishop Grandin Blvd.", "address_line2": "Unit 408", "address_line3": "Building #7", "city_locality": "Winnipeg", "state_province": "Manitoba", "postal_code": "78756-3717", "country_code": "CA", "address_residential_indicator": "no", "instructions": "string", "geolocation": [] }, "void_type": "manual", "refund_details": { "refund_status": "request_scheduled", "request_date": "2018-09-23T15:00:00.000Z", "amount_paid": {}, "amount_requested": {}, "amount_approved": {}, "amount_credited": {} } }

Purchase label with rate ID

Request

When retrieving rates for shipments using the /rates endpoint, the returned information contains a rate_id property that can be used to generate a label without having to refill in the shipment information repeatedly.

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

Rate ID

Example: se-28529731
Bodyapplication/jsonrequired
custom_field1string

Optional - Value will be saved in the shipment's advanced_options > custom_field1

custom_field2string

Optional - Value will be saved in the shipment's advanced_options > custom_field2

custom_field3string

Optional - Value will be saved in the shipment's advanced_options > custom_field3

validate_addressstring(validate_address)

The possible validate address values

Enum"no_validation""validate_only""validate_and_clean"
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"
label_download_typestring(label_download_type)

There are two different ways to download a label:

Label Download TypeDescription
urlYou will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.
inlineYou will receive the Base64-encoded label as part of the response. No need for a second request to download the label.
Default "url"
Enum"url""inline"
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/labels/rates/se-28529731 \
  -H 'API-Key: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "custom_field1": "string",
    "custom_field2": "string",
    "custom_field3": "string",
    "validate_address": "no_validation",
    "label_layout": "4x6",
    "label_format": "pdf",
    "label_download_type": "url",
    "display_scheme": "label"
  }'

Responses

The requested object creation was a success.

Bodyapplication/json
label_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created.

Example: "se-28529731"
statusstring(label_status)read-only

The possible statuses that a shipping label can be in.

StatusDescription
processingWhen labels are created in a batch, it may take a few minutes for all of the labels in the batch to be created. During this period, they will be in processing status.
completedThe label was successfully created
errorThe label could not be created due to an error, such as an invalid delivery address
voidedThe label has been voided
Enum"processing""completed""error""voided"
shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The shipment that this label is for. ShipEngine can create a shipment for you automatically when you create a label, or you can create your own shipment and then use it to print a label

Example: "se-28529731"
external_shipment_idstring or null<= 50 charactersread-only

A unique user-defined key to identify a shipment. This can be used to retrieve the shipment.

external_order_idstring or nullread-only

ID that the Order Source assigned

ship_datestring(date-time)(date)^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?...read-only

An ISO 8601 string that represents a date, but not a specific time. The value may contain a time component, but it will be set to 00:00:00 UTC by ShipEngine.

Example: "2018-09-23T00:00:00.000Z"
created_atstring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
shipment_costobject(monetary_value)read-only

The cost of shipping, delivery confirmation, and other carrier charges. This amount does not include insurance costs.

insurance_costobject(monetary_value)read-only

The insurance cost for this package. Add this to the shipment_cost field to get the total cost.

requested_comparison_amountobject(monetary_value)read-only

The total shipping cost for the specified comparison_rate_type.

rate_detailsArray of objects(rate_detail)read-only

A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user.

tracking_numberstringnon-emptyread-only

The tracking number for the package. Tracking number formats vary across carriers.

Example: "782758401696"
is_return_labelboolean

Indicates whether this is a return label. You may also want to set the rma_number so you know what is being returned.

rma_numberstring or null

An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.

is_internationalbooleanread-only

Indicates whether this is an international shipment. That is, the originating country and destination country are different.

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

If this label was created as part of a batch, then this is the unique ID of that batch.

Example: "se-28529731"
carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The unique ID of the carrier account that was used to create this label

Example: "se-28529731"
charge_eventstring(label_charge_event)

The label charge event.

Enum"carrier_default""on_creation""on_carrier_acceptance"
service_codestring(service_code)^[a-z0-9]+(_[a-z0-9-]+)* ?$read-only

A carrier service, such as fedex_ground, usps_first_class_mail, flat_rate_envelope, etc.

Example: "usps_first_class_mail"
package_codestring(package_code)[ 1 .. 50 ] characters^[a-z0-9]+(_[a-z0-9]+)*$read-only

A package type, such as thick_envelope, small_flat_rate_box, large_package, etc. Use the code package for custom or unknown package types.

Example: "small_flat_rate_box"
voidedbooleanread-only

Indicates whether the label has been voided

voided_atstring or null(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
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"
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"
trackablebooleanread-only

Indicates whether the shipment is trackable, in which case the tracking_status field will reflect the current status and each package will have a tracking_number.

label_image_idstring or null(image_id)>= 4 characters

The label image resource that was used to create a custom label image.

Example: "img_DtBXupDBxREpHnwEXhTfgK"
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"
tracking_statusstring(tracking_status)read-only

The current status of the package, such as in_transit or delivered

Enum"unknown""in_transit""error""delivered"
confirmationstring(delivery_confirmation)read-only

The type of delivery confirmation that is required for this shipment.

Enum"none""delivery""signature""adult_signature""direct_signature""delivery_mailed""verbal_confirmation""delivery_code""age_verification_16_plus"
label_downloadobject(label_download)read-only

Reference to the various downloadable file formats for the generated label

form_downloadobject or null(optional_link)read-only

The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it.

qr_code_downloadobject or null(optional_link)read-only

The QR code download for the package

paperless_downloadobject or null(paperless_download)read-only

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

insurance_claimobject or null(optional_link)read-only

The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission.

packagesArray of objects(alternative_identifiers)read-only

The label's package(s).

Note: Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned.

alternative_identifiersArray of objects or null(alternative_identifier)read-only

Additional information some carriers may provide by which to identify a given label in their system.

tracking_urlstring or nullread-only

The URL to track the package. This URL is provided by the carrier and is unique to the tracking number.

Example: "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234"
ship_toobject(partial_shipping_address_to)read-only

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

void_typestring or null(void_type)read-only

Indicates how a label was voided. refund_assist means the label was voided through the Refund Assist program, while manual means it was voided manually by the user.

Enum"refund_assist""manual"
Example: "manual"
refund_detailsobject or null(refund_details)read-only

Information about the Refund Assist request for this label. This field is null if the label is not eligible for Refund Assist.

Response
application/json
{ "label_id": "se-28529731", "status": "processing", "shipment_id": "se-28529731", "external_shipment_id": "string", "external_order_id": "string", "ship_date": "2018-09-23T00:00:00.000Z", "created_at": "2018-09-23T15:00:00.000Z", "shipment_cost": { "currency": "string", "amount": 0 }, "insurance_cost": { "currency": "string", "amount": 0 }, "requested_comparison_amount": { "currency": "string", "amount": 0 }, "rate_details": [ {} ], "tracking_number": "782758401696", "is_return_label": true, "rma_number": "string", "is_international": true, "batch_id": "se-28529731", "carrier_id": "se-28529731", "charge_event": "carrier_default", "service_code": "usps_first_class_mail", "package_code": "small_flat_rate_box", "voided": true, "voided_at": "2018-09-23T15:00:00.000Z", "label_format": "pdf", "display_scheme": "label", "label_layout": "4x6", "trackable": true, "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK", "carrier_code": "dhl_express", "tracking_status": "unknown", "confirmation": "none", "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" }, "qr_code_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 }, "insurance_claim": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "packages": [ {} ], "alternative_identifiers": [ {} ], "tracking_url": "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234", "ship_to": { "name": "John Doe", "phone": "+1 204-253-9411 ext. 123", "email": "example@example.com", "company_name": "The Home Depot", "address_line1": "1999 Bishop Grandin Blvd.", "address_line2": "Unit 408", "address_line3": "Building #7", "city_locality": "Winnipeg", "state_province": "Manitoba", "postal_code": "78756-3717", "country_code": "CA", "address_residential_indicator": "no", "instructions": "string", "geolocation": [] }, "void_type": "manual", "refund_details": { "refund_status": "request_scheduled", "request_date": "2018-09-23T15:00:00.000Z", "amount_paid": {}, "amount_requested": {}, "amount_approved": {}, "amount_credited": {} } }

Purchase label from rate shopper

Request

Purchase and print a shipping label using the Rate Shopper. The Rate Shopper automatically selects the optimal carrier and service from your wallet carriers based on your specified rate selection strategy (cheapest, fastest, or best_value). For more information about this in the rates documentation.

Security
api_key
Path
rate_shopper_idstring(rate_attributes)required

The rate selection strategy for the Rate Shopper. This determines which carrier and service will be automatically selected from your wallet carriers based on the rates returned for the shipment.

Enum"best_value""cheapest""fastest"
Bodyapplication/jsonrequired

Label creation details with inline shipment

shipmentobject(partial_shipment_for_rate_shopper)required

The information necessary to ship a package for Rate Shopper, such as the origin, the destination, and the package dimensions and weight.

Note: This schema excludes carrier_id, service_code, and shipping_rule_id as these are automatically selected by the Rate Shopper based on your chosen strategy.

shipment.​external_order_idstring or null

ID that the Order Source assignedd

shipment.​itemsArray of objects(shipment_item)

Describe the packages included in this shipment as related to potential metadata that was imported from external order sources

Default []
shipment.​tax_identifiersArray of objects or null(tax_identifier)
shipment.​external_shipment_idstring or null<= 50 characters

A unique user-defined key to identify a shipment. This can be used to retrieve the shipment.

Warning: The external_shipment_id is limited to 50 characters. Any additional characters will be truncated.

shipment.​shipment_numberstring or null<= 50 characters

A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment.

Warning: The shipment_number is limited to 50 characters. Any additional characters will be truncated.

shipment.​ship_datestring(date-time)(date)^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?...

An ISO 8601 string that represents a date, but not a specific time. The value may contain a time component, but it will be set to 00:00:00 UTC by ShipEngine.

Example: "2018-09-23T00:00:00.000Z"
shipment.​ship_toobject(partial_shipping_address_to)

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

shipment.​ship_fromobject(partial_shipping_address)

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

shipment.​warehouse_idstring or null(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$

The warehouse that the shipment is being shipped from. Either warehouse_id or ship_from must be specified.

Default null
Example: "se-28529731"
shipment.​return_toobject(partial_shipping_address)

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

shipment.​is_returnboolean or null

An optional indicator if the shipment is intended to be a return. Defaults to false if not provided.

Default false
shipment.​confirmationstring(delivery_confirmation)

The type of delivery confirmation that is required for this shipment.

Default "none"
Enum"none""delivery""signature""adult_signature""direct_signature""delivery_mailed""verbal_confirmation""delivery_code""age_verification_16_plus"
shipment.​customsobject or null(international_shipment_options)

Customs information. This is usually only needed for international shipments.

Default null
shipment.​advanced_optionsobject(advanced_shipment_options)

Advanced shipment options. These are entirely optional.

shipment.​insurance_providerstring(insurance_provider)

The insurance provider to use for any insured packages in the shipment.

Default "none"
Enum"none""shipsurance""carrier""third_party"
shipment.​order_source_codestring(order_source_name)

The order sources that are supported by ShipEngine

Enum"amazon_ca""amazon_us""brightpearl""channel_advisor""cratejoy""ebay""etsy""jane""groupon_goods""magento"
shipment.​packagesArray of objects(package)non-empty

The packages in the shipment.

Note: Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned.

shipment.​comparison_rate_typestring or null

Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS.

Example: "retail"
is_return_labelboolean

Indicates whether this is a return label. You may also want to set the rma_number so you know what is being returned.

rma_numberstring or null

An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.

charge_eventstring(label_charge_event)

The label charge event.

Enum"carrier_default""on_creation""on_carrier_acceptance"
outbound_label_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$write-only

The label_id of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers.

Example: "se-28529731"
validate_addressstring(validate_address)write-only

The possible validate address values

Default "no_validation"
Enum"no_validation""validate_only""validate_and_clean"
label_download_typestring(label_download_type)write-only

There are two different ways to download a label:

Label Download TypeDescription
urlYou will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.
inlineYou will receive the Base64-encoded label as part of the response. No need for a second request to download the label.
Default "url"
Enum"url""inline"
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"
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_image_idstring or null(image_id)>= 4 characters

The label image resource that was used to create a custom label image.

Example: "img_DtBXupDBxREpHnwEXhTfgK"
test_labelbooleanDeprecatedwrite-only

Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account.

Default false
curl -i -X POST \
  'https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/labels/rate_shopper_id/{rate_shopper_id}' \
  -H 'API-Key: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "shipment": {
      "ship_to": {
        "name": "John Doe",
        "company_name": "Example Corp",
        "address_line1": "123 Main St",
        "city_locality": "Austin",
        "state_province": "TX",
        "postal_code": "78701",
        "country_code": "US",
        "phone": "512-555-1234"
      },
      "ship_from": {
        "name": "Warehouse A",
        "address_line1": "456 Warehouse Blvd",
        "city_locality": "Dallas",
        "state_province": "TX",
        "postal_code": "75001",
        "country_code": "US"
      },
      "packages": [
        {
          "weight": {
            "value": 5,
            "unit": "pound"
          },
          "dimensions": {
            "length": 12,
            "width": 8,
            "height": 6,
            "unit": "inch"
          }
        }
      ]
    },
    "label_format": "pdf",
    "label_layout": "4x6"
  }'

Responses

Label created successfully using Rate Shopper. The response includes the selected carrier_id, service_code, and rate_shopper_id that was used.

Bodyapplication/json
rate_shopper_idstring(rate_attributes)read-only

The rate selection strategy that was used to create this label. This will match the rate_shopper_id provided in the request path.

Enum"best_value""cheapest""fastest"
label_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created.

Example: "se-28529731"
statusstring(label_status)read-only

The possible statuses that a shipping label can be in.

StatusDescription
processingWhen labels are created in a batch, it may take a few minutes for all of the labels in the batch to be created. During this period, they will be in processing status.
completedThe label was successfully created
errorThe label could not be created due to an error, such as an invalid delivery address
voidedThe label has been voided
Enum"processing""completed""error""voided"
shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The shipment that this label is for. ShipEngine can create a shipment for you automatically when you create a label, or you can create your own shipment and then use it to print a label

Example: "se-28529731"
external_shipment_idstring or null<= 50 charactersread-only

A unique user-defined key to identify a shipment. This can be used to retrieve the shipment.

external_order_idstring or nullread-only

ID that the Order Source assigned

ship_datestring(date-time)(date)^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?...read-only

An ISO 8601 string that represents a date, but not a specific time. The value may contain a time component, but it will be set to 00:00:00 UTC by ShipEngine.

Example: "2018-09-23T00:00:00.000Z"
created_atstring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
shipment_costobject(monetary_value)read-only

The cost of shipping, delivery confirmation, and other carrier charges. This amount does not include insurance costs.

insurance_costobject(monetary_value)read-only

The insurance cost for this package. Add this to the shipment_cost field to get the total cost.

requested_comparison_amountobject(monetary_value)read-only

The total shipping cost for the specified comparison_rate_type.

rate_detailsArray of objects(rate_detail)read-only

A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user.

tracking_numberstringnon-emptyread-only

The tracking number for the package. Tracking number formats vary across carriers.

Example: "782758401696"
is_return_labelboolean

Indicates whether this is a return label. You may also want to set the rma_number so you know what is being returned.

rma_numberstring or null

An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.

is_internationalbooleanread-only

Indicates whether this is an international shipment. That is, the originating country and destination country are different.

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

If this label was created as part of a batch, then this is the unique ID of that batch.

Example: "se-28529731"
carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The unique ID of the carrier account that was used to create this label

Example: "se-28529731"
charge_eventstring(label_charge_event)

The label charge event.

Enum"carrier_default""on_creation""on_carrier_acceptance"
service_codestring(service_code)^[a-z0-9]+(_[a-z0-9-]+)* ?$read-only

A carrier service, such as fedex_ground, usps_first_class_mail, flat_rate_envelope, etc.

Example: "usps_first_class_mail"
package_codestring(package_code)[ 1 .. 50 ] characters^[a-z0-9]+(_[a-z0-9]+)*$read-only

A package type, such as thick_envelope, small_flat_rate_box, large_package, etc. Use the code package for custom or unknown package types.

Example: "small_flat_rate_box"
voidedbooleanread-only

Indicates whether the label has been voided

voided_atstring or null(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
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"
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"
trackablebooleanread-only

Indicates whether the shipment is trackable, in which case the tracking_status field will reflect the current status and each package will have a tracking_number.

label_image_idstring or null(image_id)>= 4 characters

The label image resource that was used to create a custom label image.

Example: "img_DtBXupDBxREpHnwEXhTfgK"
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"
tracking_statusstring(tracking_status)read-only

The current status of the package, such as in_transit or delivered

Enum"unknown""in_transit""error""delivered"
confirmationstring(delivery_confirmation)read-only

The type of delivery confirmation that is required for this shipment.

Enum"none""delivery""signature""adult_signature""direct_signature""delivery_mailed""verbal_confirmation""delivery_code""age_verification_16_plus"
label_downloadobject(label_download)read-only

Reference to the various downloadable file formats for the generated label

form_downloadobject or null(optional_link)read-only

The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it.

qr_code_downloadobject or null(optional_link)read-only

The QR code download for the package

paperless_downloadobject or null(paperless_download)read-only

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

insurance_claimobject or null(optional_link)read-only

The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission.

packagesArray of objects(alternative_identifiers)read-only

The label's package(s).

Note: Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned.

alternative_identifiersArray of objects or null(alternative_identifier)read-only

Additional information some carriers may provide by which to identify a given label in their system.

tracking_urlstring or nullread-only

The URL to track the package. This URL is provided by the carrier and is unique to the tracking number.

Example: "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234"
ship_toobject(partial_shipping_address_to)read-only

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

void_typestring or null(void_type)read-only

Indicates how a label was voided. refund_assist means the label was voided through the Refund Assist program, while manual means it was voided manually by the user.

Enum"refund_assist""manual"
Example: "manual"
refund_detailsobject or null(refund_details)read-only

Information about the Refund Assist request for this label. This field is null if the label is not eligible for Refund Assist.

Response
application/json
{ "label_id": "se-123456", "status": "completed", "shipment_id": "se-789012", "ship_date": "2026-02-25T00:00:00Z", "created_at": "2026-02-25T10:30:00Z", "shipment_cost": { "currency": "usd", "amount": 7.33 }, "insurance_cost": { "currency": "usd", "amount": 0 }, "tracking_number": "1Z999AA10123456784", "is_return_label": false, "rma_number": null, "is_international": false, "batch_id": "se-987654", "carrier_id": "se-456789", "service_code": "usps_priority_mail", "package_code": "package", "voided": false, "label_format": "pdf", "label_layout": "4x6", "trackable": true, "carrier_code": "stamps_com", "tracking_status": "in_transit", "label_download": { "pdf": "https://api.shipengine.com/v1/downloads/10/label-123456.pdf", "png": "https://api.shipengine.com/v1/downloads/10/label-123456.png", "zpl": "https://api.shipengine.com/v1/downloads/10/label-123456.zpl", "href": "https://api.shipengine.com/v1/downloads/10/label-123456.pdf" }, "form_download": { "href": "https://api.shipengine.com/v1/downloads/10/form-123456.pdf" }, "insurance_claim": { "href": "https://api.shipengine.com/v1/claims/123456" }, "packages": [], "charge_event": "carrier_default", "rate_shopper_id": "cheapest" }

Purchase label with shipment ID

Request

Purchase a label using a shipment ID that has already been created with the desired address and package info.

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

Shipment ID

Example: se-28529731
Bodyapplication/jsonrequired
validate_addressstring(validate_address)

The possible validate address values

Enum"no_validation""validate_only""validate_and_clean"
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"
label_download_typestring(label_download_type)

There are two different ways to download a label:

Label Download TypeDescription
urlYou will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.
inlineYou will receive the Base64-encoded label as part of the response. No need for a second request to download the label.
Default "url"
Enum"url""inline"
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/labels/shipment/se-28529731 \
  -H 'API-Key: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "validate_address": "no_validation",
    "label_layout": "4x6",
    "label_format": "pdf",
    "label_download_type": "url",
    "display_scheme": "label"
  }'

Responses

The requested object creation was a success.

Bodyapplication/json
label_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created.

Example: "se-28529731"
statusstring(label_status)read-only

The possible statuses that a shipping label can be in.

StatusDescription
processingWhen labels are created in a batch, it may take a few minutes for all of the labels in the batch to be created. During this period, they will be in processing status.
completedThe label was successfully created
errorThe label could not be created due to an error, such as an invalid delivery address
voidedThe label has been voided
Enum"processing""completed""error""voided"
shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The shipment that this label is for. ShipEngine can create a shipment for you automatically when you create a label, or you can create your own shipment and then use it to print a label

Example: "se-28529731"
external_shipment_idstring or null<= 50 charactersread-only

A unique user-defined key to identify a shipment. This can be used to retrieve the shipment.

external_order_idstring or nullread-only

ID that the Order Source assigned

ship_datestring(date-time)(date)^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?...read-only

An ISO 8601 string that represents a date, but not a specific time. The value may contain a time component, but it will be set to 00:00:00 UTC by ShipEngine.

Example: "2018-09-23T00:00:00.000Z"
created_atstring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
shipment_costobject(monetary_value)read-only

The cost of shipping, delivery confirmation, and other carrier charges. This amount does not include insurance costs.

insurance_costobject(monetary_value)read-only

The insurance cost for this package. Add this to the shipment_cost field to get the total cost.

requested_comparison_amountobject(monetary_value)read-only

The total shipping cost for the specified comparison_rate_type.

rate_detailsArray of objects(rate_detail)read-only

A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user.

tracking_numberstringnon-emptyread-only

The tracking number for the package. Tracking number formats vary across carriers.

Example: "782758401696"
is_return_labelboolean

Indicates whether this is a return label. You may also want to set the rma_number so you know what is being returned.

rma_numberstring or null

An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.

is_internationalbooleanread-only

Indicates whether this is an international shipment. That is, the originating country and destination country are different.

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

If this label was created as part of a batch, then this is the unique ID of that batch.

Example: "se-28529731"
carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The unique ID of the carrier account that was used to create this label

Example: "se-28529731"
charge_eventstring(label_charge_event)

The label charge event.

Enum"carrier_default""on_creation""on_carrier_acceptance"
service_codestring(service_code)^[a-z0-9]+(_[a-z0-9-]+)* ?$read-only

A carrier service, such as fedex_ground, usps_first_class_mail, flat_rate_envelope, etc.

Example: "usps_first_class_mail"
package_codestring(package_code)[ 1 .. 50 ] characters^[a-z0-9]+(_[a-z0-9]+)*$read-only

A package type, such as thick_envelope, small_flat_rate_box, large_package, etc. Use the code package for custom or unknown package types.

Example: "small_flat_rate_box"
voidedbooleanread-only

Indicates whether the label has been voided

voided_atstring or null(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
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"
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"
trackablebooleanread-only

Indicates whether the shipment is trackable, in which case the tracking_status field will reflect the current status and each package will have a tracking_number.

label_image_idstring or null(image_id)>= 4 characters

The label image resource that was used to create a custom label image.

Example: "img_DtBXupDBxREpHnwEXhTfgK"
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"
tracking_statusstring(tracking_status)read-only

The current status of the package, such as in_transit or delivered

Enum"unknown""in_transit""error""delivered"
confirmationstring(delivery_confirmation)read-only

The type of delivery confirmation that is required for this shipment.

Enum"none""delivery""signature""adult_signature""direct_signature""delivery_mailed""verbal_confirmation""delivery_code""age_verification_16_plus"
label_downloadobject(label_download)read-only

Reference to the various downloadable file formats for the generated label

form_downloadobject or null(optional_link)read-only

The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it.

qr_code_downloadobject or null(optional_link)read-only

The QR code download for the package

paperless_downloadobject or null(paperless_download)read-only

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

insurance_claimobject or null(optional_link)read-only

The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission.

packagesArray of objects(alternative_identifiers)read-only

The label's package(s).

Note: Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned.

alternative_identifiersArray of objects or null(alternative_identifier)read-only

Additional information some carriers may provide by which to identify a given label in their system.

tracking_urlstring or nullread-only

The URL to track the package. This URL is provided by the carrier and is unique to the tracking number.

Example: "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234"
ship_toobject(partial_shipping_address_to)read-only

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

void_typestring or null(void_type)read-only

Indicates how a label was voided. refund_assist means the label was voided through the Refund Assist program, while manual means it was voided manually by the user.

Enum"refund_assist""manual"
Example: "manual"
refund_detailsobject or null(refund_details)read-only

Information about the Refund Assist request for this label. This field is null if the label is not eligible for Refund Assist.

Response
application/json
{ "label_id": "se-28529731", "status": "processing", "shipment_id": "se-28529731", "external_shipment_id": "string", "external_order_id": "string", "ship_date": "2018-09-23T00:00:00.000Z", "created_at": "2018-09-23T15:00:00.000Z", "shipment_cost": { "currency": "string", "amount": 0 }, "insurance_cost": { "currency": "string", "amount": 0 }, "requested_comparison_amount": { "currency": "string", "amount": 0 }, "rate_details": [ {} ], "tracking_number": "782758401696", "is_return_label": true, "rma_number": "string", "is_international": true, "batch_id": "se-28529731", "carrier_id": "se-28529731", "charge_event": "carrier_default", "service_code": "usps_first_class_mail", "package_code": "small_flat_rate_box", "voided": true, "voided_at": "2018-09-23T15:00:00.000Z", "label_format": "pdf", "display_scheme": "label", "label_layout": "4x6", "trackable": true, "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK", "carrier_code": "dhl_express", "tracking_status": "unknown", "confirmation": "none", "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" }, "qr_code_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 }, "insurance_claim": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "packages": [ {} ], "alternative_identifiers": [ {} ], "tracking_url": "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234", "ship_to": { "name": "John Doe", "phone": "+1 204-253-9411 ext. 123", "email": "example@example.com", "company_name": "The Home Depot", "address_line1": "1999 Bishop Grandin Blvd.", "address_line2": "Unit 408", "address_line3": "Building #7", "city_locality": "Winnipeg", "state_province": "Manitoba", "postal_code": "78756-3717", "country_code": "CA", "address_residential_indicator": "no", "instructions": "string", "geolocation": [] }, "void_type": "manual", "refund_details": { "refund_status": "request_scheduled", "request_date": "2018-09-23T15:00:00.000Z", "amount_paid": {}, "amount_requested": {}, "amount_approved": {}, "amount_credited": {} } }

Get label by ID

Request

Retrieve information for individual labels.

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

Label ID

Example: se-28529731
Query
label_download_typestring(label_download_type)

There are two different ways to download a label:

Label Download TypeDescription
urlYou will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.
inlineYou will receive the Base64-encoded label as part of the response. No need for a second request to download the label.
Enum"url""inline"
Example: label_download_type=url
curl -i -X GET \
  'https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/labels/se-28529731?label_download_type=url' \
  -H 'API-Key: YOUR_API_KEY_HERE'

Responses

The request was a success.

Bodyapplication/json
label_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created.

Example: "se-28529731"
statusstring(label_status)read-only

The possible statuses that a shipping label can be in.

StatusDescription
processingWhen labels are created in a batch, it may take a few minutes for all of the labels in the batch to be created. During this period, they will be in processing status.
completedThe label was successfully created
errorThe label could not be created due to an error, such as an invalid delivery address
voidedThe label has been voided
Enum"processing""completed""error""voided"
shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The shipment that this label is for. ShipEngine can create a shipment for you automatically when you create a label, or you can create your own shipment and then use it to print a label

Example: "se-28529731"
external_shipment_idstring or null<= 50 charactersread-only

A unique user-defined key to identify a shipment. This can be used to retrieve the shipment.

external_order_idstring or nullread-only

ID that the Order Source assigned

ship_datestring(date-time)(date)^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?...read-only

An ISO 8601 string that represents a date, but not a specific time. The value may contain a time component, but it will be set to 00:00:00 UTC by ShipEngine.

Example: "2018-09-23T00:00:00.000Z"
created_atstring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
shipment_costobject(monetary_value)read-only

The cost of shipping, delivery confirmation, and other carrier charges. This amount does not include insurance costs.

insurance_costobject(monetary_value)read-only

The insurance cost for this package. Add this to the shipment_cost field to get the total cost.

requested_comparison_amountobject(monetary_value)read-only

The total shipping cost for the specified comparison_rate_type.

rate_detailsArray of objects(rate_detail)read-only

A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user.

tracking_numberstringnon-emptyread-only

The tracking number for the package. Tracking number formats vary across carriers.

Example: "782758401696"
is_return_labelboolean

Indicates whether this is a return label. You may also want to set the rma_number so you know what is being returned.

rma_numberstring or null

An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.

is_internationalbooleanread-only

Indicates whether this is an international shipment. That is, the originating country and destination country are different.

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

If this label was created as part of a batch, then this is the unique ID of that batch.

Example: "se-28529731"
carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The unique ID of the carrier account that was used to create this label

Example: "se-28529731"
charge_eventstring(label_charge_event)

The label charge event.

Enum"carrier_default""on_creation""on_carrier_acceptance"
service_codestring(service_code)^[a-z0-9]+(_[a-z0-9-]+)* ?$read-only

A carrier service, such as fedex_ground, usps_first_class_mail, flat_rate_envelope, etc.

Example: "usps_first_class_mail"
package_codestring(package_code)[ 1 .. 50 ] characters^[a-z0-9]+(_[a-z0-9]+)*$read-only

A package type, such as thick_envelope, small_flat_rate_box, large_package, etc. Use the code package for custom or unknown package types.

Example: "small_flat_rate_box"
voidedbooleanread-only

Indicates whether the label has been voided

voided_atstring or null(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
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"
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"
trackablebooleanread-only

Indicates whether the shipment is trackable, in which case the tracking_status field will reflect the current status and each package will have a tracking_number.

label_image_idstring or null(image_id)>= 4 characters

The label image resource that was used to create a custom label image.

Example: "img_DtBXupDBxREpHnwEXhTfgK"
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"
tracking_statusstring(tracking_status)read-only

The current status of the package, such as in_transit or delivered

Enum"unknown""in_transit""error""delivered"
confirmationstring(delivery_confirmation)read-only

The type of delivery confirmation that is required for this shipment.

Enum"none""delivery""signature""adult_signature""direct_signature""delivery_mailed""verbal_confirmation""delivery_code""age_verification_16_plus"
label_downloadobject(label_download)read-only

Reference to the various downloadable file formats for the generated label

form_downloadobject or null(optional_link)read-only

The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it.

qr_code_downloadobject or null(optional_link)read-only

The QR code download for the package

paperless_downloadobject or null(paperless_download)read-only

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

insurance_claimobject or null(optional_link)read-only

The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission.

packagesArray of objects(alternative_identifiers)read-only

The label's package(s).

Note: Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned.

alternative_identifiersArray of objects or null(alternative_identifier)read-only

Additional information some carriers may provide by which to identify a given label in their system.

tracking_urlstring or nullread-only

The URL to track the package. This URL is provided by the carrier and is unique to the tracking number.

Example: "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234"
ship_toobject(partial_shipping_address_to)read-only

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

void_typestring or null(void_type)read-only

Indicates how a label was voided. refund_assist means the label was voided through the Refund Assist program, while manual means it was voided manually by the user.

Enum"refund_assist""manual"
Example: "manual"
refund_detailsobject or null(refund_details)read-only

Information about the Refund Assist request for this label. This field is null if the label is not eligible for Refund Assist.

Response
application/json
{ "label_id": "se-28529731", "status": "processing", "shipment_id": "se-28529731", "external_shipment_id": "string", "external_order_id": "string", "ship_date": "2018-09-23T00:00:00.000Z", "created_at": "2018-09-23T15:00:00.000Z", "shipment_cost": { "currency": "string", "amount": 0 }, "insurance_cost": { "currency": "string", "amount": 0 }, "requested_comparison_amount": { "currency": "string", "amount": 0 }, "rate_details": [ {} ], "tracking_number": "782758401696", "is_return_label": true, "rma_number": "string", "is_international": true, "batch_id": "se-28529731", "carrier_id": "se-28529731", "charge_event": "carrier_default", "service_code": "usps_first_class_mail", "package_code": "small_flat_rate_box", "voided": true, "voided_at": "2018-09-23T15:00:00.000Z", "label_format": "pdf", "display_scheme": "label", "label_layout": "4x6", "trackable": true, "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK", "carrier_code": "dhl_express", "tracking_status": "unknown", "confirmation": "none", "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" }, "qr_code_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 }, "insurance_claim": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "packages": [ {} ], "alternative_identifiers": [ {} ], "tracking_url": "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234", "ship_to": { "name": "John Doe", "phone": "+1 204-253-9411 ext. 123", "email": "example@example.com", "company_name": "The Home Depot", "address_line1": "1999 Bishop Grandin Blvd.", "address_line2": "Unit 408", "address_line3": "Building #7", "city_locality": "Winnipeg", "state_province": "Manitoba", "postal_code": "78756-3717", "country_code": "CA", "address_residential_indicator": "no", "instructions": "string", "geolocation": [] }, "void_type": "manual", "refund_details": { "refund_status": "request_scheduled", "request_date": "2018-09-23T15:00:00.000Z", "amount_paid": {}, "amount_requested": {}, "amount_approved": {}, "amount_credited": {} } }

Create a return label

Request

Create a return label for an existing outbound label. You can optionally specify a custom RMA (Return Merchandise Authorization) number. If no RMA number is provided, the system will auto-generate one.

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

Label ID

Example: se-28529731
Bodyapplication/jsonrequired
charge_eventstring(label_charge_event)

The label charge event.

Enum"carrier_default""on_creation""on_carrier_acceptance"
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"
label_download_typestring(label_download_type)write-only

There are two different ways to download a label:

Label Download TypeDescription
urlYou will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.
inlineYou will receive the Base64-encoded label as part of the response. No need for a second request to download the label.
Default "url"
Enum"url""inline"
display_schemestring(display_scheme)

The display format that the label should be shown in.

Default "label"
Enum"label""paperless""label_and_paperless"
label_image_idstring or null(image_id)>= 4 characters

The label image resource that was used to create a custom label image.

Example: "img_DtBXupDBxREpHnwEXhTfgK"
rma_numberstring or null

An optional Return Merchandise Authorization number. If provided, this value will be used as the return label's RMA number. If omitted, the system will auto-generate an RMA number (current default behavior). You can set it to any string value.

curl -i -X POST \
  https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/labels/se-28529731/return \
  -H 'API-Key: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "label_format": "pdf",
    "label_layout": "4x6",
    "charge_event": "carrier_default",
    "rma_number": "RMA-2024-001234"
  }'

Responses

The request was a success.

Bodyapplication/json
label_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created.

Example: "se-28529731"
statusstring(label_status)read-only

The possible statuses that a shipping label can be in.

StatusDescription
processingWhen labels are created in a batch, it may take a few minutes for all of the labels in the batch to be created. During this period, they will be in processing status.
completedThe label was successfully created
errorThe label could not be created due to an error, such as an invalid delivery address
voidedThe label has been voided
Enum"processing""completed""error""voided"
shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The shipment that this label is for. ShipEngine can create a shipment for you automatically when you create a label, or you can create your own shipment and then use it to print a label

Example: "se-28529731"
external_shipment_idstring or null<= 50 charactersread-only

A unique user-defined key to identify a shipment. This can be used to retrieve the shipment.

external_order_idstring or nullread-only

ID that the Order Source assigned

ship_datestring(date-time)(date)^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?...read-only

An ISO 8601 string that represents a date, but not a specific time. The value may contain a time component, but it will be set to 00:00:00 UTC by ShipEngine.

Example: "2018-09-23T00:00:00.000Z"
created_atstring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
shipment_costobject(monetary_value)read-only

The cost of shipping, delivery confirmation, and other carrier charges. This amount does not include insurance costs.

insurance_costobject(monetary_value)read-only

The insurance cost for this package. Add this to the shipment_cost field to get the total cost.

requested_comparison_amountobject(monetary_value)read-only

The total shipping cost for the specified comparison_rate_type.

rate_detailsArray of objects(rate_detail)read-only

A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user.

tracking_numberstringnon-emptyread-only

The tracking number for the package. Tracking number formats vary across carriers.

Example: "782758401696"
is_return_labelboolean

Indicates whether this is a return label. You may also want to set the rma_number so you know what is being returned.

rma_numberstring or null

An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.

is_internationalbooleanread-only

Indicates whether this is an international shipment. That is, the originating country and destination country are different.

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

If this label was created as part of a batch, then this is the unique ID of that batch.

Example: "se-28529731"
carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The unique ID of the carrier account that was used to create this label

Example: "se-28529731"
charge_eventstring(label_charge_event)

The label charge event.

Enum"carrier_default""on_creation""on_carrier_acceptance"
service_codestring(service_code)^[a-z0-9]+(_[a-z0-9-]+)* ?$read-only

A carrier service, such as fedex_ground, usps_first_class_mail, flat_rate_envelope, etc.

Example: "usps_first_class_mail"
package_codestring(package_code)[ 1 .. 50 ] characters^[a-z0-9]+(_[a-z0-9]+)*$read-only

A package type, such as thick_envelope, small_flat_rate_box, large_package, etc. Use the code package for custom or unknown package types.

Example: "small_flat_rate_box"
voidedbooleanread-only

Indicates whether the label has been voided

voided_atstring or null(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
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"
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"
trackablebooleanread-only

Indicates whether the shipment is trackable, in which case the tracking_status field will reflect the current status and each package will have a tracking_number.

label_image_idstring or null(image_id)>= 4 characters

The label image resource that was used to create a custom label image.

Example: "img_DtBXupDBxREpHnwEXhTfgK"
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"
tracking_statusstring(tracking_status)read-only

The current status of the package, such as in_transit or delivered

Enum"unknown""in_transit""error""delivered"
confirmationstring(delivery_confirmation)read-only

The type of delivery confirmation that is required for this shipment.

Enum"none""delivery""signature""adult_signature""direct_signature""delivery_mailed""verbal_confirmation""delivery_code""age_verification_16_plus"
label_downloadobject(label_download)read-only

Reference to the various downloadable file formats for the generated label

form_downloadobject or null(optional_link)read-only

The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it.

qr_code_downloadobject or null(optional_link)read-only

The QR code download for the package

paperless_downloadobject or null(paperless_download)read-only

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

insurance_claimobject or null(optional_link)read-only

The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission.

packagesArray of objects(alternative_identifiers)read-only

The label's package(s).

Note: Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned.

alternative_identifiersArray of objects or null(alternative_identifier)read-only

Additional information some carriers may provide by which to identify a given label in their system.

tracking_urlstring or nullread-only

The URL to track the package. This URL is provided by the carrier and is unique to the tracking number.

Example: "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234"
ship_toobject(partial_shipping_address_to)read-only

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

void_typestring or null(void_type)read-only

Indicates how a label was voided. refund_assist means the label was voided through the Refund Assist program, while manual means it was voided manually by the user.

Enum"refund_assist""manual"
Example: "manual"
refund_detailsobject or null(refund_details)read-only

Information about the Refund Assist request for this label. This field is null if the label is not eligible for Refund Assist.

Response
application/json
{ "label_id": "se-28529731", "status": "processing", "shipment_id": "se-28529731", "external_shipment_id": "string", "external_order_id": "string", "ship_date": "2018-09-23T00:00:00.000Z", "created_at": "2018-09-23T15:00:00.000Z", "shipment_cost": { "currency": "string", "amount": 0 }, "insurance_cost": { "currency": "string", "amount": 0 }, "requested_comparison_amount": { "currency": "string", "amount": 0 }, "rate_details": [ {} ], "tracking_number": "782758401696", "is_return_label": true, "rma_number": "string", "is_international": true, "batch_id": "se-28529731", "carrier_id": "se-28529731", "charge_event": "carrier_default", "service_code": "usps_first_class_mail", "package_code": "small_flat_rate_box", "voided": true, "voided_at": "2018-09-23T15:00:00.000Z", "label_format": "pdf", "display_scheme": "label", "label_layout": "4x6", "trackable": true, "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK", "carrier_code": "dhl_express", "tracking_status": "unknown", "confirmation": "none", "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" }, "qr_code_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 }, "insurance_claim": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "packages": [ {} ], "alternative_identifiers": [ {} ], "tracking_url": "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234", "ship_to": { "name": "John Doe", "phone": "+1 204-253-9411 ext. 123", "email": "example@example.com", "company_name": "The Home Depot", "address_line1": "1999 Bishop Grandin Blvd.", "address_line2": "Unit 408", "address_line3": "Building #7", "city_locality": "Winnipeg", "state_province": "Manitoba", "postal_code": "78756-3717", "country_code": "CA", "address_residential_indicator": "no", "instructions": "string", "geolocation": [] }, "void_type": "manual", "refund_details": { "refund_status": "request_scheduled", "request_date": "2018-09-23T15:00:00.000Z", "amount_paid": {}, "amount_requested": {}, "amount_approved": {}, "amount_credited": {} } }

Get label tracking information

Request

Retrieve the label's tracking information

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

Label ID

Example: se-28529731
curl -i -X GET \
  https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/labels/se-28529731/track \
  -H 'API-Key: YOUR_API_KEY_HERE'

Responses

The request was a success.

Bodyapplication/json
tracking_numberstring(tracking_number)non-emptyrequired

A tracking number for a package. The format depends on the carrier.

Example: "1Z932R800392060079"
tracking_urlstringread-only

Carrier Tracking Url, if available

Example: "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234"
status_codestring(status_code)read-onlyrequired

The tracking status codes

ValueDescription
UNUnknown
ACAccepted
ITIn Transit
DEDelivered
EXException
ATDelivery Attempt
NYNot Yet In System
SPDelivered To Collection Location
Enum"UN""AC""IT""DE""EX""AT""NY""SP"
Example: "DE"
status_detail_codestring(status_detail_code)read-only

The tracking status detail codes

ValueDescription
CARRIER_STATUS_NOT_MAPPEDStatus not mapped. Please check the carrier's website for updates.
SHIPMENT_CREATEDYour tracking number is ready. Your parcel is waiting to be registered in the carrier system and scheduled for pickup.
AWAITING_PICKUP_DROP_OFFYour parcel is waiting to be handed over to the carrier.
DROPPED_OFFYour parcel has been dropped off and is ready for carrier processing.
ELEC_ADVICE_RECD_BY_CARRIERYour shipment is now in the carrier's system.
PICKED_UPYour parcel has been picked up by the carrier.
CUSTOMS_CLEAREDYour parcel has cleared customs and is continuing its journey.
CUSTOMS_PROCESSINGYour parcel is currently being processed by customs.
DELIVERY_ARRANGED_WITH_RECIPIENTYour parcel's delivery has been arranged with the carrier.
HUB_SCAN_OUTYour parcel has left the carrier's hub.
HUB_SCAN_INYour parcel has arrived at the carrier's hub for processing.
IN_TRANSITYour shipment is on its way between the carrier hubs.
INFORMATIONThe carrier has shared additional information about your parcel.
PARCEL_OVER_LABELLEDYour parcel's label has been updated by the carrier, which may affect tracking visibility.
PARCEL_UPDATE_NOTIFICATIONThe carrier has sent you an update on your parcel status via SMS or email.
RECEIVED_BY_CARRIERYour parcel has been received by the carrier and is beginning its journey.
RECEIVED_LOCAL_DELIVERY_DEPOTYour parcel has arrived at the local delivery depot and is almost ready for delivery.
SUB_CONTRACTOR_EVENTThe carrier has shared additional information about your parcel's handling by a delivery partner.
SUB_CONTRACTOR_RECEIVEDYour parcel has been received by the carrier's local delivery partner.
PARCEL_REDIRECTEDYour parcel has been redirected to a new delivery address per your request.
DELIVERY_SCHEDULEDYour parcel's delivery has been scheduled and will soon be out for delivery.
HUB_PROCESSINGYour parcel is being processed at a carrier hub.
DELIVERY_RESCHEDULEDYour parcel's delivery has been rescheduled due to operational issues.
ATTEMPTED_DELIVERYThe carrier attempted to deliver your parcel but was unable to complete delivery.
ATTEMPTED_DELIVERY_FINALThe carrier made a final attempt to deliver your parcel but was unable to complete delivery. Please check the carrier's instructions for next steps.
COD_AMOUNT_PAIDCash on delivery payment received.
CUSTOMER_CARDEDDelivery attempt failed. Please follow delivery instructions left by the carrier.
OUT_FOR_DELIVERYYour parcel is on its way and will be delivered today.
AWAITING_COLLECTION_FROM_PICKUP_POINTYour parcel is ready for collection at the selected pickup point.
COLLECT_AT_LOCAL_POYour parcel is ready for collection at your local post office.
CUSTOMER_TO_COLLECT_FROM_CARRIERYour parcel is available for collection from the carrier's local delivery unit.
DELIVERED_TO_RECEPTIONYour parcel has been delivered to your building's reception or designated mail area.
DELIVEREDYour parcel has been successfully delivered.
DELIVERED_DAMAGEDYour parcel was delivered but arrived with visible damage.
DELIVERED_IN_PARTPart of your shipment has been delivered. Check for updates on the rest.
DELIVERED_SPECIFIED_SAFE_PLACEYour parcel has been delivered to your specified safe place.
DELIVERED_TO_ALTERNATIVE_DELIVERY_LOCATIONYour parcel was delivered to an alternative location due to the delivery company being unable to deliver it to the specified address. Check carrier instructions for pickup details.
DELIVERED_TO_NEIGHBOURYour parcel was delivered to your neighbor.
DELIVERED_TO_PO_BOXYour parcel has been delivered to your specified PO Box.
PARCEL_COLLECTED_FROM_PICKUP_POINTYour package has been picked up from the pick up point.
POST_TRANSIT_STATUSThe carrier has added more information about your delivery.
PROOF_OF_DELIVERYThe carrier has confirmed delivery with proof, such as a signature or photo.
PICKUP_FAILEDParcel pickup failed. The delivery company will try again soon.
NOT_YET_RECEIVED_BY_CARRIERThe carrier has not yet received your parcel, which may cause a delay.
PARCEL_DAMAGEDYour parcel was damaged in transit but will still be delivered.
ADDRESS_QUERYThere is an issue with the delivery address, which may delay your parcel.
CARRIER_DELAYSYour parcel is delayed due to issues within the carrier network.
DELAYED_NOT_CARRIERYour parcel is delayed due to circumstances beyond the carrier's control.
HELD_BY_CARRIERYour parcel is being held due to an operational issue. Contact with the carrier for more information.
HELD_BY_CARRIER_FOR_CLEARANCE_PRE_PROCESSINGYour parcel is being held by the carrier for customs documentation checks. This may occur when the carrier must confirm documentation before the parcel can continue its journey.
HELD_BY_CUSTOMSYour parcel is being held at customs, which may delay delivery.
INCORRECT_DECLARATIONYour parcel has been incorrectly declared but is still moving forward for delivery.
MISROUTEDYour parcel was sent to the wrong place due to a routing error but is being redirected.
PARCEL_REPACKEDYour parcel was repackaged by the carrier due to damage and will still be delivered.
RECD_BY_CARRIER_NO_ELEC_ADVICEYour parcel has been received by the carrier but may experience delays due to missing pre-advice.
COD_AMOUNT_NOT_PAIDDelivery failed due to unpaid cash on delivery. Please follow carrier instructions.
CUSTOMER_IDENTIFICATION_FAILEDDelivery couldn't be completed as identification requirements were not met.
NO_ACCESS_TO_RECIPIENTS_ADDRESSThe carrier couldn't access the delivery location due to restricted entry.
CANCELLEDYour parcel has been cancelled.
CUSTOMER_MOVEDDelivery failed as the recipient is no longer at the specified address. Your parcel is being returned.
HAZARDOUS_PROHIBITEDYour parcel contains restricted items and will not be delivered.
NOT_COLLECTED_FROM_PICKUP_POINTYour parcel was not collected from the pickup point within the designated time and will be returned.
NOT_DELIVEREDAll delivery attempts failed. Your parcel is being returned to the sender.
NOT_DELIVERED_ADDRESSEE_DECEASEDThe parcel could not be delivered as the addressee is reported deceased.
PARCEL_DISPOSEDYour parcel has been disposed of due to its contents or condition and will not be delivered.
PARCEL_LOSTThe carrier has reported that your parcel is lost and will not be delivered.
PARCEL_OUTSIDE_OF_SERVICE_CAPABILITYThe parcel cannot be delivered as it exceeds the carrier's service limits.
REFUSED_BY_CUSTOMERYou have refused the parcel, and it will be returned to the sender.
RETURN_TO_SENDERYour parcel is being returned to the sender due to delivery issues.
UNSPECIFIED_EXCEPTIONThe carrier has reported an issue with your parcel, but details are unavailable.
TRACKING_EXPIREDTracking for this parcel has expired. If you are still expecting this delivery, please contact the carrier for assistance.
DUTY_NOT_PAIDThe import taxes or duties for this package havent been paid and it may be subject to disposal by customs authorities if payment is not made.
PARCEL_REDIRECTED_BY_CARRIERThe carrier has redirected your parcel due to an operational issue. The package is likely being rerouted to a nearby pickup point. You may contact the carrier for more details about the new delivery location.
DELIVERED_TO_PICKUP_POINTYour package has been delivered to the pickup point. You will be notified when its ready for collection.
UNDELIVERABLE_RETURNED_TO_SENDERThe shipment has been returned to the sender. Please contact the sender for further information.
Enum"CARRIER_STATUS_NOT_MAPPED""SHIPMENT_CREATED""AWAITING_PICKUP_DROP_OFF""DROPPED_OFF""ELEC_ADVICE_RECD_BY_CARRIER""PICKED_UP""CUSTOMS_CLEARED""CUSTOMS_PROCESSING""DELIVERY_ARRANGED_WITH_RECIPIENT""HUB_SCAN_OUT"
Example: "DELIVERED"
carrier_codestring(carrier_code)^[a-z0-9]+(_[a-z0-9]+)*$

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

Example: "dhl_express"
carrier_idinteger(int32)read-only

The unique ID of the carrier account that was used to create this label

status_descriptionstring>= 0 charactersread-only

Status description

Example: "Delivered"
status_detail_descriptionstring>= 0 charactersread-only

Status detail description

Example: "Your parcel has been successfully delivered."
carrier_status_codestringnon-emptyread-onlyrequired

Carrier status code

Example: "1"
carrier_detail_codestringnon-emptyread-only

Carrier detail code

Example: "OT"
carrier_status_descriptionstring>= 0 charactersread-only

carrier status description

Example: "Your item was delivered in or at the mailbox at 9:10 am on March"
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"
estimated_delivery_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"
actual_delivery_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"
exception_descriptionstring>= 0 charactersread-only

Exception description

eventsArray of objects(track_event)read-onlyrequired

The events that have occured during the lifetime of this tracking number.

events[].​occurred_atstring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...required

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
events[].​carrier_occurred_atstring(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"
events[].​descriptionstring>= 0 charactersread-only

Event description

Example: "Delivered, In/At Mailbox"
events[].​city_localitystring>= 0 charactersread-onlyrequired

City locality

Example: "AUSTIN"
events[].​state_provincestring>= 2 charactersread-onlyrequired

State province

Example: "TX"
events[].​postal_codestring>= 0 charactersread-onlyrequired

Postal code

Example: "78756"
events[].​country_codestring(country_code)= 2 characters
Example: "CA"
events[].​company_namestring>= 0 charactersread-only

Company Name

Example: "Stamps.com"
events[].​signerstring>= 0 charactersread-only

Signer information

events[].​event_codestring>= 0 characters

Event Code

events[].​carrier_detail_codestringnon-emptyread-onlyrequired

Carrier detail code

Example: "OT"
events[].​status_codestring(status_code)read-onlyrequired

The tracking status codes

ValueDescription
UNUnknown
ACAccepted
ITIn Transit
DEDelivered
EXException
ATDelivery Attempt
NYNot Yet In System
SPDelivered To Collection Location
Enum"UN""AC""IT""DE""EX""AT""NY""SP"
Example: "IT"
events[].​status_detail_codestring(status_detail_code)read-only

The tracking status detail codes

ValueDescription
CARRIER_STATUS_NOT_MAPPEDStatus not mapped. Please check the carrier's website for updates.
SHIPMENT_CREATEDYour tracking number is ready. Your parcel is waiting to be registered in the carrier system and scheduled for pickup.
AWAITING_PICKUP_DROP_OFFYour parcel is waiting to be handed over to the carrier.
DROPPED_OFFYour parcel has been dropped off and is ready for carrier processing.
ELEC_ADVICE_RECD_BY_CARRIERYour shipment is now in the carrier's system.
PICKED_UPYour parcel has been picked up by the carrier.
CUSTOMS_CLEAREDYour parcel has cleared customs and is continuing its journey.
CUSTOMS_PROCESSINGYour parcel is currently being processed by customs.
DELIVERY_ARRANGED_WITH_RECIPIENTYour parcel's delivery has been arranged with the carrier.
HUB_SCAN_OUTYour parcel has left the carrier's hub.
HUB_SCAN_INYour parcel has arrived at the carrier's hub for processing.
IN_TRANSITYour shipment is on its way between the carrier hubs.
INFORMATIONThe carrier has shared additional information about your parcel.
PARCEL_OVER_LABELLEDYour parcel's label has been updated by the carrier, which may affect tracking visibility.
PARCEL_UPDATE_NOTIFICATIONThe carrier has sent you an update on your parcel status via SMS or email.
RECEIVED_BY_CARRIERYour parcel has been received by the carrier and is beginning its journey.
RECEIVED_LOCAL_DELIVERY_DEPOTYour parcel has arrived at the local delivery depot and is almost ready for delivery.
SUB_CONTRACTOR_EVENTThe carrier has shared additional information about your parcel's handling by a delivery partner.
SUB_CONTRACTOR_RECEIVEDYour parcel has been received by the carrier's local delivery partner.
PARCEL_REDIRECTEDYour parcel has been redirected to a new delivery address per your request.
DELIVERY_SCHEDULEDYour parcel's delivery has been scheduled and will soon be out for delivery.
HUB_PROCESSINGYour parcel is being processed at a carrier hub.
DELIVERY_RESCHEDULEDYour parcel's delivery has been rescheduled due to operational issues.
ATTEMPTED_DELIVERYThe carrier attempted to deliver your parcel but was unable to complete delivery.
ATTEMPTED_DELIVERY_FINALThe carrier made a final attempt to deliver your parcel but was unable to complete delivery. Please check the carrier's instructions for next steps.
COD_AMOUNT_PAIDCash on delivery payment received.
CUSTOMER_CARDEDDelivery attempt failed. Please follow delivery instructions left by the carrier.
OUT_FOR_DELIVERYYour parcel is on its way and will be delivered today.
AWAITING_COLLECTION_FROM_PICKUP_POINTYour parcel is ready for collection at the selected pickup point.
COLLECT_AT_LOCAL_POYour parcel is ready for collection at your local post office.
CUSTOMER_TO_COLLECT_FROM_CARRIERYour parcel is available for collection from the carrier's local delivery unit.
DELIVERED_TO_RECEPTIONYour parcel has been delivered to your building's reception or designated mail area.
DELIVEREDYour parcel has been successfully delivered.
DELIVERED_DAMAGEDYour parcel was delivered but arrived with visible damage.
DELIVERED_IN_PARTPart of your shipment has been delivered. Check for updates on the rest.
DELIVERED_SPECIFIED_SAFE_PLACEYour parcel has been delivered to your specified safe place.
DELIVERED_TO_ALTERNATIVE_DELIVERY_LOCATIONYour parcel was delivered to an alternative location due to the delivery company being unable to deliver it to the specified address. Check carrier instructions for pickup details.
DELIVERED_TO_NEIGHBOURYour parcel was delivered to your neighbor.
DELIVERED_TO_PO_BOXYour parcel has been delivered to your specified PO Box.
PARCEL_COLLECTED_FROM_PICKUP_POINTYour package has been picked up from the pick up point.
POST_TRANSIT_STATUSThe carrier has added more information about your delivery.
PROOF_OF_DELIVERYThe carrier has confirmed delivery with proof, such as a signature or photo.
PICKUP_FAILEDParcel pickup failed. The delivery company will try again soon.
NOT_YET_RECEIVED_BY_CARRIERThe carrier has not yet received your parcel, which may cause a delay.
PARCEL_DAMAGEDYour parcel was damaged in transit but will still be delivered.
ADDRESS_QUERYThere is an issue with the delivery address, which may delay your parcel.
CARRIER_DELAYSYour parcel is delayed due to issues within the carrier network.
DELAYED_NOT_CARRIERYour parcel is delayed due to circumstances beyond the carrier's control.
HELD_BY_CARRIERYour parcel is being held due to an operational issue. Contact with the carrier for more information.
HELD_BY_CARRIER_FOR_CLEARANCE_PRE_PROCESSINGYour parcel is being held by the carrier for customs documentation checks. This may occur when the carrier must confirm documentation before the parcel can continue its journey.
HELD_BY_CUSTOMSYour parcel is being held at customs, which may delay delivery.
INCORRECT_DECLARATIONYour parcel has been incorrectly declared but is still moving forward for delivery.
MISROUTEDYour parcel was sent to the wrong place due to a routing error but is being redirected.
PARCEL_REPACKEDYour parcel was repackaged by the carrier due to damage and will still be delivered.
RECD_BY_CARRIER_NO_ELEC_ADVICEYour parcel has been received by the carrier but may experience delays due to missing pre-advice.
COD_AMOUNT_NOT_PAIDDelivery failed due to unpaid cash on delivery. Please follow carrier instructions.
CUSTOMER_IDENTIFICATION_FAILEDDelivery couldn't be completed as identification requirements were not met.
NO_ACCESS_TO_RECIPIENTS_ADDRESSThe carrier couldn't access the delivery location due to restricted entry.
CANCELLEDYour parcel has been cancelled.
CUSTOMER_MOVEDDelivery failed as the recipient is no longer at the specified address. Your parcel is being returned.
HAZARDOUS_PROHIBITEDYour parcel contains restricted items and will not be delivered.
NOT_COLLECTED_FROM_PICKUP_POINTYour parcel was not collected from the pickup point within the designated time and will be returned.
NOT_DELIVEREDAll delivery attempts failed. Your parcel is being returned to the sender.
NOT_DELIVERED_ADDRESSEE_DECEASEDThe parcel could not be delivered as the addressee is reported deceased.
PARCEL_DISPOSEDYour parcel has been disposed of due to its contents or condition and will not be delivered.
PARCEL_LOSTThe carrier has reported that your parcel is lost and will not be delivered.
PARCEL_OUTSIDE_OF_SERVICE_CAPABILITYThe parcel cannot be delivered as it exceeds the carrier's service limits.
REFUSED_BY_CUSTOMERYou have refused the parcel, and it will be returned to the sender.
RETURN_TO_SENDERYour parcel is being returned to the sender due to delivery issues.
UNSPECIFIED_EXCEPTIONThe carrier has reported an issue with your parcel, but details are unavailable.
TRACKING_EXPIREDTracking for this parcel has expired. If you are still expecting this delivery, please contact the carrier for assistance.
DUTY_NOT_PAIDThe import taxes or duties for this package havent been paid and it may be subject to disposal by customs authorities if payment is not made.
PARCEL_REDIRECTED_BY_CARRIERThe carrier has redirected your parcel due to an operational issue. The package is likely being rerouted to a nearby pickup point. You may contact the carrier for more details about the new delivery location.
DELIVERED_TO_PICKUP_POINTYour package has been delivered to the pickup point. You will be notified when its ready for collection.
UNDELIVERABLE_RETURNED_TO_SENDERThe shipment has been returned to the sender. Please contact the sender for further information.
Enum"CARRIER_STATUS_NOT_MAPPED""SHIPMENT_CREATED""AWAITING_PICKUP_DROP_OFF""DROPPED_OFF""ELEC_ADVICE_RECD_BY_CARRIER""PICKED_UP""CUSTOMS_CLEARED""CUSTOMS_PROCESSING""DELIVERY_ARRANGED_WITH_RECIPIENT""HUB_SCAN_OUT"
Example: "IN_TRANSIT"
events[].​status_descriptionstringnon-emptyread-onlyrequired

Event Status Description

Example: "In Transit"
events[].​status_detail_descriptionstring>= 0 charactersread-only

Event Status Detail Description

Example: "Your shipment is on its way between the carrier hubs."
events[].​carrier_status_codestringnon-emptyread-onlyrequired

Carrier status code

Example: "1"
events[].​carrier_status_descriptionstring>= 0 charactersread-onlyrequired

carrier status description

Example: "Your item was delivered in or at the mailbox at 9:10 am on March"
events[].​latitudenumber(double)[ -90 .. 90 ]

Latitude coordinate of tracking event.

events[].​longitudenumber(double)[ -180 .. 180 ]

Longitude coordinate of tracking event.

events[].​proof_of_delivery_urlstringread-only

A URL to an image captured at the time of delivery, serving as evidence that the shipment was successfully delivered to the recipient. It can be used to capture things like recipient's signature, location of delivery, condition of the package upon delivery, etc.

Example: "https://tracking-service-prod.s3.amazonaws.com/proof-of-delivery/dummy_module/0000000001/bc6dd17969bd97f24262ca73ac6ff36062aafecba25ef16d4178264bf7c0e72c.png"
Response
application/json
{ "tracking_number": "1Z932R800392060079", "tracking_url": "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234", "status_code": "DE", "status_detail_code": "DELIVERED", "carrier_code": "dhl_express", "carrier_id": 0, "status_description": "Delivered", "status_detail_description": "Your parcel has been successfully delivered.", "carrier_status_code": "1", "carrier_detail_code": "OT", "carrier_status_description": "Your item was delivered in or at the mailbox at 9:10 am on March", "ship_date": "2018-09-23T15:00:00.000Z", "estimated_delivery_date": "2018-09-23T15:00:00.000Z", "actual_delivery_date": "2018-09-23T15:00:00.000Z", "exception_description": "string", "events": [ {} ] }

Void a label by ID

Request

Void a label by ID to get a refund.

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

Label ID

Example: se-28529731
curl -i -X PUT \
  https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/labels/se-28529731/void \
  -H 'API-Key: YOUR_API_KEY_HERE'

Responses

The request was a success.

Bodyapplication/json
approvedbooleanread-onlyrequired

Indicates whether the attempt to void the label was successful

Example: false
messagestring>= 0 charactersread-onlyrequired
Example: "Unable to delete FedEx shipment. Unable to retrieve record from database."
reason_codestring(reason_code)read-only

Indicates a normalized reason for the conditions if the void attempt was not approved. Will not populate if approved is true. “unknown” codes may be specified later.

Enum"unknown""unspecified""validation_failed""label_not_found_within_void_period""label_already_used""label_already_voided""contact_carrier"
Example: "label_not_found_within_void_period"
Response
application/json
{ "approved": false, "message": "Unable to delete FedEx shipment. Unable to retrieve record from database.", "reason_code": "label_not_found_within_void_period" }

Cancel a label refund request

Request

Cancel a scheduled refund request for a label. Only labels with refund status "request_scheduled" can be excluded from an upcoming refund request.

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

Label ID

Example: se-28529731
curl -i -X POST \
  https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/labels/se-28529731/cancel_refund \
  -H 'API-Key: YOUR_API_KEY_HERE'

Responses

The refund cancellation was successful. Returns the updated label object.

Bodyapplication/json
label_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created.

Example: "se-28529731"
statusstring(label_status)read-only

The possible statuses that a shipping label can be in.

StatusDescription
processingWhen labels are created in a batch, it may take a few minutes for all of the labels in the batch to be created. During this period, they will be in processing status.
completedThe label was successfully created
errorThe label could not be created due to an error, such as an invalid delivery address
voidedThe label has been voided
Enum"processing""completed""error""voided"
shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The shipment that this label is for. ShipEngine can create a shipment for you automatically when you create a label, or you can create your own shipment and then use it to print a label

Example: "se-28529731"
external_shipment_idstring or null<= 50 charactersread-only

A unique user-defined key to identify a shipment. This can be used to retrieve the shipment.

external_order_idstring or nullread-only

ID that the Order Source assigned

ship_datestring(date-time)(date)^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?...read-only

An ISO 8601 string that represents a date, but not a specific time. The value may contain a time component, but it will be set to 00:00:00 UTC by ShipEngine.

Example: "2018-09-23T00:00:00.000Z"
created_atstring(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
shipment_costobject(monetary_value)read-only

The cost of shipping, delivery confirmation, and other carrier charges. This amount does not include insurance costs.

insurance_costobject(monetary_value)read-only

The insurance cost for this package. Add this to the shipment_cost field to get the total cost.

requested_comparison_amountobject(monetary_value)read-only

The total shipping cost for the specified comparison_rate_type.

rate_detailsArray of objects(rate_detail)read-only

A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user.

tracking_numberstringnon-emptyread-only

The tracking number for the package. Tracking number formats vary across carriers.

Example: "782758401696"
is_return_labelboolean

Indicates whether this is a return label. You may also want to set the rma_number so you know what is being returned.

rma_numberstring or null

An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.

is_internationalbooleanread-only

Indicates whether this is an international shipment. That is, the originating country and destination country are different.

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

If this label was created as part of a batch, then this is the unique ID of that batch.

Example: "se-28529731"
carrier_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The unique ID of the carrier account that was used to create this label

Example: "se-28529731"
charge_eventstring(label_charge_event)

The label charge event.

Enum"carrier_default""on_creation""on_carrier_acceptance"
service_codestring(service_code)^[a-z0-9]+(_[a-z0-9-]+)* ?$read-only

A carrier service, such as fedex_ground, usps_first_class_mail, flat_rate_envelope, etc.

Example: "usps_first_class_mail"
package_codestring(package_code)[ 1 .. 50 ] characters^[a-z0-9]+(_[a-z0-9]+)*$read-only

A package type, such as thick_envelope, small_flat_rate_box, large_package, etc. Use the code package for custom or unknown package types.

Example: "small_flat_rate_box"
voidedbooleanread-only

Indicates whether the label has been voided

voided_atstring or null(date-time)(date_time)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(...read-only

An ISO 8601 string that represents a date and time.

Example: "2018-09-23T15:00:00.000Z"
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"
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"
trackablebooleanread-only

Indicates whether the shipment is trackable, in which case the tracking_status field will reflect the current status and each package will have a tracking_number.

label_image_idstring or null(image_id)>= 4 characters

The label image resource that was used to create a custom label image.

Example: "img_DtBXupDBxREpHnwEXhTfgK"
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"
tracking_statusstring(tracking_status)read-only

The current status of the package, such as in_transit or delivered

Enum"unknown""in_transit""error""delivered"
confirmationstring(delivery_confirmation)read-only

The type of delivery confirmation that is required for this shipment.

Enum"none""delivery""signature""adult_signature""direct_signature""delivery_mailed""verbal_confirmation""delivery_code""age_verification_16_plus"
label_downloadobject(label_download)read-only

Reference to the various downloadable file formats for the generated label

form_downloadobject or null(optional_link)read-only

The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it.

qr_code_downloadobject or null(optional_link)read-only

The QR code download for the package

paperless_downloadobject or null(paperless_download)read-only

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

insurance_claimobject or null(optional_link)read-only

The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission.

packagesArray of objects(alternative_identifiers)read-only

The label's package(s).

Note: Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned.

alternative_identifiersArray of objects or null(alternative_identifier)read-only

Additional information some carriers may provide by which to identify a given label in their system.

tracking_urlstring or nullread-only

The URL to track the package. This URL is provided by the carrier and is unique to the tracking number.

Example: "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234"
ship_toobject(partial_shipping_address_to)read-only

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

void_typestring or null(void_type)read-only

Indicates how a label was voided. refund_assist means the label was voided through the Refund Assist program, while manual means it was voided manually by the user.

Enum"refund_assist""manual"
Example: "manual"
refund_detailsobject or null(refund_details)read-only

Information about the Refund Assist request for this label. This field is null if the label is not eligible for Refund Assist.

Response
application/json
{ "label_id": "se-28529731", "status": "processing", "shipment_id": "se-28529731", "external_shipment_id": "string", "external_order_id": "string", "ship_date": "2018-09-23T00:00:00.000Z", "created_at": "2018-09-23T15:00:00.000Z", "shipment_cost": { "currency": "string", "amount": 0 }, "insurance_cost": { "currency": "string", "amount": 0 }, "requested_comparison_amount": { "currency": "string", "amount": 0 }, "rate_details": [ {} ], "tracking_number": "782758401696", "is_return_label": true, "rma_number": "string", "is_international": true, "batch_id": "se-28529731", "carrier_id": "se-28529731", "charge_event": "carrier_default", "service_code": "usps_first_class_mail", "package_code": "small_flat_rate_box", "voided": true, "voided_at": "2018-09-23T15:00:00.000Z", "label_format": "pdf", "display_scheme": "label", "label_layout": "4x6", "trackable": true, "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK", "carrier_code": "dhl_express", "tracking_status": "unknown", "confirmation": "none", "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" }, "qr_code_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 }, "insurance_claim": { "href": "http://api.shipengine.com/v1/labels/se-28529731", "type": "string" }, "packages": [ {} ], "alternative_identifiers": [ {} ], "tracking_url": "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234", "ship_to": { "name": "John Doe", "phone": "+1 204-253-9411 ext. 123", "email": "example@example.com", "company_name": "The Home Depot", "address_line1": "1999 Bishop Grandin Blvd.", "address_line2": "Unit 408", "address_line3": "Building #7", "city_locality": "Winnipeg", "state_province": "Manitoba", "postal_code": "78756-3717", "country_code": "CA", "address_residential_indicator": "no", "instructions": "string", "geolocation": [] }, "void_type": "manual", "refund_details": { "refund_status": "request_scheduled", "request_date": "2018-09-23T15:00:00.000Z", "amount_paid": {}, "amount_requested": {}, "amount_approved": {}, "amount_credited": {} } }

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