Movement Tracking Service
GPS Integration
API to integrate GPS data from external vendors
1 min
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 '{"body" {"vendor name" "string","count" "integer\<int32>","coordinates" \["integer\<int64>",0,0,0,"integer\<int64>","string"]}}'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "body" { "vendor name" "string", "count" "integer\<int32>", "coordinates" \[ "integer\<int64>", 0, 0, 0, "integer\<int64>", "string" ] } }); 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({ "body" { "vendor name" "string", "count" "integer\<int32>", "coordinates" \[ "integer\<int64>", 0, 0, 0, "integer\<int64>", "string" ] } }) 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({ "body" { "vendor name" "string", "count" "integer\<int32>", "coordinates" \[ "integer\<int64>", 0, 0, 0, "integer\<int64>", "string" ] } }) 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" }