post https://api.keeptruckin.com/v1/freight_visibility/subscribe
Subscribe to a vehicle or asset's location
Constraints
- start_time and end_time must specify time window between 1 hour and 5 days
- start_time must be less than 2 weeks from today
- vehicle must be owned under company
- vehicle must be active and not deactivated
- overlapping tracking instances are not allowed
- asset must be active and not deactivated
- asset must have an asset gateway assigned
require 'uri'
require 'net/http'
url = URI('https://api.keeptruckin.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
For an example of how to use our Freight Visibility endpoints in a typical business scenario, refer to Freight Visibility Workflow.