LemursEye
Documentation
API

Create a vehicle

POSThttps://lemurseye.com/api/v1/vehicles

Adds 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)

  • platestringrequired

    Licence plate. Must be unique in your company.

  • namestring

    What your team calls it.

  • makestring

    Manufacturer.

  • modelstring

    Model.

  • modelYearinteger

    Model year.

  • categorystring

    One of sedan, suv, pickup, van, minibus, truck, bus, motorcycle.

  • defaultDriverIduuid

    An active driver's id.

Response

201

The new vehicle.

Response fields

  • iduuid

    The vehicle's id.

  • platestring

    Licence plate, unique in your company.

  • namestring | null

    What your team calls it, e.g. Van 7.

  • makestring | null

    Manufacturer.

  • modelstring | null

    Model.

  • modelYearinteger | null

    Model year.

  • categorystring | null

    One of sedan, suv, pickup, van, minibus, truck, bus, motorcycle. Sets the fuel consumption defaults.

  • defaultDriverIduuid | null

    The vehicle's usual driver: trips are credited to them unless a driver signs in on the app.

  • createdAttimestamp

    When 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 required

    plate is missing or blank.

  • 409
    a vehicle with this plate already exists

    Another vehicle has this plate.

  • 400
    driver not found

    defaultDriverId is not a driver in your company.

  • 400
    driver is inactive

    defaultDriverId is a deactivated driver.

  • 401

    No token, or it has expired.

  • 403

    The token lacks the permission above.