Skip to content

ShipStation API v2 (2.0.0)

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

Batches

Process labels in bulk and receive a large number of labels and customs forms in bulk responses. Batching is ideal for workflows that need to process hundreds or thousands of labels quickly.

Operations

Carriers

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

Operations

Downloads

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

Operations

Fulfillments

Manage fulfillments which represent completed shipments. Create fulfillments to mark orders as shipped with tracking information and notify customers and marketplaces.

Operations

Inventory

Manage inventory levels, warehouses, and locations.

Operations

Labels

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

Operations

Mailing

Create mailing labels for USPS including NetStamps, mail labels and envelopes.

Operations

Create netstamps

Request

Create one or more NetStamps. Each shipment in the request produces an individual stamp with optional row/column positioning via advanced_options.netstamps_options.

Security
api_keys
Bodyapplication/jsonrequired
shipmentsArray of objects(shipment)non-emptyrequired

The shipments to create NetStamps labels for. All shipments must use the same carrier_id.

Each shipment must include advanced_options.netstamps_options with row and column to control stamp placement. Row/column combinations must be unique across shipments.

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

The carrier account that is billed for the shipping charges

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

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

Example: "usps_first_class_mail"
shipments[].​requested_shipment_servicestring or null

The requested shipment service

Example: "usps_priority_mail"
shipments[].​shipping_rule_idstring or null(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"
shipments[].​external_order_idstring or null

ID that the Order Source assigned

Example: "1232434"
shipments[].​hold_until_datestring or null(date-time)

Date to hold the shipment until

Example: "2025-01-15T00:00:00.000Z"
shipments[].​ship_by_datestring or null(date-time)

Date by which the shipment should be shipped

Example: "2025-01-15T00:00:00.000Z"
shipments[].​retail_rateobject or null(monetary_value)

The retail rate for the shipment

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

The store ID associated with the shipment

Example: "se-28529731"
shipments[].​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 []
shipments[].​notes_from_buyerstring or null

Notes from the buyer

Example: "Please handle with care"
shipments[].​notes_for_giftstring or null

Gift notes

Example: "Happy Birthday!"
shipments[].​is_giftboolean

Indicates if the shipment is a gift

Default false
Example: true
shipments[].​assigned_userstring or null

User assigned to the shipment

Example: "user@example.com"
shipments[].​amount_paidobject(monetary_value)

Total amount paid for the order

shipments[].​shipping_paidobject(monetary_value)

Amount paid for shipping

shipments[].​tax_paidobject(monetary_value)

Amount paid for taxes

shipments[].​zoneinteger or null(int32)>= 0

Shipping zone

Example: 1
shipments[].​display_schemestring or null

Display scheme for the shipment

Example: "label"
shipments[].​tax_identifiersArray of objects or null(tax_identifier)
shipments[].​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.

Example: "1234556"
shipments[].​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.

Example: "10001"
shipments[].​ship_datestring or null(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 ShipStation .

Example: "2018-09-23T00:00:00Z"
shipments[].​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.

shipments[].​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"
shipments[].​ship_to.​phonestringnon-emptyrequired

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"
shipments[].​ship_to.​emailstring or null

Email for the address owner.

Example: "example@example.com"
shipments[].​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"
shipments[].​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."
shipments[].​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"
shipments[].​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"
shipments[].​ship_to.​city_localitystringnon-emptyrequired

The name of the city or locality

Example: "Winnipeg"
shipments[].​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"
shipments[].​ship_to.​postal_codestring(postal_code)non-emptyrequired

postal code

Example: "78756-3717"
shipments[].​ship_to.​country_codestring(country_code)= 2 charactersrequired
Example: "CA"
shipments[].​ship_to.​address_residential_indicatorstring(address_residential_indicator)required

Indicates whether this is a residential address.

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

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

Example: "any instruction"
shipments[].​ship_to.​geolocationArray of objects
shipments[].​ship_fromobject(partial_shipping_address)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.

shipments[].​ship_from.​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"
shipments[].​ship_from.​phonestringnon-emptyrequired

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"
shipments[].​ship_from.​emailstring or null

Email for the address owner.

Example: "example@example.com"
shipments[].​ship_from.​company_namestring or nullnon-empty

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

Example: "The Home Depot"
shipments[].​ship_from.​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."
shipments[].​ship_from.​address_line2string or nullnon-empty

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

Example: "Unit 408"
shipments[].​ship_from.​address_line3string or nullnon-empty

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

Example: "Building #7"
shipments[].​ship_from.​city_localitystringnon-emptyrequired

The name of the city or locality

Example: "Winnipeg"
shipments[].​ship_from.​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"
shipments[].​ship_from.​postal_codestring(postal_code)non-emptyrequired

postal code

Example: "78756-3717"
shipments[].​ship_from.​country_codestring(country_code)= 2 charactersrequired
Example: "CA"
shipments[].​ship_from.​address_residential_indicatorstring(address_residential_indicator)required

Indicates whether this is a residential address.

Default "unknown"
Enum"unknown""yes""no"
Example: "yes"
shipments[].​ship_from.​instructionsstring or nullnon-empty

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

Example: "any instructions"
shipments[].​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"
shipments[].​return_toobject(partial_shipping_address)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.

shipments[].​return_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"
shipments[].​return_to.​phonestringnon-emptyrequired

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"
shipments[].​return_to.​emailstring or null

Email for the address owner.

Example: "example@example.com"
shipments[].​return_to.​company_namestring or nullnon-empty

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

Example: "The Home Depot"
shipments[].​return_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."
shipments[].​return_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"
shipments[].​return_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"
shipments[].​return_to.​city_localitystringnon-emptyrequired

The name of the city or locality

Example: "Winnipeg"
shipments[].​return_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"
shipments[].​return_to.​postal_codestring(postal_code)non-emptyrequired

postal code

Example: "78756-3717"
shipments[].​return_to.​country_codestring(country_code)= 2 charactersrequired
Example: "CA"
shipments[].​return_to.​address_residential_indicatorstring(address_residential_indicator)required

Indicates whether this is a residential address.

Default "unknown"
Enum"unknown""yes""no"
Example: "yes"
shipments[].​return_to.​instructionsstring or nullnon-empty

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

Example: "any instructions"
shipments[].​is_returnboolean or null

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

Default false
Example: true
shipments[].​confirmationstring(delivery_confirmation)required

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"
shipments[].​customsobject or null(international_shipment_options)

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

Default null
shipments[].​advanced_optionsobject(advanced_shipment_options)required

Advanced shipment options. These are entirely optional.

shipments[].​advanced_options.​bill_to_accountstring or null

This field is used to [bill shipping costs to a third party]. This field must be used in conjunction with the bill_to_country_code, bill_to_party, and bill_to_postal_code fields.

Default null
Example: "123456789"
shipments[].​advanced_options.​bill_to_country_codestring or null(country_code)= 2 characters
Default null
Example: "CA"
shipments[].​advanced_options.​bill_to_partystring or null(bill_to_party)

Indicates whether to bill shipping costs to the recipient or to a third-party. When billing to a third-party, the bill_to_account, bill_to_country_code, and bill_to_postal_code fields must also be set.

Default null
Enum"recipient""third_party"
Example: "third_party"
shipments[].​advanced_options.​bill_to_postal_codestring or null

The postal code of the third-party that is responsible for shipping costs.

Default null
Example: "28005"
shipments[].​advanced_options.​contains_alcoholboolean

Indicates that the shipment contains alcohol.

Default false
Example: true
shipments[].​advanced_options.​delivered_duty_paidboolean

Indicates that the shipper is paying the international delivery duties for this shipment. This option is supported by UPS, FedEx, and DHL Express.

Default false
Example: true
shipments[].​advanced_options.​dry_iceboolean

Indicates if the shipment contain dry ice

Default false
Example: true
shipments[].​advanced_options.​dry_ice_weightobject or null(weight)

The weight of the dry ice in the shipment

shipments[].​advanced_options.​non_machinableboolean

Indicates that the package cannot be processed automatically because it is too large or irregularly shaped. This is primarily for USPS shipments. See Section 1.2 of the USPS parcel standards for details.

Default false
Example: true
shipments[].​advanced_options.​saturday_deliveryboolean

Enables Saturday delivery, if supported by the carrier.

Default false
Example: true
shipments[].​advanced_options.​fedex_freightobject

Provide details for the Fedex freight service

shipments[].​advanced_options.​use_ups_ground_freight_pricingboolean or null

Whether to use [UPS Ground Freight pricing] If enabled, then a freight_class must also be specified.

Default null
Example: true
shipments[].​advanced_options.​freight_classstring or null

The National Motor Freight Traffic Association freight class, such as "77.5", "110", or "250".

Default null
Example: "77.5"
shipments[].​advanced_options.​custom_field1string or null<= 100 characters

An arbitrary field that can be used to store information about the shipment.

Default null
Example: "custom field 1"
shipments[].​advanced_options.​custom_field2string or null<= 100 characters

An arbitrary field that can be used to store information about the shipment.

Default null
Example: "custom field 2"
shipments[].​advanced_options.​custom_field3string or null<= 100 characters

An arbitrary field that can be used to store information about the shipment.

Default null
Example: "custom field 3"
shipments[].​advanced_options.​origin_typestring or null(origin_type)

Indicates if the package will be picked up or dropped off by the carrier

Default null
Enum"pickup""drop_off"
shipments[].​advanced_options.​additional_handlingboolean or null

Indicate to the carrier that this shipment requires additional handling.

Default null
Example: true
shipments[].​advanced_options.​shipper_releaseboolean or null
Default null
Example: true
shipments[].​advanced_options.​collect_on_deliveryobject(collect_on_delivery)

Defer payment until package is delivered, instead of when it is ordered.

shipments[].​advanced_options.​third_party_consigneeboolean

Third Party Consignee option is a value-added service that allows the shipper to supply goods without commercial invoices being attached

Default false
Example: true
shipments[].​advanced_options.​dangerous_goodsboolean

Indicates if the Dangerous goods are present in the shipment

Default false
Example: true
shipments[].​advanced_options.​dangerous_goods_contactobject

Contact information for Dangerous goods

shipments[].​advanced_options.​windsor_framework_detailsobject

The Windsor framework is a new regulation in the UK that simplifies customs procedures for goods moved from the UK mainland to Northern Ireland.

shipments[].​advanced_options.​ancillary_endorsements_optionstring or null

Ancillary endorsements option for the shipment

Example: "forward"
shipments[].​advanced_options.​return_pickup_attemptsinteger or null

Number of return pickup attempts

Example: 3
shipments[].​advanced_options.​own_document_uploadboolean

Indicates if own document upload is enabled

Default false
Example: false
shipments[].​advanced_options.​limited_quantityboolean

Indicates if the shipment contains limited quantities

Default false
Example: false
shipments[].​advanced_options.​event_notificationboolean

Indicates if event notifications are enabled

Default false
Example: false
shipments[].​advanced_options.​fragileboolean

Indicates if the shipment contains fragile items

Default false
Example: false
shipments[].​advanced_options.​delivery_as_addressedboolean

Instructs the carrier to deliver the package only to the exact address provided

Default false
Example: false
shipments[].​advanced_options.​return_after_first_attemptboolean

Ensures the shipment is immediately flagged for return to the sender if the initial delivery attempt fails

Default false
Example: false
shipments[].​advanced_options.​regulated_content_typestring or null(regulated_content_type)

Indicates the category of goods in the shipment that is subject to special regulatory or compliance requirements

Default null
Enum"day_old_poultry""other_live_animal"
shipments[].​advanced_options.​netstamps_optionsobject

Layout options for printing NetStamps labels on a sheet. Controls the starting position on the label sheet.

shipments[].​insurance_providerstring(insurance_provider)required

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

Default "none"
Enum"none""shipsurance""carrier""third_party"
shipments[].​tagsArray of objects(tag)>= 0 itemsrequired

Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. Note: Tags require object structure with name property, not simple strings.

Default []
shipments[].​tags[].​namestringnon-emptyrequired

The tag name.

Example: "Fragile"
shipments[].​order_source_codestring(order_source_name)

The order sources that are supported by ShipStation

Enum"amazon_ca""amazon_us""brightpearl""channel_advisor""cratejoy""ebay""etsy""jane""groupon_goods""magento"
shipments[].​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.

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

A string that uniquely identifies this [package type]

Example: "se-28529731"
shipments[].​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"
shipments[].​packages[].​package_namestring

The name of the of the [package type]

Example: "Flat Rate Envelope"
shipments[].​packages[].​weightobject(weight)required

The package weight

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

The weight, in the specified unit

Example: 23
shipments[].​packages[].​weight.​unitstring(weight_unit)required

Weight unit

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

The package dimensions

shipments[].​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}]
shipments[].​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
shipments[].​packages[].​external_package_idstringnon-empty

