get https://api.gomotive.com/v1/asset_locations
Purpose: Use this API to fetch a list of all the company assets and their current location. This API will provide information about the asset such as make, model, year, and others that are crucial.
require 'uri'
require 'net/http'
url = URI('https://api.gomotive.com/v1/asset_locations')
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., "dump_tipper").
vin
- Type: String | Null
- Description: The Vehicle Identification Number (VIN) of the asset. Can be null if not provided.
license_plate_state
- Type: String | Null
- Description: The state where the asset's license plate was issued. Can be null if not provided.
license_plate_number
- Type: String | Null
- Description: The license plate number of the asset. Can be null if not provided.
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 | Null
- Description: The axle details of the asset. Can be null if not provided.
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 | Null
- Description: Indicates whether the asset is leased. Can be null if not applicable.
notes
- Type: String | Null
- Description: Additional notes about the asset. Can be null if not provided.
length
- Type: Number | Null
- Description: The length of the asset. Can be null if not provided.
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.
last_location
- Type: Object
- Description: Contains the last known location of the asset's gateway.
odometer
- Type: Number
- Description: The odometer reading of the asset.
engine_hours
- Type: Number
- Description: The total engine hours of the asset.