Calculation
POST /api/estimateReturns component-level evidence or a structured refusal. Discovery remains separate from metered calculation.
DEVELOPER + AGENT INTERFACE
The web calculator, HTTP API, and MCP tools share the same schemas, publication decisions, missing-data errors, and metering boundary.
HTTP CONTRACT
Requests must include entry date, origin, destination, mode, transaction context, line-level tariff codes, values, and currencies. A missing material fact produces a typed error.
POST /api/estimate
Content-Type: application/json
{
"entry_date": "2026-08-03",
"origin_country": "BR",
"dispatch_country": "BR",
"destination_country": "US",
"destination_region": null,
"transport_mode": "express_courier",
"transaction_type": "commercial_b2c",
"incoterm": "DAP",
"settlement_currency": "USD",
"lines": [
{
"line_id": "line-1",
"destination_tariff_code": "6109100012",
"description": "Cotton T-shirts",
"origin_country": "BR",
"quantity": "1",
"quantity_unit": "item",
"unit_price": {
"currency": "USD",
"decimal": "50.00",
"tax_inclusive": false
}
}
],
"shipping": {
"currency": "USD",
"decimal": "12.00"
},
"insurance": {
"currency": "USD",
"decimal": "0"
},
"other_incidental_costs": [],
"tax_collection": {
"pathway": "unknown",
"ioss_status": "unknown",
"prices_include_tax": false
},
"preference_claim": {
"mode": "none"
},
"fee_mode": "official_only",
"carrier_charges_scope": "include"
}HTTP/1.1 503 Service Unavailable
{
"error": "publication_locked",
"message": "No public calculation release is approved.",
"grand_total": null,
"missing_components": [
"tax", "preferences", "trade_remedies",
"fees", "official_fx", "carrier_charges"
]
}POST /api/estimateReturns component-level evidence or a structured refusal. Discovery remains separate from metered calculation.
sources[] + release_idSupported components carry official citations, effective time, rule identity, and release provenance.
calculate_landed_costThree read-only agent tools reuse the API boundary. Registry submission and public agent access remain disabled.