PATCH Shipments
Use this endpoint to update existing shipments.
User level: Advanced
Endpoint
PATCH /v1/{scopeId}/shipments/{id}| Property | Value |
|---|---|
| Method | PATCH |
| Scope ID | Branch UUID |
| Authentication | Authorization: Bearer <access_token> |
| Required scope | routix:shipments:write |
| Content-Type | application/json |
| Request body | JSON object |
Update rules
- The API validates server-side whether the record belongs to the allowed organization and branch.
- Only explicitly allowed fields can be updated.
- Unknown or disallowed fields return
400 invalid_update.
Allowed update fields
| Field |
|---|
account_id |
order_id |
trip_id |
status |
total_weight_kg |
total_volume_m3 |
Example request
curl -X PATCH "https://api.routix.com/v1/550e8400-e29b-41d4-a716-446655440000/shipments/4b21ab6b-0a08-4a17-a8f2-1b7cb7b4cf0f" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
-H "Content-Type: application/json" \
-d '{
"status": "planned",
"total_weight_kg": 1240
}'Example response
{
"data": {
"id": "4b21ab6b-0a08-4a17-a8f2-1b7cb7b4cf0f",
"account_id": "7ecf4b8d-8d1f-4a0f-8e57-6d8f14c6a221",
"order_id": "0ea1dd6b-3a97-4284-a2b1-6c0f80a9ec39",
"trip_id": "8c6f6b38-c46c-486d-9ee6-0b2ec458f3f1",
"status": "planned",
"total_weight_kg": 1240,
"total_volume_m3": 5.4
},
"version": "v1"
}Error response
{
"error": "invalid_update",
"error_description": "One or more fields are not allowed for updates on shipments"
}Possible error codes
400 invalid_request400 invalid_update401 unauthorized401 invalid_token403 invalid_token_type403 insufficient_scope404 not_found405 method_not_allowed
Related pages
- Shipments GET
- API calls & examples
- Setup guide
Last updated on