An external package id.

Example: "se-1234545"
shipments[].​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"
shipments[].​packages[].​productsArray of objects(products)>= 0 items

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

Default []
shipments[].​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"
label_layoutstringrequired

The NetStamps layout to use.

Enum"netstamps_traditional""netstamps_standard""netstamps_alternate""netstamps_promotional""netstamps_themed""netstamps_photo_landscape""netstamps_photo_portrait""netstamps_photo_landscape_hs""netstamps_return_address""netstamps_roll_type_sd"
Example: "netstamps_traditional"
label_formatstring

The file format for the label.

Default "pdf"
Enum"pdf""png"
Example: "pdf"
display_schemestring(display_scheme)

The display format that the label should be shown in.

Default "label"
Enum"label""paperless""label_and_paperless"
test_labelboolean

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

Default false
Example: true
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.

This is the default if label_download_type is unspecified.
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"
is_return_labelboolean

Indicates whether these are return labels.

Default false
Example: true
rma_numberstring or null

An optional Return Merchandise Authorization number for return labels.

Example: "asd12323"
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]+)+$

The label_id of the original (outgoing) label that the return label is for.

Example: "se-28529731"
validate_addressstring(validate_address)

The possible validate address values

Default "no_validation"
Enum"no_validation""validate_only""validate_and_clean"
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"
ship_to_service_point_idstring or null

A unique identifier for a carrier service point where the shipment will be delivered.

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.

