Skip to content

Shippo external API. (2018-02-08)

Use this API to integrate with the Shippo service

Download OpenAPI description
Languages
Servers
https://api.goshippo.com

First-time users and those looking for specific integration tutorials, see our full API documentation and guides.
Download the API Specification yaml file

API Resources

All API URLs listed in this documentation are relative to https://api.goshippo.com/.

For example, the /addresses/ resource is reachable at https://api.goshippo.com/addresses/.

Authentication

The API requires Shippo's token HTTP Authentication with your Shippo token (live or test).

In order to authenticate properly, please put Authorization: ShippoToken <token> in your header. You can find your token on the Shippo API settings page.

For more information about authentication and test mode, please visit our Authentication guide.

The API is available via Secure Socket Layer (SSL) only. All requests to the Shippo API must use TLS version 1.2 or higher.

Request & Response Data

Request data is passed to the API by POSTing JSON objects with the appropriate key/value-pairs to the respective resource. The documentation for each API resource contains more details on the values accepted by a given resource.

Response data also formatted as JSON object. You can specify how many results per page are to be returned. For instance, /rates/?results=25 will return up to 25 results.

REST & Disposable Objects

The Shippo API is built around REST principles. Use POST requests to create objects, GET requests to retrieve objects, and PUT requests to update objects.

Only the Carrier Accounts object can be updated via PUT requests. All other objects such as Addresses, Parcels, Shipments, Rates, Transactions, Refunds, Customs Items, and Customs Declarations are disposable. This means that once you have created an object, you cannot change it. Instead, create a new one with the desired values.

API Version

This reference guide supports the Shippo API version: 2018-02-08 .

To see reference guides for older API versions, see our legacy reference guide. For more information about Shippo API versions, see our API versions guide.

Addresses are the locations a parcel is being shipped from and to. They represent company and residential places. Among other things, you can use address objects to create shipments, calculate shipping rates, and purchase shipping labels.

Schemas
Operations

A parcel is an item you are shipping. The parcel object includes details about its physical make-up of the parcel. It includes dimensions and weight that Shippo uses to calculate rates.

Schemas
Operations

A carrier parcel template represents a package used for shipping that has preset dimensions defined by a carrier. Some examples of a carrier parcel template include USPS Flat Rate Box and Fedex Small Pak. When using a carrier parcel template, the rates returned may be limited to the carrier that provides the box. You can create user parcel templates using a carrier parcel template. Shippo takes the dimensions of the carrier parcel template but you must configure the weight.

Schemas
Operations

A user parcel template represents a package used for shipping that has preset dimensions and attributes defined by you. They are useful for capturing attributes of parcel-types you frequently use for shipping, allowing them to be defined once and then used for many shipments. These parcel templates can also be used for live rates.

User parcel templates can also be created using a carrier parcel template, where the dimensions will be copied from the carrier presets, but the weight can be configured by you.

Schemas
Operations

A shipment is the act of transporting goods. A shipment object contains to and from addresses, and the parcel details that you are shipping. You can use the shipment object to retrieve shipping rates and purchase a shipping label.

Schemas
Operations

A rate is the cost to ship a parcel from a carrier. The rate object details the service level including the cost and transit time.

Schemas
Operations

A transaction is the purchase of a shipping label from a shipping provider for a specific service. You can print purchased labels and used them to ship a parcel with a carrier, such as USPS or FedEx.

Schemas
Operations

A batch is a technique for creating multiple labels at once. Use the batch object to create and purchase many shipments in two API calls. After creating the batch, retrieve the batch to verify that all shipments are valid. You can add and remove shipments after you have created the batch. When all shipments are valid you can purchase the batch and retrieve all the shipping labels.

Schemas
Operations


If you purchased your shipping label through Shippo, you can also get all the tracking details of your Shipment from the Transaction object.

A tracking status of a package is an indication of current location of a package in the supply chain. For example, sorting, warehousing, or out for delivery. Use the tracking status object to track the location of your shipments.

When using your Test token for tracking, you need to use Shippo's predefined tokens for testing different tracking statuses. You can find more information in our Tracking tutorial on how to do this, and what the payloads look like.

Schemas
Operations

Webhooks are a way for Shippo to notify your application when a specific event occurs. For example, when a label is purchased or when a shipment tracking status has changed. You can use webhooks to trigger actions in your application, such as sending an email or updating a database.

Schemas
Operations

Customs declarations are relevant information, including one or multiple customs items, you need to provide for customs clearance for your international shipments.

Schemas
Operations

Customs declarations are relevant information, including one or multiple customs items, you need to provide for customs clearance for your international shipments.

