Calculate driving behavior
This endpoint returns driving behavior information according to the provided filter.
Note about the alarms:
When this endpoint is used with a token obtained using a APIv2 user, all alarms types are considered.
If the token is obtained by a human user, then the alarms types are restricted to those available to the user in question.
Parameters
A filter object, in JSON format, that defines the parameters for the calculation.
{
"from": "2023-10-12T13:39:14.968Z",
"to": "2023-10-13T13:39:14.968Z",
"groupBy": 1,
"isDetailed": true,
"vehicles": [ 0 ],
"drivers": [ 0 ],
"ecoProfiles": [ 0 ],
"manufacturers": [ 0 ],
"models": [ 0 ],
"engines": [ 0 ],
"canbusOnly": true,
"lowMileage": true
}
Field | Description | ||||||
from | The timestamp of the begining of the interval. If this field is not specified, the endpoint will consider it as being 24 hours before the to timestamp. |
||||||
to | The timestamp of the end of the interval. If this field this fied is not specified, then the current date/time is considered. |
||||||
groupBy | Defines how the calculation is grouped. Available groupping options are:
|
||||||
isDetailed | Specifies the level of detail of the data to be returned if true is specified, then all ecodriving records are returned; if not specified or false is specified, the returned records are aggregated by vehicle or driver, according with the specified in the groupBy option. |
||||||
vehicles |
Array of IDs of the vehicles to include in the calculation. If the field if not specified, null or empty, then all the vehicles in the account are considered. |
||||||
drivers |
Array of IDs of the drivers to include in the calculation. If the field if not specified, null or empty, then all the drivers in the account are considered. |
||||||
ecoProfiles |
Array of IDs of the Eco profiles to include in the calculation. If the field if not specified, null or empty, then all the profiles are considered. Check the endpoint Get profiles to see how to get the list of eco profiles. |
||||||
manufacturers |
Array of IDs of the manufacturers to include in the calculation. If the field if not specified, null or empty, then all the manufacturers are considered. Check the endpoint Get manufacturers to see how to get the list of the manufacturers. |
||||||
models |
Array of IDs of the models to include in the calculation. If the field if not specified, null or empty, then all the models are considered. Check the endpoint Get models to see how to get the list of the models. |
||||||
engines |
Array of IDs of the engines to include in the calculation. If the field if not specified, null or empty, then all the engines are considered. Check the endpoint Get engines to see how to get the list of the engines. |
||||||
canbusOnly | Specifies if only the vehicles with CANBus should be considered.
|
||||||
lowMileage | Specifies if the vehicles or drivers - depending on the option specified in groupBy - with low mileage in the period should be included in the results.false : All vehicles/drivers are included in the resultstrue : Only vehicles with a minimum mileage are included in the results.
The value of the minimum mileage is defined for the company in Frontend, in ADMINISTRATION > ACCOUNT > DRIVING BEHAVIOR > Minimum Mileage. If this value is not explicitly defined, then the value of 20Km will be considered. |
Return
The expected return of the endpoint when the request is valid is a JSON object with the folowing format:
[
{
"Recommendations": [0],
"HasLowMileage": true,
"HasTripsWithEco": true,
"VehicleId": 0,
"LicensePlate": "string",
"Drivers": ["string"]
"DriverId": 0,
"DriverName": "string",
"DriverUsername": "string",
"Vehicles": ["string"],
"EcoProfileId": int,
"VehiclesId": [0],
"DriversId": : [0],
"Score": 0.0,
"ScoreCustomized": 0.0,
"Mileage": 0.0,
"DrivingTime": 0,
"AverageConsumption": 0.0,
"MileageGps": 0.0,
"MileageCanbus": 0.0,
"TotalConsumption": 0.0,
"AverageSpeed": 0.0,
"IdleTimePerc": 0.0,
"HighRPMPerc": 0.0,
"IdlingConsumption": 0.0,
"BrakeStrokes": 0.0,
"IdlingConsumption": 0.0,
"LowSpeedAccelerationScore": 0,
"HighSpeedAccelerationScore": 0,
"LowSpeedBrakingScore": 0,
"HighSpeedBrakingScore": 0,
"IdlingScore": 0,
"NoCruiseControlScore": 0,
"HighRPMScore": 0,
"AlarmsScore": 0,
"FastAccelerationBrakeShiftScore": 0,
"HarshCorneringScore": 0,
"AccelerationWithCCActiveScore": 0,
"LowSpeedAccelerationOccurrences": 0.0,
"HighSpeedAccelerationOccurrences": 0.0,
"LowSpeedBrakingOccurrences": 0.0,
"HighSpeedBrakingOccurrences": 0.0,
"IdlingOccurrences": 0.0,
"NoCruiseControlOccurrences": 0.0,
"HighRPMOccurrences": 0.0,
"SpeedingOccurrences": 0.0,
"AlarmOccurrences": 0.0,
"FastAccelerationBrakeShiftOccurrences": 0.0,
"HarshCorneringOccurrences": 0.0,
"AccelerationWithCCActiveOccurrences": 0.0,
"HighRPMOccurrencesAbsolute": 0.0,
"NoCruiseControlOccurrencesAbsolute": 0.0,
"LowSpeedBrakingOccurrencesAbsolute": 0.0,
"LowSpeedAccelerationOccurrencesAbsolute": 0.0,
"HighSpeedAccelerationOccurrencesAbsolute": 0.0,
"AlarmOccurrencesAbsolute": 0.0,
"FastAccelerationBrakeShiftOccurrencesAbsolute": 0.0,
"HarshCorneringOccurrencesAbsolute": 0.0,
"AccelerationWithCCActiveOccurrencesAbsolute": 0.0,
"IdlingOccurrencesCustomized": 0.0,
"HighRPMOccurrencesCustomized": 0.0,
"NoCruiseControlOccurrencesCustomized": 0.0,
"LowSpeedBrakingOccurrencesCustomized": 0.0,
"HighSpeedBrakingOccurrencesCustomized": 0.0,
"LowSpeedAccelerationOccurrencesCustomized": 0.0,
"HighSpeedAccelerationOccurrencesCustomized": 0.0,
"AlarmOccurrencesCustomized": 0.0,
"FastAccelerationBrakeShiftOccurrencesCustomized": 0.0,
"HarshCorneringOccurrencesCustomized": 0.0,
"AccelerationWithCCActiveOccurrencesCustomized": 0.0,
"DrivingBehaviorCanbusPerformanceData": object
}
]
Field | Description |
recommendations |
Array of IDs of the recomentations determined by the calcutation. Check the endpoint Get recommendations to see how to get the list of the recomendations. |
hasLowMileage | HasLowMileage
|
hasTripsWithEco | Has trips with eco
|
vehicleId | The ID of the vehicle in Frotcom
|
licensePlate | The license plate of the vehicle
|
drivers | Drivers names array
|
driverId | Driver id
|
driverName | Driver name
|
driverUsername | Driver username
|
vehicles | Vehicles license plates
|
ecoProfileId | The IF of the profile of the vehicle. Check the endpoint Get profiles to see how to get the list of eco profiles. |
vehiclesId | Vehicles ids array
|
driversId | Drivers ids array
|
score | Score
|
scoreCustomized | Customized score
|
mileage | Mileage
|
drivingTime | The driving time, in seconds.
|
averageConsumption | Average consumption
|
mileageGps | The mileage traveled by the vehicle calculated using the GPS positions.
|
mileageCanbus | The mileage traveled by the vehilce considering the data read from CAN Bus
|
totalConsumption | Total consumption
|
averageSpeed | Average speed
|
idleTimePerc | Idle time perc
|
highRPMPerc | High RPM perc
|
idlingConsumption | Idling consumption
|
brakeStrokes | Brake strokes
|
idlingConsumption | Idling consumption
|
lowSpeedAccelerationScore | Low speed acceleration score
|
highSpeedAccelerationScore | High speed acceleration score
|
lowSpeedBrakingScore | Low speed braking score
|
highSpeedBrakingScore | High speed braking score
|
idlingScore | Idling score
|
noCruiseControlScore | Score related with the usage of the crise control.
|
highRPMScore | High RPM score
|
alarmsScore | Alarms score
|
fastAccelerationBrakeShiftScore | Fast acceleration brake shift score
|
harshCorneringScore | Harsh cornering score
|
accelerationWithCCActiveScore | Acceleration with Cruise Control active score
|
lowSpeedAccelerationOccurrences | Low speed acceleration occurrences
|
highSpeedAccelerationOccurrences | High speed acceleration occurrences
|
lowSpeedBrakingOccurrences | Low speed braking occurrences
|
highSpeedBrakingOccurrences | High speed braking occurrences
|
idlingOccurrences | Idling occurrences
|
noCruiseControlOccurrences | Percentage of
|
highRPMOccurrences | High RPM occurrences
|
speedingOccurrences | Speeding occurrences
|
alarmOccurrences | Alarm occurrences
|
fastAccelerationBrakeShiftOccurrences | Fast acceleration brake shift occurrences
|
harshCorneringOccurrences | Harsh cornering occurrences
|
accelerationWithCCActiveOccurrences | Acceleration with Cruise Control active occurrences
|
highRPMOccurrencesAbsolute | The time, in seconds, that the vehicle was in high RPM.
|
noCruiseControlOccurrencesAbsolute | Racio of how many minutes per hour the cruise control was NOT active.
|
lowSpeedBrakingOccurrencesAbsolute | Low speed braking occurrences absolute
|
lowSpeedAccelerationOccurrencesAbsolute | Low speed acceleration occurrences absolute
|
highSpeedAccelerationOccurrencesAbsolute | High speed acceleration occurrences absolute
|
alarmOccurrencesAbsolute | Alarm occurrences absolute
|
fastAccelerationBrakeShiftOccurrencesAbsolute | Fast acceleration brake shift occurrences absolute
|
harshCorneringOccurrencesAbsolute | Harsh cornering occurrences absolute
|
accelerationWithCCActiveOccurrencesAbsolute | The number of times the driver pressed the accelerator pedal while the cruise control was active.
|
idlingOccurrencesCustomized | Idling occurrences customized
|
highRPMOccurrencesCustomized | High RPM occurrences customized
|
noCruiseControlOccurrencesCustomized | The customized weight of the usage of the Cruise Control in the driving behavior.
|
lowSpeedBrakingOccurrencesCustomized | The customized weight of the low speed braking occurrences in driver customized score. |
highSpeedBrakingOccurrencesCustomized | The customized weight of the high speed braking occurrences in driver customized score. |
lowSpeedAccelerationOccurrencesCustomized | The customized weight of the low speed acceleration occurrences in driver customized score. |
highSpeedAccelerationOccurrencesCustomized | The customized weight of the high speed acceleration occurrences in driver customized score. |
alarmOccurrencesCustomized | The customized weight of the alarm occurrences in driver customized score.
|
fastAccelerationBrakeShiftOccurrencesCustomized | Fast acceleration brake shift occurrences customized
|
harshCorneringOccurrencesCustomized | Harsh cornering occurrences customized
|
accelerationWithCCActiveOccurrencesCustomized | Acceleration with Cruise Control active occurrences customized
|
drivingBehaviorCanbusPerformanceData | Object in JSON format containing the driving behavior canbus performance data.
|
Response HTTP Codes
200 - OK
- The endpoint executed sucessfully.
204 - No content
- No data was found.
400 - Bad Request
- The user does not have these permissions: ADMIN_CNPD_COMPLIANCE and ADMIN_OVERRIDE_CNPD
- The user has these permissions: ADMIN_CNPD_COMPLIANCE and ADMIN_OVERRIDE_CNPD and the
from
field from filter was more than 7 days ago - The user is not allowed to view vehicle history
- The search filter matches an interval greater than 31 days
401 - Unauthorized
- The authentication token is invalid
403 - Forbidden
- User does not have permission to view driving behavior dashboard