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

Listar os parceiros comerciais de uma empresa

Os fornecedores ou compradores de uma empresa, ranqueados, com a participação de cada um. Cobrado por parceiro retornado.

Ranqueia as empresas com quem uma empresa negocia: os fornecedores com role=supplier (o padrão) e os compradores com role=buyer. Custa US$ 0,01 por parceiro retornado; um resultado vazio é grátis. share é a fatia do parceiro nos registros da empresa naquela direção, de 0 a 1: poucas fatias grandes significam que a empresa depende de poucos fornecedores ou compradores. Use para encontrar os fornecedores de um concorrente, ou os outros clientes do seu próprio fornecedor. Toda linha tem um ID para os endpoints de empresa. Os parceiros são encontrados pelo nome da empresa como ele aparece nos registros, então, para uma empresa com nome comum, a lista pode incluir parceiros de uma homônima.

  • Cobrança: trade_company US$ 0,01: Uma empresa numa lista de compradores, fornecedores ou parceiros, ou a empresa de um lead.
  • Modo: proxy (o que cada modo significa)

Uma chave de teste (won_test_...) responde a esta requisição com as mesmas empresas de exemplo, sem custo.

GET
/trade/companies/{id}/partners

Autenticação

apiKey
headerAuthorizationBearer <chave de API>

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

Parâmetros de caminho

id*string

Company ID, such as co_8f3k2m9x4p1q. Search results carry it; GET /trade/companies/lookup?q= finds it by name.

Tamanholength <= 40

Parâmetros de consulta

role?string

supplier: the companies it buys from. buyer: the companies it sells to.

Padrão"supplier"
Valores"supplier""buyer"
hs_code?string

HS code, digits only, 6 to 10 digits. Six digits are the same in every country; a longer code is one country's own tariff line, matched by prefix. Find the code of a product with GET /trade/hs-codes.

Tamanholength <= 20
since?string

First day of the date range, YYYY-MM-DD. Default: the first day of the month 12 months before until.

Tamanholength <= 10
until?string

Last day of the date range, YYYY-MM-DD. Default: up to the latest records.

Tamanholength <= 10
sort?string

Rank by number of records, or by declared value.

Padrão"shipments"
Valores"shipments""recorded_value"
limit?integer

How many results to return, 1 to 100. You pay for the results returned.

Intervalo1 <= value <= 100
Padrão10
cursor?string

To get the next page, pass next_cursor of the previous response back unchanged, with the same parameters.

Tamanholength <= 200
max_cost?number

Spending cap for this call in US dollars. If the call could cost more, it fails with budget_exceeded before anything is charged.

Intervalo0 < value
dry_run?boolean

If true, only return the maximum cost of this call. Nothing runs, nothing is charged.

Padrãofalse

Corpo da resposta

The result. With dry_run, only the maximum cost.

application/json
  1. response
data*array<>

The results of this page.

total*integer

How many results match in all. Use it to decide between paging on and narrowing the query.

has_more*boolean

Whether more results follow this page.

next_cursor*|

Pass it as cursor to get the next page. Null on the last page.

query*

The request as it was understood: country names as codes, the default dates filled in. data_through says how recent the records behind the answer are.

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*

What this call was charged, and the balance left.

Requisição de exemplo
curl -X GET 'https://api.won.dev/v1/trade/companies/co_8f3k2m9x4p1q/partners?role=supplier&limit=2'
Resposta de exemplo
{  "data": [    {      "id": "co_2c7h5n0w6r8t",      "name": "SAMPLE DONG NAI COMFORT FURNITURE CO LTD",      "role": "supplier",      "country": "VN",      "shipments": 1325,      "recorded_value_usd": 18240118.6,      "website": "dongnai-comfort.example",      "sample_product": "UPHOLSTERED SOFA WITH WOODEN FRAME, FABRIC COVER",      "share": 0.5421    },    {      "id": "co_4e6g8j0k2m4n",      "name": "SAMPLE SELANGOR UPHOLSTERY SDN BHD",      "role": "supplier",      "country": "MY",      "shipments": 688,      "recorded_value_usd": 6120440.9,      "website": "selangor-upholstery.example",      "sample_product": "RECLINER SOFA SET, LEATHER, 3 SEATER",      "share": 0.2815    }  ],  "total": 3,  "has_more": true,  "next_cursor": "cur_UGFydG5lcnMuMXJ6ZzQ",  "query": {    "id": "co_8f3k2m9x4p1q",    "role": "supplier",    "sort": "shipments",    "since": "2025-11-01",    "until": "2026-11-20",    "data_through": "2026-11-11"  },  "notice": null,  "usage": {    "unit": "trade_company",    "records": 2,    "already_paid": 0,    "cost": 0.02,    "balance": 48.08,    "replayed": false  }}

Última atualização em