LemursEye
Documentation
API

Assign a tracker

PUThttps://lemurseye.com/api/v1/devices/{id}/assign/{vehicleId}

Fits a tracker to a vehicle. From now on its positions are that vehicle's. If it was fitted elsewhere, it moves: the old assignment ends now, and the history stays with each vehicle.

No body.

Permission: device:write. The token is sent as Authorization: Bearer <token>; see Authentication.

Path parameters

  • iduuidrequired

    The tracker's id.

  • vehicleIduuidrequired

    The vehicle to fit it to.

Response

200

The tracker, with its new vehicleId.

Response fields

  • iduuid

    The tracker's id (not its IMEI).

  • imeistring

    The identifier the tracker reports with. For the phone app, the device ID shown in the app.

  • protocolstring | null

    gt06 (Concox), teltonika, h02 (SinoTrack), osmand (the phone app) or other.

  • modelstring | null

    Hardware model, for your records.

  • simMsisdnstring | null

    The SIM's phone number.

  • statusstring

    REGISTERED, or DECOMMISSIONED once retired: its positions are then refused.

  • vehicleIduuid | null

    The vehicle it is fitted to, or null.

  • traccarIdinteger | null

    Internal id in the position bridge. Null for a moment after registering; repaired automatically.

  • notesstring | null

    Free text, e.g. where it is installed.

  • createdAttimestamp

    When it was registered.

  • decommissionedAttimestamp | null

    When it was retired, or null.

Errors

Where a message is listed, it comes back as JSON: { "error": "..." }. Otherwise only the status code is returned.

  • 404
    device not found

    No tracker with this id.

  • 404
    unknown vehicle

    No vehicle with this id.

  • 409
    device is decommissioned

    The tracker is retired: reactivate it first.

  • 401

    No token, or it has expired.

  • 403

    The token lacks the permission above.