Pular para o conteúdo
Won.dev
DocumentaçãoReferência da API
API de comércio exterior

Buscar códigos HS

Encontra o código HS de um produto a partir de uma descrição, ou lista os códigos sob um prefixo. Grátis.

Encontra o código HS de um produto a partir de uma descrição em inglês (office chair), ou lista os códigos sob um prefixo (9401). É grátis. Chame primeiro quando você só sabe o nome do produto: todos os outros endpoints de comércio exterior são mais precisos com um hs_code do que com palavras-chave em product. Os códigos de seis dígitos são os mesmos em todos os países (no Brasil, são os seis primeiros dígitos da NCM); passe um como hs_code para os endpoints de busca.

GET
/trade/hs-codes

Autenticação

apiKey
headerAuthorizationBearer <chave de API>

Authorization: Bearer won_live_..., a key from the console.

Parâmetros de consulta

q*string

A product in plain English, such as office chair or led lamp, or the first digits of a code, such as 9401.

Tamanho1 <= length <= 100
limit?integer

How many codes to return, 1 to 50.

Intervalo1 <= value <= 50
Padrão10
fields?array<>

Pass us_duty to add the general US duty rate of every tariff line under each code.

Itensitems <= 5
Padrão[]

Corpo da resposta

The result.

application/json
  1. response
data*array<>

The best matches first.

query*

The request as it was understood: country names as codes, the default dates filled in.

notice*|

A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.

usage*

Nothing is charged here. The balance, for reference.

Requisição de exemplo
curl -X GET 'https://api.won.dev/v1/trade/hs-codes?q=sofa&limit=2'
Resposta de exemplo
{  "data": [    {      "code": "940161",      "description": "Seats (other than those of heading 9402), whether or not convertible into beds, and parts thereof > Other seats, with wooden frames > Upholstered",      "parent": "9401"    },    {      "code": "940171",      "description": "Seats (other than those of heading 9402), whether or not convertible into beds, and parts thereof > Other seats, with metal frames > Upholstered",      "parent": "9401"    }  ],  "query": {    "q": "sofa",    "limit": 2  },  "notice": null,  "usage": {    "cost": 0,    "balance": 48.08,    "replayed": false  }}

Última atualização em