get https://api.gomotive.com/v1/vehicles
Purpose: Use this API to fetch a list of all the vehicles of your company that were updated after a given date. The response includes detailed data about each vehicle, including identifiers, status, specifications, driver information, and related metadata.
NOTE
The query parameters for this endpoint are optional as it will allow you to zero down the list of all the vehicles that are updated after a particular date. The date must be provided in UTC format. For example: 2023-10-04T00:00:00Z
Your API endpoint will look like this if you use the query parameter:
https://api.gomotive.com/v1/vehicles?updated_after=2023-10-04T00:00:00Z
require 'uri'
require 'net/http'
url = URI('https://api.gomotive.com/v1/vehicles')
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
vehicles
- Type: Object
- Description: This object contains the details of all the corresponding vehicles of the company.
vehicles Object
id
- Type: Number
- Description: The unique identifier for the vehicle.
company_id
- Type: Number
- Description: The unique identifier for the company to which the vehicle belongs.
number
- Type: String
- Description: The fleet number assigned to the vehicle.
status
- Type: String
- Description: The status of the vehicle (e.g., "active").
ifta
- Type: Boolean
- Description: Indicates whether the vehicle is subject to International Fuel Tax Agreement (IFTA) reporting.
vin
- Type: String
- Description: The Vehicle Identification Number (VIN).
make
- Type: String
- Description: The manufacturer of the vehicle.
model
- Type: String
- Description: The model of the vehicle.
year
- Type: String
- Description: The year the vehicle was manufactured.
license_plate_state
- Type: String
- Description: The state of the vehicle's license plate.