> ## Documentation Index
> Fetch the complete documentation index at: https://docs.landedfees.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> REST API for landed-cost calculation, HS classification, and multi-origin comparison. Same engine that powers the LandedFees UI, exposed as JSON.

## What LandedFees is

LandedFees resolves the true cost of importing a shipment: the goods
value, freight, insurance, every duty layer (MFN, Section 232, 301,
122, 338, AD/CVD, FTA preferences), destination-country VAT or GST,
and the mandatory customs fees (MPF, HMF, ISF, broker, exam expected
value). Every rate is anchored to a primary source (USITC HTS, EU
TARIC, HMRC UK Trade Tariff, WCO HS, CBP weekly FX per 19 CFR 141.62).
No estimates.

## Who this API is for

Developers at import-of-record firms, freight forwarders, brokerage
teams, and procurement automation vendors who need programmatic
landed-cost math inside quoting flows, ERP integrations, and CI
pipelines.

Typical use cases:

* Real-time landed-cost quoting inside a checkout or ERP.
* Nightly re-audit of the last N shipments after a tariff-notice
  publication.
* Multi-origin sourcing analysis for reshoring decisions.
* HS classification triage on new SKU intake.

## The CostLayer output model

Every `/v1/calc` response returns a `breakdown` array of
`CostLayer` objects. Each layer carries its own code, amount, rate,
exempted flag, and an optional note. This is the shape:

```json theme={null}
{
  "code": "SEC_301",
  "amount": 1636.25,
  "rate": 0.25,
  "exempted": false,
  "note": "USTR List 4A, HTS 9903.88.15"
}
```

Layers stack. A single shipment can carry MFN, Section 232, Section
301, Section 122, AD/CVD, MPF, and HMF at the same time. Because the
API returns each layer as a discrete row, downstream systems can log,
audit, or dispute any single line without re-running math.

## Primary-source citations

Every rate resolves against a live table. Every compliance flag ships
with `source`, `source_url`, and `legal_citation` fields so your team
can trace a number to a statute, a Federal Register notice, or a TARIC
line. If a rate cannot be resolved (rare, non-US non-EU tail), the API
returns a `data_gap` compliance flag rather than a fabricated number.

## Five stable v1 endpoints

* `POST /v1/calc`: landed cost for one shipment.
* `POST /v1/calc/bulk`: up to 500 rows per call.
* `POST /v1/classify`: HS or HTS code from a product description.
* `POST /v1/compare`: up to 6 origin countries side-by-side.
* `GET  /v1/rates/{country}/{hs}`: MFN plus overlay plus VAT lookup.

Additive changes ship under v1 with 30-day changelog notice. Breaking
changes ship under a new major version prefix.
