Start tracking
Add a container, bill of lading or booking to your account. We resolve the carrier, backfill history and keep it live. Both identifier and identifier_type are required; a body without them answers 400 VALIDATION_ERROR.
Request body
The reference to track: a container number, a bill of lading, or a booking. 1 to 50 characters.
What the identifier is. One of container_id, bill_of_lading, booking. Note the keyed surface says booking where the public tracker says booking_number.
Optional SCAC hint, 2 to 10 characters. Omit it and we resolve the line from the container prefix.
Optional labels of your own, up to 20. They come back on the list endpoint and can filter it.
Response fields
Derived from the example response.
Whether the request succeeded.
The payload. Everything an endpoint returns sits under this key.
Stable identifier for the record. On the tracking endpoints this is the container UUID, except on a portfolio summary row, where it is the container number.
The container number, bill of lading or booking this record tracks.
Current normalised status of the shipment. Ocean lifecycle order: discharged, available, delivered, returned_empty. Two values end a shipment, delivered and returned_empty, and returned_empty outranks delivered.
Carrier SCAC.
Where the answer on this call came from: direct_carrier, searates or warm_db.
Errors
A failure carries { "ok": false, "error": { "code", "message", "severity" } }. Branch on the code, and log the message.
The body is not JSON, or identifier or identifier_type is missing or out of range. This is what you get for posting the wrong field names.
The key is missing, malformed or revoked.
The add would take you past the shipment quota on your plan.
No container slot is free on your plan. The body names the plan you would need.
Pay-as-you-go only: the add would cross the spend cap you set.
You are already tracking this identifier. Read the existing record instead of adding it twice.
The same identifier is mid-add on another request. Wait and read it back.
We failed to open the record. Nothing was charged against your quota.
curl -X POST 'https://api.trackingmcp.com/v1/containers' \
-H "Authorization: Bearer tmcp_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"identifier":"MEDU1234562","identifier_type":"container_id"}'const res = await fetch("https://api.trackingmcp.com/v1/containers", {
method: "POST",
headers: {
"Authorization": "Bearer tmcp_YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"identifier": "MEDU1234562",
"identifier_type": "container_id"
})
});
const data = await res.json();import requests
res = requests.post(
"https://api.trackingmcp.com/v1/containers",
headers={"Authorization": "Bearer tmcp_YOUR_API_KEY"},
json={
"identifier": "MEDU1234562",
"identifier_type": "container_id"
},
)
data = res.json() {
"ok": true,
"data": {
"id": "8f1c2d4e-6a3b-4f52-9c70-11ab22cd33ef",
"identifier": "MEDU1234562",
"status": "in_transit",
"carrier_code": "MSCU",
"source": "direct_carrier"
}
}