Company Filter List API
POST /api/v1/company/filterList
Request parameters
com_id
string
Company ID.
- Required:
Yes - Example:
29b4ee2aa03d35248f96d9298c608d16
com_role
integer
Company role in trade. 1 = buyer, 2 = supplier.
- Required:
Yes - Example:
2
date
array<integer>
Date range. Two-element array of 8-digit integers [YYYYMMDD, YYYYMMDD]. Max span: 3 years.
- Required:
Yes - Example:
[20221108, 20231106]
{
"com_id": "29b4ee2aa03d35248f96d9298c608d16",
"com_role": 2,
"date": [
20221108,
20231106
]
}
curl https://api.tradedata.io/api/v1/company/filterList \
-H "Authorization: Bearer yourTokenHere" \
-H "Content-Type: application/json" \
-d '{"com_id": "29b4ee2aa03d35248f96d9298c608d16", "com_role": 2, "date": [20221108, 20231106]}'
import requests
response = requests.post(
"https://api.tradedata.io/api/v1/company/filterList",
headers={
"Authorization": "Bearer yourTokenHere",
"Content-Type": "application/json",
},
json={
"com_id": "29b4ee2aa03d35248f96d9298c608d16",
"com_role": 2,
"date": [
20221108,
20231106,
],
},
)
print(response.json())
const response = await fetch("https://api.tradedata.io/api/v1/company/filterList", {
method: "POST",
headers: {
"Authorization": "Bearer yourTokenHere",
"Content-Type": "application/json",
},
body: JSON.stringify({
"com_id": "29b4ee2aa03d35248f96d9298c608d16",
"com_role": 2,
"date": [
20221108,
20231106
]
}),
});
const data = await response.json();
<?php
$ch = curl_init("https://api.tradedata.io/api/v1/company/filterList");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer yourTokenHere",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"com_id" => "29b4ee2aa03d35248f96d9298c608d16",
"com_role" => 2,
"date" => [
20221108,
20231106
]
]),
]);
echo curl_exec($ch);
Response parameters
data.destPortList
array
Available destination port filter options.
data.destPortList.val
string
Port name.
- Example:
NEW YORK NEWARK AREA NEWARK NEW JERSEY
data.destPortList.count
integer
Number of records through this port.
- Example:
32
data.destPortList.id
string
Port ID.
- Example:
755252869344384e968f3fdc92b1d036
data.origPortList
array
Available origin port filter options.
data.origPortList.val
string
Port name.
- Example:
OSLO
data.origPortList.count
integer
Number of records through this port.
- Example:
121
data.origPortList.id
string
Port ID.
- Example:
e8a1f1ac058d38b4b89557bf4a58d6af
data.origCountryList
array
Available origin country filter options.
data.origCountryList.val
string
Country name (English).
- Example:
NORWAY
data.origCountryList.code
string
Country ISO2 code.
- Example:
NO
data.origCountryList.count
integer
Number of records from this country.
- Example:
622
data.origCountryList.iso3Code
string
Country ISO3 code.
- Example:
NOR
data.destCountryList
array
Available destination country filter options.
data.destCountryList.val
string
Country name (English).
- Example:
MEXICO
data.destCountryList.code
string
Country ISO2 code.
- Example:
MX
data.destCountryList.count
integer
Number of records to this country.
- Example:
394
data.destCountryList.iso3Code
string
Country ISO3 code.
- Example:
MEX
data.originalDataSourceList
array
Raw data source codes used in this query result.
data.incoterms
array
Available incoterms filter options.
data.transType
array
Available transport mode filter options.
data.customs
array
Available customs office filter options.
data.count
integer
Total number of records.
- Example:
1031
{
"code": 200,
"success": true,
"data": {
"destPortList": [
{
"val": "NEW YORK NEWARK AREA NEWARK NEW JERSEY",
"count": 32,
"id": "755252869344384e968f3fdc92b1d036"
}
],
"incoterms": [],
"originalDataSourceList": [],
"origCountryList": [
{
"val": "NORWAY",
"code": "NO",
"count": 622,
"iso3Code": "NOR"
}
],
"transType": [],
"destCountryList": [
{
"val": "MEXICO",
"code": "MX",
"count": 394,
"iso3Code": "MEX"
}
],
"origPortList": [
{
"val": "OSLO",
"count": 121,
"id": "e8a1f1ac058d38b4b89557bf4a58d6af"
}
],
"customs": [],
"count": 1031
},
"msg": "OK",
"total": 0,
"pageSize": 0,
"current": 0,
"sumResult": null
}