PATCH Vehicles
Use this endpoint to update existing vehicles.
User level: Advanced
Endpoint
PATCH /v1/{scopeId}/vehicles/{id}| Property | Value |
|---|---|
| Method | PATCH |
| Scope ID | Organization UUID |
| Authentication | Authorization: Bearer <access_token> |
| Required scope | routix:vehicles:write |
| Content-Type | application/json |
| Request body | JSON object |
Update rules
- The API validates server-side whether the record belongs to the allowed organization.
- Only explicitly allowed fields can be updated.
- Unknown or disallowed fields return
400 invalid_update.
Allowed update fields
| Field |
|---|
description |
license_plate |
brand |
model |
year |
status |
Example request
curl -X PATCH "https://api.routix.com/v1/123e4567-e89b-12d3-a456-426614174000/vehicles/91eb2f55-bc74-4ebb-a118-8d996a96f2f4" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
-H "Content-Type: application/json" \
-d '{
"status": "active",
"license_plate": "12-ABC-3"
}'Example response
{
"data": {
"id": "91eb2f55-bc74-4ebb-a118-8d996a96f2f4",
"description": "Delivery truck",
"license_plate": "12-ABC-3",
"brand": "Volvo",
"model": "FH",
"year": 2024,
"status": "active"
},
"version": "v1"
}Error response
{
"error": "invalid_update",
"error_description": "One or more fields are not allowed for updates on vehicles"
}Possible error codes
400 invalid_request400 invalid_update401 unauthorized401 invalid_token403 invalid_token_type403 insufficient_scope404 not_found405 method_not_allowed
Related pages
- API calls & examples
- Setup guide
Last updated on

