Update a vehicle
https://lemurseye.com/api/v1/vehicles/{id}Replaces the vehicle's details. Send every field you want to keep: a field left out is cleared, except plate, which stays as it was.
Read the vehicle first with Retrieve a vehicle, change what you need, and send it back.
Permission: fleet:write. The token is sent as Authorization: Bearer <token>; see Authentication.
Path parameters
iduuidrequiredThe vehicle's id.
Body (JSON)
platestringLicence plate. Left out, it stays as it was.
namestringWhat your team calls it.
makestringManufacturer.
modelstringModel.
modelYearintegerModel year.
categorystringOne of
sedan,suv,pickup,van,minibus,truck,bus,motorcycle.defaultDriverIduuidAn active driver's id.
Response
200 The updated vehicle.
Response fields
iduuidThe vehicle's id.
platestringLicence plate, unique in your company.
namestring | nullWhat your team calls it, e.g.
Van 7.makestring | nullManufacturer.
modelstring | nullModel.
modelYearinteger | nullModel year.
categorystring | nullOne of
sedan,suv,pickup,van,minibus,truck,bus,motorcycle. Sets the fuel consumption defaults.defaultDriverIduuid | nullThe vehicle's usual driver: trips are credited to them unless a driver signs in on the app.
createdAttimestampWhen it was added (ISO 8601, UTC).
Errors
Where a message is listed, it comes back as JSON: { "error": "..." }. Otherwise only the status code is returned.
- 404
vehicle not foundNo vehicle with this id.
- 409
a vehicle with this plate already existsAnother vehicle has the new plate.
- 400
driver not founddefaultDriverIdis not a driver in your company. - 400
driver is inactivedefaultDriverIdis a deactivated driver. - 401
No token, or it has expired.
- 403
The token lacks the permission above.