REST API · Justified customs classification

    The right customs code, with proof, straight into your systems

    Four endpoints, one API key. Classify one item, a batch of 1 to 100 items, or the same item for several countries among the EU, the United Kingdom, the United States, Norway and Canada. Every response contains a justified final code or the precise question that is missing. A free test key lets you validate the integration before going to production.

    4 REST endpoints
    Batches of 1 to 100 items
    5 countries available · 4 destinations per request
    Free test key
    Reference — HTTP request
    Tip: in Postman, Insomnia or your code, paste only the JSON block into the Body field. The URL, method and headers are set separately. The cURL block is for a terminal.
    1. Endpoint
    POST https://bxrocmhthszinptwduze.supabase.co/functions/v1/classify-api
    2. Headers
    Content-Type: application/json
    X-API-Key: YOUR_API_KEY
    3. Body (JSON) — to paste into the “Body” field of Postman / Insomnia
    {
      "reference": "SKU-ROBE-001",
      "description": "Robe pour femme en tissu de soie (chaîne et trame), 100 % soie, sans doublure",
      "materials": "100 % soie",
      "origin": "CN",
      "jurisdiction": "EU-FR"
    }

    Jurisdictions: EU-FR, UK, US, NO, CA (EU, TARIC), UK, US, NO, CA. The code EU is accepted and applied as EU-FR ; the response shows the code received and the code applied. The reference is mandatory: it is the item's key (the same reference updates the existing item, per country). Without a reference, or with an empty one, the request is refused with a 400 error missing_reference, before any credit is debited.

    4. cURL equivalent (terminal only) — copy the whole block
    curl -X POST https://bxrocmhthszinptwduze.supabase.co/functions/v1/classify-api \
      -H "Content-Type: application/json" \
      -H "X-API-Key: YOUR_API_KEY" \
      -d '{
        "reference": "SKU-ROBE-001",
        "description": "Robe pour femme en tissu de soie (chaîne et trame), 100 % soie, sans doublure",
        "materials": "100 % soie",
        "origin": "CN",
        "jurisdiction": "EU-FR"
      }'
    Response · 200 OK
    {
      "success": true,
      "data": {
        "reference": "SKU-ROBE-001",
        "status": "code",
        "hs_code": "6204491000",
        "question": null,
        "cited_text": null,
        "codes_in_play": [],
        "explanation": "Robe pour femmes, autre qu'en bonneterie : position 6204. Sous-position 6204.49 (d'autres matières textiles), puis 6204.49.10 « de soie ou de déchets de soie ».",
        "jurisdiction": "EU-FR",
        "jurisdiction_input": { "received": "EU-FR", "applied": "EU-FR", "normalized": false },
        "citations": ["RGI 1", "RGI 6"],
        "requires_review": false,
        "missing_info": null,
        "image_analysis": null,
        "inherited_hs6_from": null
      }
    }
    Response · 200 OK — open question
    {
      "success": true,
      "data": {
        "reference": "SKU-ROBE-002",
        "status": "open_question",
        "hs_code": null,
        "question": "Le tissu de votre robe est-il en soie (chaîne et trame) ou en fibres synthétiques ?",
        "cited_text": "6204.4 — Robes : 6204.43 de fibres synthétiques ; 6204.49 d'autres matières textiles",
        "codes_in_play": [
          { "code": "6204430000", "description": "de fibres synthétiques" },
          { "code": "6204491000", "description": "de soie ou de déchets de soie" }
        ],
        "explanation": "La matière du tissu n'est pas déclarée : elle seule départage les sous-positions.",
        "jurisdiction": "EU-FR",
        "jurisdiction_input": { "received": "EU-FR", "applied": "EU-FR", "normalized": false },
        "citations": ["RGI 1", "RGI 6"],
        "requires_review": true,
        "missing_info": { "question": "Le tissu de votre robe est-il en soie (chaîne et trame) ou en fibres synthétiques ?" },
        "image_analysis": null,
        "inherited_hs6_from": null
      }
    }
    Sandbox mode response (cbrd_test_)
    {
      "sandbox": true,
      "warning": "⚠️ MODE BAC À SABLE — Les codes douaniers retournés sont FACTICES et générés à des fins de test technique uniquement (même description = même code). Ne JAMAIS utiliser ces codes pour une déclaration douanière réelle.",
      "success": true,
      "data": {
        "reference": "SKU-ROBE-001",
        "status": "code",
        "hs_code": "8472.48.46.16",
        "question": null,
        "cited_text": null,
        "codes_in_play": [],
        "explanation": "CODE FACTICE généré par le bac à sable CrossbordIA. Ne pas utiliser pour une déclaration douanière réelle.",
        "jurisdiction": "EU-FR",
        "jurisdiction_input": { "received": "EU-FR", "applied": "EU-FR", "normalized": false },
        "citations": ["SANDBOX — citation factice"],
        "requires_review": false,
        "missing_info": null,
        "image_analysis": null,
        "sandbox_fake_code": true
      }
    }
    4
    REST endpoints
    5
    Countries: EU, United Kingdom, United States, Norway, Canada
    1
    Credit per item and per country
    0
    Credits debited on error
    Features

    What the API gives you

    Responses your code can handle without interpretation: a justified final code, or a precise question with the codes in play.

    Simplicity

    Four endpoints

    Synchronous single, bulk of 1 to 100 items, multi-country, bulk multi-country. Same authentication, same item fields.

    Security

    X-API-Key authentication

    The full key is shown only once; only its SHA-256 fingerprint is stored. Deactivate or delete a key from your account.

    International

    Five markets in one request

    Classify an item for EU-FR (TARIC), UK (UK Global Tariff), US (HTS), NO (Tolltariffen) and CA (Customs Tariff). The first 6 digits (HS) are carried over unchanged from one country to another; only the national digits are classified.

    Photo

    Photo in base64

    Attach a photo to a single or multi-country classification. It is only used for visible properties and never establishes the material, the weight or the use. A photo that contradicts the description triggers a question.

    Reliability

    Never a guessed code

    If a fact is missing (weight, material, use…), the response stops at the level reached and contains the question to ask, the rule behind it and the codes in play.

    Robustness

    Explicit errors

    Standard HTTP codes and a stable error code (missing_reference, unknown_jurisdiction, rate_limit_exceeded, insufficient_credits, FEATURE_NOT_INCLUDED…), with retry_after when a limit is exceeded.

    Quotas

    Limits by plan

    Free: 10 requests/min and 100/day. Premium: 60/min and 5,000/day. Pro: 120/min and 20,000/day. Test keys: 20/min and 100/day. The API is not included in the Standard plan.

    Asynchronous

    Batches and webhooks

    Batches (1 to 100 items, or 1 to 50 items for several countries) return a tracking ID. The result can be pushed to your webhook_url, signed (HMAC), with 3 attempts.

    Integration

    4 steps to your first code

    From creating your account to your first justified response.

    01

    Create your account

    The API is included in the Free plan and in the Premium and Pro plans (not in Standard).

    02

    Generate a key

    A test key (dummy codes, no credits) to integrate, then a production key.

    03

    Send an item

    A POST with the reference, the description, the declared attributes and the target country.

    04

    Receive a code or a question

    A justified final code, or the precise question that is missing, with the codes in play.

    Ready to integrate?

    Plug justified customs classification into your systems

    For your developers: a documented REST API, a test key with no credits and explicit errors. For your decision-makers: a code justified by the official texts for every item, a question when a fact is missing, and 1 credit per item and per country, nothing on error.

    Full documentation · Free test key · 10 free credits to try