Zum Inhalt springen
GET /v1/code

An HS code with its description & ancestor chain

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/hscodes-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/hscodes-api/v1/code" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/hscodes-api/v1/code", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/hscodes-api/v1/code");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/hscodes-api/v1/code",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "level": "6",
        "hscode": "090111",
        "parent": "0901",
        "section": "II",
        "ancestors": [
            {
                "level": "4",
                "hscode": "0901",
                "parent": "09",
                "section": "II",
                "description": "Coffee, whether or not roasted or decaffeinated; husks and skins; coffee substitutes containing coffee in any proportion"
            },
            {
                "level": "2",
                "hscode": "09",
                "parent": "TOTAL",
                "section": "II",
                "description": "Coffee, tea, mate and spices"
            },
            {
                "level": "5",
                "hscode": "TOTAL",
                "parent": "TOTAL",
                "section": "TOTAL",
                "description": "Total of all HS2022 commodities"
            }
        ],
        "description": "Coffee; not roasted or decaffeinated"
    },
    "meta": {
        "timestamp": "2026-05-31T02:53:35.119Z",
        "request_id": "9ce47e12-d007-4778-9abf-2a35ce6ab937"
    },
    "status": "ok",
    "message": "HS code retrieved",
    "success": true
}