Skip to Content

PATCH Vehicles

Gebruik dit endpoint om bestaande vehicles bij te werken.

Gebruikersniveau: Gevorderd

Endpoint

PATCH /v1/{scopeId}/vehicles/{id}
EigenschapWaarde
MethodPATCH
Scope IDOrganization UUID
AuthenticatieAuthorization: Bearer <access_token>
Vereiste scoperoutix:vehicles:write
Content-Typeapplication/json
Request bodyJSON object

Update-regels

  • De API controleert server-side of het record binnen de toegestane organization valt.
  • Alleen expliciet toegestane velden mogen worden bijgewerkt.
  • Onbekende of niet-toegestane velden geven 400 invalid_update.

Toegestane updatevelden

Veld
description
license_plate
brand
model
year
status

Voorbeeldrequest

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" }'

Voorbeeldresponse

{ "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" }

Foutresponse

{ "error": "invalid_update", "error_description": "One or more fields are not allowed for updates on vehicles" }

Mogelijke foutcodes

  • 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

Gerelateerde pagina’s

  • API calls en voorbeelden
  • Setup guide
Last updated on