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 |
| Number of elements to return (default: Min: |
pageNumber |
| Position of the page to return, the first page has the position : 0 (default: |
groupLabel |
| Group name (default: |
minTripNumber |
| Minimum number of trip registered for a driver (default: |
Response
The table below summarizes the list of elements included in the response.
Field | Type | Description |
---|---|---|
data |
| List of requested statistics (see below) |
totalElements |
| Total number of statistics that can be retrieved |
pageNumber |
| Position of the requested page (0 for the first page) |
pageSize |
| Requested page size (between 1000 and 20000) |
hasNext |
| Indicates whether there are more results to fetch |
Data array
The data array contains a list of driver's statistics.
Field | Type | Description |
---|---|---|
driverId |
| Driver's unique identifier (auto-generated) |
userId |
| Driver's unique identifier set to initialize the DriveKit SDK |
firstname |
| Driver's firstname |
lastname |
| Driver's lastname |
firstTrip |
| First trip date Date format: |
lastTrip |
| Last trip date Date format: |
numberTripScored |
| Number of trips analyzed |
numberTripTotal |
| Total number of trips |
numberTripDeleted |
| Number of trips deleted |
distance |
| Distance analyzed (km) |
distanceTotal |
| Total distance (km) |
distanceDeleted |
| Deleted distance (km) |
duration |
| Analyzed duration (h) |
durationTotal |
| Total duration (h) |
durationDeleted |
| 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 |
| Average eco-driving score based on trips performed during the current week |
weeklySafety |
| Average safety score based on trips performed during the current week |
weeklyPhoneDistraction |
| Average distraction score based on trips performed during the current week |
weeklySpeeding |
| Average speeding score based on trips performed during the current week |
weeklyDistance |
| Total driving distance during the current week (in km) |
monthlyEfficiency |
| Average eco-driving score based on trips performed during the current month |
monthlySafety |
| Average safety score based on trips performed during the current month |
monthlyPhoneDistraction |
| Average distraction score based on trips performed during the current month |
monthlySpeeding |
| Average speeding score based on trips performed during the current month |
monthlyDistance |
| Total driving distance during the current week (in km) |
allTimeEfficiency |
| Overall average eco-driving score |
allTimeSafety |
| Overall average safety score |
allTimePhoneDistraction |
| Overall average distraction score |
allTimeSpeeding |
| Overall average speeding score |
allTimeDistance |
| 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 |
---|---|---|
| Invalid value for parameter(s) '[...]' | The page size or the page number are not within the authorized range |
| Invalid group label | The requested group does not exist |
| Invalid minimum trip number | The requested minimum trip number is invalid |
Last updated