Site Logo

🎉 ShipEngine is becoming ShipStation API 🎉

Over the next few months you'll notice the ShipEngine website, documentation portal, and dashboard being rebranded as ShipStation API. For our ShipEngine customers, you don't need to take any action or change any of your integrations in any way. All endpoints will remain the same and continue to function as they always have.

To learn more about what's coming, review our New ShipStation API page.

Duties & Tariffs

When shipping internationally, various duties and tariffs may get applied to your packages depending on the destination country and type of product you are shipping. ShipStation API tells you exactly how much you can expect to pay. This is commonly referred to as the "fully landed shipping cost".

Contact our sales team for details about the pricing of this feature.

Example Request & Response

To accurately calculate the duties, tariffs, and other taxes for your shipment, ShipStation API needs to know the Harmonized Tariff Codes of the products in your shipment. You also need to set the calculate_tax_amount: true flag to opt-in to this feature since there is additional cost involved.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
POST /v1/rates HTTP/1.1
Host: api.shipengine.com
API-Key: __YOUR_API_KEY_HERE__
Content-Type: application/json
{
"rate_options": {
"carrier_ids": [
"se-82785"
],
"calculate_tax_amount": true
},
"shipment": {
"service_code": "usps_first_class_mail_international",
"customs": {
"contents": "merchandise",
"non_delivery": "treat_as_abandoned",
"customs_items": [
{
"harmonized_tariff_code": "0901.21",
"country_of_manufacture": "US",
"country_of_origin": "US",
"quantity": 2,
"description": "rare books",
"value": {
"currency": "usd",
"amount": 1000
}
}
]
},
"ship_from": {
"company_name": "Example Corp.",
"name": "John Doe",
"phone": "111-111-1111",
"address_line1": "4009 Marathon Blvd",
"address_line2": "Suite 300",
"city_locality": "Austin",
"state_province": "TX",
"postal_code": "78756",
"country_code": "US",
"address_residential_indicator": "no"
},
"ship_to": {
"name": "Amanda Miller",
"phone": "20 5555 5555",
"address_line1": "77 Netherpark Crescent",
"address_line2": "Suite 100",
"city_locality": "London",
"state_province": "N/A",
"postal_code": "ABC 123",
"country_code": "GB",
"address_residential_indicator": "yes"
},
"packages": [
{
"weight": {
"value": 9.6,
"unit": "ounce"
},
"dimensions": {
"unit": "inch",
"length": 12,
"width": 7.1,
"height": 6
}
}
]
}
}

Example Response

The tax_amount field in the response represents the total duties, tariffs, and other taxes that will be applied to this shipment.

