Fetch a vehicle's location using its ID (v3)

Purpose: Use this API to fetch the location of a particular vehicle using its ID. You must also specify the date for which you want to check the information of the vehicle as a query parameter.

📘

NOTE

This is the v3 of the "Fetch the location of a vehicle using its ID" endpoint. For this API, you must specify the following Query Parameters:

  • start_date: Provide the start date from which you want to check the location history of the vehicle.
  • end_date: Provide the end date for when you want to check the location history of the vehicle.
    IMPORTANT: The duration between the start date and the end date must not exceed 3 months.
  • updated_after: Provide the date after which the location records have been updated.
require 'uri'
require 'net/http'
require 'json'

url = URI("https://api.gomotive.com/v3/vehicle_locations/<id>?start_date=<yyyy-mm-dd>&end_date=<yyyy-mm-dd>")

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

📘

NOTE

This endpoint has a limit of 10 simultaneous requests at a time.

Response Parameters

id

  • Type: String
  • Description: The unique identifier for the vehicle location.

located_at

  • Type: String
  • Description: The timestamp of when the vehicle was located.

lat

  • Type: Number
  • Description: The latitude value of the vehicle's location.

lon

  • Type: Number
  • Description: The longitude value of the vehicle's location.

bearing

  • Type: Number
  • Description: The direction the vehicle is heading in degrees.

battery_voltage

  • Type: Number
  • Description: The voltage of the vehicle's battery at the time of location.

engine_hours

  • Type: Number
  • Description: The total engine hours at the time of location.

type

  • Type: String
  • Description: The type of location data (e.g., "vehicle_moving").

description

  • Type: String
  • Description: A textual description of the vehicle's location.

speed

  • Type: Number
  • Description: The speed of the vehicle at the time of location in miles per hour (mph).

odometer

  • Type: Number
  • Description: The odometer reading of the vehicle in miles at the time of location.

fuel

  • Type: Number
  • Description: The fuel level of the vehicle in gallons at the time of location.

fuel_primary_remaining_percentage

  • Type: Number
  • Description: The percentage of fuel remaining in the primary fuel tank.

fuel_secondary_remaining_percentage

  • Type: Number
  • Description: The percentage of fuel remaining in the secondary fuel tank.

true_odometer

  • Type: Number
  • Description: The true odometer reading of the vehicle.

true_engine_hours

  • Type: Number
  • Description: The true engine hours of the vehicle.

veh_range

  • Type: Number
  • Description: The remaining range of the vehicle based on current fuel levels.

hvb_state_of_charge

  • Type: Number
  • Description: The state of charge of the High Voltage Battery (HVB) as a percentage.

hvb_charge_status

  • Type: Number
  • Description: The charge status of the High Voltage Battery (HVB).

hvb_charge_source

  • Type: Number
  • Description: The source of charge for the High Voltage Battery (HVB).

hvb_lifetime_energy_output

  • Type: Number
  • Description: The lifetime energy output of the High Voltage Battery (HVB).

id

  • Type: Number
  • Description: The unique identifier for the driver.

first_name

  • Type: String
  • Description: The first name of the driver.

last_name

  • Type: String
  • Description: The last name of the driver.

username

  • Type: String
  • Description: The username associated with the driver.

email

  • Type: String
  • Description: The email address of the driver.

driver_company_id

  • Type: String
  • Description: The company identifier associated with the driver.

status

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

role

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

id

  • Type: Number
  • Description: The unique identifier for the ELD device.

identifier

  • Type: String
  • Description: The identifier of the ELD device.

model

  • Type: String
  • Description: The model of the ELD device.

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