Example: "614940"
curl -i -X POST \
  https://docs.shipstation.com/_mock/apis/openapi/v2/mailing/netstamps \
  -H 'Content-Type: application/json' \
  -H 'api-key: YOUR_API_KEY_HERE' \
  -d '{
    "shipments": [
      {
        "carrier_id": "se-1234567",
        "service_code": "se_1234567",
        "requested_shipment_service": "usps_priority_mail",
        "shipping_rule_id": "se-1234",
        "external_order_id": "1232434",
        "hold_until_date": "2025-01-15T00:00:00.000Z",
        "ship_by_date": "2025-01-15T00:00:00.000Z",
        "retail_rate": {
          "currency": "usd",
          "amount": 12
        },
        "store_id": "se-12345",
        "items": [],
        "notes_from_buyer": "Please handle with care",
        "notes_for_gift": "Happy Birthday!",
        "is_gift": true,
        "assigned_user": "user@example.com",
        "amount_paid": {
          "currency": "usd",
          "amount": 12
        },
        "shipping_paid": {
          "currency": "usd",
          "amount": 12
        },
        "tax_paid": {
          "currency": "usd",
          "amount": 12
        },
        "zone": 1,
        "display_scheme": "label",
        "tax_identifiers": [
          {
            "taxable_entity_type": "shipper",
            "identifier_type": "vat",
            "issuing_authority": "US",
            "value": "value"
          }
        ],
        "external_shipment_id": "1234556",
        "shipment_number": "10001",
        "ship_date": "2018-09-23T00:00:00Z",
        "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": "yes",
          "instructions": "any instruction",
          "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": "yes",
          "instructions": "any instructions"
        },
        "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": "yes",
          "instructions": "any instructions"
        },
        "is_return": true,
        "confirmation": "none",
        "customs": null,
        "advanced_options": {
          "bill_to_account": "123456789",
          "bill_to_country_code": "US",
          "bill_to_party": "third_party",
          "bill_to_postal_code": "28005",
          "contains_alcohol": true,
          "delivered_duty_paid": true,
          "dry_ice": true,
          "dry_ice_weight": {
            "value": 23,
            "unit": "pound"
          },
          "non_machinable": true,
          "saturday_delivery": true,
          "fedex_freight": {
            "shipper_load_and_count": "shipper_load_and_count",
            "booking_confirmation": "today"
          },
          "use_ups_ground_freight_pricing": true,
          "freight_class": "77.5",
          "custom_field1": "custom field 1",
          "custom_field2": "custom field 2",
          "custom_field3": "custom field 3",
          "origin_type": null,
          "additional_handling": true,
          "shipper_release": true,
          "collect_on_delivery": {
            "payment_type": "any",
            "payment_amount": {
              "currency": "USD",
              "amount": 12
            }
          },
          "third_party_consignee": true,
          "dangerous_goods": true,
          "dangerous_goods_contact": {
            "name": "Michael Robinson",
            "phone": "123456578789"
          },
          "windsor_framework_details": {
            "movement_indicator": "b2b",
            "not_at_risk": true
          },
          "ancillary_endorsements_option": "forward",
          "return_pickup_attempts": 3,
          "own_document_upload": false,
          "limited_quantity": false,
          "event_notification": false,
          "fragile": false,
          "delivery_as_addressed": false,
          "return_after_first_attempt": false,
          "regulated_content_type": null,
          "netstamps_options": {
            "row": 1,
            "column": 1
          }
        },
        "insurance_provider": "none",
        "tags": [],
        "order_source_code": "amazon_ca",
        "packages": [
          {
            "package_id": "se-123456",
            "package_code": "thick_envelope",
            "package_name": "Flat Rate Envelope",
            "weight": {
              "value": 23,
              "unit": "pound"
            },
            "dimensions": {
              "unit": "inch",
              "length": 2,
              "width": 2,
              "height": 1
            },
            "insured_value": [
              {
                "currency": "usd",
                "amount": 0
              }
            ],
            "label_messages": {
              "reference1": "Reference",
              "reference2": "Reference 2",
              "reference3": "Reference 3"
            },
            "external_package_id": "se-1234545",
            "content_description": "Hand knitted wool socks",
            "products": []
          }
        ],
        "comparison_rate_type": "retail"
      }
    ],
    "label_layout": "netstamps_traditional",
    "label_format": "pdf",
    "display_scheme": "label",
    "test_label": true,
    "label_download_type": "url",
    "is_return_label": true,
    "rma_number": "asd12323",
    "charge_event": "carrier_default",
    "outbound_label_id": "se-28529731",
    "validate_address": "no_validation",
    "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK",
    "ship_to_service_point_id": "614940",
    "ship_from_service_point_id": "614940"
  }'

Responses

The labels were created successfully.

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 ShipStation 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"
Example: "completed"
shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The shipment that this label is for. ShipStation 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.

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

Example: "externalId-1234556"
external_order_idstring or nullread-only

ID that the Order Source assigned

Example: "externalOrderId-1232434"
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 ShipStation .

Example: "2018-09-23T00:00:00Z"
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.

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.

Example: true
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.

Example: "asd12323"
is_internationalbooleanread-only

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

Example: true
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]

Example: true
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"
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.

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"
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.

Example: true
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"
confirmationstring(delivery_confirmation)read-only

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

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

Enum"unknown""in_transit""error""delivered"
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(label_package)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.

rate_detailsArray of objectsread-only
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.

total_costobject(monetary_value)read-only

The combined cost of all labels in this mailing request.

associated_labelsArray of objects(create_label_response_body)read-only

The individual labels created for each shipment in the request.

Response
application/json
{ "label_id": "se-123456", "status": "completed", "shipment_id": "se-1234567", "external_shipment_id": "externalId-1234556", "external_order_id": "externalOrderId-1232434", "ship_date": "2018-09-23T00:00:00Z", "created_at": "2018-09-23T15:00:00.000Z", "shipment_cost": { "currency": "usd", "amount": 12 }, "insurance_cost": { "currency": "usd", "amount": 12 }, "requested_comparison_amount": { "currency": "usd", "amount": 12 }, "tracking_number": "782758401696", "is_return_label": true, "rma_number": "asd12323", "is_international": true, "batch_id": "se-28529731", "carrier_id": "se-1234567", "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", "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": {} }, "label_format": "pdf", "display_scheme": "label", "label_layout": "4x6", "trackable": true, "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK", "carrier_code": "dhl_express", "confirmation": "none", "tracking_status": "unknown", "label_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "pdf": "http://api.shipstation.com/v2/labels/se-28529731", "png": "http://api.shipstation.com/v2/labels/se-28529731", "zpl": "http://api.shipstation.com/v2/labels/se-28529731" }, "form_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "qr_code_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "paperless_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "instructions": "any instructions", "handoff_code": "122334" }, "insurance_claim": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "packages": [ {} ], "alternative_identifiers": [ {} ], "rate_details": [ {} ], "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": "yes", "instructions": "any instruction", "geolocation": [] }, "total_cost": { "currency": "usd", "amount": 12 }, "associated_labels": [ {} ] }

Create mailing labels

Request

Create one or more mailing labels on a sheet layout. Use mailing_options to control which row and column to start printing from.

Security
api_keys
Bodyapplication/jsonrequired
shipmentsArray of objects(shipment)non-emptyrequired

The shipments to create mail labels for. All shipments must use the same carrier_id.

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

The carrier account that is billed for the shipping charges

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

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

Example: "usps_first_class_mail"
shipments[].​requested_shipment_servicestring or null

The requested shipment service

