# Listar los socios comerciales de una empresa

Source: https://won.dev/es/docs/trade/companies-partners

`GET https://api.won.dev/v1/trade/companies/{id}/partners`

Ordena las empresas con las que comercia una empresa: sus proveedores con `role=supplier` (por defecto) y sus compradores con `role=buyer`. Cuesta USD 0.01 por cada socio devuelto; un resultado vacío es gratis. `share` es la parte del socio en los registros de la empresa en esa dirección, de 0 a 1: unas pocas participaciones grandes significan que la empresa depende de pocos proveedores o compradores. Úsalo para encontrar los proveedores de un competidor, o los otros clientes de tu propio proveedor. Cada fila trae un ID para los endpoints de empresas. Los socios se encuentran por el nombre de la empresa tal como figura en los registros, así que, para una empresa con un nombre común, la lista puede incluir socios de una homónima.

- **Cobro:** `trade_company` USD 0.01: Una empresa en una lista de compradores, proveedores o socios, o la empresa de un lead.
- **Modo:** `proxy` ([qué significa cada modo](/es/docs/trade#modes))

Una clave de prueba (`won_test_...`) responde esta solicitud con las mismas empresas de muestra, sin costo.

## Parámetros [#parameters]

`id` va en la ruta. Los demás van en la cadena de consulta, con las listas separadas por comas.

| Parámetro | Tipo | Obligatorio | Descripción (texto original de la API) |
| --- | --- | --- | --- |
| `id` | string | sí | Company ID, such as `co_8f3k2m9x4p1q`. Search results carry it; `GET /trade/companies/lookup?q=` finds it by name. |
| `role` | `supplier` \| `buyer` | no | `supplier`: the companies it buys from. `buyer`: the companies it sells to. Default: `supplier`. |
| `hs_code` | string | no | 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`. |
| `since` | string | no | First day of the date range, `YYYY-MM-DD`. Default: the first day of the month 12 months before `until`. |
| `until` | string | no | Last day of the date range, `YYYY-MM-DD`. Default: up to the latest records. |
| `sort` | `shipments` \| `recorded_value` | no | Rank by number of records, or by declared value. Default: `shipments`. |
| `limit` | integer | no | How many results to return, 1 to 100. You pay for the results returned. Default: `10`. |
| `cursor` | string | no | To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters. |
| `max_cost` | number | no | Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged. |
| `dry_run` | boolean | no | If true, only return the maximum cost of this call. Nothing runs, nothing is charged. Default: `false`. |

## Respuesta [#response]

Con `dry_run: true` no se ejecuta nada y `data` trae solo lo máximo que puede costar la llamada; consulta [Simulaciones](/es/docs/responses#dry-run). Los errores se describen en [Errores](/es/docs/errors).

| Campo | Tipo | Descripción (texto original de la API) |
| --- | --- | --- |
| `data` | object[] | The results of this page. |
| `data[].id` | string | Company ID, such as `co_8f3k2m9x4p1q`. |
| `data[].name` | string | Name as written on shipping documents. |
| `data[].role` | `supplier` \| `buyer` | What it is to the company asked about. |
| `data[].country` | string \| null | ISO 3166-1 alpha-2 country code, such as `US`. |
| `data[].shipments` | integer | Number of shipment records. A count of records, not a market share: countries that publish every declaration are over-represented. |
| `data[].recorded_value_usd` | number \| null | Sum of the declared values of the records that have one, in US dollars. A lower bound: US bills of lading carry no value. |
| `data[].share` | number \| null | This partner's part of the company's records in the same direction, from 0 to 1. Shows how concentrated its suppliers or buyers are. |
| `data[].website` | string \| null | Bare domain, such as `example.com`. Often null. |
| `data[].sample_product` | string \| null | A goods description from one of its records. |
| `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` | string \| null | Pass it as `cursor` to get the next page. Null on the last page. |
| `query` | object | 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. |
| `query.data_through` | string \| null | Date of the latest record this query can see, `YYYY-MM-DD`. Records arrive weeks after a shipment, so recent months are incomplete. |
| `notice` | string \| null | 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` | object | What this call was charged, and the balance left. |
| `usage.unit` | `trade_record` \| `trade_company` \| `trade_company_profile` \| `trade_lookup` \| `person_email` \| `company_channels` \| `trade_stats` \| `trade_official_stats` \| `market_search` \| `market_listings` \| `market_estimates` | What is counted. |
| `usage.records` | integer | How many were returned and charged. |
| `usage.already_paid` | integer | How many more were returned for free, because this organization paid for them in the last 30 days. |
| `usage.cost` | number | What this call cost, in US dollars. |
| `usage.balance` | number | The balance left after this call, in US dollars. |
| `usage.replayed` | boolean | True when this is a repeat of a request from the last 24 hours. Repeats are free. |

## Ejemplo [#example]

```bash
curl "https://api.won.dev/v1/trade/companies/co_8f3k2m9x4p1q/partners?role=supplier&limit=2" \
  -H "Authorization: Bearer $WON_API_KEY"
```

```json
{
  "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
  }
}
```