get https://api.gomotive.com/v1/vehicles/
Purpose: Use this API to fetch the details of a vehicle using a unique vehicle number that is assigned to the vehicle. This API is mostly useful if you do not have the entire details of the vehicle, but only the assigned number of the vehicle.
require 'uri'
require 'net/http'
url = URI('https://api.gomotive.com/v1/vehicles/4')
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
Response Parameters
vehicle
- Type: Object
- Description: Contains the details of the vehicle.
id
- Type: Integer
- Description: Unique identifier for the vehicle.
company_id
- Type: Integer
- Description: ID of the company that owns the vehicle.
number
- Type: String
- Description: The vehicle's assigned number or name.
status
- Type: String
- Description: Current status of the vehicle (e.g.,
active
).
ifta
- Type: Boolean
- Description: Indicates whether the vehicle is IFTA-registered.
vin
- Type: String
- Description: The Vehicle Identification Number (VIN).
make
- Type: String
- Description: The make of the vehicle.
model
- Type: String
- Description: The model of the vehicle.
year
- Type: String
- Description: The manufacturing year of the vehicle.
license_plate_state
- Type: String
- Description: The state where the vehicle's license plate is registered.
license_plate_number
- Type: String
- Description: The vehicle's license plate number.
metric_units
- Type: Boolean
- Description: Indicates if the vehicle uses metric units.
fuel_type
- Type: String
- Description: The type of fuel used by the vehicle (e.g.,
diesel
).
prevent_auto_odometer_entry
- Type: Boolean
- Description: Indicates if auto-odometer entry is disabled.
group_ids
- Type: Array of Integers
- Description: List of group IDs associated with the vehicle.
created_at
- Type: String (Date-Time)
- Description: The timestamp when the vehicle was created.
updated_at
- Type: String (Date-Time)
- Description: The timestamp when the vehicle was last updated.
eld_device
- Type: Object
- Description: Information about the vehicle's ELD (Electronic Logging Device).
id
- Type: Integer
- Description: ELD device identifier.
identifier
- Type: String
- Description: Unique identifier for the ELD device.
model
- Type: String
- Description: The model of the ELD device.
current_driver
- Type: Object
- Description: Information about the vehicle's current driver.
id
- Type: Integer
- Description: Driver's unique identifier.
first_name
- Type: String
- Description: Driver's first name.
last_name
- Type: String
- Description: Driver's last name.
username
- Type: String
- Description: Driver's username.
email
- Type: String
- Description: Driver's email address.
driver_company_id
- Type: Integer
- Description: Driver's company ID.
status
- Type: String
- Description: Current status of the driver (e.g.,
active
).
role
- Type: String
- Description: The driver's role (e.g.,
driver
).
external_ids
- Type: Array of Objects
- Description: List of external system IDs associated with the vehicle.
external_id
- Type: String
- Description: External system identifier.
integration_name
- Type: String
- Description: The name of the integration associated with the external ID.