Shippo: we make shipping simple

Shippo API Reference

API Resources

All API URLs listed in this documentation are relative to https://api.goshippo.com/v1/. For example, the /addresses/ resource is reachable at https://api.goshippo.com/v1/addresses/.

Authentication

The API requires Basic HTTP Authentication with your Shippo username and password. Don't have them? Sign up here.

The API is available via Secure Socket Layer (SSL) only. Insecure attempts to access the API will return HTTP status 403/Forbidden.

Request & Response Data

Request data is passed to the API by POSTing JSON arrays 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. The returned data is also formatted as JSON array. You can specify how many results per page are to be returned. For instance, /v1/rates/?results=25 will return up to 25 results.

Disposable Objects

The Shippo API is built with simplicity in mind. While you can GET and POST Addresses, Parcels, Shipments and Transactions, you can only GET all other resources. This means that once you created an object, you cannot change it. Instead, create a new one with the desired values.

API Endpoint

https://api.goshippo.com/v1/

Client Framework and Libraries
The following libraries are available on our Shippo Github Account:
Questions?

We're happy to help at support@goshippo.com.

Addresses

Address objects are used for creating Shipments, obtaining Rates and printing Labels, and thus are one of the fundamental building blocks of the Shippo API.

Attributes
object_purpose
required
"QUOTE"
"PURCHASE"
Quote Addresses can be generated by only passing selected address information. Quote Addresses can only be used for obtaining shipping Rate quotes and cannot be used to purchase Labels. Addresses that should be used for purchases must be fully entered, i.e., a complete street address with all required fields must be passed.
name
required for purchase
string First and Last Name of the addressee
company
optional
string Company Name
street1
required for purchase
string First street line, which is usually the street name. Note that a building's street number should be passed separately (see below).
street_no
optional
string Street number of the addressed building. This field can be included in street1 for all carriers except for DHL Paket (Germany).
street2
optional
string Second street line.
city
required for purchase
string Name of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates. Please bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Passing a state or a ZIP code (see below), if known, will yield more accurate results.
zip
required for purchase
string Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more accurate Rates.
state
required for purchase for some countries
string State values are only required for shipments from the United States and Canada (most carriers only accept two-character state abbreviations). However, to receive more accurate quotes, passing it is generally recommended.
country
required
ISO 3166-1-alpha-2 code (ISO 2 country code) Example: 'US' or 'DE'. All accepted values can be found on the Official ISO Website. Sending a country is always required.
phone
optional
string Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped.
email
required for purchase
email E-mail address of the contact person.
metadata
optional
string A string of up to 100 characters that can be filled with any additional information you want to attach to the object.
Response attributes

A response from the Address resource contains the request data, plus the data outlined below.

object_state "VALID"
"INVALID"
"INCOMPLETE"
"COMPLETED"
Valid addresses contain all required values.

Invalid addresses have failed one or multiple validations.

Incomplete Addresses are eligible for requesting rates but lack at least one required value for purchasing labels.

Completed Addresses have been deprecated as of June 2014.
object_purpose "QUOTE"
"PURCHASE"
Indicates whether an address can be used to purchase labels or only to obtain rates.
object_source "FULLY_ENTERED"
"PARTIALLY_ENTERED"
"VALIDATOR
"ZIP_COUNTRY"
"CITY_COUNTRY"
"COUNTRY"
"IP"
Fully entered Addresses only contain user-given values and are eligible for purchasing a label.

Partially entered Addresses lack some required information and only qualify for requesting rates.

Validator addresses have been created by the address validation service.

