Subscribe to the location of a vehicle or an asset

Purpose: Use this API to subscribe to the location of a vehicle or an asset. When you subscribe to the location of an asset or a vehicle, you are essentially tracking the location of that object. You must specify how long you want to subscribe to the location or in other words, how long you want to track the location. This is determined by the start_time and the end_time parameters.

👍

IMPORTANT

When you are using this endpoint, you must remember the following points:

  1. If you are subscribing the location of vehicle, follow these requirements:
    1. Vehicle must be owned by a company.
    2. Vehicle status must be 'active', and not 'deactivated'.
  2. This endpoint does not allow overlapping of tracking instances.
  3. If you are subscribing the location of an asset, follow these requirements:
    1. Asset status must be 'active', and not 'deactivated'.
    2. Every asset must have an asset gateway assigned to it.
  4. The query parameter start_time, must be less than 2 weeks from the current date.
  5. The minimum difference between the start_time and end_time must be 1 hour.
  6. The maximum difference between the start_time and the end_time must be 5 days.
require 'uri'
require 'net/http'

url = URI('https://api.gomotive.com/v1/freight_visibility/subscribe')

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request['Authorization'] = "Bearer <OAUTH_TOKEN>"

response = http.request(request)
puts response.read_body

Response Parameters

tracking_subscription_id

  • Type: Integer
  • Description: Denotes the ID for tracking the location of the asset or the vehicle.

Query Params
string

Specify the ID of the company to which the vehicle or the asset belongs.

string

You must specify the DOT ID, if you not have the Company ID. Otherwise, it is not required.

string

Specify the ID of the asset that you want to track.

string

Specify the ID of the vehicle to be tracked.

string

Specify the name of the vehicle that you want to track.

string

Specify the ID of the driver whose vehicle location you are subscribing to.

date
required

Provide the start time from when you want to subscribe to a vehicle's location.

date
required

Provide the end time till when you want to subscribe to the vehicle's location.

string

Specify the ID of the load. Passed in by client for client side tracking. Sent back to client in response payload containing location.

string

Specify the details of the load. Passed in by client for client side tracking. Sent back to client in response payload containing location.

initial_stop
object

Specify the coordinates of the starting point of load. This is mostly used for client side tracking.

final_stop
object

Specify the final drop off point of the vehicle. This is mostly for the tracking purposes of the client.

total_distance
object

The total distance covered from the initial load point to drop off point.

string

Specify the ID of the trailer.

string

The name of the freight broker who is tracking the load.

Responses

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