Skip to content

Vehicle Management API⚓︎

Vehicle Management API

API Reference

API Changelog

The Vehicle Management API allows you to manage all the vehicles and telematics units of your fleet.

Vehicles⚓︎

As the name implies, the Vehicle Management API is centered around vehicles. Vehicles are addressed and identified by their vehicle_id, which is generated when a vehicle is added to your INVERS OneAPI fleet. The Vehicle Management API provides endpoints to view all vehicles of your fleet in a paged list, but also endpoints to retrieve detailed information about a particular vehicle, such as master data, installed telematics unit, or the latest vehicle state. Furthermore, there is an endpoint to alter the master data of a vehicle, such as VIN, custom name, or license plate.

In the following sections, important parts of the vehicle as it is defined in the Vehicle Management API will be explained in more detail. We recommend you carefully read those sections to understand the basic concepts around vehicles and their assigned telematics units within the INVERS OneAPI.

Master data⚓︎

The master data of a vehicle contains its basic information, such as VIN, license plate, or transmission. If you would like to know exactly which master data can be stored for each vehicle, have a look at the API specification in the box in the top right, or the example below.

Example

This example shows how the master data of a vehicle can look like.

"master_data": {
  "vin": "R1NBDNB16J1000135",
  "license_plate": "RKL-832",
  "brand": "NIU",
  "model": "N1",
  "custom_name": "MyNiuN1",
  "fuel_type": "ELECTRIC",
  "year_of_production": "2020",
  "transmission": "AUTOMATIC",
  "vehicle_type": "MOPED"
}

You can enter and change all vehicle master data as you wish, either by using FleetControl or the Vehicle Management API. Changing a vehicle’s master data has no effect on the vehicle’s connectivity. This data is solely intended for you to identify and filter the vehicles of your fleet.

Custom fields⚓︎

Example

"custom_fields": {
  "seats": "2",
  "color": "black"
}

Use custom fields to add additional information to your vehicles. A custom field essentially is a key/value pair. You can define both, keys and values, freely.

Keys and values are both handled as strings within the Vehicle Management API. Once added to your vehicles, you can use custom fields to filter them within FleetControl or within your own applications.

Tags⚓︎

Example

"tags": [
  "in_maintenance",
  "demo_night"
]

With tags, you can mark vehicles of a fleet and consequently group them by one or multiple tags. This makes them easier to find, e.g. within FleetControl.

You can use any character within tags, a tag can however not be empty or consist exclusively of blanks / whitespace characters.

Life status⚓︎

Each vehicle of your fleet has a life status. The life status is automatically determined by the INVERS OneAPI and provides information about the current connection status of the vehicle. As all vehicles report their status in predefined cycles instead of keeping a permanent cellular connection, the life status is based on the events reported by the vehicle. The status can have four values:

ONLINE
The vehicle has sent any data within the last 35 minutes. It can be assumed that the vehicle is connected and working.
OFFLINE
The vehicle has not sent an event for more than 35 minutes. This does not automatically imply that the vehicle or the installed telematics unit has a problem, but might be a first indicator for connectivity problems. The vehicle might not properly handle vehicle commands, but you can try to send them.
DISAPPEARED
The vehicle cannot be used, as it has disappeared from the API or cloud services of a third-party telematics manufacturer. This applies to CloudConnect vehicles only.
ABSENT
The vehicle was in status OFFLINE for a long time period (>7 days). It is very likely not ready to handle vehicle commands.
SETUP
The vehicle is currently in the telematics unit setup process, it is not yet ready for use. This is the initial value after a vehicle has been added to your fleet via the Vehicle Lifecylce API. The life status is automatically updated to either ONLINE or OFFLINE once the setup process is completed and the vehicle has contacted the INVERS OneAPI. Depending on the type of telematics unit built into the vehicle, the duration of the setup process usually ranges from several seconds to a couple of minutes.

Operation status⚓︎

The operation status is designed to help you group your vehicles based on their current operational status within your fleet. Therefore, unlike the life status, you can set the operation status manually via the Vehicle Management API with PATCH /vehicles/{vehicle_id}/operation-status.