{
"rate_response": {
"rates": [
{
"rate_id": "se-5592488",
"rate_type": "shipment",
"carrier_id": "se-82785",
"shipping_amount": {
"currency": "usd",
"amount": 23.28
},
"insurance_amount": {
"currency": "usd",
"amount": 0.0
},
"confirmation_amount": {
"currency": "usd",
"amount": 0.0
},
"other_amount": {
"currency": "usd",
"amount": 0.0
},
"tax_amount": {
"currency": "usd",
"amount": 20.1
},
"rate_details": [
{
"rate_detail_type": "shipping",
"carrier_description": null,
"carrier_billing_code": "Base Rate",
"carrier_memo": null,
"amount": {
"currency": "usd",
"amount": 23.28
},
"billing_source": "Carrier"
},
{
"rate_detail_type": "tax",
"carrier_description": null,
"carrier_billing_code": "",
"carrier_memo": null,
"amount": {
"currency": "usd",
"amount": 20.10
},
"billing_source": "Product"
}
],
"zone": null,
"package_type": "package",
"delivery_days": null,
"guaranteed_service": false,
"estimated_delivery_date": null,
"carrier_delivery_days": null,
"ship_date": "2020-10-21T00:00:00Z",
"negotiated_rate": false,
"service_type": "USPS First Class Mail Intl",
"service_code": "usps_first_class_mail_international",
"trackable": false,
"carrier_code": "stamps_com",
"carrier_nickname": "Z - Test Stamps.com Account",
"carrier_friendly_name": "Stamps.com",
"validation_status": "valid",
"warning_messages": [],
"error_messages": []
},
{
"rate_id": "se-5592489",
"rate_type": "shipment",
"carrier_id": "se-82785",
"shipping_amount": {
"currency": "usd",
"amount": 53.34
},
"insurance_amount": {
"currency": "usd",
"amount": 0.0
},
"confirmation_amount": {
"currency": "usd",
"amount": 0.0
},
"other_amount": {
"currency": "usd",
"amount": 0.0
},
"tax_amount": {
"currency": "usd",
"amount": 20.1
},
"rate_details": [
{
"rate_detail_type": "shipping",
"carrier_description": null,
"carrier_billing_code": "Base Rate",
"carrier_memo": null,
"amount": {
"currency": "usd",
"amount": 53.34
},
"billing_source": "Carrier"
},
{
"rate_detail_type": "tax",
"carrier_description": null,
"carrier_billing_code": "",
"carrier_memo": null,
"amount": {
"currency": "usd",
"amount": 20.10
},
"billing_source": "Product"
}
],
"zone": null,
"package_type": "package",
"delivery_days": 10,
"guaranteed_service": false,
"estimated_delivery_date": "2020-10-31T00:00:00Z",
"carrier_delivery_days": "6 - 10",
"ship_date": "2020-10-21T00:00:00Z",
"negotiated_rate": false,
"service_type": "USPS Priority Mail Intl",
"service_code": "usps_priority_mail_international",
"trackable": false,
"carrier_code": "stamps_com",
"carrier_nickname": "Z - Test Stamps.com Account",
"carrier_friendly_name": "Stamps.com",
"validation_status": "valid",
"warning_messages": [],
"error_messages": []
},
{
"rate_id": "se-5592490",
"rate_type": "shipment",
"carrier_id": "se-82785",
"shipping_amount": {
"currency": "usd",
"amount": 71.6000
},
"insurance_amount": {
"currency": "usd",
"amount": 0.0
},
"confirmation_amount": {
"currency": "usd",
"amount": 0.0
},
"other_amount": {
"currency": "usd",
"amount": 0.0
},
"tax_amount": {
"currency": "usd",
"amount": 20.1
},
"rate_details": [
{
"rate_detail_type": "shipping",
"carrier_description": null,
"carrier_billing_code": "Base Rate",
"carrier_memo": null,
"amount": {
"currency": "usd",
"amount": 71.60
},
"billing_source": "Carrier"
},
{
"rate_detail_type": "tax",
"carrier_description": null,
"carrier_billing_code": "",
"carrier_memo": null,
"amount": {
"currency": "usd",
"amount": 20.10
},
"billing_source": "Product"
}
],
"zone": null,
"package_type": "medium_flat_rate_box",
"delivery_days": 10,
"guaranteed_service": false,
"estimated_delivery_date": "2020-10-31T00:00:00Z",
"carrier_delivery_days": "6 - 10",
"ship_date": "2020-10-21T00:00:00Z",
"negotiated_rate": false,
"service_type": "USPS Priority Mail Intl",
"service_code": "usps_priority_mail_international",
"trackable": false,
"carrier_code": "stamps_com",
"carrier_nickname": "Z - Test Stamps.com Account",
"carrier_friendly_name": "Stamps.com",
"validation_status": "valid",
"warning_messages": [],
"error_messages": []
}
],
"invalid_rates": [],
"rate_request_id": "se-702570",
"shipment_id": "se-6407542",
"created_at": "2020-10-21T15:10:10.0994241Z",
"status": "completed",
"errors": []
},
"shipment_id": "se-6407542",
"carrier_id": "se-82785",
"service_code": "usps_first_class_mail_international",
"external_shipment_id": null,
"ship_date": "2020-10-21T00:00:00Z",
"created_at": "2020-10-21T15:10:08.63Z",
"modified_at": "2020-10-21T15:10:08.567Z",
"shipment_status": "pending",
"ship_to": {
"name": "Amanda Miller",
"phone": "20 5555 5555",
"company_name": null,
"address_line1": "77 Netherpark Crescent",
"address_line2": "Suite 100",
"address_line3": null,
"city_locality": "London",
"state_province": "N/A",
"postal_code": "ABC 123",
"country_code": "GB",
"address_residential_indicator": "yes"
},
"ship_from": {
"name": "John Doe",
"phone": "111-111-1111",
"company_name": "Example Corp.",
"address_line1": "4009 Marathon Blvd",
"address_line2": "Suite 300",
"address_line3": null,
"city_locality": "Austin",
"state_province": "TX",
"postal_code": "78756",
"country_code": "US",
"address_residential_indicator": "unknown"
},
"warehouse_id": null,
"return_to": {
"name": "John Doe",
"phone": "111-111-1111",
"company_name": "Example Corp.",
"address_line1": "4009 Marathon Blvd",
"address_line2": "Suite 300",
"address_line3": null,
"city_locality": "Austin",
"state_province": "TX",
"postal_code": "78756",
"country_code": "US",
"address_residential_indicator": "unknown"
},
"confirmation": "none",
"customs": {
"contents": "merchandise",
"customs_items": [
{
"customs_item_id": "se-582249",
"description": "rare books",
"quantity": 2,
"value": 1000.00,
"harmonized_tariff_code": "0901.21",
"country_of_origin": "US",
"unit_of_measure": null
}
],
"non_delivery": "treat_as_abandoned"
},
"external_order_id": null,
"order_source_code": null,
"advanced_options": {
"bill_to_account": null,
"bill_to_country_code": null,
"bill_to_party": null,
"bill_to_postal_code": null,
"contains_alcohol": false,
"delivered_duty_paid": false,
"non_machinable": false,
"saturday_delivery": false,
"dry_ice": false,
"dry_ice_weight": null,
"freight_class": null,
"custom_field1": null,
"custom_field2": null,
"custom_field3": null,
"collect_on_delivery": null
},
"insurance_provider": "none",
"tags": [],
"packages": [
{
"package_code": "package",
"weight": {
"value": 9.60,
"unit": "ounce"
},
"dimensions": {
"unit": "inch",
"length": 12.00,
"width": 7.10,
"height": 6.00
},
"insured_value": {
"currency": "usd",
"amount": 0.00
},
"label_messages": {
"reference1": null,
"reference2": null,
"reference3": null
},
"external_package_id": null
}
],
"total_weight": {
"value": 9.60,
"unit": "ounce"
},
"items": []
}