PATCH Vehicles
Gebruik dit endpoint om bestaande vehicles bij te werken.
Gebruikersniveau: Gevorderd
Endpoint
PATCH /v1/{scopeId}/vehicles/{id}| Eigenschap | Waarde |
|---|---|
| Method | PATCH |
| Scope ID | Organization UUID |
| Authenticatie | Authorization: Bearer <access_token> |
| Vereiste scope | routix:vehicles:write |
| Content-Type | application/json |
| Request body | JSON 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_request400 invalid_update401 unauthorized401 invalid_token403 invalid_token_type403 insufficient_scope404 not_found405 method_not_allowed
Gerelateerde pagina’s
- API calls en voorbeelden
- Setup guide
Last updated on

