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
extraobject(ParcelExtra)

An object holding optional extra services to be requested for each parcel in a multi-piece shipment. The following values are supported for the extra field of the parcel object.

metadatastring
Example: "Customer ID 123456"
mass_unitstring(WeightUnitEnum)required

The unit used for weight.

Enum"g""kg""lb""oz"
weightstringrequired

Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted.

Example: "1"
distance_unitstring(DistanceUnitEnum)required

The measure unit used for length, width and height.

Enum"cm""in""ft""m""mm""yd"
heightstringrequired

Height of the parcel. Up to six digits in front and four digits after the decimal separator are accepted.

Example: "1"
lengthstringrequired

Length of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted.

Example: "1"
widthstringrequired

Width of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted.

Example: "1"
object_createdstring(date-time)

Date and time of Parcel creation.

Example: "2014-07-09T02:19:13.174Z"
object_idstring

Unique identifier of the given Parcel object. This ID is required to create a Shipment object.

Example: "adcfdddf8ec64b84ad22772bce3ea37a"
object_ownerstring

Username of the user who created the Parcel object.

Example: "shippotle@shippo.com"
object_statestring

A Parcel will only be valid when all required values have been sent and validated successfully.

Value"VALID"
Example: "VALID"
object_updatedstring(date-time)

Date and time of last Parcel update. Since you cannot update Parcels after they were created, this time stamp reflects the time when the Parcel was changed by Shippo's systems for the last time, e.g., during sorting the dimensions given.

Example: "2014-07-09T02:19:13.174Z"
templateFedEx Parcel Template (string) or UPS Parcel Template (string) or USPS Parcel Template (string) or DHL eCommerce Parcel Template (string) or DPD UK Parcel Template (string) or Aramex Australia Parcel Template (string)(ParcelTemplateEnumSet)
One of:
TokenNameDimensions
FedEx_Box_10kgFedEx® 10kg Box15.81 x 12.94 x 10.19 in
FedEx_Box_25kgFedEx® 25kg Box54.80 x 42.10 x 33.50 in
FedEx_Box_Extra_Large_1FedEx® Extra Large Box (X1)11.88 x 11.00 x 10.75 in
FedEx_Box_Extra_Large_2FedEx® Extra Large Box (X2)15.75 x 14.13 x 6.00 in
FedEx_Box_Large_1FedEx® Large Box (L1)17.50 x 12.38 x 3.00 in
FedEx_Box_Large_2FedEx® Large Box (L2)11.25 x 8.75 x 7.75 in
FedEx_Box_Medium_1FedEx® Medium Box (M1)13.25 x 11.50 x 2.38 in
FedEx_Box_Medium_2FedEx® Medium Box (M2)11.25 x 8.75 x 4.38 in
FedEx_Box_Small_1FedEx® Small Box (S1)12.38 x 10.88 x 1.50 in
FedEx_Box_Small_2FedEx® Small Box (S2)11.25 x 8.75 x 4.38 in
FedEx_EnvelopeFedEx® Envelope12.50 x 9.50 x 0.80 in
FedEx_Padded_PakFedEx® Padded Pak11.75 x 14.75 x 2.00 in
FedEx_Pak_1FedEx® Large Pak15.50 x 12.00 x 0.80 in
FedEx_Pak_2FedEx® Small Pak12.75 x 10.25 x 0.80 in
FedEx_TubeFedEx® Tube38.00 x 6.00 x 6.00 in
FedEx_XL_PakFedEx® Extra Large Pak17.50 x 20.75 x 2.00 in
string(FedEx Parcel Template)
Enum"FedEx_Box_10kg""FedEx_Box_25kg""FedEx_Box_Extra_Large_1""FedEx_Box_Extra_Large_2""FedEx_Box_Large_1""FedEx_Box_Large_2""FedEx_Box_Medium_1""FedEx_Box_Medium_2""FedEx_Box_Small_1""FedEx_Box_Small_2"
testboolean

Indicates whether the object has been created in test mode.

{ "extra": { "COD": {}, "insurance": {}, "reference_1": "string", "reference_2": "string" }, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1", "object_created": "2014-07-09T02:19:13.174Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "object_state": "VALID", "object_updated": "2014-07-09T02:19:13.174Z", "template": "FedEx_Box_10kg", "test": true }

An object holding optional extra services to be requested for each parcel in a multi-piece shipment. The following values are supported for the extra field of the parcel object.

CODobject(COD)

Specify collection on delivery details (UPS only).

insuranceobject(ParcelInsurance)

To add insurance to your parcel, specify amount, content and currency.

If you do not want to add insurance to you parcel, do not set these parameters.

reference_1string<= 50 characters

Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.

Carrier-Specific Constraints:

CarrierConstraints
FedExMax 40 characters (Express services); Max 30 characters (Ground services)
reference_2string<= 50 characters

Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.

Carrier-Specific Constraints:

CarrierConstraints
FedExMax 30 characters
{ "COD": { "amount": "5.5", "currency": "USD", "payment_method": "CASH" }, "insurance": { "amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS" }, "reference_1": "string", "reference_2": "string" }

Request

Returns a list of all parcel 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
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/parcels/ \
  -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(Parcel)
Response
application/json
{ "next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [ {} ] }

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

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