Skip to main content

Trip List

Get Driver Trips

GET
https://api.fairmatic.com/api/v1/driver/<driver_id>/trips?start_date=2024-05-01&limit=30&page=2

This API endpoint retrieves a list of trips taken by a specified driver, from a given start date. The results are paginated. It requires a valid driver ID, start date, and optional parameters for pagination like limit and page number. The trip data wont contain details like path taken and event details. For detail trip path and events please refer to Trip Detail API.

info
  • All dates are in UTC timezone.
  • It takes 4 hours after trip end time for trips to be collected and processed. Hence you can access the trip data after 4 hours of trip completion.

Headers

NameValue
Content-Typeapplication/json
AuthorizationAPIKEY <token>

Parameters

NameTypeDescription
start_datestringDate to fetch trips
limitintegerNo. of records per page (100max)
pageintegerpage number
Note

start_date : The start date needs to be within last 6 months range

driver_id:

  • Driver id can be fetched from drivers list api for App integration,
  • For SDK integration, driver_id is the same as the one provided during SDK initiation.

Response

{
"count": 50,
"current_page": 2,
"next_page": null,
"limit": 30,
"trips": [
{
"trip_id": "96a4f7c842f74bfab0962feeae52a21b",
"driver_id": "fe497c39d28b4c50828389730e2292fd",
"trip_start_time": 1716432408087,
"trip_end_time": 1716432708087,
"duration_seconds": 2259.8329999999996,
"distance_miles": 52.11779602592761,
"insurance_period": null,
"start_latitude": 38.04636977126205,
"start_longitude": -121.39782655062564,
"end_latitude": 37.76203001834099,
"end_longitude": -121.4533660947544,
"night_driving_seconds": 0.0,
"highway_miles": 39.90748363242293,
"night_driving_miles": 0.0,
"event_summary": {
"phone_use_count": 6,
"rapid_acceleration_count": 3,
"hard_brake_count": 1,
"overspeeding_count": 0,
"phone_use_time_seconds": 491.98999999999995,
"overspeeding_time_seconds": 0.0
}
},
.....
]
}