List all the vehicles of a company

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.

availability_details

  • Type: Object
  • Description: Contains the availability details object. This object denotes the availability of the vehicle for a dispatch.

availability_status

  • Type: String
  • Description: Denotes the availability status of the vehicle. Allowed values are “out_of_service” or “in_service”.

out_of_service_reason

  • Type: String
  • Description: Denotes the reason for the vehicle being out of service.

updated_at

  • Type: DateTime
  • Description: Denotes the date and time when the availability status of the vehicle was updated.

additional_note

  • Type: String
  • Description: Denotes any comments or notes added for updating the availability of the vehicle. For example, “This vehicle is scheduled for maintenance.”

custom_driver_app_warning_prompt

  • Type: String
  • Description: This denotes the prompt message that drivers see on their driver_app. This prompt can be used to inform the driver about the status of the vehicle or communicate any specific instructions. For example, “Vehicle is under maintenance, do not operate.”

updated_by_user

  • Type: Object
  • Description: Object containing the details of the user who updated the availability status of the vehicle.

id

  • Type: Int
  • Description: The ID of the user who updated the availability status of the vehicle.

first_name

  • Type: String
  • Description: First name of the user who updated the status of the vehicle.

last_name

  • Type: String
  • Description: Last name of the user who updated the status of the vehicle.

user_name

  • Type: String
  • Description: Motive username of the person who updated the status.

email

  • Type: String
  • Description: Email address of the user.

company_reference_id

  • Type: Int
  • Description: The company ID of the user as per the internal company records.

status

  • Type: String
  • Description: The status of the user who updated the availability of the vehicle.

role

  • Type: String
  • Description: The role of the user who updated the availability status of the vehicle.

Language
Credentials
Header
Click Try It! to start a request and see the response here!