v1

latestOpenAPI 3.1.02026-07-2617501.1 MB

Fetch a driver's total worked hours

get/v1/time_tracking/worked_time

Query parameters

user_ids[]integer[] required

Specify the user IDs for whom you want to fetch the worked hours.

time_tracking_modestring

Filter the response by the time tracking mode. For example: Logs or Timecards.

start_datestring date

Specify the start date from when you want to check the driver's worked hours. Default is "30 days ago".

end_datestring date

Specify the end date before which you want to view the driver's worked hours. Default is today's date.

per_pageinteger

The number of records to display per page.

page_nointeger

Denotes the current page number.

Response

200

Example response

{
  "entries": [
    {
      "date": "2023-07-17",
      "time_tracking_mode": "timecards",
      "worked_time": 1440,
      "user": {
        "id": 1033954,
        "first_name": "Erik",
        "last_name": "Mclaughlin",
        "username": "e.mclaughlin",
        "email": "e.mclaughlin@keeptruckin.com"
      }
    }
  ],
  "pagination": {
    "per_page": 25,
    "page_no": 1,
    "total": 1
  }
}