Movement Tracking Service
GPS Integration
API to integrate GPS data from external vendors
1min
code examples curl location globoff 'http //{base url}/core/api/v1/mts/gps/push/location data' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "vendor name" "", "count" "", "coordinates" \[ { "epoch" "", "lat" "", "lon" "", "spd" "", "server timestamp" "", "vehicle number" "" } ] }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "vendor name" "", "count" "", "coordinates" \[ { "epoch" "", "lat" "", "lon" "", "spd" "", "server timestamp" "", "vehicle number" "" } ] }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("http //{base url}/core/api/v1/mts/gps/push/location data", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("http //{base url}/core/api/v1/mts/gps/push/location data") http = net http new(url host, url port); request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "vendor name" "", "count" "", "coordinates" \[ { "epoch" "", "lat" "", "lon" "", "spd" "", "server timestamp" "", "vehicle number" "" } ] }) response = http request(request) puts response read body import requests import json url = "http //{base url}/core/api/v1/mts/gps/push/location data" payload = json dumps({ "vendor name" "", "count" "", "coordinates" \[ { "epoch" "", "lat" "", "lon" "", "spd" "", "server timestamp" "", "vehicle number" "" } ] }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // successful operation { "statuscode" 200, "message" "publish successful" }