Company Trade Partner Analysis API
POST /api/v1/company/companyPartner
Request parameters
com_role
integer
Company role in trade. 1 = buyer, 2 = supplier.
- Required:
Yes - Example:
2
com_id
string
Company ID.
- Required:
Yes - Example:
1ad397fa1acc309dae3dc54e4a963d4c
date
array<integer>
Date range. Two-element array of 8-digit integers [YYYYMMDD, YYYYMMDD].
- Required:
Yes - Example:
[20230101, 20250618]
sort
string
Sort field. Supports count, weight, amount.
- Required:
Yes - Example:
count
order
string
Sort order. asc = ascending, desc = descending. Default: desc.
- Required:
Yes - Example:
desc
page
integer
Page number. Default: 1, max: 1000.
- Required:
Yes - Example:
1
page_size
integer
Records per page. Default: 10, max: 50.
- Required:
Yes - Example:
10
{
"com_role": 2,
"com_id": "1ad397fa1acc309dae3dc54e4a963d4c",
"date": [
20230101,
20250618
],
"supplier_t_or": [],
"supplier_t_not": [],
"order": "desc",
"sort": "count",
"page": 1,
"page_size": 10
}
curl https://api.tradedata.io/api/v1/company/companyPartner \
-H "Authorization: Bearer yourTokenHere" \
-H "Content-Type: application/json" \
-d '{"com_role": 2, "com_id": "1ad397fa1acc309dae3dc54e4a963d4c", "date": [20230101, 20250618], "supplier_t_or": [], "supplier_t_not": [], "order": "desc", "sort": "count", "page": 1, "page_size": 10}'
import requests
response = requests.post(
"https://api.tradedata.io/api/v1/company/companyPartner",
headers={
"Authorization": "Bearer yourTokenHere",
"Content-Type": "application/json",
},
json={
"com_role": 2,
"com_id": "1ad397fa1acc309dae3dc54e4a963d4c",
"date": [
20230101,
20250618,
],
"supplier_t_or": [],
"supplier_t_not": [],
"order": "desc",
"sort": "count",
"page": 1,
"page_size": 10,
},
)
print(response.json())
const response = await fetch("https://api.tradedata.io/api/v1/company/companyPartner", {
method: "POST",
headers: {
"Authorization": "Bearer yourTokenHere",
"Content-Type": "application/json",
},
body: JSON.stringify({
"com_role": 2,
"com_id": "1ad397fa1acc309dae3dc54e4a963d4c",
"date": [
20230101,
20250618
],
"supplier_t_or": [],
"supplier_t_not": [],
"order": "desc",
"sort": "count",
"page": 1,
"page_size": 10
}),
});
const data = await response.json();
<?php
$ch = curl_init("https://api.tradedata.io/api/v1/company/companyPartner");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer yourTokenHere",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"com_role" => 2,
"com_id" => "1ad397fa1acc309dae3dc54e4a963d4c",
"date" => [
20230101,
20250618
],
"supplier_t_or" => [],
"supplier_t_not" => [],
"order" => "desc",
"sort" => "count",
"page" => 1,
"page_size" => 10
]),
]);
echo curl_exec($ch);
Response parameters
data
array
Trade partner list.
data.id
string
Trade partner company ID.
- Example:
87d5add9ccb639ef906303553023dfee
data.val
string
Trade partner company name.
- Example:
TCL SMART DEVICE VIET NAM COMPANY LIMITED
data.amount
string
Total trade amount (USD).
- Example:
1173925527.5577073
data.count
string
Number of transactions.
- Example:
3155
data.weight
string
Total weight (kg).
- Example:
14178229.556259155
total
integer
Total number of partners.
- Example:
1
{
"code": 200,
"success": true,
"data": [
{
"id": "87d5add9ccb639ef906303553023dfee",
"val": "TCL SMART DEVICE VIET NAM COMPANY LIMITED",
"amount": "1173925527.5577073",
"count": "3155",
"weight": "14178229.556259155"
}
],
"msg": "OK",
"total": 1,
"pageSize": 10,
"current": 1,
"sumResult": {}
}
Company Country Analysis API
Retrieve trade statistics grouped by country for a company. The buyer role returns origin countries and the supplier role returns destination countries. Maximum date range is 3 years.
Company Growth Report API
Compare trade partners across two time periods and classify them as new, lost or retained. Use `min_count` to filter out low-frequency partners.