associateVehicles API Endpoint
The associateVehicles
API endpoint returns list of all the vehicles under a single fleet.
API Details
associateVehicles
GET
https://api.zendrive.com/v1/vehicles
Returns a list of vehicles for a given fleet.
Headers
Authorization*
String
API KEY <APIKEY>
{
"vehicles": [
{
"vehicle_id": "123456789",
"info": {
"trip_count": 12,
"duration_seconds": 10087.250999999998,
"distance_km": 93.903,
"attributes": {
"model": "A4",
"make": "Audi",
"model_year": 2022,
"color": "white",
"vin": "vin_string",
"nickname": "nickname_string",
"pairing": "bluetooth"
}
},
"driving_behavior": {
"event_rating": {
"hard_brake_rating": 3,
"hard_turn_rating": 5,
"rapid_acceleration_rating": 5,
"phone_use_rating": 4,
"overspeeding_rating": 5
},
"score": {
"zendrive_score": 88
}
}
}
],
"start_date": "2022-01-01",
"end_date": "2022-01-31",
"total_count": 8,
"next_offset": 2
}
Sample URL
https://api.zendrive.com/v1/vehicles?order_by=distance_km&order_type=desc&limit=2&start_date=2022-01-01&end_date=2022-01-20" -H 'Authorization: APIKEY <api_key>'
To Query Subaccount Use Case
To query subaccount, execute the following link using the subaccount_id
:
Response Fields
driving_behavior.event_rating
An array containing a list of driving events that happened during the trip. Events represent granular details of Zendrive scores.
driving_behavior.event_rating.hard_brake_rating
Rating assigned to the hard brakes applied during the trip.
driving_behavior.event_rating.hard_turn_rating
Rating assigned to the hard turn events that occurred during the trip.
driving_behavior.event_rating.overspeeding_rating
Rating assigned to the over-speeding events that occurred during the trip.
driving_behavior.event_rating.phone_use_rating
Rating assigned to phone usage that occurred during the trip.
driving_behavior.event_rating.rapid_acceleration_rating
Rating assigned to the rapid acceleration events that occurred during the trip.
driving_behavior.score.zendrive_score
The Zendrive score assigned to the overall driving behavior during the trip.
Sample Response
{
"vehicles": [
{
"vehicle_id": "123456789",
"info": {
"trip_count": 12,
"duration_seconds": 10087.250999999998,
"distance_km": 93.903,
"attributes": {
"model": "A4",
"make": "Audi",
"model_year": 2022,
"color": "white",
"vin": "vin_string",
"nickname": "nickname_string",
"pairing": "bluetooth"
}
},
"driving_behavior": {
"event_rating": {
"hard_brake_rating": 3,
"hard_turn_rating": 5,
"rapid_acceleration_rating": 5,
"phone_use_rating": 4,
"overspeeding_rating": 5
},
"score": {
"zendrive_score": 88
}
}
}
],
"start_date": "2022-01-01",
"end_date": "2022-01-31",
"total_count": 8,
"next_offset": 2
}
Was this helpful?