Example: "usps_priority_mail"
shipments[].​shipping_rule_idstring or null(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"
shipments[].​external_order_idstring or null

ID that the Order Source assigned

Example: "1232434"
shipments[].​hold_until_datestring or null(date-time)

Date to hold the shipment until

Example: "2025-01-15T00:00:00.000Z"
shipments[].​ship_by_datestring or null(date-time)

Date by which the shipment should be shipped

Example: "2025-01-15T00:00:00.000Z"
shipments[].​retail_rateobject or null(monetary_value)

The retail rate for the shipment

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

The store ID associated with the shipment

Example: "se-28529731"
shipments[].​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 []
shipments[].​notes_from_buyerstring or null

Notes from the buyer

Example: "Please handle with care"
shipments[].​notes_for_giftstring or null

Gift notes

Example: "Happy Birthday!"
shipments[].​is_giftboolean

Indicates if the shipment is a gift

Default false
Example: true
shipments[].​assigned_userstring or null

User assigned to the shipment

Example: "user@example.com"
shipments[].​amount_paidobject(monetary_value)

Total amount paid for the order

shipments[].​shipping_paidobject(monetary_value)

Amount paid for shipping

shipments[].​tax_paidobject(monetary_value)

Amount paid for taxes

shipments[].​zoneinteger or null(int32)>= 0

Shipping zone

Example: 1
shipments[].​display_schemestring or null

Display scheme for the shipment

Example: "label"
shipments[].​tax_identifiersArray of objects or null(tax_identifier)
shipments[].​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.

Example: "1234556"
shipments[].​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.

Example: "10001"
shipments[].​ship_datestring or null(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 ShipStation .

Example: "2018-09-23T00:00:00Z"
shipments[].​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.

shipments[].​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"
shipments[].​ship_to.​phonestringnon-emptyrequired

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"
shipments[].​ship_to.​emailstring or null

Email for the address owner.

Example: "example@example.com"
shipments[].​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"
shipments[].​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."
shipments[].​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"
shipments[].​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"
shipments[].​ship_to.​city_localitystringnon-emptyrequired

The name of the city or locality

Example: "Winnipeg"
shipments[].​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"
shipments[].​ship_to.​postal_codestring(postal_code)non-emptyrequired

postal code

Example: "78756-3717"
shipments[].​ship_to.​country_codestring(country_code)= 2 charactersrequired
Example: "CA"
shipments[].​ship_to.​address_residential_indicatorstring(address_residential_indicator)required

Indicates whether this is a residential address.

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

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

Example: "any instruction"
shipments[].​ship_to.​geolocationArray of objects
shipments[].​ship_fromobject(partial_shipping_address)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.

shipments[].​ship_from.​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"
shipments[].​ship_from.​phonestringnon-emptyrequired

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"
shipments[].​ship_from.​emailstring or null

Email for the address owner.

Example: "example@example.com"
shipments[].​ship_from.​company_namestring or nullnon-empty

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

Example: "The Home Depot"
shipments[].​ship_from.​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."
shipments[].​ship_from.​address_line2string or nullnon-empty

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

Example: "Unit 408"
shipments[].​ship_from.​address_line3string or nullnon-empty

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

Example: "Building #7"
shipments[].​ship_from.​city_localitystringnon-emptyrequired

The name of the city or locality

Example: "Winnipeg"
shipments[].​ship_from.​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"
shipments[].​ship_from.​postal_codestring(postal_code)non-emptyrequired

postal code

Example: "78756-3717"
shipments[].​ship_from.​country_codestring(country_code)= 2 charactersrequired
Example: "CA"
shipments[].​ship_from.​address_residential_indicatorstring(address_residential_indicator)required

Indicates whether this is a residential address.

Default "unknown"
Enum"unknown""yes""no"
Example: "yes"
shipments[].​ship_from.​instructionsstring or nullnon-empty

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

Example: "any instructions"
shipments[].​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"
shipments[].​return_toobject(partial_shipping_address)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.

shipments[].​return_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"
shipments[].​return_to.​phonestringnon-emptyrequired

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"
shipments[].​return_to.​emailstring or null

Email for the address owner.

Example: "example@example.com"
shipments[].​return_to.​company_namestring or nullnon-empty

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

Example: "The Home Depot"
shipments[].​return_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."
shipments[].​return_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"
shipments[].​return_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"
shipments[].​return_to.​city_localitystringnon-emptyrequired

The name of the city or locality

Example: "Winnipeg"
shipments[].​return_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"
shipments[].​return_to.​postal_codestring(postal_code)non-emptyrequired

postal code

Example: "78756-3717"
shipments[].​return_to.​country_codestring(country_code)= 2 charactersrequired
Example: "CA"
shipments[].​return_to.​address_residential_indicatorstring(address_residential_indicator)required

Indicates whether this is a residential address.

Default "unknown"
Enum"unknown""yes""no"
Example: "yes"
shipments[].​return_to.​instructionsstring or nullnon-empty

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

Example: "any instructions"
shipments[].​is_returnboolean or null

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

Default false
Example: true
shipments[].​confirmationstring(delivery_confirmation)required

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"
shipments[].​customsobject or null(international_shipment_options)

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

Default null
shipments[].​advanced_optionsobject(advanced_shipment_options)required

Advanced shipment options. These are entirely optional.

shipments[].​advanced_options.​bill_to_accountstring or null

This field is used to [bill shipping costs to a third party]. This field must be used in conjunction with the bill_to_country_code, bill_to_party, and bill_to_postal_code fields.

Default null
Example: "123456789"
shipments[].​advanced_options.​bill_to_country_codestring or null(country_code)= 2 characters
Default null
Example: "CA"
shipments[].​advanced_options.​bill_to_partystring or null(bill_to_party)

Indicates whether to bill shipping costs to the recipient or to a third-party. When billing to a third-party, the bill_to_account, bill_to_country_code, and bill_to_postal_code fields must also be set.

Default null
Enum"recipient""third_party"
Example: "third_party"
shipments[].​advanced_options.​bill_to_postal_codestring or null

The postal code of the third-party that is responsible for shipping costs.

Default null
Example: "28005"
shipments[].​advanced_options.​contains_alcoholboolean

Indicates that the shipment contains alcohol.

Default false
Example: true
shipments[].​advanced_options.​delivered_duty_paidboolean

Indicates that the shipper is paying the international delivery duties for this shipment. This option is supported by UPS, FedEx, and DHL Express.

Default false
Example: true
shipments[].​advanced_options.​dry_iceboolean

Indicates if the shipment contain dry ice

Default false
Example: true
shipments[].​advanced_options.​dry_ice_weightobject or null(weight)

The weight of the dry ice in the shipment

shipments[].​advanced_options.​non_machinableboolean

Indicates that the package cannot be processed automatically because it is too large or irregularly shaped. This is primarily for USPS shipments. See Section 1.2 of the USPS parcel standards for details.

Default false
Example: true
shipments[].​advanced_options.​saturday_deliveryboolean

Enables Saturday delivery, if supported by the carrier.

Default false
Example: true
shipments[].​advanced_options.​fedex_freightobject

Provide details for the Fedex freight service

shipments[].​advanced_options.​use_ups_ground_freight_pricingboolean or null

Whether to use [UPS Ground Freight pricing] If enabled, then a freight_class must also be specified.

Default null
Example: true
shipments[].​advanced_options.​freight_classstring or null

The National Motor Freight Traffic Association freight class, such as "77.5", "110", or "250".

Default null
Example: "77.5"
shipments[].​advanced_options.​custom_field1string or null<= 100 characters

An arbitrary field that can be used to store information about the shipment.

Default null
Example: "custom field 1"
shipments[].​advanced_options.​custom_field2string or null<= 100 characters

An arbitrary field that can be used to store information about the shipment.

Default null
Example: "custom field 2"
shipments[].​advanced_options.​custom_field3string or null<= 100 characters

An arbitrary field that can be used to store information about the shipment.

Default null
Example: "custom field 3"
shipments[].​advanced_options.​origin_typestring or null(origin_type)

Indicates if the package will be picked up or dropped off by the carrier

Default null
Enum"pickup""drop_off"
shipments[].​advanced_options.​additional_handlingboolean or null

Indicate to the carrier that this shipment requires additional handling.

Default null
Example: true
shipments[].​advanced_options.​shipper_releaseboolean or null
Default null
Example: true
shipments[].​advanced_options.​collect_on_deliveryobject(collect_on_delivery)

Defer payment until package is delivered, instead of when it is ordered.

shipments[].​advanced_options.​third_party_consigneeboolean

Third Party Consignee option is a value-added service that allows the shipper to supply goods without commercial invoices being attached

Default false
Example: true
shipments[].​advanced_options.​dangerous_goodsboolean

Indicates if the Dangerous goods are present in the shipment

Default false
Example: true
shipments[].​advanced_options.​dangerous_goods_contactobject

Contact information for Dangerous goods

shipments[].​advanced_options.​windsor_framework_detailsobject

The Windsor framework is a new regulation in the UK that simplifies customs procedures for goods moved from the UK mainland to Northern Ireland.

shipments[].​advanced_options.​ancillary_endorsements_optionstring or null

Ancillary endorsements option for the shipment

Example: "forward"
shipments[].​advanced_options.​return_pickup_attemptsinteger or null

Number of return pickup attempts

Example: 3
shipments[].​advanced_options.​own_document_uploadboolean

Indicates if own document upload is enabled

Default false
Example: false
shipments[].​advanced_options.​limited_quantityboolean

Indicates if the shipment contains limited quantities

Default false
Example: false
shipments[].​advanced_options.​event_notificationboolean

Indicates if event notifications are enabled

Default false
Example: false
shipments[].​advanced_options.​fragileboolean

Indicates if the shipment contains fragile items

Default false
Example: false
shipments[].​advanced_options.​delivery_as_addressedboolean

Instructs the carrier to deliver the package only to the exact address provided

Default false
Example: false
shipments[].​advanced_options.​return_after_first_attemptboolean

Ensures the shipment is immediately flagged for return to the sender if the initial delivery attempt fails

Default false
Example: false
shipments[].​advanced_options.​regulated_content_typestring or null(regulated_content_type)

Indicates the category of goods in the shipment that is subject to special regulatory or compliance requirements

Default null
Enum"day_old_poultry""other_live_animal"
shipments[].​advanced_options.​netstamps_optionsobject

Layout options for printing NetStamps labels on a sheet. Controls the starting position on the label sheet.

shipments[].​insurance_providerstring(insurance_provider)required

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

Default "none"
Enum"none""shipsurance""carrier""third_party"
shipments[].​tagsArray of objects(tag)>= 0 itemsrequired

Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. Note: Tags require object structure with name property, not simple strings.

Default []
shipments[].​tags[].​namestringnon-emptyrequired

The tag name.

Example: "Fragile"
shipments[].​order_source_codestring(order_source_name)

The order sources that are supported by ShipStation

Enum"amazon_ca""amazon_us""brightpearl""channel_advisor""cratejoy""ebay""etsy""jane""groupon_goods""magento"
shipments[].​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.

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

A string that uniquely identifies this [package type]

Example: "se-28529731"
shipments[].​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"
shipments[].​packages[].​package_namestring

The name of the of the [package type]

Example: "Flat Rate Envelope"
shipments[].​packages[].​weightobject(weight)required

The package weight

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

The weight, in the specified unit

Example: 23
shipments[].​packages[].​weight.​unitstring(weight_unit)required

Weight unit

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

The package dimensions

shipments[].​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}]
shipments[].​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
shipments[].​packages[].​external_package_idstringnon-empty

