Docs menu
Get started
Using the API
API reference
Classification
Landed cost
Compliance
- POSTRegulate: find an agency product code
- POSTCheck restricted goods
- GETRestricted-goods checks
- GETAgency filing checks
- POSTCheck agency filings (Comply)
- POSTCross: classify, restrict, comply, regulate and calculate in one call
- GETYour restricted-goods rules
- POSTAdd a restricted-goods rule
- DELETERemove a restricted-goods rule
- POSTScreen a person or company
- GETYour screening checks
Reference
Origin
Shipping documents
Bulk
Catalogue
- GETList products
- POSTCreate a product
- GETGet a product
- PATCHUpdate a product
- POSTArchive a product
- GETA product’s history
- GETA product’s codes
- POSTAdd a code
- POSTSuggest codes
- POSTApprove a code
- POSTReject a code
- POSTClassify many products
- GETYour imports
- POSTImport a CSV file
- GETAn import
- GETExport as CSV
- POSTSync records from a source
- GETApproved codes to write back
- GETCatalogue vocabularies
- GETSource kinds
- GETDefault target markets
- POSTSet default target markets
Cross: classify, restrict, comply, regulate and calculate in one call
POST https://api.border.bot/v1/cross
Requires an access token from an API client (Authorization: Bearer <access_token>).
Everything an order needs to cross a border, per item: its tariff code (classified for the destination when you give none), what the destination prohibits or restricts, what each government agency that flags the line needs (file or disclaim, with its citations; for the US, CPSC is decided and FDA and the other agencies come back flagged), the agency’s own product code once its destination has them (agencyCodes, empty today: Regulate isn’t live yet), and, when every item has a value and an origin, the landed cost of the whole shipment. Each item gets a verdict (clear, action_needed, prohibited, review). Each part runs as its own endpoint does and is charged at its own price (POST /classify, /restrictions, /comply, /calculate/shipment), kept as its own evidence (the checkIds); Cross adds its own price per item on top (see GET /pricing). A part the destination doesn’t cover comes back available: false with the reason, uncharged. Up to 25 items. The client needs the compliance scope, plus classify when an item has no hsCode and calculate when the shipment is priced. An Idempotency-Key makes a retry replay the result without charging again.
API client scope: compliance.
Headers#
| Name | Type | Required | Description |
|---|---|---|---|
idempotency-key |
string | no | Make retries safe: a repeat with the same key returns the original result without charging again (keys are scoped to your workspace). |
Request body (JSON)#
| Name | Type | Required | Description |
|---|---|---|---|
destinationCountry |
string | yes | Ship-to country: every part runs for it. ISO 3166-1 alpha-2, case-insensitive. |
originCountry |
string | no | Where the goods are made or ship from, for items that don’t say (Restrict and Calculate use it). ISO 3166-1 alpha-2, case-insensitive. |
items |
CrossItem[] | yes | 1–25 items. |
reference |
string | no | Your reference (an order or entry id), kept with each part’s evidence. |
agencies |
string[] | no | |
classifyMode |
string | no | |
currency |
string | no | |
shippingCost |
number | no | |
insuranceCost |
number | no | |
transportMode |
"air" | "sea" | "road" | "rail" | no | |
shippingTerms |
"EXW" | "FCA" | "FAS" | "FOB" | "CFR" | "CIF" | "CPT" | "CIP" | "DAP" | "DPU" | "DDP" | no |
Responses#
200: One record per item, each part’s summary and evidence id, and the landed cost (or why it wasn’t priced). (CrossResponse)400: Invalid input (invalid_input). (Error)401: Missing, invalid or expired access token, or a revoked or expired API client (unauthorized). (Error)402: Not enough credits (insufficient_credits). Nothing was charged. (Error)403: Workspace suspended, action disabled, or the client lacks the scope (org_suspended,action_disabled,forbidden). (Error)409: A request with this Idempotency-Key is still in progress (conflict). (Error)422: The destination can’t be classified for (unsupported_country); other parts it doesn’t cover come backavailable: false. (Error)429: Rate limited (rate_limited). Retry afterRetry-Afterseconds;RateLimitsays which limit was hit (r=0,tseconds until its window ends) andRateLimit-Policyits quota. (Error)500: Unexpected error (internal). (Error)502: The engine failed (upstream_error). The credits are refunded automatically. (Error)504: The engine timed out (upstream_timeout). The credits are refunded automatically. (Error)
Example request#
curl -X POST https://api.border.bot/v1/cross \
-H "Authorization: Bearer $BORDERBOT_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"destinationCountry": "US",
"originCountry": "CN",
"reference": "order-1042",
"currency": "USD",
"shippingCost": 18,
"items": [
{
"sku": "TOY-STACK-01",
"title": "Wooden stacking toy for ages 3+",
"materials": "Beech wood, water-based paint",
"value": 24,
"quantity": 2
},
{
"sku": "SERUM-30",
"title": "Vitamin C face serum, 30 ml",
"hsCode": "3304.99.50.00",
"originCountry": "KR",
"value": 32
}
]
}'const response = await fetch('https://api.border.bot/v1/cross', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BORDERBOT_TOKEN}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
"destinationCountry": "US",
"originCountry": "CN",
"reference": "order-1042",
"currency": "USD",
"shippingCost": 18,
"items": [
{
"sku": "TOY-STACK-01",
"title": "Wooden stacking toy for ages 3+",
"materials": "Beech wood, water-based paint",
"value": 24,
"quantity": 2
},
{
"sku": "SERUM-30",
"title": "Vitamin C face serum, 30 ml",
"hsCode": "3304.99.50.00",
"originCountry": "KR",
"value": 32
}
]
}),
});
const data = await response.json();import os, uuid
import requests
response = requests.post(
"https://api.border.bot/v1/cross",
headers={"Authorization": f"Bearer {os.environ['BORDERBOT_TOKEN']}", "Idempotency-Key": str(uuid.uuid4())},
json={
"destinationCountry": "US",
"originCountry": "CN",
"reference": "order-1042",
"currency": "USD",
"shippingCost": 18,
"items": [
{
"sku": "TOY-STACK-01",
"title": "Wooden stacking toy for ages 3+",
"materials": "Beech wood, water-based paint",
"value": 24,
"quantity": 2,
},
{
"sku": "SERUM-30",
"title": "Vitamin C face serum, 30 ml",
"hsCode": "3304.99.50.00",
"originCountry": "KR",
"value": 32,
},
],
},
)
data = response.json()<?php
$ch = curl_init('https://api.border.bot/v1/cross');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('BORDERBOT_TOKEN'),
'Content-Type: application/json',
'Idempotency-Key: ' . bin2hex(random_bytes(16)),
],
CURLOPT_POSTFIELDS => json_encode([
'destinationCountry' => 'US',
'originCountry' => 'CN',
'reference' => 'order-1042',
'currency' => 'USD',
'shippingCost' => 18,
'items' => [
[
'sku' => 'TOY-STACK-01',
'title' => 'Wooden stacking toy for ages 3+',
'materials' => 'Beech wood, water-based paint',
'value' => 24,
'quantity' => 2,
],
[
'sku' => 'SERUM-30',
'title' => 'Vitamin C face serum, 30 ml',
'hsCode' => '3304.99.50.00',
'originCountry' => 'KR',
'value' => 32,
],
],
]),
]);
$data = json_decode(curl_exec($ch), true);Example response (200)#
{
"data": {
"destination": "string",
"reference": "string",
"items": [
{
"sku": "string",
"title": "string",
"hsCode": "string",
"classification": {
"hsCode": "string",
"hsCodeFormatted": "string",
"description": "string",
"confidence": "high",
"probability": 0,
"mode": "string"
},
"originCountry": "string",
"restrictions": [
{
"id": "string",
"source": "string",
"hsCode": "string",
"imposingCountry": "string",
"direction": "string",
"ruleType": "string",
"title": "string",
"summary": "string",
"agency": "string",
"requirement": "string",
"sourceUrl": "string",
"confidence": "string",
"probability": 0
}
],
"filings": [
{
"country": "US",
"agency": "U.S. Consumer Product Safety Commission",
"outcome": "file",
"requirement": "required",
"flags": [
{
"flag": "CP2",
"requirement": "required",
"source": "agency",
"code": "string"
}
],
"category": "Toys",
"certificate": {
"kind": "children",
"code": "CPC"
},
"citations": [
{
"code": "4.6",
"title": "string",
"probability": 0,
"testing": [
{
"code": "1112.15(b)(14)",
"title": "string",
"summary": "string",
"link": "https://www.cpsc.gov/cgi-bin/labsearch/",
"sourceUrl": "https://www.ecfr.gov/current/title-16/section-1112.15",
"regulation": "1501",
"text": "Warning—Do Not Tie Pacifier Around Child's Neck as it Presents a Strangulation Danger.",
"placement": "Each individually packaged pacifier shall bear the labeling statement required in paragraph (a) of this section on the package legibly and conspicuously.",
"labs": [
{
"id": "1001",
"name": "Vartest Laboratories, Inc.",
"country": "US",
"locality": "New York, NY",
"website": "http://www.vartest.com/",
"accreditation": "A2LA (American Association for Lab Accreditation) - 2180.01",
"body": {
"kind": "independent",
"label": "Independent Conformity Assessment Body"
},
"scopes": [
"Small Parts Regulation - 16 CFR Part 1501"
]
}
],
"labCount": 430
}
],
"labelling": [
{
"code": "1112.15(b)(14)",
"title": "string",
"summary": "string",
"link": "https://www.cpsc.gov/cgi-bin/labsearch/",
"sourceUrl": "https://www.ecfr.gov/current/title-16/section-1112.15",
"regulation": "1501",
"text": "Warning—Do Not Tie Pacifier Around Child's Neck as it Presents a Strangulation Danger.",
"placement": "Each individually packaged pacifier shall bear the labeling statement required in paragraph (a) of this section on the package legibly and conspicuously.",
"labs": [
{
"id": "1001",
"name": "Vartest Laboratories, Inc.",
"country": "US",
"locality": "New York, NY",
"website": "http://www.vartest.com/",
"accreditation": "A2LA (American Association for Lab Accreditation) - 2180.01",
"body": {
"kind": "independent",
"label": "Independent Conformity Assessment Body"
},
"scopes": [
"Small Parts Regulation - 16 CFR Part 1501"
]
}
],
"labCount": 430
}
]
}
],
"exemptions": [
{
"code": "string",
"regulation": "string",
"title": "string",
"probability": 0
}
],
"waiver": {
"code": "A",
"title": "string",
"basis": "not_regulated"
},
"intendedUse": {
"code": "081.001",
"title": "string",
"probability": 0
},
"program": {
"code": "NED",
"title": "Non-Radiation Emitting Device",
"parent": {
"code": "DEV",
"title": "Medical Device"
},
"probability": 0
},
"productCode": {
"code": "80FMF",
"scheme": "us-fda",
"codeName": "FDA product code",
"parts": [
{
"level": "string",
"label": "string",
"code": "string",
"description": "string"
}
],
"product": {
"code": "string",
"description": "string"
},
"validated": false,
"probability": 0
},
"declarations": [
{
"codes": [
"PM#"
],
"title": "Device Premarket Number",
"status": "mandatory",
"applies": false,
"probability": 0,
"valueRequired": false
}
],
"priorNotice": {
"required": false,
"probability": 0
},
"probability": 0,
"audience": {
"kind": "children",
"probability": 0.95
},
"alternates": [
{
"code": "1610",
"title": "string",
"probability": 0
}
],
"labelling": [
{
"code": "1112.15(b)(14)",
"title": "string",
"summary": "string",
"link": "https://www.cpsc.gov/cgi-bin/labsearch/",
"sourceUrl": "https://www.ecfr.gov/current/title-16/section-1112.15",
"regulation": "1501",
"text": "Warning—Do Not Tie Pacifier Around Child's Neck as it Presents a Strangulation Danger.",
"placement": "Each individually packaged pacifier shall bear the labeling statement required in paragraph (a) of this section on the package legibly and conspicuously.",
"labs": [
{
"id": "1001",
"name": "Vartest Laboratories, Inc.",
"country": "US",
"locality": "New York, NY",
"website": "http://www.vartest.com/",
"accreditation": "A2LA (American Association for Lab Accreditation) - 2180.01",
"body": {
"kind": "independent",
"label": "Independent Conformity Assessment Body"
},
"scopes": [
"Small Parts Regulation - 16 CFR Part 1501"
]
}
],
"labCount": 430
}
],
"needsReview": false,
"why": [
"string"
],
"sources": [
"string"
]
}
],
"agencyCodes": [
{
"agency": "string",
"scheme": "us-fda",
"code": "16AYN07",
"validated": false
}
],
"verdict": "clear"
}
],
"comply": {
"available": true,
"checkId": "0199c3a2-7b4e-7d21-9f3a-2c5e8b1d4f60",
"fileCount": 0,
"disclaimCount": 0,
"reviewCount": 0
},
"restrict": {
"available": true,
"checkId": "0199c3a2-7b4e-7d21-9f3a-2c5e8b1d4f60",
"matchCount": 0,
"hasProhibitions": false,
"hasRestrictions": false
},
"landedCost": {
"destinationCountry": "string",
"currency": "string",
"exchangeRate": 0,
"transportMode": "string",
"shipmentChannel": "string",
"shippingTerms": "string",
"deMinimis": {
"threshold": 0,
"exempt": false,
"taxThreshold": 0,
"taxExempt": false
},
"customsValue": 0,
"lines": [
{
"kind": "duty",
"name": "string",
"type": "string",
"code": "string",
"rate": "string",
"amount": 0,
"agreement": "string",
"category": "customs_processing",
"publisher": {
"code": "string",
"label": "string"
},
"collectedBy": "border",
"estimated": false,
"exemptedBy": "9903.05.86",
"legalBasis": "Section 301 (failure to prohibit imports made with forced labour, 60 economies); USTR notice 91 FR 47318 (FR 2026-15181); CBP CSMS 69326983; HTSUS ch. 99 subch. III U.S. note 52",
"sourceUrl": "https://www.federalregister.gov/d/2026-15181",
"exemption": {
"code": "9903.05.86",
"name": "Products listed in U.S. note 52(b)",
"application": "automatic",
"kind": "string",
"legalBasis": "U.S. note 52(b)",
"sourceUrl": "https://www.federalregister.gov/d/2026-15181",
"proof": null,
"alternatives": [
{
"code": "9903.05.86",
"name": "Products listed in U.S. note 52(b)",
"application": "automatic",
"kind": null,
"legalBasis": "U.S. note 52(b)",
"sourceUrl": "https://www.federalregister.gov/d/2026-15181"
}
]
}
}
],
"totals": {
"goods": 0,
"shipping": 0,
"insurance": 0,
"duties": 0,
"fees": 0,
"taxes": 0,
"dutiesTaxesFees": 0,
"landedCost": 0
},
"notes": [
"string"
],
"upstreamRequestId": "string",
"dataSource": {
"version": "string",
"importedAt": "string",
"datasets": [
{
"dataset": "US:rates",
"seq": 0,
"releaseId": "0199c3a2-7b4e-7d21-9f3a-2c5e8b1d4f60",
"version": "string",
"liveSince": "string"
}
]
},
"engine": "borderbot",
"schedule": "string",
"region": "string",
"entryDate": "string",
"entryType": "formal",
"declaration": {
"type": "full",
"term": "string"
},
"filing": {
"method": "electronic",
"preparedBy": "declarant"
},
"estimated": false,
"needs": [
"string"
],
"sources": [
{
"label": "string",
"url": "string"
}
],
"sellerTaxes": 0,
"flatDuty": {
"rate": "string",
"amount": 0
},
"validation": [
{
"rule": "string",
"action": "reject",
"code": "string",
"message": "string",
"itemIndex": 0
}
],
"catalog": [
{
"index": 0,
"productId": "string",
"itemId": "string",
"sku": "string",
"title": "string",
"schedule": "string",
"classificationId": "string",
"code": "string",
"filled": [
"string"
]
}
],
"items": [
{
"index": 0,
"hsCode": "string",
"hsCodeFormatted": "string",
"originCountry": "string",
"customsValue": 0,
"duty": 0,
"rateFound": false,
"tradeAgreement": "string",
"lines": [
{
"kind": "duty",
"name": "string",
"type": "string",
"code": "string",
"rate": "string",
"amount": 0,
"agreement": "string",
"category": "customs_processing",
"publisher": {
"code": "string",
"label": "string"
},
"collectedBy": "border",
"estimated": false,
"exemptedBy": "9903.05.86",
"legalBasis": "Section 301 (failure to prohibit imports made with forced labour, 60 economies); USTR notice 91 FR 47318 (FR 2026-15181); CBP CSMS 69326983; HTSUS ch. 99 subch. III U.S. note 52",
"sourceUrl": "https://www.federalregister.gov/d/2026-15181",
"exemption": {
"code": "9903.05.86",
"name": "Products listed in U.S. note 52(b)",
"application": "automatic",
"kind": "string",
"legalBasis": "U.S. note 52(b)",
"sourceUrl": "https://www.federalregister.gov/d/2026-15181",
"proof": null,
"alternatives": [
{
"code": "9903.05.86",
"name": "Products listed in U.S. note 52(b)",
"application": "automatic",
"kind": null,
"legalBasis": "U.S. note 52(b)",
"sourceUrl": "https://www.federalregister.gov/d/2026-15181"
}
]
}
}
],
"regulatory": [
{
"code": "string",
"name": "string",
"description": "string",
"agency": "string",
"measureType": "string",
"condition": "string"
}
],
"options": [
{
"tier": "general",
"programme": {
"code": "string",
"name": "string",
"agreement": "string",
"proof": "string"
},
"rate": "string",
"amount": 0,
"estimated": false,
"applied": false,
"condition": {
"kind": "pharmaceutical",
"code": "string",
"label": "string"
},
"quota": "string",
"relief": {
"code": "string",
"name": "string",
"kind": "autonomous_suspension"
}
}
],
"claims": {
"available": [
{
"code": "9903.94.06",
"name": "string",
"affects": "string",
"affectsCode": "9903.94.05",
"kind": "string",
"legalBasis": "U.S. note 33(h)",
"sourceUrl": "string",
"proof": "string",
"condition": null
}
],
"applied": [
{
"code": "string",
"name": "string",
"application": "automatic"
}
]
},
"availableExemptions": [
"string"
],
"contentHints": [
{
"code": "9903.82.06",
"name": "string",
"fields": [
"materials[steel].weightKg",
"materials[steel].origins.melt_pour"
],
"note": "string"
}
],
"entryCodes": [
{
"code": "9903.05.90",
"role": "exemption",
"name": "Goods under Section 232 aren’t subject to the forced-labour duties (U.S. note 52(f))",
"type": "S301_FORCED_LABOUR",
"lines": [
"9903.05.31"
]
},
{
"code": "9903.94.05",
"role": "additional",
"name": "Section 232 automobile parts (25%)",
"type": "S232_AUTO_PARTS",
"lines": [
"9903.94.05"
]
},
{
"code": "8471300100",
"role": "tariff",
"name": "General rate",
"type": "CUSTOMS_DUTY",
"lines": [
"84713001"
]
}
],
"entryCodeOrder": {
"label": "string",
"url": "string"
}
}
]
},
"summary": {
"clear": 0,
"action_needed": 0,
"prohibited": 0,
"review": 0
}
},
"credits": {
"charged": 0,
"remaining": 0,
"usageId": "string"
},
"replayed": false
}