Fetch a list of all the assets and their locations using their IDs

Purpose: Use this API to fetch a list of the all the assets of your company by using the asset ID. Optionally, you can also use the query parameters to fetch the list of assets 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/v1/asset_locations/<id>?start_time=<yyyy-mm-dd>&end_time=<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

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.
Language
Credentials
Header
Click Try It! to start a request and see the response here!