Statistics

The statistics service provides the average scores of all the drivers registered to your company.

For each driver, you will find useful information such as the mileage, number of trips as well as weekly, monthly and all time average driving scores.

If you have your admin API key, you can try the API via this link.

Query parameters

Field
Type
Description

pageSize

int

Number of elements to return (default: 1000).

Min: 1000 Max: 20000

pageNumber

int

Position of the page to return, the first page has the position : 0 (default: 0) Min: 0

groupLabel

string

Group name (default: All)

minTripNumber

int

Minimum number of trip registered for a driver (default: 0)

Response

The table below summarizes the list of elements included in the response.

Field
Type
Description

data

array[object]

totalElements

int

Total number of statistics that can be retrieved

pageNumber

int

Position of the requested page (0 for the first page)

pageSize

int

Requested page size (between 1000 and 20000)

hasNext

boolean

Indicates whether there are more results to fetch

Data array

The data array contains a list of driver's statistics.

Field
Type
Description

driverId

string

Driver's unique identifier (auto-generated)

userId

string

Driver's unique identifier set to initialize the DriveKit SDK

firstname

string

Driver's firstname

lastname

string

Driver's lastname

firstTrip

string

First trip date

Date format: YYYY-MM-dd’T’HH:mm:ss.SSSZ

lastTrip

string

Last trip date

Date format: YYYY-MM-dd’T’HH:mm:ss.SSSZ

numberTripScored

int

Number of trips analyzed

numberTripTotal

int

Total number of trips

numberTripDeleted

int

Number of trips deleted

distance

double

Distance analyzed (km)

distanceTotal

double

Total distance (km)

distanceDeleted

double

Deleted distance (km)

duration

double

Analyzed duration (h)

durationTotal

double

Total duration (h)

durationDeleted

double

Deleted duration (h)

periodicScores

Average driving scores (see below)

Periodic scores

The periodicScores object includes the driver's average scores over different time ranges.

Field
Type
Description

weeklyEfficiency

double

Average eco-driving score based on trips performed during the current week

weeklySafety

double

Average safety score based on trips performed during the current week

weeklyPhoneDistraction

double

Average distraction score based on trips performed during the current week

weeklySpeeding

double

Average speeding score based on trips performed during the current week

weeklyDistance

double

Total driving distance during the current week (in km)

monthlyEfficiency

double

Average eco-driving score based on trips performed during the current month

monthlySafety

double

Average safety score based on trips performed during the current month

monthlyPhoneDistraction

double

Average distraction score based on trips performed during the current month

monthlySpeeding

double

Average speeding score based on trips performed during the current month

monthlyDistance

double

Total driving distance during the current week (in km)

allTimeEfficiency

double

Overall average eco-driving score

allTimeSafety

double

Overall average safety score

allTimePhoneDistraction

double

Overall average distraction score

allTimeSpeeding

double

Overall average speeding score

allTimeDistance

double

Overall distance (in km)

Error response

Unauthorized

If the request does not contain a valid authentication token, the service will answer with a http code 401.

Bad request

If the request cannot be processed, the service will answer with a http code 400. The response body will contain more details about the error:

Message Key
Message
Description

dk_invalid_parameter_value

Invalid value for parameter(s) '[...]'

The page size or the page number are not within the authorized range

invalid_group_label

Invalid group label

The requested group does not exist

invalid_min_trip_number

Invalid minimum trip number

The requested minimum trip number is invalid

Last updated