Company Trade Detail API
POST /api/v1/company/companyDetail
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]. Max span: 3 years.
- Required:
Yes - Example:
[20220101, 20241231]
sort
string
Sort field. Supports date, weight.
- Required:
No - Example:
date
order
string
Sort order. asc = ascending, desc = descending. Default: desc.
- Required:
No - Example:
desc
page
integer
Page number. Default: 1, max: 1000.
- Required:
No - Example:
2
page_size
integer
Records per page. Default: 10, max: 50.
- Required:
No - Example:
10
{
"com_role": 2,
"com_id": "1ad397fa1acc309dae3dc54e4a963d4c",
"date": [
20220101,
20241231
],
"sort": "date",
"order": "desc",
"page": 2,
"page_size": 10
}
curl https://api.tradedata.io/api/v1/company/companyDetail \
-H "Authorization: Bearer yourTokenHere" \
-H "Content-Type: application/json" \
-d '{"com_role": 2, "com_id": "1ad397fa1acc309dae3dc54e4a963d4c", "date": [20220101, 20241231], "sort": "date", "order": "desc", "page": 2, "page_size": 10}'
import requests
response = requests.post(
"https://api.tradedata.io/api/v1/company/companyDetail",
headers={
"Authorization": "Bearer yourTokenHere",
"Content-Type": "application/json",
},
json={
"com_role": 2,
"com_id": "1ad397fa1acc309dae3dc54e4a963d4c",
"date": [
20220101,
20241231,
],
"sort": "date",
"order": "desc",
"page": 2,
"page_size": 10,
},
)
print(response.json())
const response = await fetch("https://api.tradedata.io/api/v1/company/companyDetail", {
method: "POST",
headers: {
"Authorization": "Bearer yourTokenHere",
"Content-Type": "application/json",
},
body: JSON.stringify({
"com_role": 2,
"com_id": "1ad397fa1acc309dae3dc54e4a963d4c",
"date": [
20220101,
20241231
],
"sort": "date",
"order": "desc",
"page": 2,
"page_size": 10
}),
});
const data = await response.json();
<?php
$ch = curl_init("https://api.tradedata.io/api/v1/company/companyDetail");
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" => [
20220101,
20241231
],
"sort" => "date",
"order" => "desc",
"page" => 2,
"page_size" => 10
]),
]);
echo curl_exec($ch);
Response parameters
data
array
Transaction record list.
data.id
string
Transaction record ID.
- Example:
993286241307144194
data.date
string
Transaction date.
- Example:
2024-12-30
data.data_source
string
Data source code.
- Example:
VNM_IMP
data.data_source_en
string
Data source country (English).
- Example:
Vietnam
data.master_bill_no
string
Master bill of lading number.
- Example:
251224GZD24120191
data.supplier_id
string
Supplier company ID.
- Example:
1ad397fa1acc309dae3dc54e4a963d4c
data.buyer_t
string
Buyer company name.
- Example:
Tcl Smart Device Viet Nam Company Limited
data.buyer_id
string
Buyer company ID.
- Example:
87d5add9ccb639ef906303553023dfee
data.supplier_t
string
Supplier company name.
- Example:
Tcl Electronics Hk Limited
data.hs_code
string
HS code.
- Example:
85299091
data.prod_desc
string
Product description.
data.quantity
number
Quantity.
- Example:
8512
data.quantity_unit
string
Quantity unit.
- Example:
Pieces
data.weight
number
Janeght (kg).
- Example:
15749.18
data.amount
number
Trade amount (USD).
- Example:
584859.52
data.incoterms
string
Incoterms.
- Example:
CIF
data.trans_type
string
Transport type.
- Example:
SEA
data.orig_country_code
string
Origin country ISO2 code.
- Example:
CN
data.orig_country_en
string
Origin country name (English).
- Example:
MAINLAND CHINA
data.orig_port
string
Origin port code.
- Example:
CNSHK
data.dest_country_code
string
Destination country ISO2 code.
- Example:
VN
data.dest_country_en
string
Destination country name (English).
- Example:
VIETNAM
data.dest_port
string
Destination port code.
- Example:
VNCLI
total
integer
Total number of records.
- Example:
3129
{
"code": 200,
"success": true,
"data": [
{
"data_source": "VNM_IMP",
"data_source_full": "Vietnam_Import",
"data_source_origin": "IMP_VIETNAM_CD_AEN",
"data_source_en": "Vietnam",
"master_bill_no": "251224GZD24120191",
"buyer_addr": "No. 26 Vsip Ii-A Road No. 32 Vietnam - Singapore Industrial Park II-A Tan Binh Town Bac Tan Uyen District Binh Duong Vietnam",
"supplier_addr": "123 Example Street, Example City",
"price": 68.71,
"incoterms": "CIF",
"trans_type": "SEA",
"orig_port_id": "a4a5a8cc186a3a17bee44bc6dfc2dde2",
"orig_port": "CNSHK",
"dest_port_id": "ab0b2c6a18f63379baf85160b21bab16",
"dest_port": "VNCLI",
"vessel_name": "SITC CEBU 2501W",
"id": "993286241307144194",
"date": "2024-12-30",
"supplier_id": "1ad397fa1acc309dae3dc54e4a963d4c",
"buyer_t": "Tcl Smart Device Viet Nam Company Limited",
"buyer_id": "87d5add9ccb639ef906303553023dfee",
"supplier_t": "Tcl Electronics Hk Limited",
"hs_code": "85299091",
"prod_desc": "12201-500224#&43\" LCD panel used to produce LED screens, 100% new, TV manufacturing capacity",
"quantity": 8512,
"quantity_unit": "Pieces",
"weight": 15749.18,
"amount": 584859.52,
"orig_country_code": "CN",
"orig_country_en": "MAINLAND CHINA",
"dest_country_code": "VN",
"dest_country_en": "VIETNAM"
}
],
"msg": "OK",
"total": 3129,
"pageSize": 10,
"current": 2,
"sumResult": {}
}