References (iOS)

DKVehicle

FieldTypeDescription

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 carGearboxIndex is set to 1.

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

ValueTypeDescription

base

DKVehicleCharacteristics

Characteristics of the car

DKTruckVehicleCharacteristics

ValueTypeDescription

base

DKVehicleCharacteristics

Characteristics of the truck

ptac

Double

Total permissible laden weight in kg of the truck

TypeIndex

typeIndexisCarisTruckDescription

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

ValueDescription

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 or bluetooth detection modes, every trip where these peripherals are not seen will be assigned to this vehicle.

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 gps mode, trips will be canceled if the Beacon is not seen during a trip.

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 gps mode, trips will be canceled if the Bluetooth device is not seen during a trip.

DKBeacon

FieldTypeDescription

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

FieldTypeDescription

macAddress

String

Peripheral MAC address

name

String

Bluetooth device name

DKVehicleSyncStatus

ValueDescription

noError

Synchronization request has been successfully executed. List of vehicles (if they exist) are available in vehicles.

cacheDataOnly

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.

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

ValueDescription

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

ValueDescription

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 forceGPSVehicleUpdate parameter to true.

DKVehicleBluetoothStatus

ValueDescription

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

ValueDescription

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

ValueDescription

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 cache.

DKOdometerAddHistoryStatus

ValueDescription

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

ValueDescription

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

ValueDescription

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

FieldTypeDescription

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

FieldTypeDescription

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