get https://api.gomotive.com/v1/freight_visibility/asset_locations
Purpose: Use this API to fetch a locations of all the assets that you've subscribed to.
require 'uri'
require 'net/http'
url = URI('https://api.gomotive.com/v1/freight_visibility/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
Data
- Type: Object
- Description: Contains details about assets, including load information, distance, and asset properties.
asset_details
- Type: Array of Objects
- Description: List of asset details including load, location, and asset specifications.
start_time
- Type: String
- Description: Start time of asset activity.
end_time
- Type: String
- Description: End time of asset activity.
load_id
- Type: String
- Description: Load ID associated with the asset.
load_details
- Type: String
- Description: Additional details regarding the load.
total_distance
- Type: String
- Description: Total distance traveled by the asset.
initial_stop
- Type: String
- Description: Initial stop location of the asset.
final_stop
- Type: String
- Description: Final stop location of the asset.
asset
- Type: Object
- Description: Asset-related details such as name, status, type, and specifications.
id
- Type: Integer
- Description: Unique identifier for the asset.
name
- Type: String
- Description: Name of the asset.
status
- Type: String
- Description: Status of the asset (e.g., active).
type
- Type: String
- Description: Type of the asset (e.g., dry_box).
vin
- Type: String
- Description: Vehicle Identification Number (VIN) for the asset.
license_plate_state
- Type: String
- Description: State where the license plate is registered.
license_plate_number
- Type: String
- Description: License plate number of the asset.
make
- Type: String
- Description: Manufacturer of the asset.
model
- Type: String
- Description: Model of the asset.
year
- Type: String
- Description: Manufacturing year of the asset.
axle
- Type: String
- Description: Number of axles on the asset.
weight_metric_units
- Type: Boolean
- Description: Indicates whether weight is measured in metric units.
length_metric_units
- Type: Boolean
- Description: Indicates whether length is measured in metric units.
leased
- Type: String
- Description: Indicates if the asset is leased.
notes
- Type: String
- Description: Additional notes about the asset.
length
- Type: String
- Description: Length of the asset.
gvwr
- Type: String
- Description: Gross Vehicle Weight Rating (GVWR) of the asset.
gawr
- Type: String
- Description: Gross Axle Weight Rating (GAWR) of the asset.
asset_gateway
- Type: Object
- Description: Details of the asset's gateway.
id
- Type: Integer
- Description: Unique identifier for the asset gateway.
identifier
- Type: String
- Description: Identifier of the asset gateway.
active
- Type: Boolean
- Description: Indicates whether the asset gateway is active.
last_location
- Type: Object
- Description: The most recent location details of the asset.
address
- Type: String
- Description: Address of the asset's last location.
bearing
- Type: Float
- Description: Direction in which the asset was moving, in degrees.
lat
- Type: Float
- Description: Latitude of the asset's last location.
lon
- Type: Float
- Description: Longitude of the asset's last location.
located_at
- Type: String
- Description: Timestamp of when the last location was recorded.
ground_speed_kph
- Type: Integer
- Description: Ground speed of the asset in kilometers per hour.
battery_capacity
- Type: Integer
- Description: Battery capacity of the asset in percentage.
uuid
- Type: String
- Description: Unique identifier for the location entry.
moving
- Type: Boolean
- Description: Indicates if the asset was moving at the time.
formatted_address
- Type: String
- Description: Formatted address of the asset's last location.
company_id
- Type: String
- Description: Unique identifier of the company.
dot_ids
- Type: Array of Strings
- Description: List of DOT (Department of Transportation) IDs associated with the company.
trailer_id
- Type: Integer
- Description: Identifier of the trailer associated with the asset.
tracking_subscription_id
- Type: Integer
- Description: Tracking subscription ID for the asset.