Skip to main content

Weekly Driver Aggregate Summary

Get Weekly Driver Summary

GET
https://api.fairmatic.com/api/v1/driver-aggregate/weekly?start_date=2024-05-20&driver_id=xyz&driver_id=abc&driver_id=123

The Weekly Driver Summary API provides aggregated information for the specified week for the provided driver IDs. It returns a daily summary breakdown as well, helping monitor and analyze the weekly performance of drivers using the given time frame and driver identifiers.

info

All dates and epoch time is provided here are as per UTC timezone and aggregates done as per UTC dates.

Headers

NameValue
Content-Typeapplication/json
AuthorizationAPIKEY <token>

Parameters

NameTypeDescription
start_datestringSummary Date
driver_idstringdriver_id to fetch summary. Accepts multiple driver_ids.
info
  • start_date:
    • The start date needs to be within last 6 months range.
    • The start date cant be today's date(current day).
    • The start date needs to be a Monday(week start).
  • driver_id:
    • Min 1 driver_id should be there, max 20 driver_id can be sent.
    • Driver id can be fetched from drivers list api for App integration, for SDK integration driver_id is same as the one provided during SDK initiation.

Response

{
"data": [
{
"driver_info": {
// all fields except driver_id can contain null
"driver_id": "548eddcdb576436f96ad7870efcced01",
"first_name": "John",
"last_name": "Doe",
"email": None,
"alias": "John Doe",
"first_travel_date": "2024-05-23",
"last_travel_date": "2024-05-23"
},
"driving_summary": {
"fm_score": 88,
"fm_grade": "excellent",
"trip_count": 1,
"distance_miles": 10.0,
"duration_seconds": 1800.0,
"night_driving_seconds": 1800.0,
"highway_miles": 3.0,
"events_summary": {
"phone_use_count": 1,
"rapid_acceleration_count": 1,
"hard_brake_count": 1,
"overspeeding_count": 1,
"phone_use_time_seconds": 0,
"overspeeding_time_seconds": 0
},
"focus_area": {
"is_phone_use": true,
"is_overspeeding": false,
"is_hard_brake": false,
"is_acceleration": false
},
"start_date": "2024-05-20",
"end_date": "2024-05-26",
"daily_summary_breakdown": [
{
"fm_score": 84,
"fm_grade": "excellent",
"trip_count": 1,
"distance_miles": 10.0,
"duration_seconds": 1800.0,
"night_driving_seconds": 1800.0,
"highway_miles": 3.0,
"events_summary": {
"phone_use_count": 1,
"rapid_acceleration_count": 1,
"hard_brake_count": 1,
"overspeeding_count": 1,
"phone_use_time_seconds": 0,
"overspeeding_time_seconds": 0
},
"focus_area": {
"is_phone_use": false,
"is_overspeeding": false,
"is_hard_brake": false,
"is_acceleration": false
},
"date": "2024-05-20"
},
...
daywise summary breakdown for the days
the driver drove in the week
...
{
"fm_score": 80,
"fm_grade": "good",
"trip_count": 1,
"distance_miles": 10.0,
"duration_seconds": 1800.0,
"night_driving_seconds": 1800.0,
"highway_miles": 3.0,
"events_summary": {
"phone_use_count": 1,
"rapid_acceleration_count": 1,
"hard_brake_count": 1,
"overspeeding_count": 1,
"phone_use_time_seconds": 0,
"overspeeding_time_seconds": 0
},
"focus_area": {
"is_phone_use": true,
"is_overspeeding": false,
"is_hard_brake": false,
"is_acceleration": false
},
"date": "2024-05-26"
}
]
}
}
driver_2 ...
driver_3 ...
...
driver_20 ...
]
}