List the location details of an asset (v2)

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

Purpose: Use this API to fetch the location details of a particular asset using its ID. Optionally, you can also use the query parameters to view the location details within a particular date range.

NOTE: The date range between the start date and the end date should not exceed more than 3 months.

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

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

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

asset

  • Type: Object
  • Description: Contains the details of an asset.

id

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

name

  • Type: String
  • Description: The name assigned to the asset.

status

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

type

  • Type: String
  • Description: The type of asset (e.g., "low_boy").

vin

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

license_plate_state

  • Type: String
  • Description: The state where the asset's license plate was issued.

license_plate_number

  • Type: String
  • Description: The license plate number of the asset.

make

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

model

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

year

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

axle

  • Type: String
  • Description: The axle details of the asset.

weight_metric_units

  • Type: Boolean
  • Description: Indicates whether the asset's weight is measured in metric units.

length_metric_units

  • Type: Boolean
  • Description: Indicates whether the asset's length is measured in metric units.

leased

  • Type: Boolean
  • Description: Indicates whether the asset is leased.

notes

  • Type: String
  • Description: Additional notes about the asset.

length

  • Type: Number
  • Description: The length of the asset.

gvwr

  • Type: Number
  • Description: The Gross Vehicle Weight Rating (GVWR) of the asset.

gawr

  • Type: Number
  • Description: The Gross Axle Weight Rating (GAWR) of the asset.

asset_gateway

  • Type: Object
  • Description: Contains details about the asset's gateway.

id

  • Type: Number
  • Description: The unique identifier for the asset's gateway.

identifier

  • Type: String
  • Description: The identifier for the asset's gateway.

active

  • Type: Boolean
  • Description: Indicates whether the asset's gateway is active.

breadcrumbs

  • Type: Array
  • Description: A list of breadcrumb locations for the asset.

uuid

  • Type: String
  • Description: The unique identifier for the breadcrumb.

lat

  • Type: Number
  • Description: The latitude of the breadcrumb location.

lon

  • Type: Number
  • Description: The longitude of the breadcrumb location.

bearing

  • Type: Number
  • Description: The bearing (direction) of the asset at the time of the breadcrumb.

speed

  • Type: Number
  • Description: The speed of the asset at the time of the breadcrumb.

motion_description

  • Type: String
  • Description: A description of the asset's motion at the time of the breadcrumb.

moving

  • Type: Boolean
  • Description: Indicates whether the asset was moving at the time of the breadcrumb.

address

  • Type: String
  • Description: The address of the breadcrumb location.

located_at

  • Type: String
  • Description: The timestamp when the asset was located at the breadcrumb location.

per_page

  • Type: Integer
  • Description: The requested page size.

cursor

  • Type: String
  • Description: A pagination token used to fetch the next page of results. This value is null when there are no more results.

Path Params
int32
required

Specify the ID of an asset to know it's location details.

Query Params
date
required

Specify the start date from which you want to fetch the asset's location history.

date
required

Provide the end date for when you want to check the location history of the asset.

int32
Defaults to 25

Number of records to display per page. Allowed values - 1 to 500

string

[OPTIONAL] Use this parameter to fetch the next page of results. First call the same endpoint without cursor. After you receive the first page, pass the cursor value returned in the response to retrieve the next set of results. Continue until the response returns pagination.cursor as null.

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.

Response

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