Fix a shipment already being tracked: its carrier or its type — then it is re-tracked and the stored document refreshed. Both fields are optional and at least one is required; anything omitted keeps its stored value.
An edit CORRECTS a shipment and never re-points it at another container. reference_number is NOT accepted: sending one is a 400, whatever else the body carries. To track a different number, delete this shipment and add the new one — a quick delete usually refunds the slot.
This is the API equivalent of editing a shipment in the dashboard, and the answer to a shipment that landed on the wrong carrier. Before it existed the only routes were ?sealine= on a first add or /shipments/retry-failed, neither of which can re-point a reference you already track at a carrier you name.
An edit CORRECTS a row rather than adding one: it consumes no shipment slot and is not counted against the same-reference daily re-add limit.
A carrier that returns nothing is not an error — the row is updated to what you asked for, carrier discovery is queued, and the response is 200 with still_failed: true. Poll GET /shipments/{id} from there.
Only shipments this key’s own user added: a teammate’s shipment reads 200 on GET and answers 404 here.
customer sets the shipment’s customer, by name. A customer of your account with that name (trimmed, any letter case, not archived; the oldest when two share it) is used, otherwise one is created with the name alone. The shipment is then assigned to that customer and to no other: the field sets the customer, it does not add one more. null or "" removes it. customer alone is a valid body; with carrier or type, both are applied. Reads carry the result as customers. A view-only key gets 403; a plan without customers gets 403 plan_required; at your account’s customer limit a new name is 422 and nothing changes.
Setting the customer sends nothing. But a customer who already has a contact and alerts on is treated exactly as after a dashboard assignment, and can be emailed about this shipment. A customer created through the API has no contact, so nobody can be emailed until a person adds one in the dashboard.
Request
PATCH https://traqocontainer.com/api/v1/shipments/{id}
Your API key as a Bearer token: Authorization: Bearer YOUR_API_KEY.
Rate limit.Each API key gets 120 requests per minute by default; your key's own budget comes back in the X-RateLimit-* headers.Limits by plan.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The shipment id to correct, or the container / bill-of-lading number you track it by. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
carrier | string | No | The carrier SCAC you know is correct, 2-10 alphanumeric characters. |
type | "container" | "bl" | No | Use this when the number was filed as the wrong kind — a bill of lading tracked as a container, or the reverse. |
customer | string | null | No | The customer, by name: found (trimmed, any case) or created with the name alone, and made the shipment’s only customer. |
tags | array | null | No | The shipment’s tags, by name. SETS the list: a name your account has no tag for becomes one, |
custom_fields | object | No | Values by field key. MERGES: only the keys sent change, |
Example request
curl -X PATCH "https://traqocontainer.com/api/v1/shipments/MSCU1234567" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"carrier":"MAEU"}'Run it in the sandbox — no key, no account: the same request answers at https://traqocontainer.com/api/v1/sandbox/shipments/{id} with a schema-identical reply.
Responses
Example 200 body:
{
"success": true,
"shipment_id": "SHP-1000",
"carrier": "MAEU",
"reference_number": "SBXU1184991",
"type": "container"
}| Status | Meaning |
|---|---|
200 | Corrected and re-tracked. |
400 | Bad request — check required parameters. |
401 | Invalid or missing API key. |
402 |
|
403 | Developer mode off; or, with |
404 | Resource not found. |
409 | That reference is already tracked on another shipment in your account; or, with |
422 |
|
429 | Rate limit exceeded — see the Retry-After header. The body names the plan the limit was computed from ( |
503 | Live tracking is temporarily unavailable. Nothing was changed; retry. |
Error bodies and retry advice: Errors.