# References (Android)

## Vehicle

| Field              | Type                            | Description                                                                                                                                                                                                                                                                      |
| ------------------ | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| vehicleId          | String                          | Unique identifier of the vehicle                                                                                                                                                                                                                                                 |
| name               | String?                         | <p>Name of the vehicle</p><p><em>Default value: null</em></p>                                                                                                                                                                                                                    |
| brand              | String?                         | <p>Vehicle brand</p><p><em>Default value: null</em></p>                                                                                                                                                                                                                          |
| model              | String?                         | <p>Vehicle model</p><p><em>Default value: null</em></p>                                                                                                                                                                                                                          |
| version            | String?                         | <p>Model version</p><p><em>Default value: null</em></p>                                                                                                                                                                                                                          |
| year               | String?                         | <p>Year version of the vehicle</p><p><em>Default value: “0”</em></p>                                                                                                                                                                                                             |
| typeIndex          | Int                             | <p>Vehicle body type.</p><p>Possible values are listed in <a href="#typeindex">TypeIndex</a>.</p><p><em>Default value : -1</em></p>                                                                                                                                              |
| engineIndex        | Int                             | <p>Engine type. Possible values are listed <a href="https://docs.drivequant.com/backend/vehicle/references#engine-type">here</a>.</p><p><em>Default value : -1</em></p>                                                                                                          |
| power              | Double                          | <p>Vehicle power \[ hp ]. This value must be entered in horsepower. In case you only have the engine power in kW you can apply the following formula:</p><p><code>P \[ hp ] = P \[ kW ] / 0.7355</code></p><p>Min: 40 hp</p><p>Max: 450 hp</p><p><em>Default value : -1</em></p> |
| mass               | Double                          | <p>Vehicle mass \[ kg ]</p><p>Min: 700 kg</p><p>Max: 3500 kg</p><p><em>Default value : -1</em></p>                                                                                                                                                                               |
| engineDisplacement | Double                          | <p>Engine displacement in liter</p><p><em>Default value : -1</em></p>                                                                                                                                                                                                            |
| gearboxIndex       | Int                             | <p>Gearbox type. Possible values are listed <a href="https://docs.drivequant.com/backend/vehicle/references#gearbox-type">here</a>.</p><p><em>Default value : -1</em></p>                                                                                                        |
| autoGearboxNumber  | Int                             | <p>Number of gear ratios for the automatic gearbox. This parameter is taken into account only if « carGearboxIndex » is set to 1.</p><p><em>Default value : -1</em></p>                                                                                                          |
| consumption        | Float                           | <p>Combined fuel consumption \[l/100km] measured during the <em>New European Driving Cycle</em> (NEDC).</p><p>Min: 3 l/100km</p><p>Max: 20 l/100km</p><p><em>Default value : -1</em></p>                                                                                         |
| frontTireSize      | String?                         | <p>Front tire size</p><p><em>Default value : null</em></p>                                                                                                                                                                                                                       |
| rearTireSize       | String?                         | <p>Rear tire size</p><p><em>Default value : null</em></p>                                                                                                                                                                                                                        |
| length             | Double                          | <p>Vehicle’s length in meter</p><p><em>Default value : -1</em></p>                                                                                                                                                                                                               |
| width              | Double                          | <p>Vehicle’s width in meter</p><p><em>Default value : -1</em></p>                                                                                                                                                                                                                |
| height             | Double                          | <p>Vehicle’s height in meter</p><p><em>Default value : -1</em></p>                                                                                                                                                                                                               |
| driveWheels        | Int                             | <p>Number of wheels of the vehicle. Possible values are listed here.</p><p><em>Default value : -1</em></p>                                                                                                                                                                       |
| engineCylinderNb   | Int                             | <p>Number of cylinders</p><p><em>Default value : -1</em></p>                                                                                                                                                                                                                     |
| dqIndex            | String?                         | <p>DriveQuant vehicle index reference</p><p><em>Default value: null</em></p>                                                                                                                                                                                                     |
| detectionMode      | [DetectionMode](#detectionmode) | <p>Detection mode for the vehicle.</p><p><em>Default value: <code>DISABLED</code></em></p>                                                                                                                                                                                       |
| liteConfig         | Boolean                         | Only for advanced configuration. This parameter is usually set to `false`.                                                                                                                                                                                                       |
| ptac               | Double?                         | <p>Total permissible laden weight in kg of the vehicle if its a truck.</p><p><em>Default value : -1</em></p>                                                                                                                                                                     |
| extraData          | Map\<String, String>            | Only for advanced configuration. Map intended for adding some additional information for the vehicle.                                                                                                                                                                            |
| beacon             | [Beacon](#beacon)?              | <p>Beacon paired to the vehicle.</p><p><em>Default value : null</em></p>                                                                                                                                                                                                         |
| bluetooth          | [Bluetooth](#bluetooth)?        | <p>Bluetooth device paired to the vehicle.</p><p><em>Default value : null</em></p>                                                                                                                                                                                               |

{% hint style="info" %}
If your vehicle has a characteristic value to `-1`, DriveQuant servers will use default values to analyze your trip.
{% endhint %}

## VehicleBaseCharacteristics

See [Vehicle](#vehicle) for corresponding fields.

## CarCharacteristics

| Field | Type                                                      | Description                |
| ----- | --------------------------------------------------------- | -------------------------- |
| base  | [VehicleBaseCharacteristics](#vehiclebasecharacteristics) | Characteristics of the car |

## TruckCharacteristics

| Field | Type                                                      | Description                                       |
| ----- | --------------------------------------------------------- | ------------------------------------------------- |
| base  | [VehicleBaseCharacteristics](#vehiclebasecharacteristics) | Characteristics of the truck                      |
| ptac  | Double                                                    | Total permissible laden weight in kg of the truck |

## TypeIndex

<table><thead><tr><th width="148">Value</th><th width="100">Is car?</th><th width="100">Is truck?</th><th>Corresponding vehicle category</th></tr></thead><tbody><tr><td>1</td><td>✅</td><td>❌</td><td>MICRO</td></tr><tr><td>1</td><td>✅</td><td>❌</td><td>COMPACT</td></tr><tr><td>2</td><td>✅</td><td>❌</td><td>SEDAN</td></tr><tr><td>6</td><td>✅</td><td>❌</td><td>SUV</td></tr><tr><td>5</td><td>✅</td><td>❌</td><td>MINIVAN</td></tr><tr><td>9</td><td>✅</td><td>❌</td><td>COMMERCIAL</td></tr><tr><td>3</td><td>✅</td><td>❌</td><td>LUXURY</td></tr><tr><td>7</td><td>✅</td><td>❌</td><td>SPORT</td></tr><tr><td>200</td><td>❌</td><td>✅</td><td>TWO_AXLES_STRAIGHT_TRUCK</td></tr><tr><td>201</td><td>❌</td><td>✅</td><td>THREE_AXLES_STRAIGHT_TRUCK</td></tr><tr><td>202</td><td>❌</td><td>✅</td><td>FOUR_AXLES_STRAIGHT_TRUCK</td></tr><tr><td>203</td><td>❌</td><td>✅</td><td>TWO_AXLES_TRACTOR</td></tr><tr><td>204</td><td>❌</td><td>✅</td><td>THREE_AXLES_TRACTOR</td></tr><tr><td>205</td><td>❌</td><td>✅</td><td>FOUR_AXLES_TRACTOR</td></tr></tbody></table>

## DetectionMode

<table><thead><tr><th width="161">Value</th><th>Description</th></tr></thead><tbody><tr><td>DISABLED</td><td><p>The vehicle is disabled. It means that no trip can be assigned to this vehicle.</p><p>If it is the unique vehicle of the account, autostart will be disabled.</p></td></tr><tr><td>GPS</td><td><p>Each trip will be assigned by default to this vehicle.</p><p>If the account has other vehicles with Beacon or Bluetooth detection modes, every trip where these peripherals are not seen will be assigned to this vehicle.</p></td></tr><tr><td>BEACON</td><td><p>If the vehicle has this detection mode and a configured beacon, every trip where the beacon is seen will be assigned to this vehicle.</p><p>If there is no other vehicle with GPS mode, trips will be canceled if the Beacon is not seen during a trip.</p></td></tr><tr><td>BLUETOOTH</td><td><p>If the vehicle has this detection mode and a configured Bluetooth device, every trip where the peripheral is seen will be assigned to this vehicle.</p><p>If there is no other vehicle with GPS mode, trips will be canceled if the Bluetooth device is not seen during a trip.</p></td></tr></tbody></table>

## Beacon

| Field         | Type   | Description                                                        |
| ------------- | ------ | ------------------------------------------------------------------ |
| proximityUuid | String | UUID of the beacon                                                 |
| major         | Int    | Major code                                                         |
| minor         | Int    | Minor code                                                         |
| code          | String | Unique code that identifies the beacon in our DriveQuant database. |

## Bluetooth

| Field      | Type   | Description            |
| ---------- | ------ | ---------------------- |
| macAddress | String | Peripheral MAC address |
| name       | String | Bluetooth device name  |

## VehicleSyncStatus

| Value                                   | Description                                                                                                                                                                                                                      |
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| NO\_ERROR                               | Synchronization request has been successfully executed. List of vehicles (if they exist) are available in vehicles.                                                                                                              |
| CACHE\_DATA\_ONLY                       | Method has been called with the SynchronizationType parameter to `CACHE` so the list of vehicles stored in the local database request has been successfully executed. List of vehicles (if they exist) are returned in vehicles. |
| FAILED\_TO\_SYNC\_VEHICLES\_CACHE\_ONLY | <p>Synchronization request has failed, for example if the user has no network. List of vehicles stored in the local database (if they exist) are returned in vehicles. </p><p><br></p>                                           |
| SYNC\_ALREADY\_IN\_PROGRESS             | Synchronization request is already called, so the list of vehicles stored in the local database request has been successfully executed. List of vehicles (if they exist) are returned in vehicles.                               |

## VehicleReplaceStatus

| Value            | Description                                                                                  |
| ---------------- | -------------------------------------------------------------------------------------------- |
| SUCCESS          | Vehicle is successfully replaced and changes are saved in the local database.                |
| INVALID\_VEHICLE | Error thrown when the provided vehicleId is incorrect and/or if characteristics are invalid. |
| ERROR            | An error occurred when trying to replace the vehicle. (e.g: device has no network)           |

## DetectionModeStatus

| Value                      | Description                                                                                                                                                                                                                                                                                |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| SUCCESS                    | The detection mode of the specified vehicle has been successfully updated. The new detection mode is automatically saved in the local database.                                                                                                                                            |
| ERROR                      | An error occurred when trying to update the detection mode of the vehicle.                                                                                                                                                                                                                 |
| GPS\_MODE\_ALREADY\_EXISTS | <p>The detection mode of the specified vehicle could not have been updated to <code>GPS</code> because the account already has a vehicle with that detection mode.</p><p>If you still want to do that, you must set <code>forceGPSVehicleUpdate</code> parameter to <code>true</code>.</p> |

## VehicleBluetoothStatus

| Value                  | Description                                                                                                                                                          |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SUCCESS                | The Bluetooth device has been successfully paired to the specified vehicle. The vehicle data in the local database is automatically updated.                         |
| ERROR                  | An error occurred when trying to pair the Bluetooth device to the vehicle                                                                                            |
| UNKNOWN\_VEHICLE       | An error occurred: the specified vehicle does not belong to you.                                                                                                     |
| UNAVAILABLE\_BLUETOOTH | The provided Bluetooth device is currently paired to another vehicle. You must unpair the device to that vehicle before in order to pair it to your desired vehicle. |

## VehicleRemoveBluetoothStatus

| Value            | Description                                                                                                                                    |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| SUCCESS          | The Bluetooth device has been successfully unpaired to the specified vehicle. The vehicle data in the local database is automatically updated. |
| ERROR            | An error occurred when trying to unpair the Bluetooth device to the vehicle                                                                    |
| UNKNOWN\_VEHICLE | An error occurred: the specified vehicle does not belong to the user.                                                                          |

## OdometerSyncStatus

| Value                               | Description                                                                         |
| ----------------------------------- | ----------------------------------------------------------------------------------- |
| SUCCESS                             | Synchronization has been successfully performed.                                    |
| FAILED\_TO\_SYNC\_CACHE\_DATA\_ONLY | Synchronization has failed, only odometer data previously synchronized are returned |
| VEHICLE\_NOT\_FOUND                 | An error occurred: the specified vehicle does not belong to the user.               |
| CACHE\_DATA\_ONLY                   | `SynchronizationType` has been set to `CACHE`.                                      |

## OdometerAddHistoryStatus

| Value               | Description                                                                                                                     |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| SUCCESS             | The history entry has been successfully added to the odometer’s vehicle                                                         |
| FAILED              | An error occurred, for example if the user has no network.                                                                      |
| VEHICLE\_NOT\_FOUND | An error occurred: the specified vehicle does not belong to the user.                                                           |
| BAD\_DISTANCE       | An invalid distance value has been filled, for example if the provided distance is lower than the last distance odometer entry. |

## OdometerUpdateHistoryStatus

| Value               | Description                                                                      |
| ------------------- | -------------------------------------------------------------------------------- |
| SUCCESS             | The history entry has been successfully updated.                                 |
| FAILED              | An error occurred, for example if the user has no network.                       |
| HISTORY\_NOT\_FOUND | There is no matching odometer’s history for the provided historyId and vehicleId |
| VEHICLE\_NOT\_FOUND | An error occurred: the specified vehicle does not belong to the user.            |
| BAD\_DISTANCE       | An invalid distance value has been filled.                                       |

## OdometerDeleteHistoryStatus

| Value                 | Description                                                                      |
| --------------------- | -------------------------------------------------------------------------------- |
| SUCCESS               | The history entry has been successfully deleted.                                 |
| FAILED                | An error occurred, for example if the user has no network.                       |
| HISTORY\_NOT\_FOUND   | There is no matching odometer’s history for the provided historyId and vehicleId |
| VEHICLE\_NOT\_FOUND   | An error occurred: the specified vehicle does not belong to the user.            |
| LAST\_ODOMETER\_ERROR | An error occurred: it is not possible to delete the last odometer history.       |

## VehicleOdometer

| Field                 | Type   | Description                                                                   |
| --------------------- | ------ | ----------------------------------------------------------------------------- |
| vehicleId             | String | Unique identifier of the vehicle                                              |
| analyzedDistance      | Double | Distance accumulated during all the analyzed trips in km                      |
| distance              | Double | Odometer last distance entry                                                  |
| estimatedYearDistance | Double | Estimated traveled distance for year in km                                    |
| estimatedYearNbTrip   | Double | Estimated number of trip for the current year                                 |
| offsetDistance        | Double | Difference between the real odometer distance and the analyzed distance in km |
| realDistance          | Double | Real odometer distance in km                                                  |
| yearAnalyzedDistance  | Double | Distance accumulated during all the analyzed trips for the current year in km |
| updateDate            | Date?  | Last update of the vehicle’s odometer                                         |

## VehicleOdometerHistory

| Field                | Type   | Description                                                                               |
| -------------------- | ------ | ----------------------------------------------------------------------------------------- |
| vehicleId            | String | Unique identifier of the vehicle                                                          |
| historyId            | Int    | Unique history identifier of the vehicle                                                  |
| analyzedDistance     | Double | Distance accumulated during all the analyzed trips in km                                  |
| distance             | Double | Mileage in km for this history                                                            |
| offsetDistance       | Double | Difference between the real odometer distance and the analyzed distance in km             |
| realDistance         | Double | Real odometer distance in km                                                              |
| updateDate           | Date?  | Date of the odometer history entry                                                        |
| yearAnalyzedDistance | Double | <p>Distance accumulated during all the analyzed trips for the current year</p><p><br></p> |
