Fetch a vehicle's location using its ID.

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.

require 'uri'
require 'net/http'
require 'json'

url = URI("https://api.gomotive.com/v1/vehicle_locations/<id>?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

vehicle

  • Type: Object
  • Description: Contains detailed information about a specific vehicle.

id

  • Type: Number
  • Description: The unique identifier assigned to the vehicle.

number

  • Type: String
  • Description: The name or number assigned to the vehicle.

year

  • Type: String
  • Description: The year the vehicle was manufactured.

make

  • Type: String
  • Description: The manufacturer of the vehicle.

model

  • Type: String
  • Description: The model of the vehicle.

vin

  • Type: String
  • Description: The Vehicle Identification Number (VIN) of the vehicle.

aux_status

  • Type: Object
  • Description: Contains the auxiliary system status details of the vehicle.

AUX1

  • Type: Object
  • Description: The status of auxiliary system 1.

present

  • Type: Boolean
  • Description: Indicates whether auxiliary system 1 is present.

end_time

  • Type: String (ISO 8601 date format)
  • Description: The timestamp when auxiliary system 1 was last disengaged.

is_engaged

  • Type: Boolean
  • Description: Indicates whether auxiliary system 1 is currently engaged.

start_time

  • Type: String (ISO 8601 date format)
  • Description: The timestamp when auxiliary system 1 was last engaged.

AUX2

  • Type: Object
  • Description: The status of auxiliary system 2.

present

  • Type: Boolean
  • Description: Indicates whether auxiliary system 2 is present.

end_time

  • Type: String (ISO 8601 date format)
  • Description: The timestamp when auxiliary system 2 was last disengaged.

is_engaged

  • Type: Boolean
  • Description: Indicates whether auxiliary system 2 is currently engaged.

start_time

  • Type: String (ISO 8601 date format)
  • Description: The timestamp when auxiliary system 2 was last engaged.

updated_at

  • Type: String (ISO 8601 date format)
  • Description: The timestamp when the auxiliary system status was last updated.

vehicle_id

  • Type: Number
  • Description: The unique identifier of the vehicle associated with the auxiliary system status.

current_location

  • Type: Object
  • Description: The current location of the vehicle, including geographic coordinates, city, state, and additional location data.

lat

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

lon

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

bearing

  • Type: Number
  • Description: The bearing of the vehicle's movement in degrees.

located_at

  • Type: String (ISO 8601 date format)
  • Description: The timestamp when the location data was recorded.

city

  • Type: String
  • Description: The city where the vehicle is currently located.

state

  • Type: String
  • Description: The state where the vehicle is currently located.

rg_km

  • Type: Number
  • Description: The range in kilometers for a particular geofence or location.

rg_brg

  • Type: Number
  • Description: The bearing in degrees related to the range geofence or location.

rg_match

  • Type: Boolean
  • Description: Indicates whether the vehicle matches the range geofence criteria (true or false).

kph

  • Type: Number
  • Description: The speed of the vehicle in kilometers per hour.

vehicle_state

  • Type: String
  • Description: The current operational state of the vehicle (e.g., "moving").

current_location

  • Type: String
  • Description: The textual description of the vehicle's current location, including address details.

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