v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-145615375.2 KB

Use CalculateRouteMatrix to compute results for all pairs of Origins to Destinations. Each row corresponds to one entry in Origins. Each entry in the row corresponds to the route from that entry in Origins to an entry in Destinations positions.

For more information, see Calculate route matrix in the Amazon Location Service Developer Guide.

post/v2/route-matrix

Query parameters

keystring password

Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.

Request body

DepartNowboolean

Uses the current time as the time of departure.

DepartureTimestring password
<p>Time of departure from the origin.</p> <p>Time format:<code>YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm</code> </p> <p>Examples:</p> <p> <code>2020-04-22T17:57:24Z</code> </p> <p> <code>2020-04-22T17:57:24+02:00</code> </p>
OptimizeRoutingFor'FastestRoute' | 'ShortestRoute'
<p>Controls the trade-off between finding the shortest travel time (<code>FastestRoute</code>) and the shortest distance (<code>ShortestRoute</code>) when calculating reachable areas.</p> <p>Default value: <code>FastestRoute</code> </p>
TravelMode'Car' | 'Pedestrian' | 'Scooter' | 'Truck'
<p> Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility. For <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers, <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions support only <code>Car</code>, <code>Pedestrian</code>, and <code>Scooter</code>. </p> <p>Default value: <code>Car</code> </p>

Response

Success

ErrorCountinteger required

The count of error results in the route matrix. If this number is 0, all routes were calculated successfully.