Customs Guide
This guide will teach you how to pass the necessary customs information for shipping internationally. In this example, we will be sending a customer in the UK an EasyPost T-Shirt and hat from our office in the US.
When shipping internationally, you go through the same steps as shipping domestically, except that you need to add customs information to your shipment. EasyPost uses this information to automatically generate the necessary customs forms for your shipment. You need to pass customs information whenever you are shipping between two countries.
Before You Start
- Sign up for an EasyPost account.
- Grab one of our official client libraries.
If you haven't run through our Getting Started Guide, definitely do that before moving on to this one.
When shipping internationally, carriers require that you add information about the contents of your package. This information is used by the customs process for the country to which you are shipping.
To add information about your package's contents, you need to create a CustomsItem object for each type of item you are shipping. If you have multiples of the same item in the package, you don't need to create a new CustomsItem for each. You just specify the number of items when creating the CustomsItem object.
When creating a CustomsItem you pass the following:
- description = A brief description of the item
- quantity = Number of that item contained in the package
- weight = Total weight in ounces of all the items of that type in the package
- value = Total value in US dollars of all the items of that type in the package
- hs_tariff_number = The six digit code for your item as specified by harmonized system for tariffs. We talk a bit more about this below.
- origin_country = Where the item was manufactured or assembled.
To get the "hs_tariff_number", you'll need to look up the harmonization code associated with whatever product you are shipping. You can search for them on hts.usitc.gov.
Here is an example where we create a CustomsItem object for the T-shirt we're shipping:
1curl -X POST https://api.easypost.com/v2/customs_items \
2 -u "EASYPOST_API_KEY": \
3 -H 'Content-Type: application/json' \
4 -d '{
5 "customs_item": {
6 "description": "T-shirt",
7 "quantity": "1",
8 "weight": "5",
9 "value": "10",
10 "hs_tariff_number": "123456",
11 "origin_country": "US"
12 }
13 }'
Once you've created the CustomsItem objects for the items you are shipping, you next need to associate them with the customs form that you will be adding to your shipment. We call this form the CustomsInfo object. You will need only one CustomsInfo object per shipment.
The Customsinfo object contains a bunch of attributes that are very specific to shipping goods across borders. Below we'll do our best to explain each though it can be a bit confusing. If you ever have any specific questions, don't hesitate to email us at support@easypost.com.
When creating a CustomsInfo object you need to pass:
- customs_items = An array of CustomsItem objects. This array should contain any items you are shipping in your package.
- contents_type = The type of item you are sending. You pass one of the following: 'merchandise', 'returned_goods', 'documents', 'gift', 'sample', 'other'.
- contents_explanation = If you specify 'other' in the 'contents_type' attribute, you must supply a brief description in this attribute.
- restriction_type = Describes if your shipment requires any special treatment / quarantine when entering the country. You pass one of the following: 'none', 'other', 'quarantine', 'sanitary_phytosanitary_inspection'.
- restriction_comments = If the "restriction_type" attribute is not "none", you must supply a brief description of what is required.
- customs_certify = This is a boolean value (true, false) that takes the place of the signature on the physical customs form. This is how you indicate that the information you have provided is accurate.
- customs_signer = This is the name of the person who is certifying that the information provided on the customs form is accurate. Use a name of the person in your organization who is responsible for this.
- non_delivery_option = In case the shipment cannot be delivered, this option tells the carrier what you want to happen to the package. You can pass either: 'abandon', 'return'. The value defaults to 'return'. If you pass 'abandon', you will not receive the package back if it cannot be delivered.
- eel_pfc = When shipping outside the US, you need to provide either an Exemption and Exclusion Legend (EEL) code or a Proof of Filing Citation (PFC). Which you need is based on the value of the goods being shipped.
- If the value of the goods is less than $2,500, then you pass the following EEL code: "NOEEI 30.37(a)"
- If the value of the goods is greater than $2,500, you need to get an Automated Export System (AES) Internal Transaction Number (ITN) for your shipment. ITN will look like "AES X20120502123456". To get an ITN, go to the AESDirect website.
- An ITN is required for any international shipment valued over $2,500 and/or requires an export license unless exemptions apply.
- The maximum number of items that can be included in customs info with UPS is 100.
The trickiest part of creating the CustomsInfo object is figuring out the values for the attributes. Once you've done that, it's simply a matter of passing those values to us. Here's an example of creating the CustomsInfo object for our shipment of T-shirt and Hat to the UK:
1curl -X POST https://api.easypost.com/v2/customs_infos \
2 -u "EASYPOST_API_KEY": \
3 -H 'Content-Type: application/json' \
4 -d '{
5 "customs_info": {
6 "customs_certify": "true",
7 "customs_signer": "Steve Brule",
8 "contents_type": "merchandise",
9 "contents_explanation": "",
10 "restriction_type": "none",
11 "eel_pfc": "NOEEI 30.37(a)",
12 "customs_items": [
13 {
14 "description": "T-shirt",
15 "quantity": "1",
16 "weight": "5",
17 "value": "10",
18 "hs_tariff_number": "123456",
19 "origin_country": "US"
20 }
21 ]
22 }
23 }'
Now that you've created the required customs information, you can now create your international shipment. The only difference from a domestic shipment is that you need to also pass the CustomsInfo object when creating a shipment.
When you buy a shipping label for your shipment, we automatically create additional customs forms that you need. Most often, the customs form is integrated into the label and you can put it directly on your package. If you ever have any questions about a specific carrier, don't hesitate to email us.
Here's an example where we are creating an international shipment:
1curl -X POST https://api.easypost.com/v2/shipments \
2 -u "$EASYPOST_API_KEY": \
3 -H 'Content-Type: application/json' \
4 -d '{
5 "shipment": {
6 "to_address": {
7 "name": "Tim Canterbury",
8 "company": "Wernham Hogg",
9 "street1": "118 Clippenham Lane",
10 "city": "Slough",
11 "zip": "SL15BE",
12 "country": "GB"
13 },
14 "from_address": {
15 "company": "EasyPost",
16 "street1": "5th Floor",
17 "city": "San Francisco",
18 "state": "CA",
19 "zip": "94104",
20 "country": "US",
21 "phone": "415-528-7555"
22 },
23 "parcel": {
24 "length": "9",
25 "width": "6",
26 "height": "3",
27 "weight": "20"
28 },
29 "customs_info": {
30 "id": "cstinfo_..."
31 }
32 }
33}'
Congratulations! You've just created your first international package with EasyPost! Check out our Full Reference API Documentation.