An external package id.

Example: "se-1234545"
shipments[].​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"
shipments[].​packages[].​productsArray of objects(products)>= 0 items

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

Default []
shipments[].​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"
mailing_optionsobjectrequired

Layout options for printing mail labels on a single sheet. Controls the starting position on the label sheet.

mailing_options.​start_rowinteger(int32)>= 0

The row on the sheet where label placement begins.

Default 0
Example: 0
mailing_options.​start_columninteger(int32)>= 0

The column on the sheet where label placement begins.

Default 0
Example: 0
label_layoutstringrequired

The mail label layout to use.

Enum"mail_label_sdc3110""mail_label_avery5160""mail_label_avery5163"
Example: "mail_label_sdc3110"
label_formatstring

The file format for the label.

Default "pdf"
Enum"pdf""png"
Example: "pdf"
display_schemestring(display_scheme)

The display format that the label should be shown in.

Default "label"
Enum"label""paperless""label_and_paperless"
test_labelboolean

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

Default false
Example: true
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.

This is the default if label_download_type is unspecified.
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"
is_return_labelboolean

Indicates whether these are return labels.

Default false
Example: true
rma_numberstring or null

An optional Return Merchandise Authorization number for return labels.

Example: "asd12323"
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]+)+$

The label_id of the original (outgoing) label that the return label is for.

Example: "se-28529731"
validate_addressstring(validate_address)

The possible validate address values

Default "no_validation"
Enum"no_validation""validate_only""validate_and_clean"
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"
ship_to_service_point_idstring or null

A unique identifier for a carrier service point where the shipment will be delivered.

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.

Example: "614940"
curl -i -X POST \
  https://docs.shipstation.com/_mock/apis/openapi/v2/mailing/mail_labels \
  -H 'Content-Type: application/json' \
  -H 'api-key: YOUR_API_KEY_HERE' \
  -d '{
    "shipments": [
      {
        "carrier_id": "se-1234567",
        "service_code": "se_1234567",
        "requested_shipment_service": "usps_priority_mail",
        "shipping_rule_id": "se-1234",
        "external_order_id": "1232434",
        "hold_until_date": "2025-01-15T00:00:00.000Z",
        "ship_by_date": "2025-01-15T00:00:00.000Z",
        "retail_rate": {
          "currency": "usd",
          "amount": 12
        },
        "store_id": "se-12345",
        "items": [],
        "notes_from_buyer": "Please handle with care",
        "notes_for_gift": "Happy Birthday!",
        "is_gift": true,
        "assigned_user": "user@example.com",
        "amount_paid": {
          "currency": "usd",
          "amount": 12
        },
        "shipping_paid": {
          "currency": "usd",
          "amount": 12
        },
        "tax_paid": {
          "currency": "usd",
          "amount": 12
        },
        "zone": 1,
        "display_scheme": "label",
        "tax_identifiers": [
          {
            "taxable_entity_type": "shipper",
            "identifier_type": "vat",
            "issuing_authority": "US",
            "value": "value"
          }
        ],
        "external_shipment_id": "1234556",
        "shipment_number": "10001",
        "ship_date": "2018-09-23T00:00:00Z",
        "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": "yes",
          "instructions": "any instruction",
          "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": "yes",
          "instructions": "any instructions"
        },
        "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": "yes",
          "instructions": "any instructions"
        },
        "is_return": true,
        "confirmation": "none",
        "customs": null,
        "advanced_options": {
          "bill_to_account": "123456789",
          "bill_to_country_code": "US",
          "bill_to_party": "third_party",
          "bill_to_postal_code": "28005",
          "contains_alcohol": true,
          "delivered_duty_paid": true,
          "dry_ice": true,
          "dry_ice_weight": {
            "value": 23,
            "unit": "pound"
          },
          "non_machinable": true,
          "saturday_delivery": true,
          "fedex_freight": {
            "shipper_load_and_count": "shipper_load_and_count",
            "booking_confirmation": "today"
          },
          "use_ups_ground_freight_pricing": true,
          "freight_class": "77.5",
          "custom_field1": "custom field 1",
          "custom_field2": "custom field 2",
          "custom_field3": "custom field 3",
          "origin_type": null,
          "additional_handling": true,
          "shipper_release": true,
          "collect_on_delivery": {
            "payment_type": "any",
            "payment_amount": {
              "currency": "USD",
              "amount": 12
            }
          },
          "third_party_consignee": true,
          "dangerous_goods": true,
          "dangerous_goods_contact": {
            "name": "Michael Robinson",
            "phone": "123456578789"
          },
          "windsor_framework_details": {
            "movement_indicator": "b2b",
            "not_at_risk": true
          },
          "ancillary_endorsements_option": "forward",
          "return_pickup_attempts": 3,
          "own_document_upload": false,
          "limited_quantity": false,
          "event_notification": false,
          "fragile": false,
          "delivery_as_addressed": false,
          "return_after_first_attempt": false,
          "regulated_content_type": null,
          "netstamps_options": {
            "row": 1,
            "column": 1
          }
        },
        "insurance_provider": "none",
        "tags": [],
        "order_source_code": "amazon_ca",
        "packages": [
          {
            "package_id": "se-123456",
            "package_code": "thick_envelope",
            "package_name": "Flat Rate Envelope",
            "weight": {
              "value": 23,
              "unit": "pound"
            },
            "dimensions": {
              "unit": "inch",
              "length": 2,
              "width": 2,
              "height": 1
            },
            "insured_value": [
              {
                "currency": "usd",
                "amount": 0
              }
            ],
            "label_messages": {
              "reference1": "Reference",
              "reference2": "Reference 2",
              "reference3": "Reference 3"
            },
            "external_package_id": "se-1234545",
            "content_description": "Hand knitted wool socks",
            "products": []
          }
        ],
        "comparison_rate_type": "retail"
      }
    ],
    "mailing_options": {
      "start_row": 0,
      "start_column": 0
    },
    "label_layout": "mail_label_sdc3110",
    "label_format": "pdf",
    "display_scheme": "label",
    "test_label": true,
    "label_download_type": "url",
    "is_return_label": true,
    "rma_number": "asd12323",
    "charge_event": "carrier_default",
    "outbound_label_id": "se-28529731",
    "validate_address": "no_validation",
    "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK",
    "ship_to_service_point_id": "614940",
    "ship_from_service_point_id": "614940"
  }'