The operation status can be set to one of the following values:

OPERATING
The vehicle is operating and can be actively used by your customers. A vehicle has this status by default.
MAINTENANCE, GARAGE, DEFECT, FRAUD
These four states can be used to denote vehicles of your fleet that are currently under maintenance, permanently broken, have been stolen, or are simply not ready to be used yet. Assigning either one of these states to vehicles has no effect on the usability of those vehicles, i.e. you can still send vehicle commands to any of them. These states simply exist to help you manage the vehicles of your fleet effectively. For example, you can use the states as filter criteria within FleetControl or handle and create different alarms based on the operation status currently set for the vehicle.
DECOMMISSIONED
In contrast to the other states, the DECOMMISSIONED status has actual consequences associated with it. Setting a vehicle to this status is equal to removing the vehicle from the fleet. Subsequently, no commands can be executed on this vehicle anymore. To add a decommissioned vehicle to your fleet again, set the operation status back to one of the other values mentioned above. Vehicles that have the operation status DECOMMISSIONED for more than 90 days will be deleted automatically.

Capabilities⚓︎

Vehicles can execute commands and provide data in the form of vehicle states (see below). However, no vehicle supports all commands. For example, a car will not be able to execute a command such as unlocking its top case. That is why vehicles have capabilities. In order to find out more about capabilities, go to vehicle capabilities.

Command capabilities and vehicle state capabilities are assigned to a vehicle when it is added to your fleet or, more precisely, when a telematics unit is added to the vehicle. When retrieving a vehicle via the Vehicle Management API, both types of capabilities will be present in the response and you can use this information for your rental workflows and other processes you might create on top of the INVERS OneAPI.

Latest vehicle state⚓︎

A vehicle state provides information about the current state of the vehicle and the installed telematics unit. It always consists of hardware-agnostic data, which is independent of the installed telematics unit. All vehicle state values within this part have been normalized/generalized by the INVERS OneAPI, which is one of the key advantages of connecting your vehicles through this API.

Some telematics brands offer additional data that can hardly be generalized to a hardware-agnostic value or where a lot of the value would be lost in generalizing it. If this is the case, those data points will be present in the vehicle state within a separate section, which is then specific to the telematics brand.

Each time a vehicle reports new data in the form of a new vehicle state, it does not necessarily report all data points. There are two reasons for this:

  • Not all vehicle state values can be reported by all vehicle types or telematics brands (see vehicle state capabilities)
  • A telematics unit does not always report all values, e.g. some values are updated and transmitted more frequently than others

In order to compensate for the latter, the Vehicle Management API offers a latest_vehicle_state for each vehicle. It always contains all the vehicle state values the vehicle can report, and for each individual value the most recent one that was received.

Telematics unit⚓︎

The Vehicle Management API also tells you which telematics unit is installed and configured in your vehicle. You can see basic information about the telematics unit, such as the manufacturer, brand, and model. In addition, the telematics_unit_id is part of the telematics_unit property within your vehicle. This ID is assigned by the telematics manufacturer and as such only unique in combination with the brand of the telematics unit.

For example, the QNR of a CloudBoxx is only unique within the telematics brand “CloudBoxx”. For the unique identification of a telematics unit outside of a vehicle, where the vehicle_id serves as the unique identifier, the corresponding telematics brand is always required.

The telematics_unit_id is equivalent to the identifier assigned by the manufacturer.

Example

These are examples for the identifiers that are used as the telematics_unit_id:

  • CloudBoxx: QNR
  • NIU: Device Serial Number
  • OKAI: IMEI

Example⚓︎

The following example shows how to get a list of vehicles in your fleet. First, follow instructions to get an access token in order to retrieve a valid access token for the INVERS OneAPI.

curl -X GET \
    https://api.invers.com/vehicles \
    -H 'Authorization: Bearer ❰access_token❱' \ # (1)
    -H 'Content-Type: application/json'
  1. Don’t forget to fill in your access token.

This route offers cursor-based pagination. If needed, use the limit parameter to limit the length of the resulting list. In order to navigate through the results, use the cursors provided in the result object in subsequent calls and omit the limit. If the request has been successful, a JSON object is returned along with HTTP status code 200.

