get https://api.gomotive.com/v1/freight_visibility/subscribe/
Purpose: Use this API to modify the duration of the start_time and the end_time for the tracking subscription that you've created earlier. You must specify the tracking subscription ID and mention the new start time and the end time. You must however, keep in mind the following rules:
Modification Requirements
- The query parameter
start_time
, must be less than 2 weeks from the current date.- The minimum difference between the
start_time
andend_time
must be 1 hour.- The maximum difference between the
start_time
and theend_time
must be 5 days.- New
start_time
must be earlier than the previous date.- New
end_time
must be later than the previous date.- This endpoint does not allow overlapping of tracking instances.
- If you are subscribing the location of vehicle, follow these requirements:
- Vehicle must be owned by a company.
- Vehicle status must be 'active', and not 'deactivated'.
- If you are subscribing the location of an asset, follow these requirements:
- Asset status must be 'active', and not 'deactivated'.
- Every asset must have an asset gateway assigned to it.
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::Put.new(url)
request['Authorization'] = "Bearer <OAUTH_TOKEN>"
response = http.request(request)
puts response.read_body
Response Parameters
success
- Type: Boolean
- Description: Denotes if the modification to the subscription was successful or not. Mostly the value for this parameter will be "true". Otherwise, you will see the status 400 appearing.