Guides
Identifiers and ports
The references the APIs take: container numbers, bills of lading, AWBs, and UN/LOCODE ports.
The APIs are strict about identifiers on purpose. A clean reference in means a clean timeline out.
Container references
TrackingMCP accepts three kinds of reference and resolves each to the same record:
- a container number, for example
MEDU1234562, - a bill of lading,
- a booking reference.
Container numbers carry an ISO 6346 check digit. If the digit fails, the API rejects the number and, where it can, suggests the corrected form rather than tracking the wrong box.
Air waybills
AirCargoMCP takes an 11-digit air waybill, for example 020-12345675. The first three digits are the airline prefix, so there is no carrier picker. You can resolve a prefix on its own:
curl https://api.aircargomcp.com/prefix/020
{ "data": { "prefix": "020", "iata": "LH", "name": "Lufthansa Cargo" } }
Ports are UN/LOCODEs
Schedules and rates speak UN/LOCODE, the five-character port code, for example CNSHA for Shanghai and NLRTM for Rotterdam. If you have a name and not a code, resolve it first:
curl "https://schedulesmcp-api.fly.dev/public/ports/search?q=rotterdam&limit=2"
{
"ok": true,
"data": {
"ports": [
{ "unlocode": "NLRTM", "name": "Rotterdam", "country_code": "NL" }
]
}
}
Two ports can share a name across countries, so always resolve to the code before you query a lane. The country_code in the result tells the Rotterdams apart.
Lanes
A lane is a port pair. Rate and reliability endpoints take a port of loading and a port of discharge as two codes, pol and pod on rates, origin and destination on schedules. Both are required. A lane with no data yet answers 404, not an empty guess.