listDriverTrips API Endpoint
The listDriverTrips
API lists the trips taken by a particular driver, along with information on driving behavior, distance driven and so on.
List Driver Trips API
GET
https://api.zendrive.com/v4/driver/{driver_id}/trips -H
Provide a driver ID and look up a list of that driver's completed trips.
Query Parameters
fields
string
Comma separated list of fields to lookup. If nothing is specified, all data is returned.
info
: Returns information about driver (Total kilometers driven, Drive time etc.)
driving_behavior
: Returns driver score and event ratings.
session_ids
string
A comma separated list of session ids to filter trips by. Only trips tagged by the given session ids are returned. Sessions are specified in the Zendrive SDK. The mobile application can provide session ids to the SDK to tag trips with.
tracking_ids
string
A comma separated list of tracking ids to filter trips by. Only trips tagged by the given tracking ids are returned. Tracking ids are specified by the mobile application when recording a trip in manual mode.
driver_id
String
The Driver ID associated with the driver.
Headers
Authorization*
String
API KEY <APIKEY>
{
"trips": [{
"info": {
"insurance_period": "NA",
"trip_max_speed_kmph": 96.40792534541973,
"distance_km": 25.78,
"end_time": "2017-09-29T13:55:16-04:00",
"tracking_id": "39",
"duration_seconds": 400.39,
"start_time": "2017-09-29T13:16:11-04:00",
"session_id": "1613190012",
"vehicle_id": "NA",
"vehicle_type": "Car"
},
"driving_behavior": {
"score": {
"zendrive_score": 84
},
"event_rating": {
"hard_brake_rating": 3,
"phone_use_rating": 4,
"rapid_acceleration_rating": 4,
"hard_turn_rating": 4,
"overspeeding_rating": 3
}
},
"trip_id": "1506705371408"
}],
"end_date": "2017-09-30",
"start_date": "2017-09-01"
"drive_type_summary" :{
"count": 6,
"distance_km": 100,
"non_driving": {
count: 0,
distance_km: 50,
}
"driving":{
"count":6,
"distance_km": 50
"motorcycle":{
"count": 0,
"distance_km": 0
},
"car":{
"count":6,
"distance_km": 50
"driver": {
"count": 1,
"distance_km": 30
}
"passenger": {
"count": 5,
"distance_km": 20
}
}
}
}
}
Response Fields
This section contains documentation on all the response fields. Fields are in alphabetical order.
Date Fields
start_date
Start date of the request.
end_date
End date of the request.
Trips Fields
trips
List of trips from the driver in the given date range.
trips[i].trip_id
Unique Id of the trip assigned by Zendrive.
trips[i].info
Fields
trips[i].info
Fieldstrips[i].info.distance_km
Length of the trip in km.
trips[i].info.duration_seconds
Total duration of the trip in seconds.
trips[i].info.end_time
End time of trip in ISO format.
trips[i].info.session_id
Id of the session this trip belongs to. This is available if the session was live in the Zendrive SDK when the trip was recorded.
trips[i].info.start_time
Start time of trip in ISO format.
trips[i].info.tracking_id
Tracking id of the trip if specified in the Zendrive SDK. This is available only for trips recorded in manual mode of the SDK.
trips[i].info.trip_max_speed_kmph
Maximum speed reached during the duration of this trip
trips[i].info.vehicle_id
Unique ID of the vehicle tagged to the trip, if any. Returns NA
by default.
trips[i].info.vehicle_type
Vehicle Type of the trip like Car
or Motorcycle.
drive_type_summar
y
Provides the trip count, distance traveled, travel as a passenger (non-driving) number of trips on motorcycle and distance traveled, etc,.
driver_type_summary
Fields
driver_type_summary
Fieldscount
The total distance travelled by trips of all types in km
non_driving
Summary of non driving type trips
non_driving.count
Count for non driving trips
non_driving.distance_km
Distance in kms for non_driving
trips.
non_driving.others.count
Count for non_driving
trips which are neither "Bicycle", "NotCar", "Bus", "Transit" or "HighSpeedVehicle".
non_driving.others.distance_km
Distance in kms for non_driving
trips which are neither "Bicycle", "NotCar", "Bus", "Transit" or "HighSpeedVehicle".
driving
Summary of driving type trips
driving.count
Count for driving trips
driving.distance_km
Distance in kms for driving trips
driving.motorcycle
Summary of motorcycle vehicle type trips
driving.motorcycle.count
Count for motorcycle trips
driving.motorcycle.distance_km
Distance in kms for motorcycle trips
driving.car
Summary of car vehicle type trips
driving.car.count
Count for car trips
driving.car.distance_km
Distance in kms for car trips
driving.car.driver
Summary of driver user mode trips
driving.car.driver.count
Count for driver trips
driving.car.driver.distance_km
Distance in kms for driver trips
driving.car.passenger
Summary of passenger user mode trips
driving.car.passenger.count
Count for passenger trips
driving.car.passenger.distance_km
Distance in kms for passenger trips
trips[i].driving_behavior
Fields
trips[i].driving_behavior
Fieldstrips[i].driving_behavior.
event_rating
A collection of various events for the driver during the interval specified. Note that each event here is an average of daily event ratings for the driver over the given interval.
trips[i].driving_behavior.
event_rating.hard_brake_rating
Hard brake rating of the trip.
trips[i].driving_behavior.
event_rating.hard_turn_rating
Hard turn rating of the trip.
trips[i].driving_behavior.
event_rating.overspeeding_rating
Overspeeding rating of the trip.
trips[i].driving_behavior.
event_rating.phone_use_rating
Phone use of rating
trips[i].driving_behavior.
event_rating.rapid_acceleration_rating
Rapid acceleration rating of the trip.
trips[i].driving_behavior.
score.zendrive_score
Zendrive score of the trip.
Sample Response
{
"trips": [{
"info": {
"insurance_period": "NA",
"trip_max_speed_kmph": 96.40792534541973,
"distance_km": 25.78,
"end_time": "2017-09-29T13:55:16-04:00",
"tracking_id": "39",
"duration_seconds": 400.39,
"start_time": "2017-09-29T13:16:11-04:00",
"session_id": "1613190012",
"vehicle_id": "NA",
"vehicle_type": "Car"
},
"driving_behavior": {
"score": {
"zendrive_score": 84
},
"event_rating": {
"hard_brake_rating": 3,
"phone_use_rating": 4,
"rapid_acceleration_rating": 4,
"hard_turn_rating": 4,
"overspeeding_rating": 3
}
},
"trip_id": "1506705371408"
}],
"end_date": "2017-09-30",
"start_date": "2017-09-01"
"drive_type_summary" :{
"count": 6,
"distance_km": 100,
"non_driving": {
count: 0,
distance_km: 50,
}
"driving":{
"count":6,
"distance_km": 50
"motorcycle":{
"count": 0,
"distance_km": 0
},
"car":{
"count":6,
"distance_km": 50
"driver": {
"count": 1,
"distance_km": 30
}
"passenger": {
"count": 5,
"distance_km": 20
}
}
}
}
}
Was this helpful?