API v1 · deprecated
REST API v1
Every endpoint lives under https://api.tarifflo.com/api/v1, takes JSON and authenticates with X-API-Key. Long-running work answers 202 with a jobId and delivers the result to your webhook.
Classifications
Classify one product to an HTS code for each destination. The US code is computed first, then mapped to the other destinations.
/api/v1/classificationsscope: classificationsBody
| Field | Type | Description |
|---|---|---|
descriptionrequired | string | Product description, 10 to 2000 characters. |
destinationsrequired | string[] | 1 to 10 destination countries, 2-letter ISO codes. |
nameoptional | string | Product name, 3 to 200 characters. |
partialHtsCodeoptional | string | A known 4- or 6-digit prefix that constrains the result. |
webhookUrloptional | string | Public HTTPS URL that receives the signed result. Omit it to poll the GET endpoint instead. |
curl -X POST "https://api.tarifflo.com/api/v1/classifications" \
-H "X-API-Key: $TARIFFLO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Wireless over-ear headphones, plastic housing",
"destinations": ["US", "CA"],
"webhookUrl": "https://your-server.com/webhooks/tarifflo"
}'{
"jobId": "0193c1f2-...",
"status": "queued",
"destinationsQueued": 2,
"totalClassifications": 2,
"estimatedCompletionTime": 90,
"message": "Classification job queued. ..."
}/api/v1/classifications/{jobId}scope: classificationsReturns status queued, processing, complete (with data) or needs_info (with questions). To answer questions, add the answers to the description and classify again.
Tariff rates
Rate up to 50 lines. Each line returns the effective ad valorem rate with Chapter 99 stacking (Section 301, 232, IEEPA) and a cost breakdown, priced as of its date. Unknown field names are rejected, so a typo fails instead of returning a wrong rate.
/api/v1/tariff-ratesscope: tariff_ratesBody
| Field | Type | Description |
|---|---|---|
ratesrequired | object[] | 1 to 50 lines, described below. |
webhookUrlrequired | string | HTTPS URL that receives tariff_rate.completed. |
effectiveDateoptional | string | Default date for every line, YYYY-MM-DD. Defaults to today. |
loadingDateoptional | string | Loading date for time-based provisions, YYYY-MM-DD. |
modeOfTransportoptional | string | ocean, air, truck or rail. |
rates[] item
| Field | Type | Description |
|---|---|---|
htsCoderequired | string | HTS code, dots optional. |
originrequired | string | Country of origin, 2-letter ISO code. |
destinationrequired | string | Destination country, 2-letter ISO code. |
valueoptional | number | Line value in USD. |
dateoptional | string | This line's date, YYYY-MM-DD. |
metalsoptional | object | Section 232 content shares: { steel?, aluminum?, copper? }, 0 to 100. |
usContentPercentageoptional | number | US-origin content share, 0 to 100. |
steelCountryOfMeltoptional | string | Melt-and-pour country, 2-letter ISO code. |
aluminumCountryOfSmeltoptional | string | Smelt-and-cast country, 2-letter ISO code. |
uomQuantitiesoptional | object | Quantity per unit of measure, for specific duties. |
appliedExclusionsoptional | string[] | Chapter 99 exclusion codes to apply. |
chosenSpiCodesoptional | string[] | Special program indicators to evaluate. |
setKindoptional | string | For a set provision: how the set is rated. |
componentsoptional | object[] | For a set provision: up to 50 components { code, description?, valueShare?, quantity? }. |
curl -X POST "https://api.tarifflo.com/api/v1/tariff-rates" \
-H "X-API-Key: $TARIFFLO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"webhookUrl": "https://your-server.com/webhooks/tarifflo",
"modeOfTransport": "ocean",
"rates": [
{ "htsCode": "7318.15.8060", "origin": "CN", "destination": "US", "value": 25000, "metals": { "steel": 100 } }
]
}'/api/v1/tariff-rates/{jobId}scope: tariff_ratesProgress while running; once complete, data holds one result per line, the same object the webhook carries.