The other sources have been deprecated as of June 2014.
object_created datetime Date and time of Address creation.
object_updated datetime Date and time of last Address update. Since you cannot update Addresses after they were created, this time stamp reflects the time when the Address was changed by Shippo's systems for the last time, e.g., during the approximation of one or more values.
object_id string Unique identifier of the given Address object. This ID is required to create a Shipment object.
object_owner string Username of the user who created the Address object.
messages array An array containing elements of the following schema:
"code" (string): an identifier for the corresponding message (not always available")
"message" (string): a publishable message containing further information.
API Resource URL

https://api.goshippo.com/v1/addresses/

Example
						
							
{
    "object_purpose": "QUOTE",
    "name": "Laura Behrens Wu",
    "company": "Shippo",
    "street1": "Clayton St.",
    "street_no": "215",
    "street2": "",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94117",
    "country": "US",
    "phone": "+1 555 341 9393",
    "email": "laura@goshippo.com",
    "metadata": "Customer ID 123456"
}

						
					
Response Example
						
							
{
    "object_state": "VALID",
    "object_purpose": "QUOTE",
    "object_source": "FULLY_ENTERED",
    "object_created": "2013-12-11T19:38:09.729Z",
    "object_updated": "2013-12-11T19:38:09.729Z",
    "object_id": "fcd9c72b564d4bfa8c03299ed6545132",
    "object_owner": "tech@goshippo.com",
    "name": "Laura Behrens Wu",
    "company": "Shippo",
    "street1": "Clayton St.",
    "street_no": "215",
    "street2": "",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94117",
    "country": "US",
    "phone": "+1 555 341 9393",
    "email": "laura@goshippo.com",
    "ip": "",
    "metadata": "Customer ID 123456",
    "messages": []
}

						
					

Create a new address

Creates a new address object.

Attributes
object_purpose
required
"QUOTE"
"PURCHASE"
name
required for purchase
string
company
optional
string
street1
required for purchase
string
street_no
optional
string
street2
optional
string
city
required for purchase
string
zip
required for purchase
string
state
required for purchase for some countries
string
country
required
ISO 3166-1-alpha-2 code (ISO 2 country code)
phone
optional
string
email
required for purchase
email
metadata
optional
string
API Resource URL

https://api.goshippo.com/v1/addresses/

Example
						
							
curl https://api.goshippo.com/v1/addresses/ \
    -u <USERNAME>:<PASSWORD> \
    -d name="Laura Behrens Wu" \
    -d object_purpose="PURCHASE" \
    -d company="Shippo" \
    -d street1="Clayton St." \
    -d street_no="215" \
    -d street2="" \
    -d city="San Francisco" \
    -d state="CA" \
    -d zip=94117 \
    -d country=US \
    -d phone="+1 555 341 9393" \
    -d email=laura@goshippo.com\
    -d metadata="Customer ID 123456"

						
					
Response Example
						
							
{
   "object_state":"VALID",
   "object_purpose":"PURCHASE",
   "object_source":"FULLY_ENTERED",
   "object_created":"2014-07-09T02:19:13.174Z",
   "object_updated":"2014-07-09T02:19:13.174Z",
   "object_id":"d799c2679e644279b59fe661ac8fa488",
   "object_owner":"unittest",
   "name":"Laura Behrens Wu",
   "company":"Shippo",
   "street_no":"215",
   "street1":"Clayton St.",
   "street2":"",
   "city":"San Francisco",
   "state":"CA",
   "zip":"94117",
   "country":"US",
   "phone":"15553419393",
   "email":"laura@goshippo.com",
   "ip":null,
   "messages":[

   ],
   "metadata":"Customer ID 123456"
}

						
					

Retrieve an existing address

Retrieve an existing address by object id.

Attributes
object_id
required
Unique identifier of the Address object to be retrieved
API Resource URL

https://api.goshippo.com/v1/addresses/<ADDRESS OBJECT ID>

Example
						
							
curl https://api.goshippo.com/v1/addresses/d799c2679e644279b59fe661ac8fa488 \
	-u <USERNAME>:<PASSWORD>

						
					
Response Example
						
							
{
   "object_state":"VALID",
   "object_purpose":"PURCHASE",
   "object_source":"FULLY_ENTERED",
   "object_created":"2014-07-09T02:19:13.174Z",
   "object_updated":"2014-07-09T02:19:13.174Z",
   "object_id":"d799c2679e644279b59fe661ac8fa488",
   "object_owner":"unittest",
   "name":"Laura Behrens Wu",
   "company":"Shippo",
   "street_no":"215",
   "street1":"Clayton St.",
   "street2":"",
   "city":"San Francisco",
   "state":"CA",
   "zip":"94117",
   "country":"US",
   "phone":"15553419393",
   "email":"laura@goshippo.com",
   "ip":null,
   "messages":[

   ],
   "metadata":"Customer ID 123456"
}

						
					

Validate an Address

By checking if an Address exists in the USPS database, this method provides a mean to verify that an Address is valid. If the Address provided contains some fields that are inaccurate, the api will attempt to correct these fields. Otherwise, if the address is too ambiguous and cannot be corrected, the object_state in the response will be set to INVALID.
Address validation is currently only possible for US addresses.

Response attributes

A response from the Address resource contains the request data, plus the data outlined below.

object_state "INVALID"
"VALID"
A validated address is only "VALID" if the address has been found in the USPS database. If the result is invalid or ambiguous, it will be returned as "INVALID".
object_purpose "QUOTE"
"PURCHASE"
Object Purpose of the original address object.
object_source "VALIDATOR" Addresses created through the validation service are always returned with "VALIDATOR" source.
object_created datetime Date and time of the Address creation.
object_updated datetime Date and time of last Address update.
object_id string Unique identifier of the given Address object. This ID is identical to the original address object only if the given address has not been found. Otherwise, a new address object with a new object_id will be created and returned.
object_owner string Username of the user who created the Address object.
name string Name of the original address object.
company string Company name of the original address object.
street1 string Validated name or name of the original address object.
street_no string Validated street_no or street_no of the original address object.
street2 string Validated street2 or street2 of the original address object.
city string Validated city or city of the original address object.
zip string Validated zip code or zip code of the original address object.
state string Validated state or state of the original address object.
country ISO 3166-1-alpha-2 code (ISO 2 country code) Validated name or name of the original address object. Must be "US" for address to be validated.
phone string Phone of the original address object.
email email Email of the original address object.
IP IPv4 or IPv6 IP of the original address object.
metadata string Metadata of the original address object.
messages array An array containing elements of the following schema:
"code" (string): an identifier for the corresponding message (not always available")
"message" (string): a publishable message containing further information regarding the address validation.
API Resource URL

https://api.goshippo.com/v1/addresses/<ADDRESS OBJECT ID>/validate/

Example
						
							
curl https://api.goshippo.com/v1/addresses/d799c2679e644279b59fe661ac8fa488/validate/ \
    -u <USERNAME>:<PASSWORD>

						
					
Response Example
						
							
{
    "object_state": "VALID",
    "object_purpose": "QUOTE",
    "object_source": "VALIDATOR",
    "object_created": "2013-12-11T19:38:09.729Z",
    "object_updated": "2013-12-11T19:38:09.729Z",
    "object_id": "550f0375bea44ab0bb1911377ede5084",
    "object_owner": "tech@goshippo.com",
    "name": "Laura Behrens Wu",
    "company": "Shippo",
    "street1": "215 CLAYTON ST",
    "street_no": "",
    "street2": "",
    "city": "SAN FRANCISCO",
    "state": "CA",
    "zip": "94117-4324",
    "country": "US",
    "phone": "+1 555 341 9393",
    "email": "laura@goshippo.com",
    "ip": "",
    "metadata": "Customer ID 123456",
    "messages": []
}

						
					

List all addresses

List all addresses.

Attributes
results
optional GET parameter
Number of Address objects to be returned
API Resource URL

https://api.goshippo.com/v1/addresses/?results=<XX>

Example
						
							
curl https://api.goshippo.com/v1/addresses/ \
    -u <USERNAME>:<PASSWORD>

						
					
Response Example
						
							
{
   "count":3,
   "next":null,
   "previous":null,
   "results":[
      {
         "object_state":"VALID",
         "object_purpose":"PURCHASE",
         "object_source":"FULLY_ENTERED",
         "object_created":"2014-07-16T23:20:31.089Z",
         "object_updated":"2014-07-16T23:20:31.089Z",
         "object_id":"747207de2ba64443b645d08388d0309c",
         "object_owner":"unittest",
         "name":"Laura Behrens Wu",
         "company":"Shippo",
         "street_no":"215",
         "street1":"Clayton St.",
         "street2":"",
         "city":"San Francisco",
         "state":"CA",
         "zip":"94117",
         "country":"US",
         "phone":"15553419393",
         "email":"laura@goshippo.com",
         "ip":null,
         "messages":[

         ],
         "metadata":"Customer ID 123456"
      },
      {...},
      {...}
   ]
}

						
					

Parcels

Parcel objects are used for creating Shipments, obtaining Rates and printing Labels, and thus are one of the fundamental building blocks of the Shippo API. Parcels are created with their basic dimensions and their weight.

Attributes
length
required
decimal (6,4) First dimension of the Parcel. The length should always be the largest of the three dimensions length, width and height; our API will automatically order them if this is not the case. Up to six digits in front and four digits after the decimal separator are accepted.
width
required
decimal (6,4) Second dimension of the Parcel. The width should always be the second largest of the three dimensions length, width and height; our API will automatically order them if this is not the case. Up to six digits in front and four digits after the decimal separator are accepted.
height
required
decimal (6,4) Third dimension of the parcel. The height should always be the smallest of the three dimensions length, width and height; our API will automatically order them if this is not the case. Up to six digits in front and four digits after the decimal separator are accepted.
distance_unit
required
"cm"
"in"
"ft"
"mm"
"m"
"yd"
The unit used for length, width and height.
weight
required
decimal (6,4) Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted.
mass_unit
required
"g"
"oz"
"lb"
"kg"
The unit used for weight.
template
optional
string A parcel template is a predefined package used by one or multiple carriers. See the table below for all available values and the corresponding tokens. When a template is given, the parcel dimensions have to be sent, but will not be used for the Rate generation. The dimensions below will instead be used. The parcel weight is not affected by the use of a template.
metadata
optional
string A string of up to 100 characters that can be filled with any additional information you want to attach to the object.
Response attributes

A response from the Address resource contains the request data, plus the data outlined below.

object_state "VALID" A Parcel will only be valid when all required values have been sent and validated successfully.
object_created datetime Date and time of Parcel creation.
object_updated datetime 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.
object_id string Unique identifier of the given Parcel object. This ID is required to create a Shipment object.
object_owner string Username of the user who created the Parcel object.

Parcel Templates

Use any of the following templates when you ship with special carrier packaging. You will also receive rates from other carriers, treating the parcel as custom packaging with the dimensions listed below.

Carrier Token Dimensions
iloxx EUROPALLET 120.00 x 80.00 x 60.00 cm
FedEx FedEx_Box_10kg 15.81 x 12.94 x 10.19 in
FedEx FedEx_Box_25kg 54.80 x 42.10 x 33.50 in
FedEx FedEx_Box_Extra_Large_1 11.88 x 11.00 x 10.75 in
FedEx FedEx_Box_Extra_Large_2 15.75 x 14.13 x 6.00 in
FedEx FedEx_Box_Large_1 17.50 x 12.38 x 3.00 in
FedEx FedEx_Box_Large_2 11.25 x 8.75 x 7.75 in
FedEx FedEx_Box_Medium_1 13.25 x 11.50 x 2.38 in
FedEx FedEx_Box_Medium_2 11.25 x 8.75 x 4.38 in
FedEx FedEx_Box_Small_1 12.38 x 10.88 x 1.50 in
FedEx FedEx_Box_Small_2 11.25 x 8.75 x 4.38 in
FedEx FedEx_Envelope 12.50 x 9.50 x 0.80 in
FedEx FedEx_Padded_Pak 11.75 x 14.75 x 2.00 in
FedEx FedEx_Pak_1 15.50 x 12.00 x 0.80 in
FedEx FedEx_Pak_2 12.75 x 10.25 x 0.80 in
FedEx FedEx_Tube 38.00 x 6.00 x 6.00 in
FedEx FedEx_XL_Pak 17.50 x 20.75 x 2.00 in
iloxx PALLET_CAGE 124.00 x 97.00 x 83.50 cm
UPS UPS_Box_10kg 410.00 x 335.00 x 265.00 mm
UPS UPS_Box_25kg 484.00 x 433.00 x 350.00 mm
UPS UPS_Express_Box 460.00 x 315.00 x 95.00 mm
UPS UPS_Express_Box_Large 18.00 x 13.00 x 3.00 in
UPS UPS_Express_Box_Medium 15.00 x 11.00 x 3.00 in
UPS UPS_Express_Box_Small 13.00 x 11.00 x 2.00 in
UPS UPS_Express_Envelope 12.50 x 9.50 x 2.00 in
UPS UPS_Express_Hard_Pak 14.75 x 11.50 x 2.00 in
UPS UPS_Express_Legal_Envelope 15.00 x 9.50 x 2.00 in
UPS UPS_Express_Pak 16.00 x 12.75 x 2.00 in
UPS UPS_Express_Tube 970.00 x 190.00 x 165.00 mm
UPS UPS_Laboratory_Pak 17.25 x 12.75 x 2.00 in
UPS UPS_MI_BPM
UPS UPS_MI_BPM_Flat
UPS UPS_MI_BPM_Parcel
UPS UPS_MI_First_Class
UPS UPS_MI_Flat
UPS UPS_MI_Irregular
UPS UPS_MI_Machinable
UPS UPS_MI_MEDIA_MAIL
UPS UPS_MI_Parcel
UPS UPS_MI_Parcel_Post
UPS UPS_MI_Priority
UPS UPS_MI_Standard_Flat
UPS UPS_Pad_Pak 14.75 x 11.00 x 2.00 in
UPS UPS_Pallet 120.00 x 80.00 x 200.00 cm
USPS USPS_Card 6.00 x 4.25 x 0.01 in
USPS USPS_Flat 15.00 x 12.00 x 0.75 in
USPS USPS_FlatRateCardboardEnvelope 12.50 x 9.50 x 4.00 in
USPS USPS_FlatRateEnvelope 12.50 x 9.50 x 4.00 in
USPS USPS_FlatRateGiftCardEnvelope 10.00 x 7.00 x 4.00 in
USPS USPS_FlatRateLegalEnvelope 15.00 x 9.50 x 4.00 in
USPS USPS_FlatRatePaddedEnvelope 12.50 x 9.50 x 4.00 in
USPS USPS_FlatRateWindowEnvelope 10.00 x 5.00 x 4.00 in
USPS USPS_IrregularParcel
USPS USPS_LargeFlatRateBoardGameBox 24.06 x 11.88 x 3.13 in
USPS USPS_LargeFlatRateBox 12.25 x 12.25 x 6.00 in
USPS USPS_Letter 11.50 x 6.13 x 0.25 in
USPS USPS_MediumFlatRateBox1 11.25 x 8.75 x 6.00 in
USPS USPS_MediumFlatRateBox2 14.00 x 12.00 x 3.50 in
USPS USPS_RegionalRateBoxA1 10.13 x 7.13 x 5.00 in
USPS USPS_RegionalRateBoxA2 13.06 x 11.06 x 2.50 in
USPS USPS_RegionalRateBoxB1 16.25 x 14.50 x 3.00 in
USPS USPS_RegionalRateBoxB2 12.25 x 10.50 x 5.50 in
USPS USPS_RegionalRateBoxC 15.00 x 12.00 x 12.00 in
USPS USPS_SmallFlatRateBox 8.69 x 5.44 x 1.75 in
USPS USPS_SmallFlatRateEnvelope 10.00 x 6.00 x 4.00 in
API Resource URL

https://api.goshippo.com/v1/parcels/

Example
						
							
{
    "length": "5",
    "width": "5",
    "height": "5",
    "distance_unit": "cm",
    "weight": "2",
    "mass_unit": "lb",
    "template": "",
    "metadata": "Customer ID 123456"
}

						
					
Response Example
						
							
{
    "object_state": "VALID",
    "object_created": "2013-12-11T19:38:09.729Z",
    "object_updated": "2013-12-11T19:38:09.729Z",
    "object_id": "fcd9c72b564d4bfa8c03299ed6545132",
    "object_owner": "tech@goshippo.com",
    "length": "20",
    "width": "15",
    "height": "12",
    "distance_unit": "in",
    "weight": "5",
    "mass_unit": "lb",
    "metadata": "Customer ID 123456"
}

						
					

Create a new parcel

Creates a new parcel object.

Attributes
length
required
decimal (6,4)
width
required
decimal (6,4)
height
required
decimal (6,4)
distance_unit
required
"cm"
"in"
"ft"
"mm"
"m"
"yd"
weight
required
decimal (6,4)
mass_unit
required
"g"
"oz"
"lb"
"kg"
template
optional
string
metadata
optional
string
value_amount
deprecated
decimal
value_currency
deprecated
Currency Code (string)
API Resource URL

https://api.goshippo.com/v1/parcels/

Example
						
							
curl https://api.goshippo.com/v1/parcels/ \
    -u <USERNAME>:<PASSWORD> \
    -d length="5" \
    -d width="5" \
    -d height="5" \
    -d distance_unit="cm" \
    -d weight="2" \
    -d mass_unit="lb" \
    -d template="" \
    -d metadata="Customer ID 123456"

						
					
Response Example
						
							
{
   "object_state":"VALID",
   "object_created":"2014-07-08T23:19:19.565Z",
   "object_updated":"2014-07-08T23:19:19.565Z",
   "object_id":"7df2ecf8b4224763ab7c71fae7ec8274",
   "object_owner":"unittest",
   "template":null,
   "length":"5",
   "width":"5",
   "height":"5",
   "distance_unit":"cm",
   "weight":"2",
   "mass_unit":"lb",
   "metadata":"Customer ID 123456"
}

						
					

Retrieve an existing parcel

Retrieve an existing parcel by object id.

Attributes
object_id
required
Unique identifier of the Parcel object to be retrieved
API Resource URL

https://api.goshippo.com/v1/parcels/<PARCEL OBJECT ID>

Example
						
							
curl https://api.goshippo.com/v1/parcels/7df2ecf8b4224763ab7c71fae7ec8274 \
    -u <USERNAME>:<PASSWORD> 

						
					
Response Example
						
							
{  
   "object_state":"VALID",
   "object_created":"2014-07-08T23:19:19.565Z",
   "object_updated":"2014-07-08T23:19:19.565Z",
   "object_id":"7df2ecf8b4224763ab7c71fae7ec8274",
   "object_owner":"unittest",
   "template":null,
   "length":"5.0000",
   "width":"5.0000",
   "height":"5.0000",
   "distance_unit":"cm",
   "weight":"2.0000",
   "mass_unit":"lb",
   "value_amount":null,
   "value_currency":null,
   "metadata":"Customer ID 123456"
}

						
					

List all parcels

List all parcel objects.

Attributes
results
optional GET parameter
Number of Parcel objects to be returned
API Resource URL

https://api.goshippo.com/v1/parcels/?results=<XX>

Example
						
							
curl https://api.goshippo.com/v1/parcels/ \
    -u <USERNAME>:<PASSWORD> 

						
					
Response Example
						
							
{
   "count":3,
   "next":null,
   "previous":null,
   "results":[
      {
         "object_state":"VALID",
         "object_created":"2014-07-08T23:19:19.565Z",
         "object_updated":"2014-07-08T23:19:19.565Z",
         "object_id":"7df2ecf8b4224763ab7c71fae7ec8274",
         "object_owner":"unittest",
         "template":null,
         "length":"5.0000",
         "width":"5.0000",
         "height":"5.0000",
         "distance_unit":"cm",
         "weight":"2.0000",
         "mass_unit":"lb",
         "value_amount":null,
         "value_currency":null,
         "metadata":"Customer ID 123456"
      }
      {...},
      {...}
   ]
}

						
					

Shipments

The heart of the Shippo API, a Shipment is made up of "to" and "from" Addresses and the Parcel to be shipped. Once created, a Shipment object can be used to retrieve shipping Rates and purchase a shipping Label.

Attributes
object_purpose
required
"QUOTE"
"PURCHASE"
Quote Shipments can only be used to obtain quote Rates; at the same time, they accept any valid or completed Address object. Purchase Shipments can be used to obtain Rates and purchase Labels, but only accept purchase Addresses that have been fully entered.
address_from
required
string ID of the Address object that should be used as sender Address.
address_to
required
string ID of the Address object that should be used as recipient Address.
parcel
required
string ID of the Parcel object to be shipped.
submission_type
required
'DROPOFF'
'PICKUP'
Indicates whether the parcel will be dropped off at a carrier location or will be picked up. Selecting 'PICKUP' does not request a carrier pickup. A pickup always needs to be requested separately.
return_of
required for return labels
string ID of the Transaction object of the outbound shipment.This field triggers the creation of a scan-based return shipments. See the Create a return shipment section for more details.
submission_date
required if submission_type is 'PICKUP'
datetime Desired pickup date. Must be in the format "2014-01-18T00:35:03.463Z" (ISO 8601 date). Please note that for some carriers, not all pickup dates are available. The API will return the corresponding error message if not available. If no pickup_date is given, the value will default to tomorrow's date (including Saturday or Sunday, which can lead to no carrier availability).
address_return
optional
string ID of the Address object where the shipment will be sent back to if it is not delivered (Only available for UPS, USPS, and Fedex shipments).
If this field is not set, your shipments will be returned to the address_form.
customs_declaration
optional
string ID of the Customs Declarations object for an international shipment.
insurance_amount
optional
decimal Total Parcel value to be insured. Please note that you need to specify the "insurance_currency" as well as the "insurance_content" (via the extra field below, if your package content is not general cargo) as well.
insurance_currency
required if insurance_amount is set
ISO 4217 Currency Code (string) Currency used for insurance_amount. The official ISO 4217 currency codes are used, e.g. "USD" or "EUR".
extra
optional
array An array of extra services to be requested. The following services are currently available. We are continuously adding new ones.
  • signature_confirmation (string, "standard" for standard signature confirmation, "adult" for adult signature)
  • is_residential (boolean, marks receiver address as residential)
  • insurance_content (string, specify package content for insurance)
  • saturday_delivery (boolean, marks shipment as to be delivered on a Saturday)
  • bypass_address_validation (boolean, bypassed address validation, if applicable)
reference_1
optional
string Optional text to be printed on the shipping label.
reference_2
optional
string Optional text to be printed on the shipping label.
metadata
optional
string A string of up to 100 characters that can be filled with any additional information you want to attach to the object.
Response attributes

A response from the Address resource contains the request data, plus the data outlined below.

object_status "WAITING"
"QUEUED"
"SUCCESS"
"ERROR"
"Waiting" shipments have been successfully submitted but not yet been processed. "Queued" shipments are currently being processed. "Success" shipments have been processed successfully, meaning that rate generation has concluded. "Error" does not occur currently and is reserved for future use.
object_purpose "QUOTE"
"PURCHASE"
Indicated whether a shipment can be used to purchase Labels or only to obtain quote Rates. Note that if at least one quote Address is passed in the original request, the Shipment will be eligible for quotes only.
object_state "VALID"
"INCOMPLETE"
"INVALID"
"VALID" shipments contain all required values and can be used to get rates and purchase labels. "INCOMPLETE" shipments lack required values but can be used for getting rates. "INVALID" shipments can't be used for getting rates or labels.
object_created datetime Date and time of Shipment creation.
object_updated datetime Date and time of last Shipment update.
object_id string Unique identifier of the given Shipment object.
object_owner string Username of the user who created the Shipment object.
rates_url url The URL pointing to the Rates List of the given shipment. It is sent for your convenience, but can also be manually built with the following schema: "https://api.goshippo.com/v1/shipments/<SHIPMENT OBJECT ID>/rates/[<CURRENCY CODE>]"
messages array An array containing elements of the following schema:
"code" (string): an identifier for the corresponding message (not always available")
"message" (string): a publishable message containing further information.
API Resource URL

https://api.goshippo.com/v1/shipments/

Example
						
							
{
    "object_purpose": "QUOTE",
    "address_from": "4f406a13253945a8bc8deb0f8266b245",
    "address_to": "4c7185d353764d0985a6a7825aed8ffb",
    "parcel": "ec952343dd4843c39b42aca620471fd5",
    "submission_type": "PICKUP",
    "submission_date": "2013-12-03T12:00:00.000Z",
    "insurance_amount": "200",
    "insurance_currency": "USD",
    "extra": {
        "signature_confirmation": "standard"
    },
    "customs_declaration": "b741b99f95e841639b54272834bc478c",
    "reference_1": "",
    "reference_2": "",
    "metadata": "Customer ID 123456"
}

						
					
Response Example
						
							
{
    "object_state": "VALID",
    "object_status": "QUEUED",
    "object_purpose": "QUOTE",
    "object_created": "2013-12-01T06:24:20.121Z",
    "object_updated": "2013-12-01T06:24:20.121Z",
    "object_id": "694b1057e5f046c684ce05fe2d8ae525",
    "object_owner": "tech@goshippo.com",
    "address_from": "4f406a13253945a8bc8deb0f8266b245",
    "address_to": "4c7185d353764d0985a6a7825aed8ffb",
    "address_return": "4f406a13253945a8bc8deb0f8266b245",
    "parcel": "ec952343dd4843c39b42aca620471fd5",
    "submission_type": "PICKUP",
    "submission_date": "2013-12-03T12:00:00.000Z",
    "insurance_amount": "200",
    "insurance_currency": "USD",
    "extra": {
        "signature_confirmation": "standard",
        "insurance_content": "Electronics"
    },
    "customs_declaration": "b741b99f95e841639b54272834bc478c",
    "reference_1": "",
    "reference_2": "",
    "rates_url": "https://api.goshippo.com/v1/shipments/694b1057e5f046c684ce05fe2d8ae525/rates/",
    "metadata": "Customer ID 123456",
    "messages": [
        {
            "code": "Endicia",
            "text": "Parcel dimensions exceed maximum dimensions."
        }
    ]
}

						
					

Create a new shipment

Creates a new shipment object.

Attributes
object_purpose
required
"QUOTE"
"PURCHASE"
address_from
required
string
address_to
required
string
parcel
required
string
submission_type
required
'DROPOFF'
'PICKUP'
submission_date
required if submission_type is 'PICKUP'
datetime
address_return
optional
string
customs_declaration
optional
string
insurance_amount
optional
decimal
insurance_currency
required if insurance_amount is set
ISO 4217 Currency Code (string)
extra
optional
array
reference_1
optional
string
reference_2
optional
string
metadata
optional
string
API Resource URL

https://api.goshippo.com/v1/shipments/

Example
						
							
curl https://api.goshippo.com/v1/shipments/ \
    -u <USERNAME>:<PASSWORD> \
    -d object_purpose="QUOTE" \
    -d address_from="d799c2679e644279b59fe661ac8fa488" \
    -d address_to="42236bcf36214f62bcc6d7f12f02a849" \
    -d parcel="7df2ecf8b4224763ab7c71fae7ec8274" \
    -d submission_type="PICKUP" \
    -d submission_date="2013-12-03T12:00:00.000Z" \
    -d insurance_amount="30" \
    -d insurance_currency="USD"

						
					
Response Example
						
							
{
   "object_created":"2014-07-17T00:04:06.163Z",
   "object_updated":"2014-07-17T00:04:06.163Z",
   "object_id":"89436997a794439ab47999701e60392e",
   "object_owner":"unittest",
   "object_state":"VALID",
   "object_status":"QUEUED",
   "object_purpose":"PURCHASE",
   "address_from":"fdabf0abb93c4460b60aa596116872a7",
   "address_to":"0476d70c612a423f9509ba5f807569db",
   "address_return":"fdabf0abb93c4460b60aa596116872a7",
   "parcel":"7df2ecf8b4224763ab7c71fae7ec8274",
   "submission_type":"PICKUP",
   "submission_date":"2013-12-03T12:00:00Z",
   "insurance_amount":"30",
   "insurance_currency":"USD",
   "extra":{

   },
   "customs_declaration":null,
   "reference_1":"",
   "reference_2":"",
   "rates_url":"https://api.goshippo.com/v1/shipments/89436997a794439ab47999701e60392e/rates/",
   "messages":[

   ],
   "metadata":"Customer ID 123456"
}

						
					

Create a return shipment

To create a return label, simply pass the object_id of the original outbound Transaction to the "return_of" field. If this flag is set, purchasing the generated rates will create a Scan-based return label. The advantage of using a Scan-based label is that you will only be charged if the label is used/scanned (not when the label is created).The Shippo api currently supports Scan-based returns for USPS, Fedex and UPS. When the return_of flag is set, Shippo will automatically swap the address_from and address_to fields for label creation. Please check the return service terms and condition for the carrier you intend to use, and please let us know if you have any questions.

Attributes
object_purpose
required
"QUOTE"
"PURCHASE"
address_from
required
string
address_to
required
string
parcel
required
string
submission_type
required
'DROPOFF'
'PICKUP'
return_of
optional
string
submission_date
required if submission_type is 'PICKUP'
datetime
address_return
optional
string
customs_declaration
optional
string
insurance_amount
optional
decimal
insurance_currency
required if insurance_amount is set
ISO 4217 Currency Code (string)
extra
optional
array
reference_1
optional
string
reference_2
optional
string
metadata
optional
string
API Resource URL

https://api.goshippo.com/v1/shipments/

Example
						
							
curl https://api.goshippo.com/v1/shipments/ \
    -u <USERNAME>:<PASSWORD> \
    -d object_purpose="QUOTE" \
    -d address_from="d799c2679e644279b59fe661ac8fa488" \
    -d address_to="42236bcf36214f62bcc6d7f12f02a849" \
    -d parcel="7df2ecf8b4224763ab7c71fae7ec8274" \
    -d submission_type="PICKUP" \
    -d submission_date="2013-12-03T12:00:00.000Z" \
    -d return_of="763ab7c71fae7ec82747df2ecf8b4224" \
    -d insurance_amount="30" \
    -d insurance_currency="USD"

						
					
Response Example
						
							
{
   "object_created":"2014-07-17T00:04:06.163Z",
   "object_updated":"2014-07-17T00:04:06.163Z",
   "object_id":"89436997a794439ab47999701e60392e",
   "object_owner":"unittest",
   "object_state":"VALID",
   "object_status":"QUEUED",
   "object_purpose":"PURCHASE",
   "address_from":"fdabf0abb93c4460b60aa596116872a7",
   "address_to":"0476d70c612a423f9509ba5f807569db",
   "address_return":"fdabf0abb93c4460b60aa596116872a7",
   "parcel":"7df2ecf8b4224763ab7c71fae7ec8274",
   "submission_type":"PICKUP",
   "submission_date":"2013-12-03T12:00:00Z",
   "return_of":"763ab7c71fae7ec82747df2ecf8b4224",
   "insurance_amount":"30",
   "insurance_currency":"USD",
   "extra":{

   },
   "customs_declaration":null,
   "reference_1":"",
   "reference_2":"",
   "rates_url":"https://api.goshippo.com/v1/shipments/89436997a794439ab47999701e60392e/rates/",
   "messages":[

   ],
   "metadata":"Customer ID 123456"
}

						
					

Retrieve an existing shipment

Retrieve an existing shipment by object id.

Attributes
object_id
required
Unique identifier of the Shipment object to be retrieved
API Resource URL

https://api.goshippo.com/v1/shipments/<SHIPMENT OBJECT ID>

Example
						
							
curl https://api.goshippo.com/v1/shipments/7c47d12aa95a4cbb9d90c167cca7bea7 \
    -u <USERNAME>:<PASSWORD>

						
					
Response Example
						
							
{
   "object_created":"2014-07-17T00:04:06.163Z",
   "object_updated":"2014-07-17T00:06:05.416Z",
   "object_id":"89436997a794439ab47999701e60392e",
   "object_owner":"unittest",
   "object_state":"VALID",
   "object_status":"SUCCESS",
   "object_purpose":"PURCHASE",
   "address_from":"fdabf0abb93c4460b60aa596116872a7",
   "address_to":"0476d70c612a423f9509ba5f807569db",
   "address_return":"fdabf0abb93c4460b60aa596116872a7",
   "parcel":"7df2ecf8b4224763ab7c71fae7ec8274",
   "submission_type":"PICKUP",
   "submission_date":"2013-12-03T12:00:00Z",
   "insurance_amount":"30.00",
   "insurance_currency":"USD",
   "extra":{

   },
   "customs_declaration":null,
   "reference_1":"",
   "reference_2":"",
   "rates_url":"https://api.goshippo.com/v1/shipments/89436997a794439ab47999701e60392e/rates/",
   "messages":[
      {
         "source":"UPS",
         "code":"",
         "text":"RatedShipmentWarning: Ship To Address Classification is changed from Commercial to Residential"
      },
      {
         "source":"UPS",
         "code":"",
         "text":"RatedShipmentWarning: Your invoice may vary from the displayed reference rates"
      },
      {
         "source":"UPS",
         "code":"",
         "text":"RatedShipmentWarning: User Id and Shipper Number combination is not qualified to receive negotiated rates."
      }
   ],
   "metadata":"Customer ID 123456"
}

						
					

List all shipments

List all shipment objects.

Attributes
results
optional GET parameter
Number of Shipment objects to be returned
API Resource URL

https://api.goshippo.com/v1/shipments/?results=<XX>

Example
						
							
curl https://api.goshippo.com/v1/shipments/ \
    -u <USERNAME>:<PASSWORD>

						
					
Response Example
						
							
{
   "count":1269,
   "next":"https://api.goshippo.com/v1/shipments/?page=2",
   "previous":null,
   "results":[
      {
         "object_created":"2014-07-17T00:04:06.163Z",
         "object_updated":"2014-07-17T00:06:05.416Z",
         "object_id":"89436997a794439ab47999701e60392e",
         "object_owner":"unittest",
         "object_state":"VALID",
         "object_status":"SUCCESS",
         "object_purpose":"PURCHASE",
         "address_from":"fdabf0abb93c4460b60aa596116872a7",
         "address_to":"0476d70c612a423f9509ba5f807569db",
         "parcel":"7df2ecf8b4224763ab7c71fae7ec8274",
         "submission_type":"PICKUP",
         "submission_date":"2013-12-03T12:00:00Z",
         "address_return":"fdabf0abb93c4460b60aa596116872a7",
         "customs_declaration":null,
         "insurance_amount":"30.00",
         "insurance_currency":"USD",
         "extra":{

         },
         "reference_1":"",
         "reference_2":"",
         "rates_url":"https://api.goshippo.com/v1/shipments/89436997a794439ab47999701e60392e/rates/",
         "messages":[
            {
               "source":"UPS",
               "code":"",
               "text":"RatedShipmentWarning: User Id and Shipper Number combination is not qualified to receive negotiated rates."
            },
            {
               "source":"UPS",
               "code":"",
               "text":"RatedShipmentWarning: Your invoice may vary from the displayed reference rates"
            },
            {
               "source":"UPS",
               "code":"",
               "text":"RatedShipmentWarning: Ship To Address Classification is changed from Commercial to Residential"
            }
         ],
         "metadata":"Customer ID 123456"
      },
      {...},
      {...}
   ]
}

						
					

Rates

Each valid Shipment object will automatically trigger the calculation of all available Rates. Depending on your Addresses and Parcel, there may be none, one or multiple Rates.

By default, the calculated Rates will return the price in two currencies under the "amount" and "amount_local" keys, respectively. The "amount" key will contain the price of a Rate expressed in the currency that is used in the country from which Parcel originates, and the "amount_local" key will contain the price expressed in the currency that is used in the country the Parcel is shipped to. You can request Rates with prices expressed in a different currency by adding the desired currency code in the end of the resource URL. The full list of supported currencies along with their codes can be viewed on open exchange rates.

Rates are created asynchronously. The response time depends exclusively on the carrier's server.

Response attributes

A response from the Address resource contains the request data, plus the data outlined below.

object_state "VALID" Each Rate of a valid Shipment object is valid.
object_purpose "QUOTE"
"PURCHASE"
Indicates whether the corresponding Shipment object can be used to purchase Labels or only to obtain quote Rates.
object_created datetime Date and time of Rate creation.
object_updated datetime Date and time of last Rate update.
object_id string Unique identifier of the given Rate object.
object_owner string Username of the user who created the rate object.
attributes array Contains specific attributes of this Rate in context of the entire shipment. Attributes are assigned to the cheapest or fastest Rate(s) or to the Rate(s) with the overall best value.
amount_local decimal Final Rate price, expressed in the currency used in the recipient's country.
currency_local ISO 4217 Currency Code Currency used in the recipient's country, refers to "amount_local". The official ISO 4217 currency codes are used, e.g. "USD" or "EUR".
amount decimal Final Rate price, expressed in the currency used in the sender's country.
currency ISO 4217 Currency Code (string) Currency used in the sender's country, refers to "amount". The official ISO 4217 currency codes are used, e.g. "USD" or "EUR".
provider string Carrier offering the rate, e.g., "FedEx" or "Deutsche Post DHL".
provider_image_75 string URL to the provider logo with max. dimensions of 75*75px. Please refer to the provider's Logo Usage Guidelines before using the logo.
provider_image_200 string URL to the provider logo with max. dimensions of 200*200px. Please refer to the provider's Logo Usage Guidelines before using the logo.
servicelevel_name string Name of the Rate's servicelevel, e.g. "International Priority" or "Standard Post". A servicelevel commonly defines the transit time of a Shipment (e.g., Express vs. Standard), along with other properties. These names vary depending on the provider.
servicelevel_terms string Further clarification of the service.
days integer Estimated transit time (duration) in days of the Parcel at the given servicelevel. Please note that this is not binding, but only an average value as given by the provider. Shippo is not able to guarantee any transit times.
duration_terms string Further clarification of the transit times. Often, this includes notes that the transit time as given in "days" is only an average, not a guaranteed time.
trackable bool Whether the parcel is traceable or not. Please note that this also is an approximation: some providers generally offer tracking, but exclude certain destination country from that service.
insurance bool Indicates whether the Rate contains a parcel insurance.
insurance_amount_local float The parcel insurance amount (i.e. the maximum value that is covered by the insurance in case of damage or loss) expressed in the recipient's country's currency.
insurance_currency_local ISO 4217 Currency Code (string) The parcel insurance currency of the recipient's country (ISO 3 currency code).
insurance_amount float The parcel insurance amount (i.e. the maximum value that is covered by the insurance in case of damage or loss) expressed in the sender's country's currency.
insurance_currency ISO 4217 Currency Code (string) The parcel insurance currency of the sender's country (ISO 3 currency code).
messages array An array containing elements of the following schema:
"code" (string): an identifier for the corresponding message (not always available")
"message" (string): a publishable message containing further information.
API Resource URL

https://api.goshippo.com/v1/shipments/<SHIPMENT OBJECT ID>/rates/[<CURRENCY CODE>/]

Response Example
						
							
{
    "object_state": "VALID",
    "object_purpose": "PURCHASE",
    "object_created": "2013-12-09T01:56:52.780Z",
    "object_updated": "2013-12-09T01:56:52.780Z",
    "object_id": "cf6fea899f1848b494d9568e8266e076",
    "object_owner": "tech@goshippo.com",
    "attributes": [],
    "amount_local": "5.35",
    "currency_local": "USD",
    "amount": "5.35",
    "currency": "USD",
    "provider": "USPS",
    "provider_image_75": "https://shippo-static.s3.amazonaws.com/providers/75/USPS.png",
    "provider_image_200": "https://shippo-static.s3.amazonaws.com/providers/200/USPS.png",
    "servicelevel_name": "Priority Mail",
    "servicelevel_terms": "",
    "days": 2,
    "duration_terms":"Delivery within 1, 2, or 3 days based on where your package started and where it’s being sent.",
    "trackable": true,
    "insurance": true,
    "insurance_amount_local": "50.00",
    "insurance_currency_local": "USD",
    "insurance_amount": "50.00",
    "insurance_currency": "USD",
    "messages": [
        {
            "code": "",
            "text": ""
        }
    ]
}

						
					

Get shipping rates

Get rates for a shipping object.

Attributes
Rate object_id
required
string
Currency code
optional
string
API Resource URL

https://api.goshippo.com/v1/shipments/<SHIPMENT OBJECT ID>/rates/[<CURRENCY CODE>/]

Example
						
							
curl https://api.goshippo.com/v1/shipments/5e40ead7cffe4cc1ad45108696162e42/rates/USD \
    -u <USERNAME>:<PASSWORD>

						
					
Response Example
						
							
{
   "count":10,
   "next":null,
   "previous":null,
   "results":[
      {
         "object_state":"VALID",
         "object_purpose":"PURCHASE",
         "object_created":"2014-07-17T00:04:10.118Z",
         "object_updated":"2014-07-17T00:04:10.627Z",
         "object_id":"ee81fab0372e419ab52245c8952ccaeb",
         "object_owner":"unittest",
         "shipment":"89436997a794439ab47999701e60392e",
         "attributes":[

         ],
         "amount":"5.35",
         "currency":"USD",
         "amount_local":"5.35",
         "currency_local":"USD",
         "provider":"USPS",
         "provider_image_75":"https://shippo-static.s3.amazonaws.com/providers/75/USPS.png",
         "provider_image_200":"https://shippo-static.s3.amazonaws.com/providers/200/USPS.png",
         "servicelevel_name":"Priority Mail",
         "servicelevel_terms":"",
         "days":1,
         "duration_terms":"Delivery within 1, 2, or 3 days based on where your package started and where it’s being sent.",
         "trackable":true,
         "insurance":true,
         "insurance_amount_local":"50.00",
         "insurance_currency_local":"USD",
         "insurance_amount":"50.00",
         "insurance_currency":"USD",
         "messages":[

         ]
      },
      {
         "object_state":"VALID",
         "object_purpose":"PURCHASE",
         "object_created":"2014-07-17T00:04:10.492Z",
         "object_updated":"2014-07-17T00:04:10.682Z",
         "object_id":"801084d9fa37403aa79a2dca2f84cbc5",
         "object_owner":"unittest",
         "shipment":"89436997a794439ab47999701e60392e",
         "attributes":[

         ],
         "amount":"3.62",
         "currency":"USD",
         "amount_local":"3.62",
         "currency_local":"USD",
         "provider":"USPS",
         "provider_image_75":"https://shippo-static.s3.amazonaws.com/providers/75/USPS.png",
         "provider_image_200":"https://shippo-static.s3.amazonaws.com/providers/200/USPS.png",
         "servicelevel_name":"Media Mail",
         "servicelevel_terms":"The material sent must be educational media. It cannot contain advertising, video games, computer drives, or digital drives of any kind.",
         "days":5,
         "duration_terms":"Delivery in 2 to 8 days.",
         "trackable":false,
         "insurance":true,
         "insurance_amount_local":"30.00",
         "insurance_currency_local":"USD",
         "insurance_amount":"30.00",
         "insurance_currency":"USD",
         "messages":[

         ]
      },
      {
         "object_state":"VALID",
         "object_purpose":"PURCHASE",
         "object_created":"2014-07-17T00:04:10.430Z",
         "object_updated":"2014-07-17T00:04:10.674Z",
         "object_id":"5e5f24e3806c452cadbc013f4a86a6eb",
         "object_owner":"unittest",
         "shipment":"89436997a794439ab47999701e60392e",
         "attributes":[
            "CHEAPEST",
            "BESTVALUE"
         ],
         "amount":"3.47",
         "currency":"USD",
         "amount_local":"3.47",
         "currency_local":"USD",
         "provider":"USPS",
         "provider_image_75":"https://shippo-static.s3.amazonaws.com/providers/75/USPS.png",
         "provider_image_200":"https://shippo-static.s3.amazonaws.com/providers/200/USPS.png",
         "servicelevel_name":"Library Mail",
         "servicelevel_terms":"Library Mail is a service for mailing items on loan from or mailed between academic institutions, public libraries, museums, and other qualified organizations in 2 to 8 days. Content is limited to books, sound recordings, academic theses, and certain other items. Each piece must show in the address or return address the name of a school or nonprofit organization.",
         "days":5,
         "duration_terms":"Delivery in 2 to 8 days.",
         "trackable":false,
         "insurance":true,
         "insurance_amount_local":"30.00",
         "insurance_currency_local":"USD",
         "insurance_amount":"30.00",
         "insurance_currency":"USD",
         "messages":[

         ]
      },
      {
         "object_state":"VALID",
         "object_purpose":"PURCHASE",
         "object_created":"2014-07-17T00:04:10.334Z",
         "object_updated":"2014-07-17T00:04:10.661Z",
         "object_id":"fd31f301b61c49048f861573d4364ff6",
         "object_owner":"unittest",
         "shipment":"89436997a794439ab47999701e60392e",
         "attributes":[

         ],
         "amount":"16.03",
         "currency":"USD",
         "amount_local":"16.03",
         "currency_local":"USD",
         "provider":"USPS",
         "provider_image_75":"https://shippo-static.s3.amazonaws.com/providers/75/USPS.png",
         "provider_image_200":"https://shippo-static.s3.amazonaws.com/providers/200/USPS.png",
         "servicelevel_name":"Priority Mail Express",
         "servicelevel_terms":"",
         "days":1,
         "duration_terms":"Overnight delivery to most U.S. locations.",
         "trackable":true,
         "insurance":true,
         "insurance_amount_local":"30.00",
         "insurance_currency_local":"USD",
         "insurance_amount":"30.00",
         "insurance_currency":"USD",
         "messages":[

         ]
      },
      {
         "object_state":"VALID",
         "object_purpose":"PURCHASE",
         "object_created":"2014-07-17T00:04:13.188Z",
         "object_updated":"2014-07-17T00:04:13.569Z",
         "object_id":"67f2d6c93d4f42f398ff4af787959bf6",
         "object_owner":"unittest",
         "shipment":"89436997a794439ab47999701e60392e",
         "attributes":[

         ],
         "amount":"10.92",
         "currency":"USD",
         "amount_local":"10.92",
         "currency_local":"USD",
         "provider":"UPS",
         "provider_image_75":"https://shippo-static.s3.amazonaws.com/providers/75/UPS.png",
         "provider_image_200":"https://shippo-static.s3.amazonaws.com/providers/200/UPS.png",
         "servicelevel_name":"Ground",
         "servicelevel_terms":"",
         "days":3,
         "duration_terms":"Delivery times vary. Delivered usually in 1-5 business days.",
         "trackable":true,
         "insurance":true,
         "insurance_amount_local":"30.00",
         "insurance_currency_local":"USD",
         "insurance_amount":"30.00",
         "insurance_currency":"USD",
         "messages":[

         ]
      },
      {
         "object_state":"VALID",
         "object_purpose":"PURCHASE",
         "object_created":"2014-07-17T00:04:13.275Z",
         "object_updated":"2014-07-17T00:04:13.608Z",
         "object_id":"c41cdeaf28194fbe8b5f71cfccca09b4",
         "object_owner":"unittest",
         "shipment":"89436997a794439ab47999701e60392e",
         "attributes":[

         ],
         "amount":"13.05",
         "currency":"USD",
         "amount_local":"13.05",
         "currency_local":"USD",
         "provider":"UPS",
         "provider_image_75":"https://shippo-static.s3.amazonaws.com/providers/75/UPS.png",
         "provider_image_200":"https://shippo-static.s3.amazonaws.com/providers/200/UPS.png",
         "servicelevel_name":"Three-Day Select",
         "servicelevel_terms":"",
         "days":3,
         "duration_terms":"",
         "trackable":true,
         "insurance":true,
         "insurance_amount_local":"30.00",
         "insurance_currency_local":"USD",
         "insurance_amount":"30.00",
         "insurance_currency":"USD",
         "messages":[

         ]
      }
   ]
}

						
					

Retrieve an existing rate

Retrieve an existing rate by object id.

Attributes
object_id
required
Unique identifier of the Rate object to be retrieved
API Resource URL

https://api.goshippo.com/v1/rates/<RATE OBJECT ID>

Example
						
							
curl https://api.goshippo.com/v1/rates/ee81fab0372e419ab52245c8952ccaeb \
    -u <USERNAME>:<PASSWORD> 

						
					
Response Example
						
							
{
   "object_state":"VALID",
   "object_purpose":"PURCHASE",
   "object_created":"2014-07-17T00:04:10.118Z",
   "object_updated":"2014-07-17T00:04:10.627Z",
   "object_id":"ee81fab0372e419ab52245c8952ccaeb",
   "object_owner":"unittest",
   "shipment":"89436997a794439ab47999701e60392e",
   "attributes":[

   ],
   "amount":"5.77",
   "currency":"USD",
   "amount_local":"5.77",
   "currency_local":"USD",
   "provider":"USPS",
   "provider_image_75":"https://shippo-static.s3.amazonaws.com/providers/75/USPS.png",
   "provider_image_200":"https://shippo-static.s3.amazonaws.com/providers/200/USPS.png",
   "servicelevel_name":"Priority Mail",
   "servicelevel_terms":"",
   "days":1,
   "duration_terms":"Delivery within 1, 2, or 3 days based on where your package started and where it’s being sent.",
   "trackable":true,
   "insurance":true,
   "insurance_amount_local":"30.00",
   "insurance_currency_local":"USD",
   "insurance_amount":"30.00",
   "insurance_currency":"USD",
   "messages":[

   ]
}

						
					

List all rate objects.

List all the rate objects that have been previously obtained through the get rates method.

Attributes
results
optional GET parameter
Number of Rate objects to be returned
API Resource URL

https://api.goshippo.com/v1/rates/?results=<XX>

Example
						
							
curl https://api.goshippo.com/v1/rates/ \
    -u <USERNAME>:<PASSWORD> 

						
					
Response Example
						
							
{
   "count":13845,
   "next":"https://api.goshippo.com/v1/rates/?page=2",
   "previous":null,
   "results":[
      {
         "object_state":"VALID",
         "object_purpose":"PURCHASE",
         "object_created":"2014-07-17T00:03:47.601Z",
         "object_updated":"2014-07-17T00:03:47.933Z",
         "object_id":"cdadc9ea3d334635b2b577d97728c912",
         "object_owner":"unittest",
         "shipment":"025af8c79f23436b9ce4a3541864eab2",
         "attributes":[

         ],
         "amount":"13.05",
         "currency":"USD",
         "amount_local":"13.05",
         "currency_local":"USD",
         "provider":"UPS",
         "provider_image_75":"https://shippo-static.s3.amazonaws.com/providers/75/UPS.png",
         "provider_image_200":"https://shippo-static.s3.amazonaws.com/providers/200/UPS.png",
         "servicelevel_name":"Three-Day Select",
         "servicelevel_terms":"",
         "days":3,
         "duration_terms":"",
         "trackable":true,
         "insurance":true,
         "insurance_amount_local":"30.00",
         "insurance_currency_local":"USD",
         "insurance_amount":"30.00",
         "insurance_currency":"USD",
         "messages":[

         ]
      },
      {...}
   ]
}

						
					

Transactions

A Transaction is the purchase of a Shipment Label for a given Shipment Rate. Transactions can be as simple as posting a Rate ID, but also allow you to define further parameters of the desired Label, such as pickup and notifications.

Transactions can only be created for Rates that are less than 7 days old and that have an object_purpose of "PURCHASE".

Transactions are created asynchronous. The response time depends exclusively on the carrier's server.

Attributes
rate
required
string ID of the Rate object for which a Label has to be obtained. Please note that only rates that are not older than 7 days can be purchased in order to ensure up-to-date pricing.
metadata
optional
string A string of up to 100 characters that can be filled with any additional information you want to attach to the object.
Response attributes

A response from the Address resource contains the request data, plus the data outlined below.

object_state "VALID"
"INVALID"
Indicates the validity of the Transaction object based on the given data, regardless of what the corresponding carrier returns.
object_status "WAITING"
"QUEUED"
"SUCCESS"
"ERROR"
"REFUNDED"
"REFUNDPENDING"
"REFUNDREJECTED"
Indicates the status of the Transaction.
object_created datetime Date and time of Transaction creation.
object_updated datetime Date and time of last Transaction update.
object_id string Unique identifier of the given Transaction object.
object_owner string Username of the user who created the Transaction object.
was_test bool Indicates whether the transaction has been sent to the corresponding carrier's test or production server.
tracking_number string The carrier-specific tracking number that can be used to track the Shipment. A value will only be returned if the Rate is for a trackable Shipment and if the Transactions has been processed successfully.
tracking_status dict The tracking information we currently have on file for this shipment. We regularly update this information.
tracking_status.status enum one of 'UNKNOWN', 'DELIVERED', 'TRANSIT', 'FAILURE', 'RETURNED'.
tracking_status.status_details string An optional, human-readable description of the status
tracking_status.status_date datetime An optional datetime describing when the last event took place. This is not the last update of the tracking status. For that, use object_updated.
tracking_url_provider url A link to track this item on the carrier-provided tracking website. A value will only be returned if tracking is available and the carrier provides such a service.
label_url url A URL pointing directly to the Label as a PDF file. A value will only be returned if the Transactions has been processed successfully.
messages array An array containing elements of the following schema:
"code" (string): an identifier for the corresponding message (not always available")
"message" (string): a publishable message containing further information.
API Resource URL

https://api.goshippo.com/v1/transactions/

Example
						
							
{
    "rate": "67891d0ebaca4973ae2569d759da6139",
    "metadata": "Customer ID 123456"
}

						
					
Response Example
						
							
{
    "object_state": "VALID",
    "object_status": "SUCCESS",
    "object_created": "2013-12-27T19:14:48.273Z",
    "object_updated": "2013-12-27T19:14:48.273Z",
    "object_id": "64bba01845ef40d29374032599f22588",
    "object_owner": "laura@goshippo.com",
    "was_test": false,
    "rate": "67891d0ebaca4973ae2569d759da6139",
    "tracking_number": "ZW70QJC",
    "tracking_status": {
        "object_created": "2013-12-27T23:17:41.411Z",
        "object_updated": "2013-12-29T23:14:49.373Z",
        "object_id": "a21b3d6831c14ceaba6730179ce6e784",
        "object_owner": "laura@goshippo.com",
        "status": "DELIVERED",
        "status_details": "Delivered, December 28, 2013, 2:17 pm, RIVERSIDE, CA 92504",
        "status_date": "2013-12-28T12:04:04.214Z"
    },
    "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction.action?tLabels=ZW70QJC",
    "label_url": "https://shippo-delivery.s3.amazonaws.com/96.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA",
    "metadata": "Customer ID 123456",
    "messages": [
        {
            "code": "",
            "text": "Carrier Information: Shipping Label Invoice will be sent to Sender only."
        }
    ]
}

						
					

Purchase a shipping label

Creates a new transaction object and purchases the shipping label for the provided rate.

Attributes
rate
required
string
metadata
optional
string
API Resource URL

https://api.goshippo.com/v1/transactions/

Example
						
							
curl https://api.goshippo.com/v1/transactions \
    -u <USERNAME>:<PASSWORD> \
    -d rate="ee81fab0372e419ab52245c8952ccaeb"

						
					
Response Example
						
							
{
   "object_state":"VALID",
   "object_status":"QUEUED",
   "object_created":"2014-07-25T02:09:34.422Z",
   "object_updated":"2014-07-25T02:09:34.513Z",
   "object_id":"ef8808606f4241ee848aa5990a09933c",
   "object_owner":"unittest",
   "was_test":true,
   "rate":"ee81fab0372e419ab52245c8952ccaeb",
   "tracking_number":"",
   "tracking_status":null,
   "tracking_url_provider":"",
   "label_url":"",
   "messages":[

   ],
   "customs_note":"",
   "submission_note":"",
   "metadata":""
}

						
					

Retrieve an existing transaction

Retrieve an existing transaction by object id.

Attributes
object_id
required
Unique identifier of the Transaction object to be retrieved
API Resource URL

https://api.goshippo.com/v1/transactions/<TRANSACTION OBJECT ID>

Example
						
							
curl https://api.goshippo.com/v1/transactions/70ae8117ee1749e393f249d5b77c45e0 \
    -u <USERNAME>:<PASSWORD>

						
					
Response Example
						
							
{
   "object_state":"VALID",
   "object_status":"SUCCESS",
   "object_created":"2014-07-17T00:43:40.842Z",
   "object_updated":"2014-07-17T00:43:50.531Z",
   "object_id":"70ae8117ee1749e393f249d5b77c45e0",
   "object_owner":"unittest",
   "was_test":true,
   "rate":"ee81fab0372e419ab52245c8952ccaeb",
   "tracking_number":"9499907123456123456781",
   "tracking_status":{
      "object_created":"2014-07-17T00:43:50.402Z",
      "object_updated":"2014-07-17T00:43:50.402Z",
      "object_id":"907d5e6120ed491ea27d4f681a7ccd4d",
      "object_owner":"unittest",
      "status":"UNKNOWN",
      "status_details":"",
      "status_date":null
   },
   "tracking_url_provider":"https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781",
   "label_url":"https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA",
   "messages":[

   ],
   "customs_note":"",
   "submission_note":"",
   "metadata":""
}

						
					

List all transactions

List all transaction objects.

Attributes
results
optional GET parameter
Number of Transaction objects to be returned
API Resource URL

https://api.goshippo.com/v1/transactions/?results=<XX>

Example
						
							
curl https://api.goshippo.com/v1/transactions/ \
    -u <USERNAME>:<PASSWORD>

						
					
Response Example
						
							
{
   "count":1234,
   "next":null,
   "previous":null,
   "results":[
      {
         "object_state":"VALID",
         "object_status":"SUCCESS",
         "object_created":"2014-07-17T00:43:40.842Z",
         "object_updated":"2014-07-17T00:43:50.531Z",
         "object_id":"70ae8117ee1749e393f249d5b77c45e0",
         "object_owner":"unittest",
         "was_test":true,
         "rate":"ee81fab0372e419ab52245c8952ccaeb",
         "tracking_number":"9499907123456123456781",
         "tracking_status":{
            "object_created":"2014-07-17T00:43:50.402Z",
            "object_updated":"2014-07-17T00:43:50.402Z",
            "object_id":"907d5e6120ed491ea27d4f681a7ccd4d",
            "object_owner":"unittest",
            "status":"UNKNOWN",
            "status_details":"",
            "status_date":null
         },
         "tracking_url_provider":"https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781",
         "label_url":"https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA",
         "messages":[

         ],
         "customs_note":"",
         "submission_note":"",
         "metadata":""
      },
      {...},
      {...}
   ]
}

						
					

Customs Items

Customs items are distinct items in your international shipment parcel.

Attributes
description
required
string Text description of your item.
quantity
required
int Quantity of this item in the shipment you send. Must be greater than 0.
net_weight
required
decimal Total weight of this item, i.e. quantity * weight per item.
mass_unit
required
"g"
"oz"
"lb"
"kg"
The unit used for net_weight.
value_amount
required
decimal Total value of this item, i.e. quantity * value per item.
value_currency
required
ISO 4217 Currency Code (string) Currency used for value_amount. The official ISO 4217 currency codes are used, e.g. "USD" or "EUR".
origin_country
required
ISO 3166-1-alpha-2 code (ISO 2 country code) Country of origin of the item. Example: 'US' or 'DE'. All accepted values can be found on the Official ISO Website.
tariff_number
optional
string The tariff number of the item.
metadata
optional
string A string of up to 100 characters that can be filled with any additional information you want to attach to the object.
Response attributes

A response from the Address resource contains the request data, plus the data outlined below.

object_state "VALID"
"INVALID"
Indicates the validity of the Customs Item.
object_created datetime Date and time of object creation.
object_updated datetime Date and time of last object update.
object_id string Unique identifier of the given object.
object_owner string Username of the user who created the object.
API Resource URL

https://api.goshippo.com/v1/customs/items/

Example
						
							
{
    "description": "T-Shirt",
    "quantity": 2,
    "net_weight": "400",
    "mass_unit": "g",
    "value_amount": "20",
    "value_currency": "USD",
    "tariff_number": "",
    "origin_country": "US",
    "metadata": "Order ID #123123"
}

						
					
Response Example
						
							
{
    "object_created": "2014-02-24T22:05:55.014",
    "object_updated": "2014-02-24T22:05:55.016",
    "object_id": "0265b7cc4d71468197b2e8584cf8fc05",
    "object_owner": "tech@goshippo.com",
    "object_state": "VALID",
    "description": "T-Shirt",
    "quantity": 2,
    "net_weight": "400",
    "mass_unit": "g",
    "value_amount": "20",
    "value_currency": "USD",
    "tariff_number": "",
    "origin_country": "US",
    "metadata": "Order ID #123123"
}

						
					

Create a new customs item

Creates a new Customs Item object.

Attributes
description
required
string
quantity
required
int
net_weight
required
decimal
mass_unit
required
"g"
"oz"
"lb"
"kg"
value_amount
required
decimal
value_currency
required
ISO 4217 Currency Code (string)
origin_country
required
ISO 3166-1-alpha-2 code (ISO 2 country code)
tariff_number
optional
string
metadata
optional
string
API Resource URL

https://api.goshippo.com/v1/customs/items/

Example
						
							
curl  https://api.goshippo.com/v1/customs/items/ \
    -u <USERNAME>:<PASSWORD> \
    -d description="T-Shirt" \
    -d quantity=2 \
    -d net_weight="400" \
    -d mass_unit="g" \
    -d value_amount="20" \
    -d value_currency="USD" \
    -d tariff_number="" \
    -d origin_country="US" \
    -d metadata="Order ID '123123'"

						
					
Response Example
						
							
{
   "object_created":"2014-07-17T00:49:20.631Z",
   "object_updated":"2014-07-17T00:49:20.631Z",
   "object_id":"55358464c7b740aca199b395536981bd",
   "object_owner":"unittest",
   "object_state":"VALID",
   "description":"T-Shirt",
   "quantity":2,
   "net_weight":"400",
   "mass_unit":"g",
   "value_amount":"20",
   "value_currency":"USD",
   "origin_country":"US",
   "tariff_number":"",
   "metadata":"Order ID '123123'"
}

						
					

Retrieve an existing Customs Item

Retrieve an existing Customs Item by object id.

Attributes
object_id
required
Unique identifier of the Customs Item object to be retrieved
API Resource URL

https://api.goshippo.com/v1/customs/items/<CUSTOMS ITEM OBJECT ID>

Example
						
							
curl  https://api.goshippo.com/v1/customs/items/55358464c7b740aca199b395536981bd \
    -u <USERNAME>:<PASSWORD>

						
					
Response Example
						
							
{
   "object_created":"2014-07-17T00:49:20.631Z",
   "object_updated":"2014-07-17T00:49:20.631Z",
   "object_id":"55358464c7b740aca199b395536981bd",
   "object_owner":"unittest",
   "object_state":"VALID",
   "description":"T-Shirt",
   "quantity":2,
   "net_weight":"400.0000",
   "mass_unit":"g",
   "value_amount":"20.00",
   "value_currency":"USD",
   "origin_country":"US",
   "tariff_number":"",
   "metadata":"Order ID '123123'"
}

						
					

List all Customs Items

List all custom-items objects.

Attributes
results
optional GET parameter
Number of Customs Item objects to be returned
API Resource URL

https://api.goshippo.com/v1/customs/items/?results=<XX>

Example
						
							
curl  https://api.goshippo.com/v1/customs/items/ \
    -u <USERNAME>:<PASSWORD>

						
					
Response Example
						
							
{
   "count":10,
   "next":null,
   "previous":null,
   "results":[
      {
         "object_created":"2014-07-17T00:49:20.631Z",
         "object_updated":"2014-07-17T00:49:20.631Z",
         "object_id":"55358464c7b740aca199b395536981bd",
         "object_owner":"unittest",
         "object_state":"VALID",
         "description":"T-Shirt",
         "quantity":2,
         "net_weight":"400.0000",
         "mass_unit":"g",
         "value_amount":"20.00",
         "value_currency":"USD",
         "origin_country":"US",
         "tariff_number":"",
         "metadata":"Order ID '123123'"
      },
      {...},
      {...}
   ]
}

						
					

Customs Declarations

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

Attributes
certify_signer
required
string Name of the person who created the customs declaration and is responsible for the validity of all information provided.
certify
required
boolean Expresses that the certify_signer has provided all information of this customs declaration truthfully.
items
required
Array of Customs Items object_ids Distinct Parcel content items as Customs Items object_ids.
non_delivery_option
required
'ABANDON',
'RETURN'
Indicates how the carrier should proceed in case the shipment can't be delivered.
contents_type
required
'DOCUMENTS',
'GIFT',
'SAMPLE',
'MERCHANDISE',
'HUMANITARIAN_
DONATION',
'RETURN_
MERCHANDISE',
'OTHER'
Type of goods of the shipment.
contents_explanation
required if contents_type is 'OTHER'
string Explanation of the type of goods of the shipment.
exporter_reference
optional
string Experter reference of an export shipment.
importer_reference
optional
string Importer reference of an import shipment.
invoice
optional
string Invoice reference of the shipment.
license
optional
string License reference of the shipment.
certificate
optional
string Certificate reference of the shipment.
notes
optional
string Additional notes to be included in the customs declaration.
eel_pfc
optional
'NOEEI_30_37_a',
'NOEEI_30_37_h',
'NOEEI_30_36',
'AES_ITN'
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.
aes_itn
required if eel_pfc is 'AES_ITN'
string AES / ITN reference of the shipment.
incoterm
optional
'DDP',
'DDU',
'CPT',
'CIP'
The incoterm reference of the shipment.
metadata
optional
string A string of up to 100 characters that can be filled with any additional information you want to attach to the object.
Response attributes

A response from the Address resource contains the request data, plus the data outlined below.

object_state "VALID"
"INVALID"
Indicates the validity of the Customs Item.
object_created datetime Date and time of object creation.
object_updated datetime Date and time of last object update.
object_id string Unique identifier of the given object.
object_owner string Username of the user who created the object.
disclaimer string Disclaimer for the shipment and customs information that have been provided.
API Resource URL

https://api.goshippo.com/v1/customs/declarations/

Example
						
							
{
    "exporter_reference": "",
    "importer_reference": "",
    "contents_type": "MERCHANDISE",
    "contents_explanation": "T-Shirt purchase",
    "invoice": "#123123",
    "license": "",
    "certificate": "",
    "notes": "",
    "eel_pfc": "NOEEI_30_37_a",
    "aes_itn": "",
    "non_delivery_option": "ABANDON",
    "certify": true,
    "certify_signer": "Laura Behrens Wu",
    "disclaimer": "",
    "incoterm": "",
    "items": [
        "0c1a723687164307bb2175972fbcd9ef"
    ],
    "metadata": "Order ID #123123"
}

						
					
Response Example
						
							
{
    "object_created": "2014-02-24T22:35:44.358",
    "object_updated": "2014-02-24T22:35:44.358",
    "object_id": "b741b99f95e841639b54272834bc478c",
    "object_owner": "tech@goshippo.com",
    "object_state": "VALID",
    "exporter_reference": "",
    "importer_reference": "",
    "contents_type": "MERCHANDISE",
    "contents_explanation": "T-Shirt purchase",
    "invoice": "#123123",
    "license": "",
    "certificate": "",
    "notes": "",
    "eel_pfc": "NOEEI_30_37_a",
    "aes_itn": "",
    "non_delivery_option": "ABANDON",
    "certify": true,
    "certify_signer": "Laura Behrens Wu",
    "disclaimer": "",
    "incoterm": "",
    "items": [
        "0c1a723687164307bb2175972fbcd9ef"
    ],
    "metadata": "Order ID #123123"
}

						
					

Create a new Customs Declaration

Creates a new Customs Declaration object.

Attributes
certify_signer
required
string
certify
required
boolean
items
required
Array of Customs Items object_ids
non_delivery_option
required
'ABANDON',
'RETURN'
contents_type
required
'DOCUMENTS',
'GIFT',
'SAMPLE',
'MERCHANDISE',
'HUMANITARIAN_
DONATION',
'RETURN_
MERCHANDISE',
'OTHER'
contents_explanation
required if contents_type is 'OTHER'
string
exporter_reference
optional
string
importer_reference
optional
string
invoice
optional
string
license
optional
string
certificate
optional
string
notes
optional
string
eel_pfc
optional
'NOEEI_30_37_a',
'NOEEI_30_37_h',
'NOEEI_30_36',
'AES_ITN'
aes_itn
required if eel_pfc is 'AES_ITN'
string
incoterm
optional
'DDP',
'DDU',
'CPT',
'CIP'
metadata
optional
string
API Resource URL

https://api.goshippo.com/v1/customs/declarations/

Example
						
							
curl  https://api.goshippo.com/v1/customs/declarations/ \
    -u <USERNAME>:<PASSWORD> \
    -d exporter_reference="" \
    -d importer_reference="" \
    -d contents_type="MERCHANDISE" \
    -d contents_explanation="T-Shirt purchase" \
    -d invoice="#123123" \
    -d license="" \
    -d certificate="" \
    -d notes="" \
    -d eel_pfc="NOEEI_30_37_a" \
    -d aes_itn="" \
    -d non_delivery_option="ABANDON" \
    -d certify=true \
    -d certify_signer="Laura Behrens Wu" \
    -d disclaimer="" \
    -d incoterm="" \
    -d items="5087f181d1dc4b14b73fdbf636498886" \
    -d metadata="Order ID #123123"

						
					
Response Example
						
							
{
   "object_created":"2014-07-17T01:01:08.306Z",
   "object_updated":"2014-07-17T01:01:08.306Z",
   "object_id":"e2197a54da9d470480f4f8796cc419cb",
   "object_owner":"unittest",
   "object_state":"VALID",
   "certify_signer":"Laura Behrens Wu",
   "certify":true,
   "items":[
      "5087f181d1dc4b14b73fdbf636498886"
   ],
   "non_delivery_option":"ABANDON",
   "contents_type":"MERCHANDISE",
   "contents_explanation":"T-Shirt purchase",
   "exporter_reference":"",
   "importer_reference":"",
   "invoice":"#123123",
   "commercial_invoice":false,
   "license":"",
   "certificate":"",
   "notes":"",
   "eel_pfc":"NOEEI_30_37_a",
   "aes_itn":"",
   "disclaimer":"",
   "incoterm":"",
   "metadata":"Order ID #123123"
}

						
					

Retrieve an existing Customs Declaration

Retrieve an existing customs-declaration by object id.

Attributes
object_id
required
Unique identifier of the Customs Declaration object to be retrieved
API Resource URL

https://api.goshippo.com/v1/customs/declarations/<CUSTOMS DEC. OBJECT ID>

Example
						
							
curl https://api.goshippo.com/v1/customs/declarations/e2197a54da9d470480f4f8796cc419cb \
    -u <USERNAME>:<PASSWORD>

						
					
Response Example
						
							
{
   "object_created":"2014-07-17T01:01:08.306Z",
   "object_updated":"2014-07-17T01:01:08.306Z",
   "object_id":"e2197a54da9d470480f4f8796cc419cb",
   "object_owner":"unittest",
   "object_state":"VALID",
   "certify_signer":"Laura Behrens Wu",
   "certify":true,
   "items":[
      "5087f181d1dc4b14b73fdbf636498886"
   ],
   "non_delivery_option":"ABANDON",
   "contents_type":"MERCHANDISE",
   "contents_explanation":"T-Shirt purchase",
   "exporter_reference":"",
   "importer_reference":"",
   "invoice":"#123123",
   "commercial_invoice":false,
   "license":"",
   "certificate":"",
   "notes":"",
   "eel_pfc":"NOEEI_30_37_a",
   "aes_itn":"",
   "disclaimer":"",
   "incoterm":"",
   "metadata":"Order ID #123123"
}

						
					

List all customs declarations

List all customs-declaration objects.

Attributes
results
optional GET parameter
Number of Customs Declarations objects to be returned
API Resource URL

https://api.goshippo.com/v1/customs/declarations/?results=<XX>

Example
						
							
curl https://api.goshippo.com/v1/customs/declarations/ \
	-u <USERNAME>:<PASSWORD>


						
					
Response Example
						
							
{
   "count":11,
   "next":null,
   "previous":null,
   "results":[
      {
         "object_created":"2014-07-17T01:01:08.306Z",
         "object_updated":"2014-07-17T01:01:08.306Z",
         "object_id":"e2197a54da9d470480f4f8796cc419cb",
         "object_owner":"unittest",
         "object_state":"VALID",
         "certify_signer":"Laura Behrens Wu",
         "certify":true,
         "items":[
            "5087f181d1dc4b14b73fdbf636498886"
         ],
         "non_delivery_option":"ABANDON",
         "contents_type":"MERCHANDISE",
         "contents_explanation":"T-Shirt purchase",
         "exporter_reference":"",
         "importer_reference":"",
         "invoice":"#123123",
         "commercial_invoice":false,
         "license":"",
         "certificate":"",
         "notes":"",
         "eel_pfc":"NOEEI_30_37_a",
         "aes_itn":"",
         "disclaimer":"",
         "incoterm":"",
         "metadata":"Order ID #123123"
      },
      {...},
      {...}
   ]
}

						
					

Refunds

Refunds are reimbursements for successfully created but unused Transaction.

Please keep the following in mind:

  • Once a Refund has been claimed, you must not use the shipping label for actual postage.
  • Refunds take several days to be processed.
  • Some carriers, e.g. FedEx and UPS, don't require refunds since the corresponding labels will only be charged after they have been scanned, i.e. used. The Shippo refund may be used for refunding of the $0.05 Shippo label fee.
Attributes
transaction
required
string Object ID of the Transaction to be refunded.
Response attributes

A response from the Address resource contains the request data, plus the data outlined below.

object_created datetime Date and time of object creation.
object_updated datetime Date and time of last object update.
object_id string Unique identifier of the given object.
object_owner string Username of the user who created the object.
object_status "QUEUED""PENDING"
"SUCCESS"
"ERROR"
Indicates the status of the Refund.
API Resource URL

https://api.goshippo.com/v1/refunds/

Example
						
							
{
    "transaction": "35ed59f23a514ecfa2faeaed93a00086"
}

						
					
Response Example
						
							
{
    "object_created": "2014-04-21T07:12:41.044Z",
    "object_updated": "2014-04-21T07:12:41.045Z",
    "object_id": "bd7b8379a2e847bcb0818125943dde5d",
    "object_owner": "tech@goshippo.com",
    "object_status": "QUEUED",
    "transaction": "35ed59f23a514ecfa2faeaed93a00086"
}

						
					

Create a new refund

Creates a new refund object.

Attributes
transaction
required
string
API Resource URL

https://api.goshippo.com/v1/refunds/

Example
						
							
curl  https://api.goshippo.com/v1/refunds/ \
    -u <USERNAME>:<PASSWORD> \
    -d transaction="4503427478ea45a899e9b54abc4c5803"	

						
					
Response Example
						
							
{
   "object_created":"2014-07-17T15:38:37.372Z",
   "object_updated":"2014-07-17T15:38:37.381Z",
   "object_id":"d7c811cff9e24e4387418876f1ffd371",
   "object_owner":"unittest",
   "object_status":"QUEUED",
   "transaction":"8b7f25f33d2a4bb58060df94cb152434"
}

						
					

Retrieve an existing refund

Retrieve an existing refund by object id.

Attributes
object_id
required
Unique identifier of the Refund object to be retrieved
API Resource URL

https://api.goshippo.com/v1/refunds/<REFUND OBJECT ID>

Example
						
							
curl https://api.goshippo.com/v1/refunds/d7c811cff9e24e4387418876f1ffd371 \
    -u <USERNAME>:<PASSWORD> 

						
					
Response Example
						
							
{
   "object_created":"2014-07-17T15:38:37.372Z",
   "object_updated":"2014-07-17T15:38:43.070Z",
   "object_id":"d7c811cff9e24e4387418876f1ffd371",
   "object_owner":"unittest",
   "object_status":"SUCCESS",
   "transaction":"8b7f25f33d2a4bb58060df94cb152434"
}

						
					

List all refund objects.

Retrieve an existing refund by object id.

Attributes
results
optional GET parameter
Number of Refund objects to be returned
API Resource URL

https://api.goshippo.com/v1/refunds/?results=<XX>

Example
						
							
curl https://api.goshippo.com/v1/refunds/ \
    -u <USERNAME>:<PASSWORD> 

						
					
Response Example
						
							
{
   "count":2,
   "next":null,
   "previous":null,
   "results":[
      {
         "object_created":"2014-07-17T15:38:37.372Z",
         "object_updated":"2014-07-17T15:38:43.070Z",
         "object_id":"d7c811cff9e24e4387418876f1ffd371",
         "object_owner":"unittest",
         "object_status":"SUCCESS",
         "transaction":"8b7f25f33d2a4bb58060df94cb152434"
      },
      {...}
   ]
}

						
					

Manifests

Manifests are close-outs of shipping labels of a certain day. Some carriers require Manifests to properly process the shipments.

The following carriers require Manifests:

  • DHL Express purchased through Shippo: if you use Shippo's DHL Express rates, you need to manifest ("close out") your shipments each day before submitting them to the carrier. If you don't close out a shipment, it might not be processed at all by DHL Express.

The following carriers offer Manifests optionally:

  • USPS scan form: the USPS allows you to create "scan forms", which also is a Manifest. By creating scan forms, the USPS doesn't need to scan each of your packages individually and all tracking codes are updated immediately.

You can't refund shipments after they have been closed out.

Attributes
carrier
required
string Name of the shipping provider you want to create a Manifest for, e.g. "DHL Express" or "USPS".
submission_date
required
datetime All shipments to be submitted on this day will be closed out. Must be in the format "2014-01-18T00:35:03.463Z" (ISO 8601 date).
address_from
optional
string ID of the Address object that should be used as pickup address for the scan form. The USPS will validate this address before creating the scan form.
Response attributes

A response from the Address resource contains the request data, plus the data outlined below.

object_created datetime Date and time of object creation.
object_updated datetime Date and time of last object update.
object_id string Unique identifier of the given object.
object_owner string Username of the user who created the object.
object_status "QUEUED"
"SUCCESS"
"ERROR"
Indicates the status of the Refund.
documents array An array containing the URLs to all returned Manifest documents.
API Resource URL

https://api.goshippo.com/v1/manifests/

Example
						
							
{
    "provider": "USPS",
    "submission_date": "2014-05-16T23:59:59Z",
    "address_from": "28828839a2b04e208ac2aa4945fbca9a"
}

						
					
Response Example
						
							
{
    "object_created": "2014-05-16T03:43:52.765Z",
    "object_updated": "2014-05-16T03:43:55.445Z",
    "object_id": "0fadebf6f60c4aca95fa01bcc59c79ae",
    "object_owner": "tech@goshippo.com",
    "object_status": "SUCCESS",
    "provider": "USPS",
    "submission_date": "2014-05-16T23:59:59Z",
    "address_from": "28828839a2b04e208ac2aa4945fbca9a",
    "documents": [
        "https://shippo-delivery.s3.amazonaws.com/0fadebf6f60c4aca95fa01bcc59c79ae.pdf?Signature=tlQU3RECwdHUQJQadwqg5bAzGFQ%3D&Expires=1402803835&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"
    ]
}

						
					

Create a new manifest

Creates a new manifest object.

Attributes
carrier
required
string
submission_date
required
datetime
address_from
optional
string
API Resource URL

https://api.goshippo.com/v1/manifests/

Example
						
							
curl https://api.goshippo.com/v1/manifests/ \
    -u <USERNAME>:<PASSWORD> \
    -d provider="USPS" \
    -d submission_date="2014-05-16T23:59:59Z" \
    -d address_from="d799c2679e644279b59fe661ac8fa488" 

						
					
Response Example
						
							
{
    "object_created": "2014-05-16T03:43:52.765Z",
    "object_updated": "2014-05-16T03:43:55.445Z",
    "object_id": "0fadebf6f60c4aca95fa01bcc59c79ae",
    "object_owner": "tech@goshippo.com",
    "object_status": "SUCCESS",
    "provider": "USPS",
    "submission_date": "2014-05-16T23:59:59Z",
    "address_from": "d799c2679e644279b59fe661ac8fa488",
    "documents": [
        "https://shippo-delivery.s3.amazonaws.com/0fadebf6f60c4aca95fa01bcc59c79ae.pdf?Signature=tlQU3RECwdHUQJQadwqg5bAzGFQ%3D&Expires=1402803835&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"
    ]
}

						
					

Retrieve an existing manifest

Retrieve an existing manifest by object id.

Attributes
object_id
required
Unique identifier of the Manifest object to be retrieved
API Resource URL

https://api.goshippo.com/v1/manifests/<MANIFEST OBJECT ID>

Example
						
							
curl https://api.goshippo.com/v1/manifests/0fadebf6f60c4aca95fa01bcc59c79ae \
    -u <USERNAME>:<PASSWORD> 

						
					
Response Example
						
							
{
   "object_created":"2014-05-16T03:43:52.765Z",
   "object_updated":"2014-05-16T03:43:55.445Z",
   "object_id":"0fadebf6f60c4aca95fa01bcc59c79ae",
   "object_owner":"admin",
   "object_status":"SUCCESS",
   "provider":"USPS",
   "submission_date":"2014-05-16T23:59:59Z",
   "address_from":"008ee72b723c4f129371b7346fe2f55f",
   "documents":[
      "https://shippo-delivery.s3.amazonaws.com/0fadebf6f60c4aca95fa01bcc59c79ae.pdf?Signature=tlQU3RECwdHUQJQadwqg5bAzGFQ%3D&Expires=1402803835&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"
   ]
}

						
					

List all manifests

List all Manifest objects.

Attributes
results
optional GET parameter
Number of Manifest objects to be returned
API Resource URL

https://api.goshippo.com/v1/manifests/?results=<XX>

Example
						
							
curl https://api.goshippo.com/v1/manifests/ \
    -u <USERNAME>:<PASSWORD>

						
					
Response Example
						
							
{
   "count":2,
   "next":null,
   "previous":null,
   "results":[
      {
         "object_created":"2014-07-17T16:09:46.079Z",
         "object_updated":"2014-07-17T16:09:46.079Z",
         "object_id":"aa41ad380c53413ab2cee8ba98d2cc34",
         "object_owner":"unittest",
         "object_status":"QUEUED",
         "provider":"USPS",
         "submission_date":"2014-05-16T23:59:59Z",
         "address_from":"d799c2679e644279b59fe661ac8fa488",
         "documents":[

         ]
      },
      {...}
   ]
}

						
					

Asynchronous API calls

Both Rate and Transaction API calls trigger asynchronous object creations. This means that shipping rates and label purchases are not available in the API response right after you have created the corresponding object.

Why rates & labels are returned asynchronously

The advantage of asynchronous rates and labels is that your API request won't be blocked while Shippo calls the upstream APIs (e.g. USPS or FedEx API). This gives you a much higher flexibility of building a fast application that does not depend on external API response times.

How long does it take for rates and labels to be created?

The time until rates and labels have been created depends exclusively on the corresponding carrier's API response time. Usually, most carriers return rates and labels within 1 second or less. In test mode, response times might be a bit higher.

What's the best way to retrieve rates and labels?

Depending on the use case, we recommend one of the following ways:

  • Server-side API calls: simply access the corresponding API resource (Shipment for rates or Transaction for labels) one or multiple times after object creation. As soon as a carrier has returned a rate or label, it will be accessible in the corresponding Shippo API resource.
  • Client-side API calls: you can GET a resource by using your Authentication Token in a client-side AJAX call. This is the preferred solution for client-side rating and label display.
  • Websockets: Shippo offers a websocket streaming solution for both client- and server-side use cases. Please contact us at support@goshippo.com for more details.

Nested calls

The Shippo api also supports nested API calls. This enables the creation of objects that require the passing of other objects as parameters.

The example provided demonstrates how a shipment object can be created, in one request, by passing address_from, address_to, and parcels objects in a nested fashion.

Example
						
							
curl https://api.goshippo.com/v1/shipments/  \
    -u <USERNAME>:<PASSWORD> \
    -H "Content-Type: application/json"  \
    -d '{
       "object_purpose":"PURCHASE",
       "address_from":{
          "object_purpose":"PURCHASE",
          "name":"Laura Behrens Wu",
          "company":"Shippo",
          "street1":"Clayton St.",
          "street_no":"215",
          "street2":"",
          "city":"San Francisco",
          "state":"CA",
          "zip":"94117",
          "country":"US",
          "phone":"+1 555 341 9393",
          "email":"laura@goshippo.com",
          "metadata":"Customer ID 123456"
       },
       "address_to":{
          "object_purpose":"PURCHASE",
          "name":"Laura Behrens Wu",
          "company":"Shippo",
          "street1":"Mission St.",
          "street_no":"814",
          "street2":"",
          "city":"San Francisco",
          "state":"CA",
          "zip":"94105",
          "country":"US",
          "phone":"+1 555 341 9393",
          "email":"laura@goshippo.com",
          "metadata":"Customer ID 123456"
       },
       "parcel":{
          "length":"5",
          "width":"5",
          "height":"5",
          "distance_unit":"in",
          "weight":"2",
          "mass_unit":"lb",
          "template":"",
          "metadata":"Customer ID 123456"
       },
       "submission_type":"DROPOFF",
       "submission_date":"2014-06-06T12:00:00.000Z",
       "insurance_value":"",
       "insurance_currency":"",
       "extra":{
          "signature_confirmation":true
       },
       "customs_declaration":"",
       "reference_1":"",
       "reference_2":"",
       "metadata":"Customer ID 123456"
    }'

						
					
Response Example
						
							
{
   "object_created":"2014-07-25T23:44:40.866Z",
   "object_updated":"2014-07-25T23:44:40.866Z",
   "object_id":"3be9d9e89bba4f98b6b1255e4655e732",
   "object_owner":"unittest",
   "object_state":"VALID",
   "object_status":"QUEUED",
   "object_purpose":"PURCHASE",
   "address_from":"45edd61cd6db40b287d6e7a498a3ae49",
   "address_to":"19b92a52e854448bb70b693303902ac7",
   "parcel":"886ed7269e144c32a5e4166e6604fb50",
   "submission_type":"DROPOFF",
   "submission_date":"2014-06-06T12:00:00Z",
   "address_return":"45edd61cd6db40b287d6e7a498a3ae49",
   "customs_declaration":null,
   "insurance_amount":"0",
   "insurance_currency":null,
   "extra":{
      "signature_confirmation":true
   },
   "reference_1":"",
   "reference_2":"",
   "rates_url":"https://api.goshippo.com/v1/shipments/3be9d9e89bba4f98b6b1255e4655e732/rates/",
   "messages":[

   ],
   "metadata":"Customer ID 123456"
}

						
					

Webhooks

You can specify webhooks in your Shippo API settings. Every time the tracking status of one of your packages has been updated, we will send a POST request to each of the webhook URLs set up for your account.

Webhooks format

We will serialize the corresponding Transaction object into JSON and POST to each of your webhook URLs.

Webhooks handling

For each tracking update, we will POST to your webhooks up to 5 times with a 600 millisecond delay. You should return a HTTP status 200. If the 5th webhook POST requests fails, we will automatically deactivate this specific webhook.

Example Webhook Format
{
    "object_state": "VALID",
    "object_status": "SUCCESS",
    "object_created": "2013-12-27T19:14:48.273Z",
    "object_updated": "2013-12-27T19:14:48.273Z",
    "object_id": "64bba01845ef40d29374032599f22588",
    "object_owner": "laura@goshippo.com",
    "was_test": false,
    "rate": "67891d0ebaca4973ae2569d759da6139",
    "notification_email_from": true,
    "notification_email_to": false,
    "notification_email_other": "max@goshippo.com",
    "customs_note": "",
    "submission_note": "Drop off at front door if nobody at home",
    "tracking_number": "ZW70QJC",
    "tracking_status": {
        "object_created": "2013-12-27T23:17:41.411Z",
        "object_updated": "2013-12-29T23:14:49.373Z",
        "object_id": "a21b3d6831c14ceaba6730179ce6e784",
        "object_owner": "laura@goshippo.com",
        "status": "DELIVERED",
        "status_details": "Delivered, December 28, 2013, 2:17 pm, RIVERSIDE, CA 92504",
        "status_date": "2013-12-28T12:04:04.214Z"
    },
    "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction.action?tLabels=ZW70QJC",
    "label_url": "https://shippo-delivery.s3.amazonaws.com/96.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA",
    "metadata": "Customer ID 123456",
    "messages": [
        {
            "code": "",
            "text": "Carrier Information: Shipping Label Invoice will be sent to Sender only."
        }
    ]
}