Responses

The labels were created successfully.

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 ShipStation 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"
Example: "completed"
shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-only

The shipment that this label is for. ShipStation 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.

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

Example: "externalId-1234556"
external_order_idstring or nullread-only

ID that the Order Source assigned

Example: "externalOrderId-1232434"
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 ShipStation .

Example: "2018-09-23T00:00:00Z"
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.

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.

Example: true
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.

Example: "asd12323"
is_internationalbooleanread-only

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

Example: true
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]

Example: true
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"
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.

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"
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.

Example: true
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"
confirmationstring(delivery_confirmation)read-only

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

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

Enum"unknown""in_transit""error""delivered"
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(label_package)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.

rate_detailsArray of objectsread-only
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.

total_costobject(monetary_value)read-only

The combined cost of all labels in this mailing request.

associated_labelsArray of objects(create_label_response_body)read-only

The individual labels created for each shipment in the request.

Response
application/json
{ "label_id": "se-123456", "status": "completed", "shipment_id": "se-1234567", "external_shipment_id": "externalId-1234556", "external_order_id": "externalOrderId-1232434", "ship_date": "2018-09-23T00:00:00Z", "created_at": "2018-09-23T15:00:00.000Z", "shipment_cost": { "currency": "usd", "amount": 12 }, "insurance_cost": { "currency": "usd", "amount": 12 }, "requested_comparison_amount": { "currency": "usd", "amount": 12 }, "tracking_number": "782758401696", "is_return_label": true, "rma_number": "asd12323", "is_international": true, "batch_id": "se-28529731", "carrier_id": "se-1234567", "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", "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": {} }, "label_format": "pdf", "display_scheme": "label", "label_layout": "4x6", "trackable": true, "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK", "carrier_code": "dhl_express", "confirmation": "none", "tracking_status": "unknown", "label_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "pdf": "http://api.shipstation.com/v2/labels/se-28529731", "png": "http://api.shipstation.com/v2/labels/se-28529731", "zpl": "http://api.shipstation.com/v2/labels/se-28529731" }, "form_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "qr_code_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "paperless_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "instructions": "any instructions", "handoff_code": "122334" }, "insurance_claim": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "packages": [ {} ], "alternative_identifiers": [ {} ], "rate_details": [ {} ], "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": "yes", "instructions": "any instruction", "geolocation": [] }, "total_cost": { "currency": "usd", "amount": 12 }, "associated_labels": [ {} ] }

Create envelope

Request

Create a single envelope shipment.

Security
api_keys
Bodyapplication/jsonrequired
shipmentobject(partial_shipment)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 or null(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$

The carrier account that is billed for the shipping charges

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

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

Example: "usps_first_class_mail"
shipment.​requested_shipment_servicestring or null

The requested shipment service

Example: "usps_priority_mail"
shipment.​shipping_rule_idstring or null(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 assigned

Example: "1232434"
shipment.​hold_until_datestring or null(date-time)

Date to hold the shipment until

Example: "2025-01-15T00:00:00.000Z"
shipment.​ship_by_datestring or null(date-time)

Date by which the shipment should be shipped

Example: "2025-01-15T00:00:00.000Z"
shipment.​retail_rateobject or null(monetary_value)

The retail rate for the shipment

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

The store ID associated with the shipment

Example: "se-28529731"
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.​notes_from_buyerstring or null

Notes from the buyer

Example: "Please handle with care"
shipment.​notes_for_giftstring or null

Gift notes

Example: "Happy Birthday!"
shipment.​is_giftboolean

Indicates if the shipment is a gift

Default false
Example: true
shipment.​assigned_userstring or null

User assigned to the shipment

Example: "user@example.com"
shipment.​amount_paidobject(monetary_value)

Total amount paid for the order

shipment.​shipping_paidobject(monetary_value)

Amount paid for shipping

shipment.​tax_paidobject(monetary_value)

Amount paid for taxes

shipment.​zoneinteger or null(int32)>= 0

Shipping zone

Example: 1
shipment.​display_schemestring or null

Display scheme for the shipment

Example: "label"
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.

Example: "1234556"
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.

Example: "10001"
shipment.​ship_datestring or null(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 ShipStation .

Example: "2018-09-23T00:00:00Z"
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-emptyrequired

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 charactersrequired
Example: "CA"
shipment.​ship_to.​address_residential_indicatorstring(address_residential_indicator)required

Indicates whether this is a residential address.

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

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

Example: "any instruction"
shipment.​ship_to.​geolocationArray of objects
shipment.​ship_fromobject(partial_shipping_address)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_from.​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_from.​phonestringnon-emptyrequired

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_from.​emailstring or null

Email for the address owner.

Example: "example@example.com"
shipment.​ship_from.​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_from.​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_from.​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_from.​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_from.​city_localitystringnon-emptyrequired

The name of the city or locality

Example: "Winnipeg"
shipment.​ship_from.​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_from.​postal_codestring(postal_code)non-emptyrequired

postal code

Example: "78756-3717"
shipment.​ship_from.​country_codestring(country_code)= 2 charactersrequired
Example: "CA"
shipment.​ship_from.​address_residential_indicatorstring(address_residential_indicator)required

Indicates whether this is a residential address.

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

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

Example: "any instructions"
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)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.​return_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.​return_to.​phonestringnon-emptyrequired

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.​return_to.​emailstring or null

Email for the address owner.

Example: "example@example.com"
shipment.​return_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.​return_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.​return_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.​return_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.​return_to.​city_localitystringnon-emptyrequired

The name of the city or locality

Example: "Winnipeg"
shipment.​return_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.​return_to.​postal_codestring(postal_code)non-emptyrequired

postal code

Example: "78756-3717"
shipment.​return_to.​country_codestring(country_code)= 2 charactersrequired
Example: "CA"
shipment.​return_to.​address_residential_indicatorstring(address_residential_indicator)required

Indicates whether this is a residential address.

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

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

Example: "any instructions"
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
Example: true
shipment.​confirmationstring(delivery_confirmation)required

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

Advanced shipment options. These are entirely optional.

shipment.​advanced_options.​bill_to_accountstring or null

This field is used to [bill shipping costs to a third party]. This field must be used in conjunction with the bill_to_country_code, bill_to_party, and bill_to_postal_code fields.

Default null
Example: "123456789"
shipment.​advanced_options.​bill_to_country_codestring or null(country_code)= 2 characters
Default null
Example: "CA"
shipment.​advanced_options.​bill_to_partystring or null(bill_to_party)

Indicates whether to bill shipping costs to the recipient or to a third-party. When billing to a third-party, the bill_to_account, bill_to_country_code, and bill_to_postal_code fields must also be set.

Default null
Enum"recipient""third_party"
Example: "third_party"
shipment.​advanced_options.​bill_to_postal_codestring or null

The postal code of the third-party that is responsible for shipping costs.

Default null
Example: "28005"
shipment.​advanced_options.​contains_alcoholboolean

Indicates that the shipment contains alcohol.

Default false
Example: true
shipment.​advanced_options.​delivered_duty_paidboolean

Indicates that the shipper is paying the international delivery duties for this shipment. This option is supported by UPS, FedEx, and DHL Express.

Default false
Example: true
shipment.​advanced_options.​dry_iceboolean

Indicates if the shipment contain dry ice

Default false
Example: true
shipment.​advanced_options.​dry_ice_weightobject or null(weight)

The weight of the dry ice in the shipment

shipment.​advanced_options.​non_machinableboolean

Indicates that the package cannot be processed automatically because it is too large or irregularly shaped. This is primarily for USPS shipments. See Section 1.2 of the USPS parcel standards for details.

Default false
Example: true
shipment.​advanced_options.​saturday_deliveryboolean

Enables Saturday delivery, if supported by the carrier.

Default false
Example: true
shipment.​advanced_options.​fedex_freightobject

Provide details for the Fedex freight service

shipment.​advanced_options.​use_ups_ground_freight_pricingboolean or null

Whether to use [UPS Ground Freight pricing] If enabled, then a freight_class must also be specified.

Default null
Example: true
shipment.​advanced_options.​freight_classstring or null

The National Motor Freight Traffic Association freight class, such as "77.5", "110", or "250".

Default null
Example: "77.5"
shipment.​advanced_options.​custom_field1string or null<= 100 characters

An arbitrary field that can be used to store information about the shipment.

Default null
Example: "custom field 1"
shipment.​advanced_options.​custom_field2string or null<= 100 characters

An arbitrary field that can be used to store information about the shipment.

Default null
Example: "custom field 2"
shipment.​advanced_options.​custom_field3string or null<= 100 characters

An arbitrary field that can be used to store information about the shipment.

Default null
Example: "custom field 3"
shipment.​advanced_options.​origin_typestring or null(origin_type)

Indicates if the package will be picked up or dropped off by the carrier

Default null
Enum"pickup""drop_off"
shipment.​advanced_options.​additional_handlingboolean or null

Indicate to the carrier that this shipment requires additional handling.

Default null
Example: true
shipment.​advanced_options.​shipper_releaseboolean or null
Default null
Example: true
shipment.​advanced_options.​collect_on_deliveryobject(collect_on_delivery)

Defer payment until package is delivered, instead of when it is ordered.

shipment.​advanced_options.​third_party_consigneeboolean

Third Party Consignee option is a value-added service that allows the shipper to supply goods without commercial invoices being attached

Default false
Example: true
shipment.​advanced_options.​dangerous_goodsboolean

Indicates if the Dangerous goods are present in the shipment

Default false
Example: true
shipment.​advanced_options.​dangerous_goods_contactobject

Contact information for Dangerous goods

shipment.​advanced_options.​windsor_framework_detailsobject

The Windsor framework is a new regulation in the UK that simplifies customs procedures for goods moved from the UK mainland to Northern Ireland.

shipment.​advanced_options.​ancillary_endorsements_optionstring or null

Ancillary endorsements option for the shipment

Example: "forward"
shipment.​advanced_options.​return_pickup_attemptsinteger or null

Number of return pickup attempts

Example: 3
shipment.​advanced_options.​own_document_uploadboolean

Indicates if own document upload is enabled

Default false
Example: false
shipment.​advanced_options.​limited_quantityboolean

Indicates if the shipment contains limited quantities

Default false
Example: false
shipment.​advanced_options.​event_notificationboolean

Indicates if event notifications are enabled

Default false
Example: false
shipment.​advanced_options.​fragileboolean

Indicates if the shipment contains fragile items

Default false
Example: false
shipment.​advanced_options.​delivery_as_addressedboolean

Instructs the carrier to deliver the package only to the exact address provided

Default false
Example: false
shipment.​advanced_options.​return_after_first_attemptboolean

Ensures the shipment is immediately flagged for return to the sender if the initial delivery attempt fails

Default false
Example: false
shipment.​advanced_options.​regulated_content_typestring or null(regulated_content_type)

Indicates the category of goods in the shipment that is subject to special regulatory or compliance requirements

Default null
Enum"day_old_poultry""other_live_animal"
shipment.​advanced_options.​netstamps_optionsobject

Layout options for printing NetStamps labels on a sheet. Controls the starting position on the label sheet.

shipment.​insurance_providerstring(insurance_provider)required

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

Default "none"
Enum"none""shipsurance""carrier""third_party"
shipment.​tagsArray of objects(tag)>= 0 itemsrequired

Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. Note: Tags require object structure with name property, not simple strings.

Default []
shipment.​tags[].​namestringnon-emptyrequired

The tag name.

Example: "Fragile"
shipment.​order_source_codestring(order_source_name)

The order sources that are supported by ShipStation

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]

Example: "Flat Rate Envelope"
shipment.​packages[].​weightobject(weight)required

The package weight

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

The weight, in the specified unit

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

Weight unit

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.

Example: "se-1234545"
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"
label_layoutstringrequired

The envelope layout to use.

Enum"envelope_9""envelope_10""envelope_11""envelope_12""envelope_personal""envelope_monarch""envelope_greeting""envelope_invitation""envelope_traditional_single""envelope_standard_single"
Example: "envelope_9"
label_formatstring

The file format for the label.

Default "pdf"
Enum"pdf""png""zpl"
Example: "pdf"
display_schemestring(display_scheme)

The display format that the label should be shown in.

Default "label"
Enum"label""paperless""label_and_paperless"
test_labelboolean

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

Default false
Example: true
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.

This is the default if label_download_type is unspecified.
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"
is_return_labelboolean

Indicates whether this is a return label.

Default false
Example: true
rma_numberstring or null

An optional Return Merchandise Authorization number for return labels.

Example: "asd12323"
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]+)+$

