POST
https://api.milda.ai/v1/trade-data/candidatesTrade Candidates
application/json01
Description
Trade Data — Candidates
POST /v1/trade-data/candidates
Step 1 of trade data. Given a company, returns the matching companies (candidates) found in the trade database, each with shipment counts.
Request
company_id(required) — Company ID.
Response
List of candidates:
- candidate_id — pass this to the other trade-data endpoints.
- name, country_code
- total_import_shipments, total_export_shipments
Returns 204 No Content if no matches are found.
Flow & credits
Pick a candidate_id from the results and call POST /v1/trade-data/analytics. This candidates step is free.
02
Headers
nameinreqdescription
tokenheaderone ofYour API token, sent as "token: YOUR_API_TOKEN". Send this or Authorization.
Authorizationheaderone ofThe same token in the standard form, sent as "Authorization: Bearer YOUR_API_TOKEN" (the word Bearer, a space, then your token). Send this or token.
03
Request body
TradeCandidatesRequestTradeCandidatesRequesttypereq1 fields
company_idstringyesCompany ID.
04
Responses
200 Successful Response422 Validation Error
Returns a JSON array. Each item:
TradeCandidatetype5 fields
candidate_idstringCandidate id. Pass this to the other trade-data endpoints.
namestring | nullMatched company name.
country_codestring | nullISO country code.
total_import_shipmentsinteger | nullCount of import shipments.
total_export_shipmentsinteger | nullCount of export shipments.