v1

latestOpenAPI 3.1.02026-07-2617501.1 MB

Fetch a list of the vehicle's driving periods

get/v1/driving_periods

Query parameters

driver_ids[]integer[]

Specify a list of driver IDs to filter the vehicle's driving periods.

vehicle_ids[]integer[]

Specify a list of the vehicle IDs.

typestring

Mention the type of the driving period. Possible values are PC = Personal Conveyance, YM = Yard Move, driving - Driving.

statusstring

Specify the status of the Driving Period. Possible values: in_progress, complete, interrupted.

annotation_statusstring

Specify the annotation status. Possible values are 0 = Not annotated, 1 = Annotated, 2 = Pending annotation.

assigned_to_driverboolean

This parameter allows you to filter the search results based on the available driver's information. Allowed values are <ul><li><b>True</b>: View only those driving periods that have the driver's information.</li><li><b>False</b>: View the driving periods that do not have any driver's information.</li></ul>

start_datestring date

Specify the start date from when you want to view the driving periods. Default: TODAY - 7 DAYS AGO

end_datestring date

Specify the end date till when you want to view the driving periods. Default: TODAY

updated_afterstring date

Return all driving periods updated after given time.

per_pageinteger

Number of records to return per page.

page_nointeger

Denotes the current page number.

Headers

X-Time-Zonestring

Specify the timezone for formatting the timestamps.

Response

200

Example response

{
  "driving_periods": [
    {
      "driving_period": {
        "id": 71,
        "start_time": "2018-01-01T14:00:00Z",
        "end_time": "2018-01-01T15:00:00Z",
        "type": "driving",
        "duration": 3600,
        "start_kilometers": 76,
        "end_kilometers": 164,
        "start_hvb_state_of_charge": 70.1,
        "end_hvb_state_of_charge": 90.1,
        "start_hvb_lifetime_energy_output": 1101.1,
        "end_hvb_lifetime_energy_output": 1201.1,
        "driver": {
          "id": 3102,
          "first_name": "bfoo",
          "last_name": "bar",
          "email": "3e9595c90b19@keeptruckin.com",
          "status": "active",
          "role": "driver"
        },
        "vehicle": {
          "id": 1009,
          "number": "bar"
        },
        "origin": "84 Corporate Park, Irvine, CA 92606",
        "origin_lat": 33.6932408,
        "origin_lon": -117.8266837,
        "destination_lat": 33.6930478,
        "destination_lon": 33.6930478,
        "destination": "Chino Hills, CA",
        "distance": "54.7 mi",
        "source": 1
      }
    }
  ],
  "pagination": {
    "per_page": 25,
    "page_no": 1,
    "total": 2
  }
}