API Reference
Plug Tariff Hub EU into your storefront, ERP or warehouse system. Show real EU landed costs at checkout, in your purchase orders, or on your customs paperwork — without your team doing the math.
5-Minute Onboarding
1. Get a key
Generate one on the API Keys page.
2. POST a calculation
Send TARIC code, origin and value (optionally member state). Get a JSON breakdown back.
3. Show the total
Display
totalLandedCostin your UI — that's the headline number.
/api/v1/calculateCalculate Landed Cost
Returns the full EU landed cost for a shipment: import duty, trade-defence duties, VAT (per member state if supplied), excise and processing fees — already broken down line by line.
Parameters
hs_codestringRequiredTARIC commodity code (10-digit recommended; we fall back to the longest matching parent).originstringRequiredCountry of origin as ISO 3166-1 alpha-2 (e.g. CN, VN, DE).valuenumberRequiredCustoms value of the goods in EUR.weight_kgnumberOptionalNet weight in kilograms — needed for specific duties (e.g. €/100 kg).destination_member_statestringOptionalISO-2 EU member state of import (e.g. DE, FR, HU). Drives per-state VAT and reduced-rate product rules. Default: EU-average 21 %.shipment_modestringOptionalocean | air | road | rail. Currently informational for EU imports.Example Request
curl -X POST https://tariffhub.eu/api/v1/calculate \
-H "Authorization: Bearer th_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"hs_code": "8471300000",
"origin": "CN",
"value": 10000,
"destination_member_state": "DE",
"weight_kg": 50,
"shipment_mode": "ocean"
}'Example Response
{
"input": {
"hsCode": "8471300000",
"hsCodeFormatted": "8471.30.00.00",
"origin": "CN",
"destination": "EU",
"value": 10000,
"currency": "EUR",
"weightKg": 50
},
"description": "Portable automatic data-processing machines, weighing not more than 10 kg",
"customsValue": 10000,
"totalDuty": 0,
"totalTax": 2100,
"totalFees": 25,
"totalLandedCost": 12125,
"effectiveDutyRatePct": 0,
"machine": [
{ "type": "mfn", "ratePct": 0, "amount": 0, "source": { "measureType": "103" } },
{ "type": "vat", "ratePct": 21, "amount": 2100, "source": {} },
{ "type": "processing_fee", "ratePct": null, "amount": 25, "source": {} }
],
"warnings": [],
"notes": [],
"meta": {
"dataSource": "EU_TARIC",
"calculatedAt": "2026-04-15T10:32:14.812Z",
"approximate": false
}
}Response Fields
totalLandedCost — the headline number to show your customer (customs value + duty + tax + fees).
totalDuty / totalTax / totalFees — sub-totals if you want to display them separately.
effectiveDutyRatePct — total duty as a percentage of customs value.
machine[] — line-by-line breakdown with stable type identifiers (mfn, preferential, anti_dumping, countervailing, safeguard, vat, excise, processing_fee). Use this if you need to itemise on an invoice.
notes[] / warnings[] — plain-English context (e.g. "preferential rate applied", "data is approximate").
meta.approximate — true when our data coverage was incomplete; show a disclaimer.
Error Codes
Bad Request
Missing or invalid parameters
Unauthorized
Missing or invalid API key
Not Found
Commodity code not found in the EU TARIC schedule
Too Many Requests
Monthly rate limit exceeded for your plan
Internal Server Error
Unexpected server error — retry with backoff
Ready to integrate?
Get your API key and have totals appearing at checkout in minutes.