Create a vehicle
https://lemurseye.com/api/v1/vehiclesAdds a vehicle. It starts with no tracker: register one with Register a tracker and fit it with Assign a tracker.
Only plate is required, and it must be unique in your company.
Permission: fleet:write. The token is sent as Authorization: Bearer <token>; see Authentication.
Body (JSON)
platestringrequiredLicence plate. Must be unique in your company.
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
201 The new 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.
- 400
plate is requiredplateis missing or blank. - 409
a vehicle with this plate already existsAnother vehicle has this 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.