{
"success": true,
"request_id": "c6f398bb-1dad-40e8-a991-a22a180ad842",
"calculation_type": "US",
"hs_code": "<string>",
"origin_country": "<string>",
"destination_country": "<string>",
"transport_mode": "air",
"shipping_terms": "FOB",
"quantity": 1,
"weight": 10.5,
"weight_unit": "kg",
"volume": 9,
"volume_unit": "liter",
"currencies": {
"origin": "<string>",
"destination": "<string>",
"exchange_rate": 123,
"exchange_rate_display": "<string>"
},
"exemptions": {
"de_minimis_threshold": 123,
"de_minimis_exempt": true
},
"values": {
"declared_value": 137.93,
"cbp_value": 138,
"shipping_cost": 6.9,
"insurance_cost": 1.38
},
"trade_agreement": "AU",
"estimated_duties": {
"tariffs": [
{
"name": "Customs Duty",
"rate": "16.5%",
"amount": 22.77,
"type": "CUSTOMS_DUTY",
"code": "6109100040",
"agreement_name": "Australia FTA",
"agreement_code": "AU"
}
],
"total_duty": 22.77,
"agreement_name": "Australia FTA",
"agreement_code": "AU",
"note": "Column 2 rates apply to goods from Cuba, North Korea, Russia, and Belarus",
"normal_tariff": {
"tariffs": [
{
"name": "Customs Duty",
"rate": "16.5%",
"amount": 22.77,
"type": "CUSTOMS_DUTY"
}
],
"total_duty": 22.77
},
"preferential_tariff": {
"tariffs": [
{
"name": "Customs Duty (Preferential)",
"rate": "0%",
"amount": 0,
"type": "PREFERENTIAL_DUTY"
}
],
"total_duty": 0,
"agreement_name": "Australia FTA",
"agreement_code": "AU"
}
},
"fees": {
"MPF": {
"code": "499",
"amount": 25
},
"HMF": {
"code": "400",
"amount": 12.5
},
"Cotton": {
"code": "462",
"amount": 1.327
},
"total_fees": 38.827
},
"additional_tariff_measures": [
{
"code": "FDA",
"name": "FDA - May Be Regulated",
"description": "Product may or may not be FDA-regulated; if regulated, transmit FDA entry data; otherwise disclaim.",
"agency": "Food and Drug Administration (FDA)",
"measure_type": "Health / Safety",
"condition": null
}
],
"vat": {
"rate": 20,
"amount": 240,
"exempt": false
},
"totals": {
"total_duties_vat": 405,
"total_landed_cost": 1443.827
}
}{
"success": false,
"request_id": "c6f398bb-1dad-40e8-a991-a22a180ad842",
"error": "invalid_request",
"message": "Invalid request parameters"
}{
"success": false,
"request_id": "c6f398bb-1dad-40e8-a991-a22a180ad842",
"error": "invalid_request",
"message": "Invalid request parameters"
}Calculate Duties
Enhanced duty calculation with comprehensive fee calculations from database.
Key Features:
- Database-driven fees (MPF, HMF, Cotton fees, etc.) with exact HS code matching
- Weight-based fee calculations with automatic unit conversions
- Preferential duty rates where available
- Real-time currency conversions
MANDATORY FIELDS:
hs_code: 10-digit HTS/HS codeorigin_country: 2-letter origin country codedestination_country: 2-letter destination country codedeclared_value: Value in origin currency (must be > 0)
OPTIONAL FIELDS:
measurement: Unified measurement object withvalueandunit- auto-detects weight vs volume based on unitquantity: Quantity of items for per-item duties (default: 1)
ROUTING:
destination_country = "US"→ U.S. calculationdestination_country = "GB"→ UK calculationdestination_country = EU countries→ EU calculation with VAT
{
"success": true,
"request_id": "c6f398bb-1dad-40e8-a991-a22a180ad842",
"calculation_type": "US",
"hs_code": "<string>",
"origin_country": "<string>",
"destination_country": "<string>",
"transport_mode": "air",
"shipping_terms": "FOB",
"quantity": 1,
"weight": 10.5,
"weight_unit": "kg",
"volume": 9,
"volume_unit": "liter",
"currencies": {
"origin": "<string>",
"destination": "<string>",
"exchange_rate": 123,
"exchange_rate_display": "<string>"
},
"exemptions": {
"de_minimis_threshold": 123,
"de_minimis_exempt": true
},
"values": {
"declared_value": 137.93,
"cbp_value": 138,
"shipping_cost": 6.9,
"insurance_cost": 1.38
},
"trade_agreement": "AU",
"estimated_duties": {
"tariffs": [
{
"name": "Customs Duty",
"rate": "16.5%",
"amount": 22.77,
"type": "CUSTOMS_DUTY",
"code": "6109100040",
"agreement_name": "Australia FTA",
"agreement_code": "AU"
}
],
"total_duty": 22.77,
"agreement_name": "Australia FTA",
"agreement_code": "AU",
"note": "Column 2 rates apply to goods from Cuba, North Korea, Russia, and Belarus",
"normal_tariff": {
"tariffs": [
{
"name": "Customs Duty",
"rate": "16.5%",
"amount": 22.77,
"type": "CUSTOMS_DUTY"
}
],
"total_duty": 22.77
},
"preferential_tariff": {
"tariffs": [
{
"name": "Customs Duty (Preferential)",
"rate": "0%",
"amount": 0,
"type": "PREFERENTIAL_DUTY"
}
],
"total_duty": 0,
"agreement_name": "Australia FTA",
"agreement_code": "AU"
}
},
"fees": {
"MPF": {
"code": "499",
"amount": 25
},
"HMF": {
"code": "400",
"amount": 12.5
},
"Cotton": {
"code": "462",
"amount": 1.327
},
"total_fees": 38.827
},
"additional_tariff_measures": [
{
"code": "FDA",
"name": "FDA - May Be Regulated",
"description": "Product may or may not be FDA-regulated; if regulated, transmit FDA entry data; otherwise disclaim.",
"agency": "Food and Drug Administration (FDA)",
"measure_type": "Health / Safety",
"condition": null
}
],
"vat": {
"rate": 20,
"amount": 240,
"exempt": false
},
"totals": {
"total_duties_vat": 405,
"total_landed_cost": 1443.827
}
}{
"success": false,
"request_id": "c6f398bb-1dad-40e8-a991-a22a180ad842",
"error": "invalid_request",
"message": "Invalid request parameters"
}{
"success": false,
"request_id": "c6f398bb-1dad-40e8-a991-a22a180ad842",
"error": "invalid_request",
"message": "Invalid request parameters"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
HS/HTS harmonized system code
"6109100040"
2-letter origin country code
2"CN"
2-letter destination country code
2"US"
Declared value in origin currency
x >= 01000
Weight of goods (optional, but if provided, weight_unit is required for weight-based fee calculations)
x >= 010.5
Unit of weight (required if weight is provided)
kg, lb "kg"
Volume of goods (required for volume-based specific duties like alcohol/spirits)
x >= 09
Unit of volume (required if volume is provided).
liter- Standard litersml- Milliliters (converted to liters)hl- Hectoliters (converted to liters)gallon- US gallons (converted to liters)proof_liter- Proof liters for spirits (not converted, used directly for alcohol duty calculations)
liter, ml, hl, gallon, proof_liter "liter"
Unified measurement object - alternative to separate weight/volume fields. The unit determines whether it's treated as weight or volume. Weight units: kg, kilogram, lb, lbs, pound, g, gram, oz, ounce, t, ton, tonne, carat Volume units: l, liter, litre, liters, ml, milliliter, gal, gallon, hl, hectoliter, proof_liters, bbl, barrel, m3
Show child attributes
Show child attributes
Shipping cost
x >= 050
Insurance cost
x >= 010
3-letter currency code for origin
3"CNY"
3-letter currency code for destination
3"USD"
Quantity of items. For count-based specific duties, you may need to adjust based on the unit of measure:
- For per-item duties: provide actual count
- For per-dozen duties: provide actual count (will be divided by 12)
- For per-gross duties: provide actual count (will be divided by 144, as 1 gross = 12 dozen = 144 units)
x >= 1Mode of transport
sea, air, road, rail Shipping terms
FOB, CIF, EXW, DDP Entry date for historical calculations
Trade agreement or country group code to apply special tariff rates.
When provided, the system will look for additional tariffs where origin_area_id matches this value.
Examples: USMCA, GSP, CN_HK, ASEAN, EU
"USMCA"
Product components for derivative products (Section 232 metals, timepieces, etc.). Use this to specify material content, origin, and characteristics of product components.
Show child attributes
Show child attributes
[
{
"type": "frame",
"material": "steel",
"percentage": 25,
"origin_country": "CN"
},
{
"type": "movement",
"mechanism": "automatic",
"jewels": 21,
"origin_country": "CH"
}
]
Response
Successful calculation
true
"c6f398bb-1dad-40e8-a991-a22a180ad842"
US, GB, EU "air"
"FOB"
1
Weight of goods (if provided)
10.5
Unit of weight (if weight is provided)
"kg"
Volume of goods (if provided)
9
Unit of volume (if volume is provided)
"liter"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Trade agreement code applied (if passed in request and country is a member)
"AU"
Duty calculation results. Structure depends on AUTOMATIC_PREF_RATE environment setting:
- Default (AUTOMATIC_PREF_RATE=false): Flat structure with tariffs array directly
- AUTOMATIC_PREF_RATE=true: Nested normal_tariff and preferential_tariff objects
Show child attributes
Show child attributes
Database-driven fees structure with codes and amounts
Show child attributes
Show child attributes
Additional regulatory requirements (e.g., PGA flags for US imports)
Show child attributes
Show child attributes
VAT information (EU and GB only)
Show child attributes
Show child attributes
Show child attributes
Show child attributes