The label_id of the original (outgoing) label that the return label is for.

Example: "se-28529731"
validate_addressstring(validate_address)

The possible validate address values

Default "no_validation"
Enum"no_validation""validate_only""validate_and_clean"
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"
ship_to_service_point_idstring or null

A unique identifier for a carrier service point where the shipment will be delivered.

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.

Example: "614940"
curl -i -X POST \
  https://docs.shipstation.com/_mock/apis/openapi/v2/mailing/envelopes \
  -H 'Content-Type: application/json' \
  -H 'api-key: YOUR_API_KEY_HERE' \
  -d '{
    "shipment": {
      "carrier_id": "se-1234567",
      "service_code": "se_1234567",
      "requested_shipment_service": "usps_priority_mail",
      "shipping_rule_id": "se-1234",
      "external_order_id": "1232434",
      "hold_until_date": "2025-01-15T00:00:00.000Z",
      "ship_by_date": "2025-01-15T00:00:00.000Z",
      "retail_rate": {
        "currency": "usd",
        "amount": 12
      },
      "store_id": "se-12345",
      "items": [],
      "notes_from_buyer": "Please handle with care",
      "notes_for_gift": "Happy Birthday!",
      "is_gift": true,
      "assigned_user": "user@example.com",
      "amount_paid": {
        "currency": "usd",
        "amount": 12
      },
      "shipping_paid": {
        "currency": "usd",
        "amount": 12
      },
      "tax_paid": {
        "currency": "usd",
        "amount": 12
      },
      "zone": 1,
      "display_scheme": "label",
      "tax_identifiers": [
        {
          "taxable_entity_type": "shipper",
          "identifier_type": "vat",
          "issuing_authority": "US",
          "value": "value"
        }
      ],
      "external_shipment_id": "1234556",
      "shipment_number": "10001",
      "ship_date": "2018-09-23T00:00:00Z",
      "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": "yes",
        "instructions": "any instruction",
        "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": "yes",
        "instructions": "any instructions"
      },
      "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": "yes",
        "instructions": "any instructions"
      },
      "is_return": true,
      "confirmation": "none",
      "customs": null,
      "advanced_options": {
        "bill_to_account": "123456789",
        "bill_to_country_code": "US",
        "bill_to_party": "third_party",
        "bill_to_postal_code": "28005",
        "contains_alcohol": true,
        "delivered_duty_paid": true,
        "dry_ice": true,
        "dry_ice_weight": {
          "value": 23,
          "unit": "pound"
        },
        "non_machinable": true,
        "saturday_delivery": true,
        "fedex_freight": {
          "shipper_load_and_count": "shipper_load_and_count",
          "booking_confirmation": "today"
        },
        "use_ups_ground_freight_pricing": true,
        "freight_class": "77.5",
        "custom_field1": "custom field 1",
        "custom_field2": "custom field 2",
        "custom_field3": "custom field 3",
        "origin_type": null,
        "additional_handling": true,
        "shipper_release": true,
        "collect_on_delivery": {
          "payment_type": "any",
          "payment_amount": {
            "currency": "USD",
            "amount": 12
          }
        },
        "third_party_consignee": true,
        "dangerous_goods": true,
        "dangerous_goods_contact": {
          "name": "Michael Robinson",
          "phone": "123456578789"
        },
        "windsor_framework_details": {
          "movement_indicator": "b2b",
          "not_at_risk": true
        },
        "ancillary_endorsements_option": "forward",
        "return_pickup_attempts": 3,
        "own_document_upload": false,
        "limited_quantity": false,
        "event_notification": false,
        "fragile": false,
        "delivery_as_addressed": false,
        "return_after_first_attempt": false,
        "regulated_content_type": null,
        "netstamps_options": {
          "row": 1,
          "column": 1
        }
      },
      "insurance_provider": "none",
      "tags": [],
      "order_source_code": "amazon_ca",
      "packages": [
        {
          "package_id": "se-123456",
          "package_code": "thick_envelope",
          "package_name": "Flat Rate Envelope",
          "weight": {
            "value": 23,
            "unit": "pound"
          },
          "dimensions": {
            "unit": "inch",
            "length": 2,
            "width": 2,
            "height": 1
          },
          "insured_value": [
            {
              "currency": "usd",
              "amount": 0
            }
          ],
          "label_messages": {
            "reference1": "Reference",
            "reference2": "Reference 2",
            "reference3": "Reference 3"
          },
          "external_package_id": "se-1234545",
          "content_description": "Hand knitted wool socks",
          "products": []
        }
      ],
      "comparison_rate_type": "retail"
    },
    "label_layout": "envelope_9",
    "label_format": "pdf",
    "display_scheme": "label",
    "test_label": true,
    "label_download_type": "url",
    "is_return_label": true,
    "rma_number": "asd12323",
    "charge_event": "carrier_default",
    "outbound_label_id": "se-28529731",
    "validate_address": "no_validation",
    "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK",
    "ship_to_service_point_id": "614940",
    "ship_from_service_point_id": "614940"
  }'

