Fetch a vehicle's location using its ID.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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_location

  • Type: Object
  • Description: Contains the vehicle's latest location, operational data, device information, and auxiliary status.

located_at

  • Type: String
  • Description: The timestamp when the vehicle location was recorded, in ISO 8601 format.

lat

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

lon

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

id

  • Type: String
  • Description: The unique identifier assigned to the location record.

type

  • Type: String
  • Description: The type of location record.

description

  • Type: String
  • Description: A human-readable description of the vehicle's location.

speed

  • Type: Number
  • Description: The vehicle's speed at the time the location was recorded. Can be null.

bearing

  • Type: Number
  • Description: The vehicle's direction of travel in degrees.

engine_hours

  • Type: Number
  • Description: The total number of engine hours recorded for the vehicle.

battery_voltage

  • Type: Number
  • Description: The vehicle's battery voltage. Can be null.

odometer

  • Type: Number
  • Description: The vehicle's odometer reading.

fuel

  • Type: Number
  • Description: The vehicle's remaining fuel level.

fuel_primary_remaining_percentage

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

fuel_secondary_remaining_percentage

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

driver

  • Type: Object
  • Description: Contains information about the driver assigned to the vehicle. Can be null.

eld_device

  • Type: Object
  • Description: Contains information about the electronic logging device installed in the vehicle.

id

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

identifier

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

model

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

aux_status

  • Type: Object
  • Description: Contains the status of the vehicle's auxiliary equipment.

AUX4

  • Type: Object
  • Description: Contains the status of the AUX4 input.

body_equipment_status

  • Type: String
  • Description: The type of body equipment associated with the AUX4 input.

is_engaged

  • Type: Boolean
  • Description: Indicates whether the AUX4 input is engaged.

Path Params
int32
required

Specify the unique identifier of the vehicle.

Query Params
date
required

Specify the date for which you want to check the information of the vehicle. NOTE: The format of the date is YYYY-MM-DD

Headers
string

Specify the timezone for formatting the timestamps.

boolean

Specify if you want to use the Metric units or the Imperial units. TRUE: Metric units. FALSE: Imperial Units

int32

Specify the ID of the Fleet Admin or the Fleet Manager who is accessing this endpoint.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json