Update a driver
https://lemurseye.com/api/v1/drivers/{id}Replaces the driver's details. Send every field you want to keep: a field left out is cleared, except active, which stays as it was.
Setting active to false also removes them as any vehicle's usual driver.
Permission: drivers:write. The token is sent as Authorization: Bearer <token>; see Authentication.
Path parameters
iduuidrequiredThe driver's id.
Body (JSON)
namestringrequiredFull name.
phonestringPhone number.
licenceNostringDriving licence number.
licenceExpirydateYYYY-MM-DD.tagIdstringID tag the tracker reads. Must be unique in your company.
activebooleanDefaults to
true. Left out on an update, it stays as it was.notesstringFree text.
Response
200 The updated driver.
Response fields
iduuidThe driver's id.
namestringFull name.
phonestring | nullPhone number.
licenceNostring | nullDriving licence number.
licenceExpirydate | nullLicence expiry (
YYYY-MM-DD).tagIdstring | nullID tag (iButton / RFID) the tracker reads, unique in your company.
activebooleanInactive drivers keep their history but cannot sign in or be a vehicle's usual driver.
notesstring | nullFree text.
vehicleIdsuuid[]Vehicles whose usual driver this is.
hasCodebooleanWhether an app code has been issued (the code itself is never returned again).
createdAttimestampWhen the driver was added.
Errors
Where a message is listed, it comes back as JSON: { "error": "..." }. Otherwise only the status code is returned.
- 404
driver not foundNo driver with this id.
- 400
name is requirednameis missing or blank. - 409
another driver already has this tagtagIdbelongs to another driver. - 401
No token, or it has expired.
- 403
The token lacks the permission above.