Responses

The label was created successfully.

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 ShipStation 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"
Example: "completed"
shipment_idstring(se_id)[ 1 .. 25 ] characters^se(-[a-z0-9]+)+$read-onlyrequired

The shipment that this label is for. ShipStation 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.

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

Example: "externalId-1234556"
external_order_idstring or nullread-only

ID that the Order Source assigned

Example: "externalOrderId-1232434"
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 ShipStation .

Example: "2018-09-23T00:00:00Z"
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

Currency code

Example: "usd"
shipment_cost.​amountnumber>= 0required

The monetary amount, in the specified currency.

Example: 12
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

Currency code

Example: "usd"
insurance_cost.​amountnumber>= 0required

The monetary amount, in the specified currency.

Example: 12
requested_comparison_amountobject(monetary_value)read-only

The total shipping cost for the specified comparison_rate_type.

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.

Example: true
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.

Example: "asd12323"
is_internationalbooleanread-onlyrequired

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

Example: true
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]

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

An ISO 8601 string that represents a date and time.

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

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"
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.

Example: true
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"
confirmationstring(delivery_confirmation)read-only

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"
tracking_statusstring(tracking_status)read-onlyrequired

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

Enum"unknown""in_transit""error""delivered"
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.shipstation.com/v2/labels/se-28529731"
label_download.​pdfstring(url)(url)non-empty

The URL for the pdf generated label

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

The URL for the png generated label

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

The URL for the zpl generated label

Example: "http://api.shipstation.com/v2/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.shipstation.com/v2/labels/se-28529731"
form_download.​typestringnon-empty

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

Example: "child"
qr_code_downloadobject or null(optional_link)read-only

The QR code download for the package

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.shipstation.com/v2/labels/se-28529731"
paperless_download.​instructionsstring or null

The instructions for the paperless download.

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

The handoff code for the paperless download.

Default null
Example: "122334"
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.shipstation.com/v2/labels/se-28529731"
insurance_claim.​typestringnon-empty

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

Example: "child"
packagesArray of objects(label_package)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

Example: 1234545
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

Example: 23
packages[].​weight.​unitstring(weight_unit)required

Weight unit

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.

Example: "se-1234567"
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

Example: 34
packages[].​has_label_documentsboolean

Whether the package has label documents available for download

Example: true
packages[].​has_form_documentsboolean

Whether the package has form documents available for download

Example: true
packages[].​has_qr_code_documentsboolean

Whether the package has QR code documents available for download

Example: true
packages[].​has_paperless_label_documentsboolean

Whether the package has paperless documents available for download

Example: true
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.

rate_detailsArray of objectsread-onlyrequired
rate_details[].​rate_detail_typestring
Example: "shipping"
rate_details[].​carrier_descriptionstring
Example: "Shipping"
rate_details[].​carrier_billing_codestring
Example: "shipping"
rate_details[].​carrier_memostring
Example: ""
rate_details[].​amountobject(monetary_value)

A monetary value, such as the price of a shipping label, the insured value of a package, or an account balance.

rate_details[].​billing_sourcestring
Example: "carrier"
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.

Response
application/json
{ "label_id": "se-123456", "status": "completed", "shipment_id": "se-1234567", "external_shipment_id": "externalId-1234556", "external_order_id": "externalOrderId-1232434", "ship_date": "2018-09-23T00:00:00Z", "created_at": "2018-09-23T15:00:00.000Z", "shipment_cost": { "currency": "usd", "amount": 12 }, "insurance_cost": { "currency": "usd", "amount": 12 }, "requested_comparison_amount": { "currency": "usd", "amount": 12 }, "tracking_number": "782758401696", "is_return_label": true, "rma_number": "asd12323", "is_international": true, "batch_id": "se-28529731", "carrier_id": "se-1234567", "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", "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": {} }, "label_format": "pdf", "display_scheme": "label", "label_layout": "4x6", "trackable": true, "label_image_id": "img_DtBXupDBxREpHnwEXhTfgK", "carrier_code": "dhl_express", "confirmation": "none", "tracking_status": "unknown", "label_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "pdf": "http://api.shipstation.com/v2/labels/se-28529731", "png": "http://api.shipstation.com/v2/labels/se-28529731", "zpl": "http://api.shipstation.com/v2/labels/se-28529731" }, "form_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "qr_code_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "paperless_download": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "instructions": "any instructions", "handoff_code": "122334" }, "insurance_claim": { "href": "http://api.shipstation.com/v2/labels/se-28529731", "type": "child" }, "packages": [ {} ], "alternative_identifiers": [ {} ], "rate_details": [ {} ], "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": "yes", "instructions": "any instruction", "geolocation": [] } }

Manifests

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

Operations

Package Pickups

Scheduled pickups and manage pickup requests for supported carriers.

Operations

Package Types

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

Operations

Products

Manage products in your ShipStation account. Products represent the items you sell and ship to customers.

Operations

Purchase Orders

Create and manage purchase orders from suppliers to replenish inventory. Track order status, receive products, and update inventory levels automatically.

Operations

Rates

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

Operations

Shipments

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

Operations

Suppliers

Manage supplier information including contact details, email addresses, and physical addresses. Suppliers are used when creating purchase orders.

Operations

Tags

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

Operations

Totes

Manage totes (bins or containers) used in warehouse picking and packing operations. Create, update, delete totes and track tote quantities by warehouse.

Operations

Tracking

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

Operations

Warehouses

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

Operations

Users

Manage and retrieve user information for the ShipStation account. This endpoint allows you to list users with various filtering options.

Operations

Webhooks

Webhooks are a powerful feature that can save you from sending repeated polling requests to check on the state of something. With webhooks, ShipStation will automatically contact your servers when the stage changes. This can include parcel tracking events, notification when a batch operation completes, and more.

Operations