Create a driver
https://lemurseye.com/api/v1/driversAdds a driver. To let them sign in on the driver app, issue a code with Issue an app code.
Permission: drivers:write. The token is sent as Authorization: Bearer <token>; see Authentication.
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
201 The new 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.
- 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.