MTS ETA
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.
- Get estimated time of arrival (ETA) for routes
- Specify source & destination as coordinates or addresses
- Integrated with Google Maps for traffic-aware ETAs
The ETA service integrates with Google maps to determine travel time between locations.
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
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. |