Responses
Every answer has the same top-level fields, in the same order. What each one holds, how errors look, and the headers that come with them.
Every endpoint answers with the same top-level fields, always in this order. An endpoint leaves out the ones it has no use for and never adds others: anything else it has to say is inside one of them.
| Field | Where | What it holds |
|---|---|---|
data | Every answer | What you asked for: an object, or a list of them. |
total | Trade data and enrichment lists | How many results match in all, not only on this page. |
has_more | Lists | Whether another page follows. See Pagination. |
next_cursor | Lists | What to pass as cursor for the next page. null on the last page. |
query | Trade data, enrichment, account | The request as it was understood. |
notice | Every answer | null, or a sentence about this answer. |
usage | Every answer | What the call cost, and the balance left. |
A search for the buyers of a product, cut to one result:
{
"data": [
{
"id": "co_8f3k2m9x4p1q",
"name": "SAMPLE NORTHFIELD HOME FURNISHINGS INC",
"role": "importer",
"country": "US",
"shipments": 1840,
"recorded_value_usd": 21480350.4,
"website": "northfield-home.example",
"sample_product": "UPHOLSTERED SOFA WITH WOODEN FRAME, FABRIC COVER"
}
],
"total": 4087,
"has_more": true,
"next_cursor": "cur_Zx81kQp4b2JtMW0uMXJ6ZzQ",
"query": {
"role": "importer",
"hs_code": "940161",
"importer_country": "US",
"exclude_forwarders": true,
"sort": "shipments",
"since": "2025-11-01",
"until": "2026-11-20",
"data_through": "2026-11-11"
},
"notice": null,
"usage": {
"unit": "trade_company",
"records": 1,
"already_paid": 0,
"cost": 0.01,
"balance": 48.09,
"replayed": false
}
}data
The answer itself. A list is an array, anything else an object. Finding nothing is not an error: the answer is a 200 with an empty array, or null where the object would be, and it is free.
query
The request as the server understood it, with defaults filled in and countries, codes and dates normalized. Check it first when a result surprises you. It also holds what the server decided for this answer:
| Field | What it says |
|---|---|
query.data_through | The date of the newest record a trade data answer could include. |
query.domain | The website that contacts or a work email were looked for on. |
query.resolution | How a waterfall search went. exhausted: true means asking again will not find more. |
query.scanned | How many companies POST /trade/leads/find looked at to fill the page. |
Cold email answers have no query: what you sent is in data.
notice
null, or one or two plain sentences about this answer: why it is empty, what was left out, what to call next. It is written for an agent to read. Branch on fields, never on the text of notice, which may change.
usage
The last field of every answer. Its shape follows how the endpoint is billed.
One kind of result, counted:
{
"unit": "trade_company",
"records": 20,
"already_paid": 5,
"cost": 0.2,
"balance": 48.8,
"replayed": false
}Several kinds in one call, such as a company profile with its contacts:
{
"cost": 0.13,
"breakdown": [
{ "unit": "trade_company_profile", "records": 1, "already_paid": 0, "cost": 0.04 },
{ "unit": "person_email", "records": 3, "already_paid": 0, "cost": 0.09 }
],
"balance": 48.62,
"replayed": false
}A free endpoint:
{ "cost": 0, "balance": 48.75, "replayed": false }records counts the results that were charged. already_paid counts the ones that came back for free, because your organization paid for each of them in the last 30 days, through any endpoint: the same shipment record, company, profile, contact, person, phone number or job posting. An answer to one question is charged each time the question is asked: a lookup by name (trade_lookup), a market statistics query, an address check (email_verification) and every email sent.
replayed: true with cost: 0 means the answer is the stored one of the same request within the last 24 hours. See Idempotency. Prices are in Billing by result.
Dry runs
Every paid endpoint takes dry_run: true. Nothing runs and nothing is charged: data holds the most the call can cost, and total how many results match when that is already known.
{
"data": {
"dry_run": true,
"max_cost": 0.25,
"breakdown": [
{ "unit": "trade_company", "max_records": 25, "unit_price": 0.01, "max_cost": 0.25 }
]
},
"total": 4087,
"query": { "role": "importer", "hs_code": "940161", "importer_country": "US", "limit": 25 },
"notice": null,
"usage": {
"unit": "trade_company",
"records": 0,
"already_paid": 0,
"cost": 0,
"balance": 49,
"replayed": false
}
}POST /email/campaigns and POST /email/campaigns/{id}/recipients answer a dry run with a preview instead: the same data as the real call, with nothing created and nothing sent.
Errors
An error has a 4xx or 5xx status and one field, error, instead of the ones above. Branch on code: it is stable, the message is not. invalid_input lists every parameter that needs fixing in issues, so one round trip is enough.
{
"error": {
"code": "invalid_input",
"message": "`role` must be one of: importer, exporter.",
"hint": "This endpoint accepts: role, hs_code, product, importer_country, exporter_country, trading_with, exclude_forwarders, sort, since, until, limit, cursor, max_cost, dry_run.",
"issues": [
{ "param": "role", "message": "`role` must be one of: importer, exporter." },
{ "param": "limt", "message": "Unknown parameter `limt`." }
],
"docs_url": "https://won.dev/docs/errors#invalid_input",
"retry_after": null,
"request_id": "req_6f1c0d3a9b8e4f2a8c7d5e4b3a2f1e0d"
}
}A failed request is never charged. Errors lists every code and what to do about it.
Headers
| Header | On | What it says |
|---|---|---|
X-Request-Id | Every response | The ID of the request, also error.request_id. Quote it to support. |
RateLimit-Limit | Every response to a valid key | Requests the key can send back to back. |
RateLimit-Remaining | Every response to a valid key | How many more it can send before it has to pause. |
RateLimit-Reset | Every response to a valid key | Seconds of quiet after which the count starts over. |
Retry-After | Errors where waiting helps | Seconds to wait, the same number as error.retry_after. |
See Rate limits for the RateLimit-* headers.
Formats
- IDs are stable strings that start with their type, and an ID only works with the endpoints of its type.
- Dates are
YYYY-MM-DD, times are ISO 8601 in UTC, countries are ISO 3166 two-letter codes and money is a number of US dollars.
| Prefix | What it is |
|---|---|
co_ | A company |
shp_ | A shipment record |
per_ | A person |
job_ | A job posting |
sig_ | A signal: something that happened at a company |
snd_ | A sender |
cmp_ | A campaign |
rcp_ | A recipient of a campaign |
msg_ | An email that was sent |
rpl_ | A reply |
att_ | A file attached to an email |
evt_ | An event |
whk_ | A webhook |
sup_ | An entry on the do-not-contact list |
task_ | A task: many calls run in the background |
req_ | A request |