Depending on the vehicle and the telematics unit installed the extent of information may vary. Here is an example of what the response might look like:

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
{
  "items": [
    {
      "id": "JQ7RP",
      "fleet_id": "F48XD",
      "last_contact_at": "2021-02-17T14:33:12.42Z",
      "created_at": "2021-01-19T13:13:09.952Z",
      "master_data": {
        "vin": "R1NBDNB16J1000135",
        "license_plate": "RKL-832",
        "brand": "NIU",
        "model": "N1",
        "custom_name": "MyNiuN1",
        "fuel_type": "ELECTRIC",
        "year_of_production": "2020",
        "transmission": "AUTOMATIC",
        "vehicle_type": "MOPED"
      },
      "capabilities": {
        "commands": [
          "UNLOCK_TOP_CASE",
          "LOCK_TOP_CASE",
          "DISABLE_DRIVING",
          "ENABLE_DRIVING",
          "DRAW_ATTENTION",
          "UNLOCK_BATTERY_COMPARTMENT"
        ],
        "vehicle_state": [
          "FUEL_LEVEL_IN_PERCENT",
          "TOP_CASE_LOCK",
          "TOP_CASE_LID",
          "POSITION",
          "DRIVING_ENABLED",
          "MILEAGE_IN_KILOMETERS",
          "CELLULAR_SIGNAL_QUALITY",
          "REMAINING_RANGE_IN_KILOMETERS"
        ]
      },
      "telematics_unit": {
        "id": "NBSG7D2A50742X0F",
        "attached_at": "2021-02-08T10:29:00Z",
        "manufacturer": "NIU",
        "brand": "NIU",
        "type": "EMBEDDED"
      },
      "latest_vehicle_state": {
        "mileage_in_kilometers": {
          "value": 70.402,
          "timestamp": "2021-02-17T14:32:55Z"
        },
        "fuel_level_in_percent": {
          "value": 17,
          "timestamp": "2021-02-17T14:32:55Z"
        },
        "remaining_range_in_kilometers": {
          "value": 31.786,
          "timestamp": "2021-02-17T14:32:55Z"
        },
        "cellular_signal_quality": {
          "value": 3,
          "timestamp": "2021-02-17T14:32:55Z"
        },
        "driving_enabled": {
          "value": false,
          "timestamp": "2021-02-17T14:32:55Z"
        },
        "top_case_lock": {
          "value": "UNLOCKED",
          "timestamp": "2021-02-17T14:32:55Z"
        },
        "position": {
          "value": {
            "lat": 50.909826,
            "lon": 8.065595
          },
          "timestamp": "2021-02-17T14:32:53.824Z"
        }
      },
      "life_status": {
        "value": "ONLINE",
        "modified_at": "2020-10-08T10:29:00Z"
      },
      "operation_status": {
        "value": "OPERATING",
        "modified_at": "2020-10-08T12:29:00Z"
      },
      "custom_fields_modified_at": "2020-10-08T10:29:00Z",
      "custom_fields": {
        "seats": "2",
        "color": "black"
      }
    }
  ],
  "cursors": {
    "self": "eyJ2IjpbIjIwMjAtMTEtMTZUMDk6NTc6MjUuNDUwMDAwMFoiLCJOWUNOVSJdLCJkIjpmYWxzZSwicSI6eyJsIjozfX0=",
    "first": "eyJkIjpmYWxzZSwicSI6eyJsIjozfX0=",
    "prev": "eyJ2IjpbIjIwMjAtMTEtMTZUMDk6NTc6MjUuNTYxMDAwMFoiLCJOVEY1VCJdLCJkIjp0cnVlLCJxIjp7ImwiOjN9fQ==",
    "next": "eyJ2IjpbIjIwMjAtMTEtMTZUMDk6NTc6MjUuNzY2MDAwMFoiLCJaOTVSUyJdLCJkIjpmYWxzZSwicSI6eyJsIjozfX0=",
    "last": "eyJkIjp0cnVlLCJxIjp7ImwiOjN9fQ=="
  }
}
Back to top