Fetch recent location details of a vehicle (within 24 hours)

Log in to see full request history

Purpose: Use this API to fetch the recent location details of a specific vehicle. It is important to note that you can only view the location history of the past 24 hours or less. The following are the things to remember when using this endpoint:

📘

THINGS TO REMEMBER

  1. The start_time and the end_time, must be within the past 24 hours or less. This endpoint will not fetch the historical location data.
  2. You must have an active tracking subscription for the vehicle.
  3. The vehicle must not be deactivated.
  4. The start_time and the end_time must match or be within the start_time and the end_time of the vehicle subscription.
require 'uri' require 'net/http' url = URI('https://api.gomotive.com/v1/freight_visibility/vehicle_locations/details') 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

Data

  • Type: Object
  • Description: Contains information about vehicle locations.

vehicle_locations

  • Type: Array of Objects
  • Description: List of vehicle locations with details such as coordinates, speed, and engine hours.

d

  • Type: String
  • Description: Unique identifier for the vehicle location event.

located_at

  • Type: String
  • Description: Timestamp of when the vehicle location was recorded.

lat

  • Type: Float
  • Description: Latitude of the vehicle’s location.

lon

  • Type: Float
  • Description: Longitude of the vehicle’s location.

description

  • Type: String
  • Description: Descriptive location of the vehicle (e.g., city, state).

bearing

  • Type: Integer
  • Description: The vehicle's directional bearing in degrees.

engine_hours

  • Type: Float
  • Description: Number of engine hours recorded.

type

  • Type: String
  • Description: Type of vehicle event (e.g., vehicle moving).

speed

  • Type: Float
  • Description: Speed of the vehicle in miles per hour.

fuel

  • Type: Float
  • Description: The amount of fuel remaining in gallons.

odometer

  • Type: Float
  • Description: The vehicle’s odometer reading in miles.

Query Params
int32

Specify the ID of the vehicle for which you are fetching the location details.

string

Specify the name of the vehicle for which you are fetching the location details.

int32

Specify the ID of the driver driving the vehicle.

date

Specify the start time from when you want to view the location details of the vehicle. NOTE: Must be within 24 hours of current time.

date

Specify the end time till when you want to view the location details of the vehicle. NOTE: Must be within 24 hours from the current time.

Responses

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