Schemas
Operations

Carriers are the companies who deliver your package. Shippo uses Carrier account objects as credentials to retrieve shipping rates and purchase labels from shipping Carriers.

Schemas
Operations

A manifest is a single-page document with a barcode that carriers can scan to accept all packages into transit without the need to scan each item individually. They are close-outs of shipping labels of a certain day. Some carriers require manifests to process the shipments.

Schemas
Operations

A pickup is when you schedule a carrier to collect a package for delivery. Use Shippo’s pickups endpoint to schedule pickups with USPS and DHL Express for eligible shipments that you have already created.

Schemas
Operations

An order is a request from a customer to purchase goods from a merchant. Use the orders object to load orders from your system to the Shippo dashboard. You can use the orders object to create, retrieve, list, and manage orders programmatically. You can also retrieve shipping rates, purchase labels, and track shipments for each order.

Schemas
Operations
currencystring

Required if total_price is provided
Currency of the total_price and total_tax amounts.

Example: "USD"
notesstring

Custom buyer- or seller-provided notes about the order.

Example: "This customer is a VIP"
order_numberstring

An alphanumeric identifier for the order used by the seller/buyer. This identifier doesn't need to be unique.

Example: "#1068"
order_statusstring(OrderStatusEnum)

Current state of the order. See the orders tutorial for the logic of how the status is handled.

Enum"UNKNOWN""AWAITPAY""PAID""REFUNDED""CANCELLED""PARTIALLY_FULFILLED""SHIPPED"
placed_atstringrequired

Date and time when the order was placed. This datetime can be different from the datetime of the order object creation on Shippo.

Example: "2016-09-23T01:28:12Z"
shipping_coststring

Amount paid by the buyer for shipping. This amount can be different from the price the seller will actually pay for shipping.

Example: "12.83"
shipping_cost_currencystring

Required if shipping_cost is provided
Currency of the shipping_cost amount.

Example: "USD"
shipping_methodstring

Shipping method (carrier + service or other free text description) chosen by the buyer. This value can be different from the shipping method the seller will actually choose.

Example: "USPS First Class Package"
subtotal_pricestring
Example: "12.1"
total_pricestring

Total amount paid by the buyer for this order.

Example: "24.93"
total_taxstring

Total tax amount paid by the buyer for this order.

Example: "0.0"
weightstring

Total weight of the order.

Example: "0.4"
weight_unitstring(WeightUnitEnum)

The unit used for weight.

Enum"g""kg""lb""oz"
from_addressobject(AddressFrom)

Address object of the sender / seller. Will be returned expanded by default.

to_addressobject(AddressTo)required

Address object of the recipient / buyer. Will be returned expanded by default.

line_itemsArray of objects(Line Item)

Array of line item objects representing the items in this order. All objects will be returned expanded by default.

object_idstring

Unique identifier of the order object.

Example: "adcfdddf8ec64b84ad22772bce3ea37a"
object_ownerstring

Username of the user who created the object.

Example: "shippotle@shippo.com"
shop_appstring(OrderShopAppEnum)

Platform the order was created on and, if applicable, imported from. Orders created via the Shippo API or dashboard will have the value "Shippo".

Enum"Amazon""Bigcommerce""CSV_Import""eBay""ePages""Etsy""Godaddy""Magento""Shippo""Shopify"
transactionsArray of objects

Array of transaction objects representing all shipping labels purchased for this order. All objects are returned expanded with a limited number of fields by default.

