Skip to main content
POST
Calculate landed cost for one shipment.

Authorizations

Authorization
string
header
required

API key issued from the LandedFees dashboard under Settings > API keys. Format: sk_live_... (production) or sk_test_... (sandbox). Pass in the Authorization: Bearer <key> header.

Headers

Idempotency-Key
string

Client-generated unique string (recommended UUID v4). Repeating the same key within 24 hours returns the cached response for the original request body. Different bodies with the same key return HTTP 409.

Required string length: 8 - 128
Example:

"e4c1d2a0-8f6b-4c9d-a123-2f8b7c5e9d10"

Body

application/json
destination_country
string
required
Required string length: 2
Example:

"US"

origin_country
string
required
Required string length: 2
Example:

"CN"

incoterm
enum<string>
required
Available options:
EXW,
FCA,
CPT,
CIP,
DAP,
DPU,
DDP,
FAS,
FOB,
CFR,
CIF
transport_mode
enum<string>
required
Available options:
ocean,
air,
truck,
rail,
express
currency
string
required
Required string length: 3
Example:

"USD"

line_items
object[]
required
Minimum array length: 1
freight
number
default:0
Required range: x >= 0
insurance
number
default:0
Required range: x >= 0
other_dutiable_charges
number
default:0
Required range: x >= 0
customs_value_adjustments
object

Itemized customs-value adjustments per 19 CFR 152.103.

eu_member_state
string

Required when destination_country is EU.

Required string length: 2
br_state
string
Required string length: 2
ca_province
string
Required string length: 2
usmca_qualifying
boolean
fta_id
string

FTA program ID (KORUS, CAFTA_DR, etc.).

calculation_date
string<date>
export_date
string<date>

ISO date the shipment left the country of exportation. Drives the CBP-published weekly FX lookup per 19 CFR 141.62. Falls back to calculation_date when unset.

input_method
enum<string>
default:manual
Available options:
upload,
manual
extracted_data
any | null

Snapshot of extractor output for auto-detected fields.

invoice_file_url
string | null

Response

Calculation completed.

id
string<uuid> | null
shipment_id
string<uuid> | null
result
object
compliance_flags
object[]
fta_opportunities
object[]
data_as_of
object
data_stale
boolean