listDriverSessions API Endpoint

The listDriverSessions API allows Zendrive customers to look up sessions data for a given driver.

Refer to Zendrive Server APIs for an understanding of how Zendrive server APIs are organized.

List Driver Sessions

GET https://api.zendrive.com/v4/driver/{driver_id}/sessions -H

Look up session data for a specified driver.

Query Parameters

Name
Type
Description

driver_id

String

The unique ID associated with a driver

Headers

Name
Type
Description

Authorization*

String

API KEY <APIKEY>

{
    "next_offset": 10,
    "start_date": "2014-11-16",
    "end_date": "2014-11-22",
    "sessions": [
        {
            "session_id": "542ebb4ee98f7c2438f6c140bb"
        },
        {
            "session_id": "542ebb4ee98f7c2438f6c140bb"
        },
        { ... }
    ]
}
  • This API uses Set 2 of the Date Range, Pagination, and Sorting parameters:

    • Date Range fields (start_date and end_date)

    • Pagination fields (limit and offset)

    • Sorting fields (order_by and order_type)

  • To understand how session_id is set in Zendrive SDK, refer to this.

Response Parameters

This section contains documentation on all the response fields. Fields are in alphabetical order.

Response Field
Description

end_date

End date of the request.

sessions

List of session ids.

sessions[i].session_id

The session id provided by the application in the Zendrive SDK.

start_date

Start date of the request.

Sample Response

{
    "next_offset": 10,
    "start_date": "2014-11-16",
    "end_date": "2014-11-22",
    "sessions": [
        {
            "session_id": "542ebb4ee98f7c2438f6c140bb"
        },
        {
            "session_id": "542ebb4ee98f7c2438f6c140bb"
        },
        { ... }
    ]
}

Was this helpful?