Skip to Content

PATCH Vehicles

Use this endpoint to update existing vehicles.

User level: Advanced

Endpoint

PATCH /v1/{scopeId}/vehicles/{id}
PropertyValue
MethodPATCH
Scope IDOrganization UUID
AuthenticationAuthorization: Bearer <access_token>
Required scoperoutix:vehicles:write
Content-Typeapplication/json
Request bodyJSON 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_request
  • 400 invalid_update
  • 401 unauthorized
  • 401 invalid_token
  • 403 invalid_token_type
  • 403 insufficient_scope
  • 404 not_found
  • 405 method_not_allowed
  • API calls & examples
  • Setup guide
Last updated on