{ "currency": "USD", "notes": "This customer is a VIP", "order_number": "#1068", "order_status": "PAID", "placed_at": "2016-09-23T01:28:12Z", "shipping_cost": "12.83", "shipping_cost_currency": "USD", "shipping_method": "USPS First Class Package", "subtotal_price": "12.1", "total_price": "24.93", "total_tax": "0.0", "weight": "0.4", "weight_unit": "lb", "from_address": { "name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street2": "string", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "latitude": 0, "longitude": 0, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {}, "test": false }, "to_address": { "name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street2": "string", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "latitude": 0, "longitude": 0, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {}, "test": false }, "line_items": [ {} ], "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "shop_app": "Shippo", "transactions": [ {} ] }


Line Items, and their corresponding abstract Products and Variants, might be exposed as a separate resource in the future. Currently it's a nested object within the order resource.

A line item is an individual object in an order. For example, if your order contains a t-shirt, shorts, and a jacket, each item is represented by a line item.
currencystring

Currency of the total_price amount.

Example: "USD"
manufacture_countrystring

Country the item was manufactured in. In the Shippo dashboard, this value will be used ot pre-fill the customs declaration when creating a label for this order.

Example: "US"
max_delivery_timestring(date-time)

The date and time this item needs to be delivered by, i.e. by when the carrier delivers it to the buyer. This value is used by some platforms such as eBay to measure a seller's shipping time and performance. It will be displayed in the Shippo dashboard.

Example: "2016-07-23T00:00:00Z"
max_ship_timestring(date-time)

The date and time this item needs to be fulfilled by, i.e. by when the shipping label needs to be created and handed over to the carrier. This value is used by some platforms such as eBay to measure a seller's handling time and performance. It will be displayed in the Shippo dashboard.

Example: "2016-07-23T00:00:00Z"
quantityinteger(int64)

The quantity of this item in this order.

Example: 20
skustring

The stock keeping unit value of this item.

Example: "HM-123"
titlestring

Title of the line item.

Example: "Hippo Magazines"
total_pricestring

Total price paid by the buyer for this item (or these items, if quantity > 1).

Example: "12.1"
variant_titlestring

A variant is a specific variation of an item (e.g. size M or color blue). Variants might be exposed as a separate resource in the future too. Currently the variant title is a free text field describing the variant.

Example: "June Edition"
weightstring

Total weight of this/these item(s). Instead of specifying the weight of all items, you can also set the total_weight value of the order object.

Example: "0.4"
weight_unitstring(WeightUnitEnum)

The unit used for weight.

Enum"g""kg""lb""oz"
object_idstring

Unique identifier of the line item object.

Example: "abf7d5675d744b6ea9fdb6f796b28f28"
{ "currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28" }

Request

Returns a list of all order objects.

Security
APIKeyHeader
Query
pageinteger(int64)

The page number you want to select

Default 1
resultsinteger(int64)<= 100

The number of results to return per page (max 100)

Default 25
order_status[]Array of strings(OrderStatusEnum)

Filter orders by order status

Items Enum"UNKNOWN""AWAITPAY""PAID""REFUNDED""CANCELLED""PARTIALLY_FULFILLED""SHIPPED"
Example: order_status[]=PAID
shop_appstring(OrderShopAppEnum)

Filter orders by shop app

Enum"Amazon""Bigcommerce""CSV_Import""eBay""ePages""Etsy""Godaddy""Magento""Shippo""Shopify"
Example: shop_app=Shippo
start_datestring

Filter orders created after the input date and time (ISO 8601 UTC format). This is based on the placed_at field, meaning when the order has been placed, not when the order object was created.

end_datestring

Filter orders created before the input date and time (ISO 8601 UTC format). This is based on the placed_at field, meaning when the order has been placed, not when the order object was created.

Headers
SHIPPO-API-VERSIONstring

Optional string used to pick a non-default API version to use. See our API version guide.

Example: 2018-02-08
curl https://api.goshippo.com/orders/ \
-H "Authorization: ShippoToken shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396"

Responses

Bodyapplication/json
nextstring
Example: "baseurl?page=3&results=10"
previousstring
Example: "baseurl?page=1&results=10"
resultsArray of objects(Order)
Response
application/json
{ "next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [ {} ] }

Refunds are reimbursements for successfully created but unused shipping labels or other charges.

Schemas
Operations

A service group is a set of service levels grouped together. Rates at checkout uses services groups to present available shipping options to customers in their shopping basket.

Schemas
Operations

Rates at checkout is a tool for merchants to display up-to-date shipping estimates based on what's in their customers cart and where they’re shipping to. Merchants set up curated shipping options for customers in the checkout flow based on data in the shopping cart. The request must include the to address and item information. Optional fields are the from address and package information. If the optional fields are not included, the service will use the default address and/or package configured for rates at checkout. The response is a list of shipping options based on the Service Group configuration. (see Service Group configuration for details).

Schemas
Operations

Shippo Accounts are used by Shippo Platform Accounts to create and manage Managed Shippo Accounts. Managed Shippo Accounts are headless accounts that represent your customers. They are opaque to your end customers, meaning customers do not need to create their own Shippo login or have a billing relationship with Shippo. They can be used by marketplaces, e-commerce platforms, and third-party logistics providers who want to offer, seamless, built-in shipping functionality to their customers. See our guide for more details.

Schemas
Operations
TokenCarrier name
airterraAirterra
apc_postalAPC Postal
apgAPG
aramexAramex
asendia_usAsendia US
australia_postAustralia Post (also used for Startrack)
axlehireJitsu
better_trucksBetterTrucks
borderguruBorderGuru
boxberryBoxberry
bringBring (also used for Posten Norge)
canada_postCanada Post
cdlCDL
chronopostChronopost
collect_plusCollectPlus
correios_brCorreiosBR
correos_espanaCorreos España
colissimoColissimo
deutsche_postDeutsche Post
dhl_beneluxDHL Benelux
dhl_ecommerceDHL eCommerce
dhl_expressDHL Express
dhl_germany_c2cDHL Germany C2C
dhl_germanyDHL Germany
dpd_deDPD GERMANY
dpd_ukDPD UK
estafetaEstafeta
fastway_australiaAramex
fedexFedEx
globegisticsGlobegistics (now Asendia)
gls_usGLS US
gophrGophr
gsoGSO
hermes_germany_b2cHermes Germany B2C
hermes_ukEvri UK
hongkong_postHongkong Post
lasershipLaserShip
lsoLSO
mondial_relayMondial Relay
new_zealand_postNew Zealand Post (also used for Pace and CourierPost)
nippon_expressNippon Express
ontracOnTrac
parcelforceParcelforce
passportPassport
pcfPCF
poste_italianePoste Italiane
postiPosti
purolatorPurolator
royal_mailRoyal Mail
royal_mail_sfRoyal Mail Storefeeder
rr_donnelleyePost Global
russian_postRussian Post
skypostalSkyPostal
stuartStuart
swyftSwyft
udsUDS (United Delivery Service)
upsUPS
uspsUSPS
vehoVeho

Service levels represent the shipping service type for each carrier. Use the tokens below when creating shipments.

A predefined package used by one or multiple carriers. When a template is given, the parcel dimensions do not have to be sent - the dimensions below will instead be used. The parcel weight is not affected by the use of a template.

Source of the address validation message.

Allowed values:

  • Shippo Address Validator
  • UPS

Validation result codes returned by the address validation service.

Allowed values:

  • verification_error
  • unknown_street
  • component_mismatch_error
  • multiple_match
  • sub_premise_number_invalid
  • sub_premise_number_missing
  • premise_number_invalid
  • premise_number_missing
  • box_number_invalid
  • box_number_missing
  • pmb_number_missing
  • postal_code_change
  • administrative_area_change
  • locality_change
  • dependent_locality_change
  • street_name_change
  • street_type_change
  • street_directional_change
  • sub_premise_type_change
  • sub_premise_number_change
  • double_dependent_locality_change
  • subadministrative_area_change
  • subnational_area_change
  • po_box_change
  • premise_type_change
  • house_number_change
  • organization_change
  • extraneous_information
  • usps_door_inaccessible
  • administrative_area_partial
  • city_partial
  • street_partial
  • building_partial
  • subpremise_partial
  • administrative_area_full
  • city_full
  • thoroughfare_full
  • premises_full
  • subpremise_full
  • geocoded_street
  • geocoded_neighborhood
  • geocoded_community
  • geocoded_state
  • geocoded_rooftop
  • geocoded_interpolated_rooftop
  • invalid_postal_code
  • postal_code_not_found
  • empty_request
  • service_error
  • street_detail_missing
  • Invalid City/State/Zip
  • Default Match
  • Unknown Street
  • Address Not Found
  • Non-Deliverable ZIP4
  • Multiple Responses
  • Invalid Dual Address
  • Invalid State
  • Invalid City
  • Ambiguous Address

Customs Declaration B13A Filing Option

B13A Option details are obtained by filing a B13A Canada Export Declaration via the Canadian Export Reporting System (CERS). More information on reporting commercial exports from Canada.

Allowed values:

  • FILED_ELECTRONICALLY
  • SUMMARY_REPORTING
  • NOT_REQUIRED

Type of goods of the shipment.

Allowed values:

  • DOCUMENTS
  • GIFT
  • SAMPLE
  • MERCHANDISE
  • HUMANITARIAN_DONATION
  • RETURN_MERCHANDISE
  • OTHER

EEL / PFC type of the shipment. For most shipments from the US to CA, NOEEI_30_36 is applicable; for most other shipments from the US, NOEEI_30_37_a is applicable.

Allowed values:

  • NOEEI_30_37_a
  • NOEEI_30_37_h
  • NOEEI_30_37_f
  • NOEEI_30_36
  • AES_ITN

The incoterm reference of the shipment. FCA is available for DHL Express and FedEx only. eDAP is available for DPD UK only. DAP is available for DHL Express and DPD UK. If expecting DAP for other carriers, please use DDU.

Allowed values:

  • DDP
  • DDU
  • FCA
  • DAP
  • eDAP

Customs Declaration Non Delivery Option

Indicates how the carrier should proceed in case the shipment can't be delivered.

Allowed values:

  • ABANDON
  • RETURN