Calculate
Calculate multiple codes
One shipment, up to 50 HS codes — a full basket in one call.
POST
Requires the
Like the single endpoint, partner validation-rule failures reject the whole
batch with
calculate:read scope.
string
required
ISO alpha-2 destination shared by every line.
array
required
1–50 lines. Each line requires
hs_code, origin_country, and
declared_value (per unit), plus optional currency, quantity,
weight, weight_unit — line values fall back to the batch-level ones.string
Your reference, echoed back in the response.
string
Batch-level ISO 4217 currency, used by lines without their own.
number
Batch-level default quantity for lines without their own.
number
Batch-level default weight, in
weight_unit.string
default:"kg"
kg or lb.number
default:"0"
Shipment-level freight. (Not apportioned into per-line customs values in
this endpoint.)
number
default:"0"
Shipment-level insurance.
string
default:"sea"
sea, air, road, or rail.string
default:"FOB"
FOB, CIF, EXW, or DDP.string
postal or courier.string
YYYY-MM-DD — rates resolved as of this date.Response
array
One entry per line, in request order — each carries the full
single-calculation response
(
values, estimated_duties, totals, rate_found, request_id, …).
A line that failed carries { hs_code, origin_country, rate_found: false, error } instead, without failing the batch.object
{ total } — the grand total of every line’s duty + fees + VAT, in the
destination currency.object | null
Which tariff publication answered:
{ version, source, imported_at }.number
Processing time in milliseconds.
400 { "errors": [{ "code", "description" }] }. Shipment-level
money rules aggregate across every line (FX-converted).