Cancel the subscription to location tracking

Purpose: Use this API to cancel the subscription to track either a vehicle or an asset. When you first subscribe to this feature, you will be provided a tracking_subscription_id. You must specify the same ID to cancel the subscription. This will delete the subscription to the tracking of that particular vehicle or an asset.

There are some important points to keep in mind before cancelling your subscription:

📘

IMPORTANT

  1. When you initially subscribe to the location tracking, you will be billed for the entire duration (start_time & end_time). It is important to note that when you cancel the subscription, even if you have some days pending for the duration to complete, you will be billed for the entire duration. There will not be any pro-rata billing for the duration.
  2. You cannot cancel a subscription that has already ended. Since the duration has already passed, you will be billed for the complete duration. Only subscriptions that are not ended (the end_date is yet to come), can be cancelled.
  3. If you cancel a subscription it does not mean that you will not be able to track your vehicles or assets. The Motive Dashboard will still show you the tracking of the vehicles or assets as usual irrespective of your subscription to the location tracking feature.
  4. When pulling the location information of a vehicle or an asset, the user will not see the subscription information. This info will be removed.
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::Delete.new(url)
request['Authorization'] = "Bearer <OAUTH_TOKEN>"

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

Response Parameters

success

  • Type: Boolean
  • Description: Denotes if the subscription was deleted successfully for tracking the location of an asset or a vehicle. Mostly the value for this parameter will be "true". Otherwise, you will see the status 400 appearing.

Language
Credentials
Header
Click Try It! to start a request and see the response here!