References (iOS)
DKVehicle
Field | Type | Description |
---|---|---|
vehicleId | String | Unique identifier of the vehicle |
name | String? | Name of the vehicle Default value: “” |
brand | String? | Vehicle brand Default value: “” |
model | String? | Vehicle model Default value: “” |
version | String? | Model version Default value: “” |
year | String? | Year version of the vehicle Default value: “” |
typeIndex | Int | Vehicle body type: 1: Compact 2: Sedan 3: Luxury vehicle 4: Estate car 5: Minivan 6: 4x4, SUV 7: Sports car 8: Convertible 9: Commercial vehicle Default value : -1 |
engineIndex | Int | Engine type: 1: Gasoline 2: Diesel 3: Electric vehicle 4: Gasoline-electric hybrid 5: Diesel-electric hybrid Default value : -1 |
power | Double | 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 [ hp ] = P [ kW ] / 0.7355 Min: 40 hp Max: 450 hp Default value : -1 |
mass | Double | Vehicle mass [ kg ] Min: 700 kg Max: 3500 kg Default value : -1 |
engineDisplacement | Double | Engine displacement in liter Default value : -1 |
gearboxIndex | Int | Gearbox type: 1: automatic 2: manual 5-speed 3: manual 6-speed 4: manual 7-speed 5: manual 8-speed Default value : -1 |
autoGearboxNumber | Int | Number of gear ratios for the automatic gearbox. This parameter is taken into account only if Default value : -1 |
consumption | Double | Combined fuel consumption [l/100km] measured during the New European Driving Cycle (NEDC). Min: 3 l/100km Max: 20 l/100km Default value : -1 |
frontTireSize | String? | Front tire size Default value : “” |
rearTireSize | String? | Rear tire size Default value : “” |
length | Double | Vehicle’s length in meter Default value : -1 |
width | Double | Vehicle’s width in meter Default value : -1 |
height | Double | Vehicle’s height in meter Default value : -1 |
driveWheels | Int | 0 : front-wheel drive 1 : rear-wheel drive 2 : four-wheel drive Default value : -1 |
engineCylinderNb | Int | Number of cylinders Default value : -1 |
dqIndex | String? | DriveQuant vehicle index reference Default value: “” |
detectionMode | Detection mode for the vehicle. Default value: .disabled | |
liteConfig | Boolean | Only for advanced configuration. This parameter is usually set to false. |
ptac | Double? | Total permissible laden weight in kg of the vehicle if its a truck. Default value : -1 |
extraData | [String: String] | Only for advanced configuration. Map intended for adding some additional information for the vehicle. |
beacon | Beacon paired to the vehicle. Default value : nil | |
bluetooth | Bluetooth device paired to the vehicle. Default value : nil | |
odometer | Odometer of the vehicle. Default value : nil | |
odometerHistories | Odometer historical values for the vehicle. Default value : nil |
If your vehicle has a characteristic value to -1
, DriveQuant servers will use default values to analyze your trip.
DKVehicleCharacteristics
See DKVehicle for corresponding fields
DKCarVehicleCharacteristics
Value | Type | Description |
---|---|---|
base | DKVehicleCharacteristics | Characteristics of the car |
DKTruckVehicleCharacteristics
Value | Type | Description |
---|---|---|
base | DKVehicleCharacteristics | Characteristics of the truck |
ptac | Double | Total permissible laden weight in kg of the truck |
TypeIndex
typeIndex | isCar | isTruck | Description |
---|---|---|---|
1 | ✅ | ❌ | MICRO |
1 | ✅ | ❌ | COMPACT |
2 | ✅ | ❌ | SEDAN |
6 | ✅ | ❌ | SUV |
5 | ✅ | ❌ | MINIVAN |
9 | ✅ | ❌ | COMMERCIAL |
3 | ✅ | ❌ | LUXURY |
7 | ✅ | ❌ | SPORT |
200 | ❌ | ✅ | TWO_AXLES_STRAIGHT_TRUCK |
201 | ❌ | ✅ | THREE_AXLES_STRAIGHT_TRUCK |
202 | ❌ | ✅ | FOUR_AXLES_STRAIGHT_TRUCK |
203 | ❌ | ✅ | TWO_AXLES_TRACTOR |
204 | ❌ | ✅ | THREE_AXLES_TRACTOR |
205 | ❌ | ✅ | FOUR_AXLES_TRACTOR |
DKDetectionMode
Value | Description |
---|---|
disabled | The vehicle is disabled. It means that no trip can be assigned to this vehicle. If it is the unique vehicle of the account, autostart will be disabled. |
gps | Each trip will be assigned by default to this vehicle. If the account has other vehicles with |
beacon | If the vehicle has this detection mode and a configured beacon, every trip where the beacon is seen will be assigned to this vehicle. If there is no other vehicle with |
bluetooth | 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. If there is no other vehicle with |
DKBeacon
Field | Type | Description |
---|---|---|
proximityUuid | String | UUID of the beacon |
major | Int | Major code |
minor | Int | Minor code |
uniqueId | String? | Unique code that identifies the beacon in our DriveQuant database. |
DKBluetooth
Field | Type | Description |
---|---|---|
macAddress | String | Peripheral MAC address |
name | String | Bluetooth device name |
DKVehicleSyncStatus
Value | Description |
---|---|
noError | Synchronization request has been successfully executed. List of vehicles (if they exist) are available in vehicles. |
cacheDataOnly | Method has been called with the |
failedToSyncVehiclesCacheOnly | 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. |
syncAlreadyInProgress | 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. |
DKVehicleReplaceStatus
Value | Description |
---|---|
success | Vehicle is successfully replaced and changes are saved in the local database. |
invalidVehicle | 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) |
DKDetectionModeStatus
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. |
gpsModeAlreadyExists | The detection mode of the specified vehicle could not have been updated to GPS because the account already has a vehicle with that detection mode. If you still want to do that, you must set |
DKVehicleBluetoothStatus
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 |
unknownVehicle | An error occurred: the specified vehicle does not belong to you. |
unavailableBluetooth | 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. |
DKVehicleBluetoothRemoveStatus
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 |
unknownVehicle | An error occurred: the specified vehicle does not belong to the user. |
DKOdometerSyncStatus
Value | Description |
---|---|
success | Synchronization has been successfully performed. |
failedToSyncOdometerCacheOnly | Synchronization has failed, only odometer data previously synchronized are returned |
vehicleNotFound | An error occurred: the specified vehicle does not belong to the user. |
cacheDataOnly | SynchronizationType has been set to |
DKOdometerAddHistoryStatus
Value | Description |
---|---|
success | The history entry has been successfully added to the odometer’s vehicle |
error | An error occurred, for example if the user has no network. |
vehicleNotFound | An error occurred: the specified vehicle does not belong to the user. |
badDistance | An invalid distance value has been filled, for example if the provided distance is lower than the last distance odometer entry. |
DKOdometerUpdateHistoryStatus
Value | Description |
---|---|
success | The history entry has been successfully updated. |
error | An error occurred, for example if the user has no network. |
historyNotFound | There is no matching odometer’s history for the provided historyId and vehicleId |
vehicleNotFound | An error occurred: the specified vehicle does not belong to the user. |
badDistance | An invalid distance value has been filled. |
DKOdometerDeleteHistoryStatus
Value | Description |
---|---|
success | The history entry has been successfully deleted. |
error | An error occurred, for example if the user has no network. |
historyNotFound | There is no matching odometer’s history for the provided historyId and vehicleId |
vehicleNotFound | An error occurred: the specified vehicle does not belong to the user. |
lastOdometerError | An error occurred: it is not possible to delete the last odometer history. |
DKVehicleOdometer
Field | Type | Description |
---|---|---|
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 | Int | 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 |
DKVehicleOdometerHistory
Field | Type | Description |
---|---|---|
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 | Distance accumulated during all the analyzed trips for the current year
|
Last updated