Compare landed cost across up to 6 origin countries.
curl --request POST \
--url https://www.landedfees.com/v1/compare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hs_code": "8518.30.20",
"destination": "US",
"value": 64250,
"currency": "USD",
"freight": 3200,
"insurance": 480,
"incoterm": "FOB",
"transport_mode": "ocean",
"origins": [
"CN",
"VN",
"MX",
"IN"
]
}
'import requests
url = "https://www.landedfees.com/v1/compare"
payload = {
"hs_code": "8518.30.20",
"destination": "US",
"value": 64250,
"currency": "USD",
"freight": 3200,
"insurance": 480,
"incoterm": "FOB",
"transport_mode": "ocean",
"origins": ["CN", "VN", "MX", "IN"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
hs_code: '8518.30.20',
destination: 'US',
value: 64250,
currency: 'USD',
freight: 3200,
insurance: 480,
incoterm: 'FOB',
transport_mode: 'ocean',
origins: ['CN', 'VN', 'MX', 'IN']
})
};
fetch('https://www.landedfees.com/v1/compare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.landedfees.com/v1/compare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hs_code' => '8518.30.20',
'destination' => 'US',
'value' => 64250,
'currency' => 'USD',
'freight' => 3200,
'insurance' => 480,
'incoterm' => 'FOB',
'transport_mode' => 'ocean',
'origins' => [
'CN',
'VN',
'MX',
'IN'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.landedfees.com/v1/compare"
payload := strings.NewReader("{\n \"hs_code\": \"8518.30.20\",\n \"destination\": \"US\",\n \"value\": 64250,\n \"currency\": \"USD\",\n \"freight\": 3200,\n \"insurance\": 480,\n \"incoterm\": \"FOB\",\n \"transport_mode\": \"ocean\",\n \"origins\": [\n \"CN\",\n \"VN\",\n \"MX\",\n \"IN\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.landedfees.com/v1/compare")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hs_code\": \"8518.30.20\",\n \"destination\": \"US\",\n \"value\": 64250,\n \"currency\": \"USD\",\n \"freight\": 3200,\n \"insurance\": 480,\n \"incoterm\": \"FOB\",\n \"transport_mode\": \"ocean\",\n \"origins\": [\n \"CN\",\n \"VN\",\n \"MX\",\n \"IN\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.landedfees.com/v1/compare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hs_code\": \"8518.30.20\",\n \"destination\": \"US\",\n \"value\": 64250,\n \"currency\": \"USD\",\n \"freight\": 3200,\n \"insurance\": 480,\n \"incoterm\": \"FOB\",\n \"transport_mode\": \"ocean\",\n \"origins\": [\n \"CN\",\n \"VN\",\n \"MX\",\n \"IN\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"hs_code": "<string>",
"destination": "<string>",
"currency": "<string>",
"value": 123,
"incoterm": "<string>",
"transport_mode": "<string>",
"freight": 123,
"insurance": 123,
"origins_requested": [
"<string>"
],
"results": [
{
"origin": "<string>",
"coverage": true,
"coverage_message": "<string>",
"error_code": "<string>",
"total_landed_cost": 123,
"duty_amount": 123,
"tax_amount": 123,
"fees_amount": 123,
"customs_value": 123,
"currency": "<string>",
"delta_vs_cheapest": 123,
"delta_pct": 123,
"breakdown_summary": {},
"flags": {
"denied_party": true,
"pga": true,
"restriction": true,
"ad_cvd": true,
"fta_opportunity": true
}
}
],
"calculated_at": "2023-11-07T05:31:56Z"
}{
"error": "invalid body",
"issues": [
{
"path": [
"destination_country"
],
"message": "String must contain exactly 2 character(s)"
}
]
}{
"error": "unauthorized"
}{
"error": "quota_exceeded",
"code": "QUOTA_EXCEEDED",
"message": "Monthly quota exhausted. Upgrade at https://www.landedfees.com/pricing."
}{
"error": "rate_limited",
"code": "RATE_LIMITED",
"message": "Too many requests. Retry after 60 seconds."
}{
"error": "internal",
"detail": "engine error"
}Endpoints
Compare origins
Runs the landed-cost engine in parallel for 1 to 6 origin countries against a single HS + destination + value + freight combination. Returns a compact per-origin breakdown (MFN, Section 122 / 301 / 301-FL / 232 / 338, AD/CVD, MPF, HMF, VAT) plus flags (denied-party, PGA, restriction, AD/CVD, fta_opportunity). Per-origin failures do not fail the batch.
POST
/
v1
/
compare
Compare landed cost across up to 6 origin countries.
curl --request POST \
--url https://www.landedfees.com/v1/compare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hs_code": "8518.30.20",
"destination": "US",
"value": 64250,
"currency": "USD",
"freight": 3200,
"insurance": 480,
"incoterm": "FOB",
"transport_mode": "ocean",
"origins": [
"CN",
"VN",
"MX",
"IN"
]
}
'import requests
url = "https://www.landedfees.com/v1/compare"
payload = {
"hs_code": "8518.30.20",
"destination": "US",
"value": 64250,
"currency": "USD",
"freight": 3200,
"insurance": 480,
"incoterm": "FOB",
"transport_mode": "ocean",
"origins": ["CN", "VN", "MX", "IN"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
hs_code: '8518.30.20',
destination: 'US',
value: 64250,
currency: 'USD',
freight: 3200,
insurance: 480,
incoterm: 'FOB',
transport_mode: 'ocean',
origins: ['CN', 'VN', 'MX', 'IN']
})
};
fetch('https://www.landedfees.com/v1/compare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.landedfees.com/v1/compare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hs_code' => '8518.30.20',
'destination' => 'US',
'value' => 64250,
'currency' => 'USD',
'freight' => 3200,
'insurance' => 480,
'incoterm' => 'FOB',
'transport_mode' => 'ocean',
'origins' => [
'CN',
'VN',
'MX',
'IN'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.landedfees.com/v1/compare"
payload := strings.NewReader("{\n \"hs_code\": \"8518.30.20\",\n \"destination\": \"US\",\n \"value\": 64250,\n \"currency\": \"USD\",\n \"freight\": 3200,\n \"insurance\": 480,\n \"incoterm\": \"FOB\",\n \"transport_mode\": \"ocean\",\n \"origins\": [\n \"CN\",\n \"VN\",\n \"MX\",\n \"IN\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.landedfees.com/v1/compare")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hs_code\": \"8518.30.20\",\n \"destination\": \"US\",\n \"value\": 64250,\n \"currency\": \"USD\",\n \"freight\": 3200,\n \"insurance\": 480,\n \"incoterm\": \"FOB\",\n \"transport_mode\": \"ocean\",\n \"origins\": [\n \"CN\",\n \"VN\",\n \"MX\",\n \"IN\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.landedfees.com/v1/compare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hs_code\": \"8518.30.20\",\n \"destination\": \"US\",\n \"value\": 64250,\n \"currency\": \"USD\",\n \"freight\": 3200,\n \"insurance\": 480,\n \"incoterm\": \"FOB\",\n \"transport_mode\": \"ocean\",\n \"origins\": [\n \"CN\",\n \"VN\",\n \"MX\",\n \"IN\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"hs_code": "<string>",
"destination": "<string>",
"currency": "<string>",
"value": 123,
"incoterm": "<string>",
"transport_mode": "<string>",
"freight": 123,
"insurance": 123,
"origins_requested": [
"<string>"
],
"results": [
{
"origin": "<string>",
"coverage": true,
"coverage_message": "<string>",
"error_code": "<string>",
"total_landed_cost": 123,
"duty_amount": 123,
"tax_amount": 123,
"fees_amount": 123,
"customs_value": 123,
"currency": "<string>",
"delta_vs_cheapest": 123,
"delta_pct": 123,
"breakdown_summary": {},
"flags": {
"denied_party": true,
"pga": true,
"restriction": true,
"ad_cvd": true,
"fta_opportunity": true
}
}
],
"calculated_at": "2023-11-07T05:31:56Z"
}{
"error": "invalid body",
"issues": [
{
"path": [
"destination_country"
],
"message": "String must contain exactly 2 character(s)"
}
]
}{
"error": "unauthorized"
}{
"error": "quota_exceeded",
"code": "QUOTA_EXCEEDED",
"message": "Monthly quota exhausted. Upgrade at https://www.landedfees.com/pricing."
}{
"error": "rate_limited",
"code": "RATE_LIMITED",
"message": "Too many requests. Retry after 60 seconds."
}{
"error": "internal",
"detail": "engine error"
}Authorizations
Headers
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 - 128Example:
"e4c1d2a0-8f6b-4c9d-a123-2f8b7c5e9d10"
Body
application/json