Record what you know about one container that the carrier did not say: when it was picked up, delivered, or its empty returned. An object sets a milestone, null clears it, a key you leave out is untouched. Answers the box as it now reads — the same shape GET /shipments/{id} publishes in container_milestones.
The carrier wins. Where the carrier reported a milestone for this box, its date is the one shown, and setting your own is a 409 carrier_reported. Clearing is always allowed.
Recorded for your team and the API; free-time clocks and alerts still follow the carrier. It never frees a shipment slot and never stops a shipment refreshing.
Nothing can be set before that box reaches its port of discharge, even when others on the shipment have: 409 not_arrived. at may not be more than 10 minutes in the future, nor before the box landed. Picked up, delivered and empty returned may not go backwards — a delivery no earlier than the pickup, a return no earlier than either — and an empty return needs a pickup on that box first (400). note is up to 120 characters. Only shipments this key’s own user added; a view-only key gets 403 read_only. Answers 404 while manual milestones are switched off for this deployment.
Request
PATCH https://traqocontainer.com/api/v1/shipments/{id}/containers/{number}/milestones
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, or the container / bill-of-lading number you track it by. |
number | path | string | Yes | The container number on that shipment, e.g. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
picked_up | object | null | No | Set picked up, or |
delivered | object | null | No | Set delivered, or |
empty_returned | object | null | No | Set empty returned, or |
Example request
curl -X PATCH "https://traqocontainer.com/api/v1/shipments/MSCU1234567/containers/MSCU1234567/milestones" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"picked_up":{"at":"2026-11-03T14:20:00Z","note":"Truck 14"}}'Run it in the sandbox — no key, no account: the same request answers at https://traqocontainer.com/api/v1/sandbox/shipments/{id}/containers/{number}/milestones with a schema-identical reply.
Responses
Example 200 body:
{
"success": true,
"shipment_id": "SHP-1000",
"data": {
"container_number": "MSCU1234567",
"picked_up": {
"at": "2026-11-03T14:20:00Z",
"source": "manual",
"note": "Truck 14"
},
"delivered": null,
"empty_returned": null
}
}| Status | Meaning |
|---|---|
200 | Saved. The box with every milestone as it now reads. |
400 | Bad request — check required parameters. |
401 | Invalid or missing API key. |
403 | Developer mode not enabled, or the feature is not on your plan. |
404 | Not a shipment in your account ( |
409 |
|
429 | Rate limit exceeded — see the Retry-After header. The body names the plan the limit was computed from ( |
Error bodies and retry advice: Errors.