Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request GET \
--url 'https://api.aisa.one/apis/v1/trade/companies/co_g7sfqjqgfxj3/shipments?limit=1&role=importer' \
--header 'Authorization: Bearer <token>'curl --request GET \
--url https://api.aisa.one/apis/v1/trade/companies/{id}/shipments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/trade/companies/{id}/shipments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/trade/companies/{id}/shipments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/trade/companies/{id}/shipments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/trade/companies/{id}/shipments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/trade/companies/{id}/shipments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/trade/companies/{id}/shipments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"bill_of_lading": "<string>",
"brand": "<string>",
"date": "<string>",
"description": "<string>",
"description_full": "<string>",
"description_truncated": true,
"exporter": {
"country": "<string>",
"id": "<string>",
"name": "<string>"
},
"hs_code": "<string>",
"importer": {
"country": "<string>",
"id": "<string>",
"name": "<string>"
},
"incoterm": "<string>",
"loading_port": "<string>",
"origin_country": "<string>",
"quantity": 123,
"quantity_unit": "<string>",
"reported_by": {
"country": "<string>",
"flow": "import"
},
"transport": "sea",
"unit_price_usd": 123,
"unloading_port": "<string>",
"value_usd": 123,
"weight_kg": 123
}
],
"has_more": true,
"next_cursor": "<string>",
"notice": "<string>",
"query": {
"data_through": "<string>"
},
"total": 123
}Global Trade & Customs
List a company's historical customs shipments
Global Trade & Customs API (trade.companies.id.shipments)
GET
https://api.aisa.one
/
apis
/
v1
/
trade
/
companies
/
{id}
/
shipments
Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request GET \
--url 'https://api.aisa.one/apis/v1/trade/companies/co_g7sfqjqgfxj3/shipments?limit=1&role=importer' \
--header 'Authorization: Bearer <token>'curl --request GET \
--url https://api.aisa.one/apis/v1/trade/companies/{id}/shipments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/trade/companies/{id}/shipments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/trade/companies/{id}/shipments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/trade/companies/{id}/shipments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/trade/companies/{id}/shipments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/trade/companies/{id}/shipments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/trade/companies/{id}/shipments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"bill_of_lading": "<string>",
"brand": "<string>",
"date": "<string>",
"description": "<string>",
"description_full": "<string>",
"description_truncated": true,
"exporter": {
"country": "<string>",
"id": "<string>",
"name": "<string>"
},
"hs_code": "<string>",
"importer": {
"country": "<string>",
"id": "<string>",
"name": "<string>"
},
"incoterm": "<string>",
"loading_port": "<string>",
"origin_country": "<string>",
"quantity": 123,
"quantity_unit": "<string>",
"reported_by": {
"country": "<string>",
"flow": "import"
},
"transport": "sea",
"unit_price_usd": 123,
"unloading_port": "<string>",
"value_usd": 123,
"weight_kg": 123
}
],
"has_more": true,
"next_cursor": "<string>",
"notice": "<string>",
"query": {
"data_through": "<string>"
},
"total": 123
}Request contract
- Method and path: GET /apis/v1/trade/companies/{id}/shipments
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/trade/companies/{id}/shipments - id: path; required
- cursor: query; optional
- exporter_country: query; optional
- fields: query; optional
- hs_code: query; optional
- importer_country: query; optional
- limit: query; optional
- product: query; optional
- role: query; optional
- since: query; optional
- sort: query; optional
- until: query; optional
{
"operationId": "trade.companies.id.shipments",
"method": "GET",
"path": "/apis/v1/trade/companies/{id}/shipments",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"examples": {
"default": {
"value": "co_g7sfqjqgfxj3"
},
"minimal": {
"value": "co_g7sfqjqgfxj3"
}
},
"in": "path",
"name": "id",
"required": true,
"schema": {
"maxLength": 40,
"minLength": 1,
"pattern": "^[A-Za-z0-9_-]{1,40}$",
"type": "string"
}
},
{
"in": "query",
"name": "cursor",
"required": false,
"schema": {
"maxLength": 200,
"minLength": 1,
"type": "string"
}
},
{
"in": "query",
"name": "exporter_country",
"required": false,
"schema": {
"maxLength": 80,
"minLength": 2,
"type": "string"
}
},
{
"in": "query",
"name": "fields",
"required": false,
"schema": {
"type": "string",
"x-aisa-delimiter": ",",
"x-aisa-item-pattern": "^[a-z][a-z0-9_]{0,39}$",
"x-aisa-maxItems": 40,
"x-aisa-minItems": 1
}
},
{
"in": "query",
"name": "hs_code",
"required": false,
"schema": {
"maxLength": 10,
"minLength": 6,
"pattern": "^[0-9]{6,10}$",
"type": "string"
}
},
{
"in": "query",
"name": "importer_country",
"required": false,
"schema": {
"maxLength": 80,
"minLength": 2,
"type": "string"
}
},
{
"examples": {
"default": {
"value": 1
},
"minimal": {
"value": 1
}
},
"in": "query",
"name": "limit",
"required": false,
"schema": {
"default": 10,
"maximum": 100,
"minimum": 1,
"type": "integer"
}
},
{
"in": "query",
"name": "product",
"required": false,
"schema": {
"maxLength": 100,
"minLength": 2,
"type": "string"
}
},
{
"examples": {
"default": {
"value": "importer"
},
"minimal": {
"value": "importer"
}
},
"in": "query",
"name": "role",
"required": false,
"schema": {
"default": "importer",
"enum": [
"exporter",
"importer"
],
"type": "string"
}
},
{
"in": "query",
"name": "since",
"required": false,
"schema": {
"maxLength": 10,
"minLength": 10,
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
"type": "string"
}
},
{
"in": "query",
"name": "sort",
"required": false,
"schema": {
"default": "date_desc",
"enum": [
"date_asc",
"date_desc"
],
"type": "string"
}
},
{
"in": "query",
"name": "until",
"required": false,
"schema": {
"maxLength": 10,
"minLength": 10,
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based pricing. Published reference price: $0.005 USD per billable unit. Default request estimate: $0.005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.Authorizations
Query Parameters
Response
Normalized successful response