Class: TradeIntelManager
Trade intelligence: US import bill-of-lading records (US Customs manifests), January 2022 onward, refreshed daily. These endpoints accept and return plain JSON rather than JSON:API, so every method resolves to the response body as the API sent it. They are gated per account: when trade intelligence is not enabled, calls reject withFeatureNotEnabledError (HTTP 403). Invalid input rejects with
ValidationError (400 or 422), and 429 / 502 / 504 responses are retried
with backoff like every other read before RateLimitError or
UpstreamError is thrown.
Volume figures are physical containers (each box counted once), estimated
values are modelled USD estimates rather than declared customs values, and
the current month is partial. Company names are split by state and large
importers use several names, so absent volume does not mean low volume.
Extends
Constructors
Constructor
new TradeIntelManager(transport,defaultFormat?):TradeIntelManager
Parameters
Returns
TradeIntelManager
Inherited from
BaseManager.constructor
Methods
breakdown()
breakdown(Nested totals over a dimension hierarchy, with a grand total and subtotals at every level.request):Promise<{dims: ("scac"|"carrier"|"pol"|"pod"|"reefer"|"origin_country"|"origin_region"|"pod_coast"|"dest_state"|"pol_country"|"container_type"|"company"|"company_state"|"hs4"|"hs2")[];fact:string;filters: {carrier?:string|null;company?:string|null;company_state?:string|null;container_type?:string|null;dest_state?:string|null;hs2?:string|null;hs4?:string|null;origin_country?:string|null;origin_region?:string|null;pod?:string|null;pod_coast?:"EAST"|"WEST"|"GULF"|null;pol?:string|null;pol_country?:string|null;reefer?:boolean|null;scac?:string|null; };measure:"containers"|"teus"|"estimated_value";notes:string[];rows:object&object[];since:string;until:string; }>
Parameters
Returns
Promise<{ dims: ("scac" | "carrier" | "pol" | "pod" | "reefer" | "origin_country" | "origin_region" | "pod_coast" | "dest_state" | "pol_country" | "container_type" | "company" | "company_state" | "hs4" | "hs2")[]; fact: string; filters: { carrier?: string | null; company?: string | null; company_state?: string | null; container_type?: string | null; dest_state?: string | null; hs2?: string | null; hs4?: string | null; origin_country?: string | null; origin_region?: string | null; pod?: string | null; pod_coast?: "EAST" | "WEST" | "GULF" | null; pol?: string | null; pol_country?: string | null; reefer?: boolean | null; scac?: string | null; }; measure: "containers" | "teus" | "estimated_value"; notes: string[]; rows: object & object[]; since: string; until: string; }>
companyProfile()
companyProfile(Import profile for one company over full calendar months.request):Promise<{carriers?:object[];commodities_hs4?:object[];company_name:string;company_state:string|null;destination_states?:object[];found:boolean;monthly?:object[];notes?:string[];origin_countries?:object[];ports_of_discharge?:object[];since:string;totals?: {containers:number;containers_as_consignee:number;containers_as_notify_party:number;states:string[];teus:number; };until:string; }>
company_name
must be the exact name returned by searchCompanies.
Parameters
Returns
Promise<{ carriers?: object[]; commodities_hs4?: object[]; company_name: string; company_state: string | null; destination_states?: object[]; found: boolean; monthly?: object[]; notes?: string[]; origin_countries?: object[]; ports_of_discharge?: object[]; since: string; totals?: { containers: number; containers_as_consignee: number; containers_as_notify_party: number; states: string[]; teus: number; }; until: string; }>
lookupBillOfLading()
lookupBillOfLading(The import record for a master or house bill of lading: containers, parties, and commodity lines. Searches the lastbolNumber,options?):Promise<{bills_matched?:number;bills_truncated?:boolean;bol_number:string;commodities?:object[];commodities_truncated?:boolean;containers?:object[];containers_truncated?:boolean;found:boolean;searched_since:string; }>
months months
(default 12).
Parameters
Returns
Promise<{ bills_matched?: number; bills_truncated?: boolean; bol_number: string; commodities?: object[]; commodities_truncated?: boolean; containers?: object[]; containers_truncated?: boolean; found: boolean; searched_since: string; }>
lookupContainer()
lookupContainer(The most recent US import of a container: its bills of lading, parties, and commodity lines. Resolves withcontainerNumber):Promise<{bills_of_lading?:object[];commodities?:object[];commodities_truncated?:boolean;container_number:string;error?:string;found:boolean;latest_import?: {[key:string]:unknown; };note?:string; }>
found: false (HTTP 200) when the
number is malformed or no import is on record.
Parameters
Returns
Promise<{ bills_of_lading?: object[]; commodities?: object[]; commodities_truncated?: boolean; container_number: string; error?: string; found: boolean; latest_import?: {[key: string]: unknown; }; note?: string; }>
meta()
meta():Index window, history start, partial month, and build time. Also the cheapest way to check whether the account has trade intelligence enabled.Promise<{built_at:string;companies:number;fact_rows: {commodity_month:number;company_month:number;hs_lane_month:number;lane_month:number; };facts_hash:string;facts_since_month:string;facts_until_exclusive:string;hs_codes:number;min_containers:number;mode:string;months:number;partial_month:string;refreshed_since:string;since_month:string;until_month_exclusive:string;volume_measure:string; }>
Returns
Promise<{ built_at: string; companies: number; fact_rows: { commodity_month: number; company_month: number; hs_lane_month: number; lane_month: number; }; facts_hash: string; facts_since_month: string; facts_until_exclusive: string; hs_codes: number; min_containers: number; mode: string; months: number; partial_month: string; refreshed_since: string; since_month: string; until_month_exclusive: string; volume_measure: string; }>
searchCommodities()
searchCommodities(Resolve a product description or HS code prefix to 4-digit HS headings.request):Promise<{results:object[]; }>
Parameters
Returns
Promise<{ results: object[]; }>
searchCompanies()
searchCompanies(Find US importers by name (fuzzy), by what they import (semantic), or both. Results are ranked by match quality, not size.request?):Promise<{index: {built_at:string;companies:number;fact_rows: {commodity_month:number;company_month:number;hs_lane_month:number;lane_month:number; };facts_hash:string;facts_since_month:string;facts_until_exclusive:string;hs_codes:number;min_containers:number;mode:string;months:number;partial_month:string;refreshed_since:string;since_month:string;until_month_exclusive:string;volume_measure:string; };results:object[]; }>
Parameters
Returns
Promise<{ index: { built_at: string; companies: number; fact_rows: { commodity_month: number; company_month: number; hs_lane_month: number; lane_month: number; }; facts_hash: string; facts_since_month: string; facts_until_exclusive: string; hs_codes: number; min_containers: number; mode: string; months: number; partial_month: string; refreshed_since: string; since_month: string; until_month_exclusive: string; volume_measure: string; }; results: object[]; }>
topImporters()
topImporters(Rank US importers by physical containers, optionally for one HS4 heading, port of discharge, or origin country.request?):Promise<{filters: {hs4?:string;origin_country?:string;port_of_discharge?:string; };importers:object[];notes:string[];ranked_by:string;since:string;until:string; }>
Parameters
Returns
Promise<{ filters: { hs4?: string; origin_country?: string; port_of_discharge?: string; }; importers: object[]; notes: string[]; ranked_by: string; since: string; until: string; }>
trends()
trends(Time series of containers, TEUs, or estimated value, optionally split by up to two dimensions. Defaults to the last 24 months including the current, partial month.request?):Promise<{fact:string;filters: {carrier?:string|null;company?:string|null;company_state?:string|null;container_type?:string|null;dest_state?:string|null;hs2?:string|null;hs4?:string|null;origin_country?:string|null;origin_region?:string|null;pod?:string|null;pod_coast?:"EAST"|"WEST"|"GULF"|null;pol?:string|null;pol_country?:string|null;reefer?:boolean|null;scac?:string|null; };group_by: ("scac"|"carrier"|"pol"|"pod"|"reefer"|"origin_country"|"origin_region"|"pod_coast"|"dest_state"|"pol_country"|"container_type"|"company"|"company_state"|"hs4"|"hs2")[];interval:"month"|"quarter"|"year";measure:"containers"|"teus"|"estimated_value";notes:string[];series:object&object[];since:string;until:string; }>
Parameters
Returns
Promise<{ fact: string; filters: { carrier?: string | null; company?: string | null; company_state?: string | null; container_type?: string | null; dest_state?: string | null; hs2?: string | null; hs4?: string | null; origin_country?: string | null; origin_region?: string | null; pod?: string | null; pod_coast?: "EAST" | "WEST" | "GULF" | null; pol?: string | null; pol_country?: string | null; reefer?: boolean | null; scac?: string | null; }; group_by: ("scac" | "carrier" | "pol" | "pod" | "reefer" | "origin_country" | "origin_region" | "pod_coast" | "dest_state" | "pol_country" | "container_type" | "company" | "company_state" | "hs4" | "hs2")[]; interval: "month" | "quarter" | "year"; measure: "containers" | "teus" | "estimated_value"; notes: string[]; series: object & object[]; since: string; until: string; }>