LemursEye
Documentation
API

Update a driver

PUThttps://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

  • iduuidrequired

    The driver's id.

Body (JSON)

  • namestringrequired

    Full name.

  • phonestring

    Phone number.

  • licenceNostring

    Driving licence number.

  • licenceExpirydate

    YYYY-MM-DD.

  • tagIdstring

    ID tag the tracker reads. Must be unique in your company.

  • activeboolean

    Defaults to true. Left out on an update, it stays as it was.

  • notesstring

    Free text.

Response

200

The updated driver.

Response fields

  • iduuid

    The driver's id.

  • namestring

    Full name.

  • phonestring | null

    Phone number.

  • licenceNostring | null

    Driving licence number.

  • licenceExpirydate | null

    Licence expiry (YYYY-MM-DD).

  • tagIdstring | null

    ID tag (iButton / RFID) the tracker reads, unique in your company.

  • activeboolean

    Inactive drivers keep their history but cannot sign in or be a vehicle's usual driver.

  • notesstring | null

    Free text.

  • vehicleIdsuuid[]

    Vehicles whose usual driver this is.

  • hasCodeboolean

    Whether an app code has been issued (the code itself is never returned again).

  • createdAttimestamp

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

    No driver with this id.

  • 400
    name is required

    name is missing or blank.

  • 409
    another driver already has this tag

    tagId belongs to another driver.

  • 401

    No token, or it has expired.

  • 403

    The token lacks the permission above.