viewFleetVehicles API Endpoint

The viewFleetVehicles API endpoint returns list of all the vehicles under a commercial line fleet.

The Commercial Lines fleet can include several child accounts. The result is calculated by combining the outcomes of all these smaller accounts and then providing the overall result.

API Details

viewFleetVehicles

GET URL: https://api.zendrive.com/insurance/v1/vehicles?start_date=2022-01-01&end_date=2022-01-20

Returns a list of vehicles for a given fleet.

Headers

Name
Type
Description

Authorization*

String

API KEY <APIKEY>

{
  "vehicles": [
    {
      "vehicle_id": "766543",
      "fleet_name": "zendrive_dpkloxhplj",
      "fleet_id": "temp_zendrive_dpkloxhplj",
      "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": 1
}

Sample URL

URL: https://api.zendrive.com/insurance/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>'

This API uses the following Date Range, Pagination, and Sorting parameters:

  • To specify date range:start_date, end_date

  • To search for specific vehicle_ids:vehicle_ids

  • For sorting, based on the following order_by, order_type:

    • trip_count, duration_seconds, distance_km, zendrive_score, and one of

    • asc, desc

  • For pagination: limit, offset

Sample Response

{
  "vehicles": [
    {
      "vehicle_id": "766543",
      "fleet_name": "zendrive_dpkloxhplj",
      "fleet_id": "temp_zendrive_dpkloxhplj",
      "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": 1
}

Was this helpful?