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. 1. Get a key

    Generate one on the API Keys page.

  2. 2. POST a calculation

    Send TARIC code, origin and value (optionally member state). Get a JSON breakdown back.

  3. 3. Show the total

    Display totalLandedCostin your UI — that's the headline number.

🔐 Bearer token auth📦 JSON in / JSON out < 100 ms typical🇪🇺 EU-27 TARIC coverage
POST/api/v1/calculate

Calculate 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

NameTypeRequiredDescription
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
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

JSON
{
  "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

400

Bad Request

Missing or invalid parameters

401

Unauthorized

Missing or invalid API key

404

Not Found

Commodity code not found in the EU TARIC schedule

429

Too Many Requests

Monthly rate limit exceeded for your plan

500

Internal Server Error

Unexpected server error — retry with backoff

Ready to integrate?

Get your API key and have totals appearing at checkout in minutes.

Get API Key →