OS1 Services
Movement Tracking System
MTS ETA
4min
overview the mts eta (estimated time of arrival) service enables developers to get the estimated travel time and distance between a source and destination it leverages third party mapping services for accurate etas calculated based on real time traffic, historical data, and routing key features get estimated time of arrival (eta) for routes specify source & destination as coordinates or addresses integrated with google maps for traffic aware etas how it works the eta service integrates with google maps to determine travel time between locations retrieve an eta between two geolocations the getmapseta endpoint let's developers retrieve the eta duration query parameters parameter description source comma separated latitude and longitude, or the address of the source point destination comma separated latitude and longitude, or the address of the destination point departuretime time in epoch seconds for the vehicle's departure from the origin can be current or future time, not past mode mode of transportation should be oneof \["driving", "walking", "bicycling"] avoid restrictions to avoid in routing, comma separated options \["tolls", "highways", "ferries", "indoor"] default is none example "tolls,highways" trafficmodel assumptions for calculating time in traffic options \["best guess", "pessimistic", "optimistic"] if provided, departuretime is mandatory callback json string with callback details for asynchronous api response delivery example {"url" "https //alexa1 requestcatcher com/test","headers" {}} example callback responses address response { "requestid" "1234", "tenantid" "os1devs", "success" true, "etaresponse" { "source" { "lat" null, "lon" null, "address" "5, sector 44, gurugram, haryana 122001, india" }, "destination" { "lat" null, "lon" null, "address" "millennium city centre gurugram, gurgaon delhi expy, sector 29, gurugram, haryana 122007, india" }, "distance" 1834, "duration" 325 } } lat/lon response { "requestid" "1234", "tenantid" "os1devs", "success" true, "etaresponse" { "source" { "lat" 28 673980543290554, "lon" 77 08028318182417, "address" null }, "destination" { "lat" 28 661782, "lon" 77 083259, "address" null }, "distance" 1726, "duration" 303 } } after processing an eta request, the api sends a response to a specified callback url see the provided sample response structure with a description of each field field description requestid a unique identifier for the eta request, useful for tracking and referencing the specific request tenantid identifier for the tenant or user account making the request, in this case, "os1devs" success a boolean flag indicating whether the eta calculation was successful etaresponse the main content of the response, containing detailed eta information source the starting point of the route source lat latitude coordinate of the source location source lon longitude coordinate of the source location source address the textual address of the source location, if available here, it's null destination the endpoint of the route destination lat latitude coordinate of the destination location destination lon longitude coordinate of the destination location destination address the textual address of the destination location distance the total distance from the source to the destination in meters duration the estimated travel time from the source to the destination in seconds