REST API for import duty rates, HS code classification, landed cost calculation, and FTA savings. One API call returns duty + VAT + anti-dumping + documents for any product into any country.
Duty + VAT/GST + anti-dumping + social welfare surcharge. Handles Brazil's 5-tax sequential stack and India's BCD+SWS+IGST+exemptions.
Describe your product in plain English. AI returns the correct HS code with confidence score. Cache-first, vector-search, Claude fallback.
60+ trade agreements. Automatically finds preferential rates for your origin-destination pair. Shows the agreement name and saving amount.
Every tariff lookup checks SANCTIONS_MEASURE first. Blocked routes return immediately with a clear warning. Never cached.
Simple, transparent pricing. No per-transaction fees. No annual contracts.
Get your API key by signing up at customs-compliance.ai/app, then start making requests:
# Get landed cost for importing smartphones (HS 8517) from China to India curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/tariff-lookup \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "commodity_code": "85171400", "import_country": "IN", "export_country": "CN", "customs_value": 10000, "currency": "USD" }'
All requests require an API key in the X-API-Key header:
X-API-Key: ci_live_your_key_here
Get your key by signing up at customs-compliance.ai/app. Free accounts get 50 lookups per month.
Auth: API key or JWT
| Parameter | Source |
|---|---|
confirm_code | body / query |
description | body / query |
document | body / query |
import_country | body / query |
# classify curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/classify \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "description": "Frozen potato chips, pre-cooked, in 25kg bags", "country": "IN" }'
Enriches Purchase Orders / Sales Orders with full customs intelligence. For each line item: classify HS code → calculate landed cost → list documents → flag savings.
Auth: API key or JWT
| Parameter | Source |
|---|---|
container_type | body / query |
currency | body / query |
dest_port | body / query |
erp_source | body / query |
export_country | body / query |
freight | body / query |
goods_category | body / query |
import_country | body / query |
incoterm | body / query |
inland_dest | body / query |
inland_origin | body / query |
insurance | body / query |
lines | body / query |
origin_port | body / query |
transport_mode | body / query |
volume_cbm | body / query |
weight_kg | body / query |
# enrich-po curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/enrich-po \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "import_country": "GB", "export_country": "CN", "currency": "USD", "lines": [ { "line_id": "1", "description": "Steel bolts M8", "total_value": 750 } ] }'
customs_value is now optional: - Omit for rates-only response (duty %, VAT %, total border rate %) - Include for full calculation with currency amounts
Auth: API key or JWT
| Parameter | Source |
|---|---|
commodity_code | body / query |
container_type | body / query |
currency | body / query |
customs_value | body / query |
dest_port | body / query |
export_country | body / query |
freight | body / query |
goods_category | body / query |
import_country | body / query |
incoterm | body / query |
inland_dest | body / query |
inland_origin | body / query |
insurance | body / query |
origin_port | body / query |
transport_mode | body / query |
volume_cbm | body / query |
weight_kg | body / query |
# tariff-lookup curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/tariff-lookup \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "commodity_code": "85171400", "import_country": "IN", "export_country": "CN", "customs_value": 10000, "currency": "USD" }'
Auth: API key or JWT
Actions: actioned, dismiss, dismiss_all, generate
| Parameter | Source |
|---|---|
alert_id | body / query |
alert_ids | body / query |
limit | body / query |
severity | body / query |
type | body / query |
# alerts curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/alerts \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "actioned" }'
Processes OPPORTUNITIES rows where AIInsight IS NULL. Calls Claude to generate a 2-3 sentence contextual insight per card. Cost: ~£0.002 per card.
Auth: API key or JWT
| Parameter | Source |
|---|---|
batch_size | body / query |
# enrich-opportunities curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/enrich-opportunities \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "batch_size": "..." }'
Auth: API key or JWT
Actions: action, dismiss, dismiss_all, generate, log_behaviour
| Parameter | Source |
|---|---|
action_type | body / query |
export_country | body / query |
import_country | body / query |
limit | body / query |
metadata | body / query |
min_saving | body / query |
opportunity_id | body / query |
opportunity_ids | body / query |
reference_id | body / query |
subheading_code | body / query |
type | body / query |
# opportunities curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/opportunities \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "action" }'
Acumatica ERP OAuth2 integration.
Auth: API key or JWT
Actions: auth, callback, connect_credentials, connect_ropc, disconnect, refresh, status
| Parameter | Source |
|---|---|
client_id | body / query |
client_secret | body / query |
code | body / query |
company_name | body / query |
instance_url | body / query |
password | body / query |
state | body / query |
username | body / query |
# acumatica-connect curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/acumatica-connect \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "auth" }'
Pulls Purchase Orders + Sales Orders from Acumatica, aggregates trade insights (top suppliers, customers, products, countries), converts to USD.
Auth: API key or JWT
Actions: get_po, list_pos, write_back
| Parameter | Source |
|---|---|
currency | body / query |
documents | body / query |
full | body / query |
limit | body / query |
lines | body / query |
order_nbr | body / query |
order_type | body / query |
savings | body / query |
status | body / query |
# acumatica-sync curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/acumatica-sync \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "get_po" }'
Gmail + Outlook OAuth2 connection.
Auth: API key or JWT
Actions: accept_extract, auth_gmail, auth_outlook, callback_gmail, callback_outlook, disconnect, list_extracts, reject_extract, status
| Parameter | Source |
|---|---|
code | body / query |
extract_id | body / query |
platform | body / query |
# email-connect curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/email-connect \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "accept_extract" }'
Reads trade-related emails from Gmail or Outlook, extracts structured context using Claude, stores in EMAIL_CONTEXT_EXTRACT. PRIVACY: Raw email body is NEVER stored — only structured extracts.
Auth: API key or JWT
| Parameter | Source |
|---|---|
data | body / query |
days | body / query |
platform | body / query |
substring | body / query |
# email-sync curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/email-sync \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "data": "...", "days": "...", "platform": "..." }'
Xero OAuth2 integration — handles both the auth redirect and callback.
Auth: API key or JWT
Actions: auth, disconnect, refresh, status
| Parameter | Source |
|---|---|
api_key | body / query |
jwt | body / query |
# xero-connect curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/xero-connect \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "auth" }'
Pulls purchase invoices (ACCPAY) from Xero, extracts line items, classifies products via /classify, and maps supplier countries.
Auth: API key or JWT
Actions: get_bill, list_bills, write_back
| Parameter | Source |
|---|---|
currency | body / query |
documents | body / query |
full | body / query |
invoice_id | body / query |
limit | body / query |
lines | body / query |
order_nbr | body / query |
since | body / query |
status | body / query |
# xero-sync curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/xero-sync \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "get_bill" }'
Admin-only endpoint for tenant management, usage stats, and KPIs. Requires is_admin=true in user metadata.
Auth: JWT (admin)
Actions: active_promotions, analytics, billing_dashboard, classify_erp_items, click_promotion, country_intelligence, cron_status, dashboard, data_browse, data_completeness, data_freshness, delete_user, dismiss_promotion, engagement, invite_user, list_promotions, manage_api_key, notifications, override_plan, referrals, reset_password, reward_config, run_monitor, send_promotion, set_admin, suggestions, tenants, update_notification, update_suggestion, usage, user_detail
| Parameter | Source |
|---|---|
active_only | body / query |
admin_response | body / query |
check | body / query |
columns | body / query |
company_name | body / query |
country | body / query |
days | body / query |
delivery_id | body / query |
delivery_method | body / query |
discount_percent | body / query |
email | body / query |
generate_api_key | body / query |
is_admin | body / query |
limit | body / query |
message | body / query |
notes | body / query |
notification_id | body / query |
offset | body / query |
operation | body / query |
order_col | body / query |
order_dir | body / query |
plan | body / query |
reason | body / query |
status | body / query |
suggestion_id | body / query |
table | body / query |
target_segment | body / query |
target_user_ids | body / query |
tenant_id | body / query |
title | body / query |
updates | body / query |
user_id | body / query |
# admin curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/admin \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "active_promotions" }'
Data maintenance workflow: country overview, sourcing instructions, file upload with diff-preview, approve/reject, spot checks, and feedback.
Auth: JWT (admin or data_maintainer)
Actions: approve, dashboard, get_instructions, list_feedback, list_issues, list_uploads, my_reports, parse_preview, reject, resolve_issue, spot_check, submit_feedback, submit_spot_check, update_instructions, upload
| Parameter | Source |
|---|---|
category | body / query |
commoditycode | body / query |
country_code | body / query |
countrycode | body / query |
description | body / query |
document_rate | body / query |
document_type | body / query |
feedback_id | body / query |
file | body / query |
instruction | body / query |
is_match | body / query |
notes | body / query |
page | body / query |
page_size | body / query |
resolution | body / query |
resolution_notes | body / query |
review_notes | body / query |
source_type | body / query |
suggested_fix | body / query |
suggestion_id | body / query |
system_rate | body / query |
upload_id | body / query |
# data-maintenance curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/data-maintenance \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "approve" }'
Admin-only document management for tariff files.
Auth: JWT (admin)
Actions: delete, download, list, list_all, parse, suggest_metadata
| Parameter | Source |
|---|---|
country_code | body / query |
document_id | body / query |
document_type | body / query |
effective_date | body / query |
file | body / query |
file_name | body / query |
hs_chapter | body / query |
notes | body / query |
source_url | body / query |
text_preview | body / query |
title | body / query |
# tariff-docs curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/tariff-docs \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "delete" }'
Admin endpoint: upload a customs tariff document (PDF/Excel/CSV) for a country. The document is parsed using Claude to extract commodity codes, MFN rates, and VAT rates, then written to the DB.
Auth: JWT (admin)
| Parameter | Source |
|---|---|
country_code | body / query |
document_type | body / query |
file | body / query |
notes | body / query |
# upload-tariff curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/upload-tariff \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "country_code": "...", "document_type": "...", "file": "..." }'
Tenant authentication and provisioning.
Auth: None (public, actions: signup/login) or JWT (actions: me/api_key)
Actions: api_key, login, logout, me, refresh, reset_password, search_hs, signup, update_password
| Parameter | Source |
|---|---|
access_token | body / query |
company_name | body / query |
country | body / query |
email | body / query |
new_password | body / query |
password | body / query |
query | body / query |
redirect_to | body / query |
referral_code | body / query |
refresh_token | body / query |
regenerate | body / query |
# auth curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/auth \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "api_key" }'
Handles Stripe subscription billing: POST { "action": "checkout", "plan": "PRO" } — create Stripe Checkout session POST { "action": "portal" } — create Stripe Customer Portal session POST { "action": "status" } — get current subscription status + usage POST { "action": "webhook" } — Stripe webhook handler (no auth) POST { "action": "increment_lookup" } — atomic usage counter increment POST { "action": "increment_classify" } — atomic usage counter increment
Auth: API key or JWT (webhook action is unauthenticated)
Actions: checkout, increment_classify, increment_lookup, portal, status
| Parameter | Source |
|---|---|
annual | body / query |
plan | body / query |
# billing curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/billing \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "checkout" }'
Agent control panel — manage AI agents, schedules, runs, and feedback.
Auth: JWT (admin)
Actions: approve_actions, auto_schedule, cancel_run, daily_summary, dashboard, get_agent, get_run, list_guidance, list_runs, run_now, schedule, submit_feedback, submit_guidance, toggle_agent
| Parameter | Source |
|---|---|
agent_id | body / query |
approved_actions | body / query |
cron_expression | body / query |
feedback_text | body / query |
guidance | body / query |
is_enabled | body / query |
limit | body / query |
offset | body / query |
rating | body / query |
rejected_actions | body / query |
run_id | body / query |
schedule_id | body / query |
schedule_type | body / query |
scheduled_for | body / query |
scheduled_time | body / query |
status | body / query |
# agent-control curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/agent-control \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "approve_actions" }'
User-facing engagement: referrals, suggestions, rewards.
Auth: API key or JWT
Actions: get_referral_link, my_referrals, my_rewards, my_suggestions, refer, referral_dashboard, should_prompt_referral, suggest, track_click
| Parameter | Source |
|---|---|
category | body / query |
referee_email | body / query |
referee_name | body / query |
referral_code | body / query |
suggestion | body / query |
# engage curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/engage \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "get_referral_link" }'
Automated freight rate collection via email RFIs. Sends rate enquiries to forwarders, extracts structured rates from replies using Claude, and writes approved rates into FREIGHT_RATE.
Auth: API key or JWT
Actions: add_forwarder, approve_rates, check_responses, create_rfi, list_forwarders, rate_comparison, review_extraction, rfi_dashboard, send_rfi, suggest_rfis
| Parameter | Source |
|---|---|
company_name | body / query |
contact_email | body / query |
contact_name | body / query |
container_type | body / query |
country_code | body / query |
data | body / query |
dest_port | body / query |
forwarder_ids | body / query |
lanes | body / query |
origin_port | body / query |
platform | body / query |
response_ids | body / query |
rfi_id | body / query |
speciality_modes | body / query |
speciality_regions | body / query |
# freight-rfi curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/freight-rfi \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "add_forwarder" }'
Auth: API key or JWT
| Parameter | Source |
|---|---|
active_destinations | body / query |
active_origins | body / query |
annual_volume_range | body / query |
business_type | body / query |
primary_hs_chapters | body / query |
target_markets | body / query |
# onboard curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/onboard \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "active_destinations": "...", "active_origins": "...", "annual_volume_range": "..." }'
Public endpoint — no auth required. Returns platform stats for landing page, SEO pages, and AI agents. Cached in-memory for 5 minutes.
Auth: None (public)
# stats curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/stats \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ }'
Auth: API key or JWT
Actions: update, upload_context
| Parameter | Source |
|---|---|
active_destinations | body / query |
active_origins | body / query |
annual_volume_range | body / query |
business_type | body / query |
document_name | body / query |
document_text | body / query |
primary_hs_chapters | body / query |
target_markets | body / query |
# tenant-profile curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/tenant-profile \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "update" }'
Training, onboarding, and progression for trade analysts. Manages training modules, quiz attempts, analyst invitations, assignments, improvement suggestions, XP tracking, and career progression.
Auth: JWT (admin or data_maintainer)
Actions: activity_log, check_promotion, complete_module, get_module, invite_maintainer, leaderboard, list_maintainers, modules, my_improvements, progression, promote, quiz_results, reset_training, start_quiz, status, submit_improvement, submit_quiz, update_assignment
| Parameter | Source |
|---|---|
analyst_id | body / query |
answers | body / query |
assigned_countries | body / query |
assigned_freight_lanes | body / query |
attempt_id | body / query |
description | body / query |
email | body / query |
evidence | body / query |
full_name | body / query |
impact_estimate | body / query |
maintainer_id | body / query |
module_code | body / query |
role | body / query |
suggestion_type | body / query |
time_spent_seconds | body / query |
title | body / query |
track | body / query |
# training curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/training \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "activity_log" }'
UK NCTS Phase 5 Transit Declarations via HMRC CTC Traders API v2.1
Auth: API key or JWT
Actions: create, list, messages, status, submit
| Parameter | Source |
|---|---|
departure_id | body / query |
enrichment | body / query |
hmrc_token | body / query |
ie015_xml | body / query |
sandbox | body / query |
substring | body / query |
transit | body / query |
type | body / query |
# transit curl -X POST https://epytgmksddhvwziwxhuq.supabase.co/functions/v1/transit \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "create" }'
{
"status": "error",
"error": "Commodity code 99999999 not found for IN"
}
403 Sanctions Block
{
"status": "BLOCKED",
"blocked_reason": "SANCTIONS",
"message": "This trade route is subject to active sanctions. Do not proceed."
}
401 Unauthorized
{
"error": "Authentication required."
}
429 Rate Limited
{
"error": "FREE plan limit reached (10 lookups/month). Upgrade for more.",
"upgrade_url": "https://customs-compliance.ai/#pricing"
}
51 countries with national tariff data, preferential rates, and import conditions:
Full national tariff data: IN (India), GB (UK), US (USA), CN (China), ZA (South Africa), NA (Namibia), BR (Brazil), MX (Mexico), AU (Australia), AE (UAE), SA (Saudi Arabia), TH (Thailand), PH (Philippines), AR (Argentina), CL (Chile), UY (Uruguay), OM (Oman), MU (Mauritius), AO (Angola), DO (Dominican Republic)
EU Common External Tariff (27 countries): AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE
| Plan | Lookups/month | Rate |
|---|---|---|
| Free | 50 | 5 req/min |
| Pro | 500 | 30 req/min |
| Business | 2,000 | 60 req/min |
| Enterprise | Unlimited | 120 req/min |
Get your API key in 30 seconds. Free tier includes 50 lookups/month.
Get API Key →Generated from source on 2026-04-10 00:36 UTC by scripts/generate_api_docs.py