Fetch the utilization of the driver (v2)

Purpose: A Utilization Summary for drivers typically refers to a report or data overview that tracks how effectively drivers are being utilized within a fleet. It generally includes metrics that help assess the productivity, efficiency, and overall use of drivers' time and resources.

require 'uri'
require 'net/http'

url = URI('https://api.gomotive.com/v1/driver_utilization')

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request['Authorization'] = "Bearer <OAUTH_TOKEN>"

response = http.request(request)
puts response.read_body

❗️

Important

This is a rollup endpoint and the timestamps are computed and returned in company configured rollup timezone (for example PT, MT, CT, or ET), and not in UTC.

Response Parameters

driver_idle_rollup

  • Type: Object
  • Description: Summary of a driver's idle and driving data, including utilization and fuel consumption.

id

  • Type: Integer
  • Description: Unique identifier for the driver.

first_name

  • Type: String
  • Description: First name of the driver.

last_name

  • Type: String
  • Description: Last name of the driver.

username

  • Type: String
  • Description: Username of the driver.

email

  • Type: String
  • Description: Email address of the driver, if available.

driver_company_id

  • Type: String
  • Description: Company ID associated with the driver.

status

  • Type: String
  • Description: Current status of the driver (e.g., "active").

role

  • Type: String
  • Description: The role of the driver (e.g., "driver").

utilization

  • Type: Integer
  • Description: The percentage of time the driver is utilized.

idle_time

  • Type: Integer
  • Description: Total idle time of the driver, measured in seconds.

idle_fuel

  • Type: Integer
  • Description: Total fuel consumed while idling, measured in gallons or litres.

driving_time

  • Type: Integer
  • Description: Total driving time of the driver, measured in minutes.

driving_fuel

  • Type: Integer
  • Description: Total fuel consumed while driving, measured in gallons or litres.

Query Params
driver_ids[]
array of int32s

Specify a list of the driver IDs for whom you want to fetch the utilization summary.

driver_ids[]
date

Specify the start from when you want to fetch the utilization summary of the driver. Default: TODAY - 7 DAYS AGO

date

Specify the date within which you want to fetch the utilization summary of the driver. Default: TODAY

int32
Defaults to 25

Number of records to display per page.

int32
Defaults to 1

Denotes the current page number.

Headers
string

Specify the timezone for formatting the timestamps.

boolean

Specify if you want to use the Metric units or the Imperial units. TRUE: Metric units. FALSE: Imperial Units

int32

Specify the ID of the Fleet Admin or the Fleet Manager who is accessing this endpoint.

Response

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json