get
https://api.gomotive.com/v2/vehicle_utilization
Purpose: Use this API to view a summary of the vehicle utilization for your vehicles. A Vehicle Utilization Summary provides a report or data overview that tracks how efficiently and effectively vehicles within a fleet are being utilized. This summary typically includes metrics that help assess the productivity, efficiency, and overall usage of each vehicle in the fleet.
require 'uri'
require 'net/http'
url = URI('https://api.gomotive.com/v2/vehicle_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.
NOTE
Mentioned below is the format for start_date and end_date parameters.
Response Parameters
vehicle_utilizations
- Type: Array of Objects
- Description: A list of vehicle utilization summaries containing performance metrics, fuel usage, and vehicle details.
vehicle_utilization
- Type: Object
- Description: Contains metrics and status details for a specific vehicle’s utilization over a given time frame.
message
- Type: String
- Description: Informational message about the status of vehicle data availability.
last_located_at
- Type: String (DateTime) or null
- Description: The timestamp when the vehicle was last located. If null, the vehicle has not yet communicated.
utilization_percentage
- Type: Number (float)
- Description: The percentage of time the vehicle was utilized for driving.
idle_time
- Type: Number (float)
- Description: Total duration (in seconds) the vehicle was idle.
idle_fuel
- Type: Number (float)
- Description: Amount of fuel (in liters or gallons depending on units) consumed while idling.
driving_time
- Type: Number (float)
- Description: Total duration (in seconds) the vehicle was driving.
driving_fuel
- Type: Number (float)
- Description: Amount of fuel consumed while driving.
total_fuel
- Type: Number (float)
- Description: Total fuel consumed (idle + driving).
total_distance
- Type: Number (float)
- Description: Total distance covered by the vehicle during the period (in km or miles depending on unit).
vehicle
- Type: Object
- Description: Contains identifying information about the vehicle being measured.
id
- Type: Number
- Description: Unique identifier assigned to the vehicle.
number
- Type: String
- Description: Human-readable number or name of the vehicle.
year
- Type: String
- Description: The year of manufacture for the vehicle.
make
- Type: String
- Description: Manufacturer or brand of the vehicle.
model
- Type: String
- Description: Model of the vehicle.
vin
- Type: String or null
- Description: Vehicle Identification Number.
metric_units
- Type: Boolean
- Description: Indicates whether metric units are used for distance and fuel (
true) or not (false).
