Amazon Location Service Routes - API Reference

59
Amazon Location Service Routes API Reference API Version 2020-11-19

Transcript of Amazon Location Service Routes - API Reference

Amazon Location Service RoutesAPI Reference

API Version 2020-11-19

Amazon Location Service Routes API Reference

Amazon Location Service Routes: API ReferenceCopyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon's trademarks and trade dress may not be used in connection with any product or service that is notAmazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages ordiscredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who mayor may not be affiliated with, connected to, or sponsored by Amazon.

Amazon Location Service Routes API Reference

Table of ContentsWelcome .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Actions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

CalculateRoute .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

CalculateRouteMatrix ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

CreateRouteCalculator ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

DeleteRouteCalculator ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

DescribeRouteCalculator ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

ListRouteCalculators ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

UpdateRouteCalculator ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

API Version 2020-11-19iii

Amazon Location Service Routes API Reference

Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Data Types .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31CalculateRouteCarModeOptions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

CalculateRouteMatrixSummary .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

CalculateRouteSummary .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

CalculateRouteTruckModeOptions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Leg .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

LegGeometry .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

ListRouteCalculatorsResponseEntry .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

RouteMatrixEntry .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

RouteMatrixEntryError ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Step .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

TruckDimensions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

TruckWeight .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

ValidationExceptionField .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Common Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Common Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

API Version 2020-11-19iv

Amazon Location Service Routes API Reference

WelcomeWelcome to the Amazon Location Service Routes API Reference.

Amazon Location Service Routes enables you to calculate routes and estimate travel time based onup-to-date road network and live traffic information from your chosen data provider. Create a routecalculator resource to use when calculating routes. Send calculate route requests that let you buildfeatures in your application to estimate travel time, distance, and directions. Send calculate route matrixrequests that let you calculate the travel time and travel distance of many routes in a single request.

Amazon Location sources high-quality traffic and road network data from the following data providers tosupport queries to calculate routes using a route calculator resource:

• Esri• HERE Technologies

For additional information , see Data providers in the Amazon Location Service Developer Guide.

For more information about how to use route calculator resources, see Calculating a route in the AmazonLocation Service Developer Guide. It provides definitions, tutorials, code examples, and instructions abouthow to integrate Amazon Location features into your application.

NoteBy using Amazon Location Routes, you agree that AWS can transmit your API queries to yourchosen third-party data provider for processing, which could be outside of your current AWSRegion. For more information, see the AWS Service Terms for Amazon Location Service.

This document was last published on April 15, 2022.

API Version 2020-11-191

Amazon Location Service Routes API Reference

ActionsThe following actions are supported:

• CalculateRoute (p. 3)• CalculateRouteMatrix (p. 9)• CreateRouteCalculator (p. 15)• DeleteRouteCalculator (p. 19)• DescribeRouteCalculator (p. 21)• ListRouteCalculators (p. 25)• UpdateRouteCalculator (p. 28)

API Version 2020-11-192

Amazon Location Service Routes API ReferenceCalculateRoute

CalculateRouteCalculates a route given the following required parameters: DeparturePosition andDestinationPosition. Requires that you first create a route calculator resource.

By default, a request that doesn't specify a departure time uses the best time of day to travel with thebest traffic conditions when calculating the route.

Additional options include:

• Specifying a departure time using either DepartureTime or DepartNow. This calculates a routebased on predictive traffic data at the given time.

NoteYou can't specify both DepartureTime and DepartNow in a single request. Specifying bothparameters returns a validation error.

• Specifying a travel mode using TravelMode sets the transportation mode used to calculate the routes.This also lets you specify additional route preferences in CarModeOptions if traveling by Car, orTruckModeOptions if traveling by Truck.

Request SyntaxPOST /routes/v0/calculators/CalculatorName/calculate/route HTTP/1.1Content-type: application/json

{ "CarModeOptions": { "AvoidFerries": boolean, "AvoidTolls": boolean }, "DepartNow": boolean, "DeparturePosition": [ number ], "DepartureTime": number, "DestinationPosition": [ number ], "DistanceUnit": "string", "IncludeLegGeometry": boolean, "TravelMode": "string", "TruckModeOptions": { "AvoidFerries": boolean, "AvoidTolls": boolean, "Dimensions": { "Height": number, "Length": number, "Unit": "string", "Width": number }, "Weight": { "Total": number, "Unit": "string" } }, "WaypointPositions": [ [ number ] ]}

URI Request ParametersThe request uses the following URI parameters.

API Version 2020-11-193

Amazon Location Service Routes API ReferenceRequest Body

CalculatorName (p. 3)

The name of the route calculator resource that you want to use to calculate the route.

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^[-._\w]+$

Required: Yes

Request BodyThe request accepts the following data in JSON format.

CarModeOptions (p. 3)

Specifies route preferences when traveling by Car, such as avoiding routes that use ferries or tolls.

Requirements: TravelMode must be specified as Car.

Type: CalculateRouteCarModeOptions (p. 32) object

Required: NoDepartNow (p. 3)

Sets the time of departure as the current time. Uses the current time to calculate a route. Otherwise,the best time of day to travel with the best traffic conditions is used to calculate the route.

Default Value: false

Valid Values: false | true

Type: Boolean

Required: NoDeparturePosition (p. 3)

The start position for the route. Defined in World Geodetic System (WGS 84) format: [longitude,latitude].• For example, [-123.115, 49.285]

NoteIf you specify a departure that's not located on a road, Amazon Location moves the positionto the nearest road. If Esri is the provider for your route calculator, specifying a route that islonger than 400 km returns a 400 RoutesValidationException error.

Valid Values: [-180 to 180,-90 to 90]

Type: Array of doubles

Array Members: Fixed number of 2 items.

Required: YesDepartureTime (p. 3)

Specifies the desired time of departure. Uses the given time to calculate the route. Otherwise, thebest time of day to travel with the best traffic conditions is used to calculate the route.

NoteSetting a departure time in the past returns a 400 ValidationException error.

API Version 2020-11-194

Amazon Location Service Routes API ReferenceRequest Body

• In ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. For example, 2020–07-2T12:15:20.000Z+01:00

Type: Timestamp

Required: NoDestinationPosition (p. 3)

The finish position for the route. Defined in World Geodetic System (WGS 84) format: [longitude,latitude].• For example, [-122.339, 47.615]

NoteIf you specify a destination that's not located on a road, Amazon Location moves theposition to the nearest road.

Valid Values: [-180 to 180,-90 to 90]

Type: Array of doubles

Array Members: Fixed number of 2 items.

Required: YesDistanceUnit (p. 3)

Set the unit system to specify the distance.

Default Value: Kilometers

Type: String

Valid Values: Kilometers | Miles

Required: NoIncludeLegGeometry (p. 3)

Set to include the geometry details in the result for each path between a pair of positions.

Default Value: false

Valid Values: false | true

Type: Boolean

Required: NoTravelMode (p. 3)

Specifies the mode of transport when calculating a route. Used in estimating the speed of travel androad compatibility.

The TravelMode you specify also determines how you specify route preferences:• If traveling by Car use the CarModeOptions parameter.• If traveling by Truck use the TruckModeOptions parameter.

Default Value: Car

Type: String

Valid Values: Car | Truck | Walking

API Version 2020-11-195

Amazon Location Service Routes API ReferenceResponse Syntax

Required: NoTruckModeOptions (p. 3)

Specifies route preferences when traveling by Truck, such as avoiding routes that use ferries or tolls,and truck specifications to consider when choosing an optimal road.

Requirements: TravelMode must be specified as Truck.

Type: CalculateRouteTruckModeOptions (p. 37) object

Required: NoWaypointPositions (p. 3)

Specifies an ordered list of up to 23 intermediate positions to include along a route between thedeparture position and destination position.• For example, from the DeparturePosition [-123.115, 49.285], the route follows the order

that the waypoint positions are given [[-122.757, 49.0021],[-122.349, 47.620]]

NoteIf you specify a waypoint position that's not located on a road, Amazon Location moves theposition to the nearest road.Specifying more than 23 waypoints returns a 400 ValidationException error.If Esri is the provider for your route calculator, specifying a route that is longer than 400 kmreturns a 400 RoutesValidationException error.

Valid Values: [-180 to 180,-90 to 90]

Type: Array of arrays of doubles

Array Members: Minimum number of 0 items. Maximum number of 23 items.

Array Members: Fixed number of 2 items.

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "Legs": [ { "Distance": number, "DurationSeconds": number, "EndPosition": [ number ], "Geometry": { "LineString": [ [ number ] ] }, "StartPosition": [ number ], "Steps": [ { "Distance": number, "DurationSeconds": number, "EndPosition": [ number ], "GeometryOffset": number, "StartPosition": [ number ] }

API Version 2020-11-196

Amazon Location Service Routes API ReferenceResponse Elements

] } ], "Summary": { "DataSource": "string", "Distance": number, "DistanceUnit": "string", "DurationSeconds": number, "RouteBBox": [ number ] }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Legs (p. 6)

Contains details about each path between a pair of positions included along a route such as:StartPosition, EndPosition, Distance, DurationSeconds, Geometry, and Steps. Thenumber of legs returned corresponds to one fewer than the total number of positions in the request.

For example, a route with a departure position and destination position returns one leg with thepositions snapped to a nearby road:• The StartPosition is the departure position.• The EndPosition is the destination position.

A route with a waypoint between the departure and destination position returns two legs with thepositions snapped to a nearby road:• Leg 1: The StartPosition is the departure position . The EndPosition is the waypoint positon.• Leg 2: The StartPosition is the waypoint position. The EndPosition is the destination

position.

Type: Array of Leg (p. 38) objectsSummary (p. 6)

Contains information about the whole route, such as: RouteBBox, DataSource, Distance,DistanceUnit, and DurationSeconds.

Type: CalculateRouteSummary (p. 35) object

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 54).

AccessDeniedException

The request was denied because of insufficient access or permissions. Check with an administrator toverify your permissions.

HTTP Status Code: 403InternalServerException

The request has failed to process because of an unknown server error, exception, or failure.

API Version 2020-11-197

Amazon Location Service Routes API ReferenceSee Also

HTTP Status Code: 500ResourceNotFoundException

The resource that you've entered was not found in your AWS account.

HTTP Status Code: 404ThrottlingException

The request was denied because of request throttling.

HTTP Status Code: 429ValidationException

The input failed to meet the constraints specified by the AWS service.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

API Version 2020-11-198

Amazon Location Service Routes API ReferenceCalculateRouteMatrix

CalculateRouteMatrixCalculates a route matrix given the following required parameters: DeparturePositions andDestinationPositions. CalculateRouteMatrix calculates routes and returns the travel time andtravel distance from each departure position to each destination position in the request. For example,given departure positions A and B, and destination positions X and Y, CalculateRouteMatrix willreturn time and distance for routes from A to X, A to Y, B to X, and B to Y (in that order). The number ofresults returned (and routes calculated) will be the number of DeparturePositions times the numberof DestinationPositions.

NoteYour account is charged for each route calculated, not the number of requests.

Requires that you first create a route calculator resource.

By default, a request that doesn't specify a departure time uses the best time of day to travel with thebest traffic conditions when calculating routes.

Additional options include:

• Specifying a departure time using either DepartureTime or DepartNow. This calculates routes basedon predictive traffic data at the given time.

NoteYou can't specify both DepartureTime and DepartNow in a single request. Specifying bothparameters returns a validation error.

• Specifying a travel mode using TravelMode sets the transportation mode used to calculate the routes.This also lets you specify additional route preferences in CarModeOptions if traveling by Car, orTruckModeOptions if traveling by Truck.

Request SyntaxPOST /routes/v0/calculators/CalculatorName/calculate/route-matrix HTTP/1.1Content-type: application/json

{ "CarModeOptions": { "AvoidFerries": boolean, "AvoidTolls": boolean }, "DepartNow": boolean, "DeparturePositions": [ [ number ] ], "DepartureTime": number, "DestinationPositions": [ [ number ] ], "DistanceUnit": "string", "TravelMode": "string", "TruckModeOptions": { "AvoidFerries": boolean, "AvoidTolls": boolean, "Dimensions": { "Height": number, "Length": number, "Unit": "string", "Width": number },

API Version 2020-11-199

Amazon Location Service Routes API ReferenceURI Request Parameters

"Weight": { "Total": number, "Unit": "string" } }}

URI Request ParametersThe request uses the following URI parameters.

CalculatorName (p. 9)

The name of the route calculator resource that you want to use to calculate the route matrix.

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^[-._\w]+$

Required: Yes

Request BodyThe request accepts the following data in JSON format.

CarModeOptions (p. 9)

Specifies route preferences when traveling by Car, such as avoiding routes that use ferries or tolls.

Requirements: TravelMode must be specified as Car.

Type: CalculateRouteCarModeOptions (p. 32) object

Required: No

DepartNow (p. 9)

Sets the time of departure as the current time. Uses the current time to calculate the route matrix.You can't set both DepartureTime and DepartNow. If neither is set, the best time of day to travelwith the best traffic conditions is used to calculate the route matrix.

Default Value: false

Valid Values: false | true

Type: Boolean

Required: No

DeparturePositions (p. 9)

The list of departure (origin) positions for the route matrix. An array of points, each of which is itselfa 2-value array defined in WGS 84 format: [longitude, latitude]. For example, [-123.115,49.285].

ImportantDepending on the data provider selected in the route calculator resource there may beadditional restrictions on the inputs you can choose. See Position restrictions in the AmazonLocation Service Developer Guide.

API Version 2020-11-1910

Amazon Location Service Routes API ReferenceRequest Body

NoteFor route calculators that use Esri as the data provider, if you specify a departure that's notlocated on a road, Amazon Location moves the position to the nearest road. The snappedvalue is available in the result in SnappedDeparturePositions.

Valid Values: [-180 to 180,-90 to 90]

Type: Array of arrays of doubles

Array Members: Minimum number of 1 item. Maximum number of 350 items.

Array Members: Fixed number of 2 items.

Required: YesDepartureTime (p. 9)

Specifies the desired time of departure. Uses the given time to calculate the route matrix. You can'tset both DepartureTime and DepartNow. If neither is set, the best time of day to travel with thebest traffic conditions is used to calculate the route matrix.

NoteSetting a departure time in the past returns a 400 ValidationException error.

• In ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. For example, 2020–07-2T12:15:20.000Z+01:00

Type: Timestamp

Required: NoDestinationPositions (p. 9)

The list of destination positions for the route matrix. An array of points, each of which is itself a2-value array defined in WGS 84 format: [longitude, latitude]. For example, [-122.339,47.615]

ImportantDepending on the data provider selected in the route calculator resource there may beadditional restrictions on the inputs you can choose. See Position restrictions in the AmazonLocation Service Developer Guide.

NoteFor route calculators that use Esri as the data provider, if you specify a destination that's notlocated on a road, Amazon Location moves the position to the nearest road. The snappedvalue is available in the result in SnappedDestinationPositions.

Valid Values: [-180 to 180,-90 to 90]

Type: Array of arrays of doubles

Array Members: Minimum number of 1 item. Maximum number of 350 items.

Array Members: Fixed number of 2 items.

Required: YesDistanceUnit (p. 9)

Set the unit system to specify the distance.

Default Value: Kilometers

Type: String

API Version 2020-11-1911

Amazon Location Service Routes API ReferenceResponse Syntax

Valid Values: Kilometers | Miles

Required: NoTravelMode (p. 9)

Specifies the mode of transport when calculating a route. Used in estimating the speed of travel androad compatibility.

The TravelMode you specify also determines how you specify route preferences:• If traveling by Car use the CarModeOptions parameter.• If traveling by Truck use the TruckModeOptions parameter.

Default Value: Car

Type: String

Valid Values: Car | Truck | Walking

Required: NoTruckModeOptions (p. 9)

Specifies route preferences when traveling by Truck, such as avoiding routes that use ferries or tolls,and truck specifications to consider when choosing an optimal road.

Requirements: TravelMode must be specified as Truck.

Type: CalculateRouteTruckModeOptions (p. 37) object

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "RouteMatrix": [ [ { "Distance": number, "DurationSeconds": number, "Error": { "Code": "string", "Message": "string" } } ] ], "SnappedDeparturePositions": [ [ number ] ], "SnappedDestinationPositions": [ [ number ] ], "Summary": { "DataSource": "string", "DistanceUnit": "string", "ErrorCount": number, "RouteCount": number }

API Version 2020-11-1912

Amazon Location Service Routes API ReferenceResponse Elements

}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

RouteMatrix (p. 12)

The calculated route matrix containing the results for all pairs of DeparturePositions toDestinationPositions. Each row corresponds to one entry in DeparturePositions. Eachentry in the row corresponds to the route from that entry in DeparturePositions to an entry inDestinationPositions.

Type: Array of arrays of RouteMatrixEntry (p. 43) objectsSnappedDeparturePositions (p. 12)

For routes calculated using an Esri route calculator resource, departure positions are snapped to theclosest road. For Esri route calculator resources, this returns the list of departure/origin positionsused for calculation of the RouteMatrix.

Type: Array of arrays of doubles

Array Members: Minimum number of 1 item. Maximum number of 350 items.

Array Members: Fixed number of 2 items.SnappedDestinationPositions (p. 12)

The list of destination positions for the route matrix used for calculation of the RouteMatrix.

Type: Array of arrays of doubles

Array Members: Minimum number of 1 item. Maximum number of 350 items.

Array Members: Fixed number of 2 items.Summary (p. 12)

Contains information about the route matrix, DataSource, DistanceUnit, RouteCount andErrorCount.

Type: CalculateRouteMatrixSummary (p. 33) object

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 54).

AccessDeniedException

The request was denied because of insufficient access or permissions. Check with an administrator toverify your permissions.

HTTP Status Code: 403InternalServerException

The request has failed to process because of an unknown server error, exception, or failure.

API Version 2020-11-1913

Amazon Location Service Routes API ReferenceSee Also

HTTP Status Code: 500ResourceNotFoundException

The resource that you've entered was not found in your AWS account.

HTTP Status Code: 404ThrottlingException

The request was denied because of request throttling.

HTTP Status Code: 429ValidationException

The input failed to meet the constraints specified by the AWS service.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

API Version 2020-11-1914

Amazon Location Service Routes API ReferenceCreateRouteCalculator

CreateRouteCalculatorCreates a route calculator resource in your AWS account.

You can send requests to a route calculator resource to estimate travel time, distance, and get directions.A route calculator sources traffic and road network data from your chosen data provider.

NoteIf your application is tracking or routing assets you use in your business, such as delivery vehiclesor employees, you may only use HERE as your geolocation provider. See section 82 of the AWSservice terms for more details.

Request SyntaxPOST /routes/v0/calculators HTTP/1.1Content-type: application/json

{ "CalculatorName": "string", "DataSource": "string", "Description": "string", "PricingPlan": "string", "Tags": { "string" : "string" }}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

CalculatorName (p. 15)

The name of the route calculator resource.

Requirements:

• Can use alphanumeric characters (A–Z, a–z, 0–9) , hyphens (-), periods (.), and underscores (_).

• Must be a unique Route calculator resource name.

• No spaces allowed. For example, ExampleRouteCalculator.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^[-._\w]+$

Required: Yes

DataSource (p. 15)

Specifies the data provider of traffic and road network data.

API Version 2020-11-1915

Amazon Location Service Routes API ReferenceRequest Body

NoteThis field is case-sensitive. Enter the valid values as shown. For example, entering HEREreturns an error. Route calculators that use Esri as a data source only calculate routes thatare shorter than 400 km.

Valid values include:• Esri – For additional information about Esri's coverage in your region of interest, see Esri details

on street networks and traffic coverage.• Here – For additional information about HERE Technologies' coverage in your region of interest,

see HERE car routing coverage and HERE truck routing coverage.

For additional information , see Data providers on the Amazon Location Service Developer Guide.

Type: String

Required: YesDescription (p. 15)

The optional description for the route calculator resource.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1000.

Required: NoPricingPlan (p. 15)

This parameter has been deprecated.

No longer used. If included, the only allowed value is RequestBasedUsage.

Type: String

Valid Values: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement

Required: NoTags (p. 15)

Applies one or more tags to the route calculator resource. A tag is a key-value pair helps manage,identify, search, and filter your resources by labelling them.• For example: { "tag1" : "value1", "tag2" : "value2"}

Format: "key" : "value"

Restrictions:• Maximum 50 tags per resource• Each resource tag must be unique with a maximum of one value.• Maximum key length: 128 Unicode characters in UTF-8• Maximum value length: 256 Unicode characters in UTF-8• Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.• Cannot use "aws:" as a prefix for a key.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

API Version 2020-11-1916

Amazon Location Service Routes API ReferenceResponse Syntax

Key Pattern: ^[a-zA-Z+-=._:/]+$

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: ^[A-Za-z0-9 _=@:.+-/]*$

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "CalculatorArn": "string", "CalculatorName": "string", "CreateTime": number}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

CalculatorArn (p. 17)

The Amazon Resource Name (ARN) for the route calculator resource. Use the ARN when you specify aresource across all AWS.

• Format example: arn:aws:geo:region:account-id:route-calculator/ExampleCalculator

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1600.

Pattern: ^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:([^/].*)?$

CalculatorName (p. 17)

The name of the route calculator resource.

• For example, ExampleRouteCalculator.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^[-._\w]+$

CreateTime (p. 17)

The timestamp when the route calculator resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

• For example, 2020–07-2T12:15:20.000Z+01:00

Type: Timestamp

API Version 2020-11-1917

Amazon Location Service Routes API ReferenceErrors

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 54).

AccessDeniedException

The request was denied because of insufficient access or permissions. Check with an administrator toverify your permissions.

HTTP Status Code: 403ConflictException

The request was unsuccessful because of a conflict.

HTTP Status Code: 409InternalServerException

The request has failed to process because of an unknown server error, exception, or failure.

HTTP Status Code: 500ThrottlingException

The request was denied because of request throttling.

HTTP Status Code: 429ValidationException

The input failed to meet the constraints specified by the AWS service.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

API Version 2020-11-1918

Amazon Location Service Routes API ReferenceDeleteRouteCalculator

DeleteRouteCalculatorDeletes a route calculator resource from your AWS account.

NoteThis operation deletes the resource permanently.

Request SyntaxDELETE /routes/v0/calculators/CalculatorName HTTP/1.1

URI Request ParametersThe request uses the following URI parameters.

CalculatorName (p. 19)

The name of the route calculator resource to be deleted.

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^[-._\w]+$

Required: Yes

Request BodyThe request does not have a request body.

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 54).

AccessDeniedException

The request was denied because of insufficient access or permissions. Check with an administrator toverify your permissions.

HTTP Status Code: 403InternalServerException

The request has failed to process because of an unknown server error, exception, or failure.

HTTP Status Code: 500

API Version 2020-11-1919

Amazon Location Service Routes API ReferenceSee Also

ResourceNotFoundException

The resource that you've entered was not found in your AWS account.

HTTP Status Code: 404ThrottlingException

The request was denied because of request throttling.

HTTP Status Code: 429ValidationException

The input failed to meet the constraints specified by the AWS service.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

API Version 2020-11-1920

Amazon Location Service Routes API ReferenceDescribeRouteCalculator

DescribeRouteCalculatorRetrieves the route calculator resource details.

Request SyntaxGET /routes/v0/calculators/CalculatorName HTTP/1.1

URI Request ParametersThe request uses the following URI parameters.

CalculatorName (p. 21)

The name of the route calculator resource.

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^[-._\w]+$

Required: Yes

Request BodyThe request does not have a request body.

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "CalculatorArn": "string", "CalculatorName": "string", "CreateTime": number, "DataSource": "string", "Description": "string", "PricingPlan": "string", "Tags": { "string" : "string" }, "UpdateTime": number}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

CalculatorArn (p. 21)

The Amazon Resource Name (ARN) for the Route calculator resource. Use the ARN when you specifya resource across AWS.

API Version 2020-11-1921

Amazon Location Service Routes API ReferenceResponse Elements

• Format example: arn:aws:geo:region:account-id:route-calculator/ExampleCalculator

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1600.

Pattern: ^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:([^/].*)?$

CalculatorName (p. 21)

The name of the route calculator resource being described.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^[-._\w]+$CreateTime (p. 21)

The timestamp when the route calculator resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.• For example, 2020–07-2T12:15:20.000Z+01:00

Type: TimestampDataSource (p. 21)

The data provider of traffic and road network data. Indicates one of the available providers:• Esri

• Here

For more information about data providers, see Amazon Location Service data providers.

Type: StringDescription (p. 21)

The optional description of the route calculator resource.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1000.PricingPlan (p. 21)

This parameter has been deprecated.

Always returns RequestBasedUsage.

Type: String

Valid Values: RequestBasedUsage | MobileAssetTracking | MobileAssetManagementTags (p. 21)

Tags associated with route calculator resource.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

API Version 2020-11-1922

Amazon Location Service Routes API ReferenceErrors

Key Pattern: ^[a-zA-Z+-=._:/]+$

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: ^[A-Za-z0-9 _=@:.+-/]*$UpdateTime (p. 21)

The timestamp when the route calculator resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.• For example, 2020–07-2T12:15:20.000Z+01:00

Type: Timestamp

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 54).

AccessDeniedException

The request was denied because of insufficient access or permissions. Check with an administrator toverify your permissions.

HTTP Status Code: 403InternalServerException

The request has failed to process because of an unknown server error, exception, or failure.

HTTP Status Code: 500ResourceNotFoundException

The resource that you've entered was not found in your AWS account.

HTTP Status Code: 404ThrottlingException

The request was denied because of request throttling.

HTTP Status Code: 429ValidationException

The input failed to meet the constraints specified by the AWS service.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript

API Version 2020-11-1923

Amazon Location Service Routes API ReferenceListRouteCalculators

ListRouteCalculatorsLists route calculator resources in your AWS account.

Request SyntaxPOST /routes/v0/list-calculators HTTP/1.1Content-type: application/json

{ "MaxResults": number, "NextToken": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

MaxResults (p. 25)

An optional maximum number of results returned in a single call.

Default Value: 100

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: NoNextToken (p. 25)

The pagination token specifying which page of results to return in the response. If no token isprovided, the default page is the first page.

Default Value: null

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2000.

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "Entries": [ {

API Version 2020-11-1925

Amazon Location Service Routes API ReferenceResponse Elements

"CalculatorName": "string", "CreateTime": number, "DataSource": "string", "Description": "string", "PricingPlan": "string", "UpdateTime": number } ], "NextToken": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Entries (p. 25)

Lists the route calculator resources that exist in your AWS account

Type: Array of ListRouteCalculatorsResponseEntry (p. 41) objects

NextToken (p. 25)

A pagination token indicating there are additional pages available. You can use the token in asubsequent request to fetch the next set of results.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2000.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 54).

AccessDeniedException

The request was denied because of insufficient access or permissions. Check with an administrator toverify your permissions.

HTTP Status Code: 403

InternalServerException

The request has failed to process because of an unknown server error, exception, or failure.

HTTP Status Code: 500

ThrottlingException

The request was denied because of request throttling.

HTTP Status Code: 429

ValidationException

The input failed to meet the constraints specified by the AWS service.

HTTP Status Code: 400

API Version 2020-11-1926

Amazon Location Service Routes API ReferenceUpdateRouteCalculator

UpdateRouteCalculatorUpdates the specified properties for a given route calculator resource.

Request SyntaxPATCH /routes/v0/calculators/CalculatorName HTTP/1.1Content-type: application/json

{ "Description": "string", "PricingPlan": "string"}

URI Request ParametersThe request uses the following URI parameters.

CalculatorName (p. 28)

The name of the route calculator resource to update.

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^[-._\w]+$

Required: Yes

Request BodyThe request accepts the following data in JSON format.

Description (p. 28)

Updates the description for the route calculator resource.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1000.

Required: NoPricingPlan (p. 28)

This parameter has been deprecated.

No longer used. If included, the only allowed value is RequestBasedUsage.

Type: String

Valid Values: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement

Required: No

Response SyntaxHTTP/1.1 200

API Version 2020-11-1928

Amazon Location Service Routes API ReferenceResponse Elements

Content-type: application/json

{ "CalculatorArn": "string", "CalculatorName": "string", "UpdateTime": number}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

CalculatorArn (p. 28)

The Amazon Resource Name (ARN) of the updated route calculator resource. Used to specify aresource across AWS.• Format example: arn:aws:geo:region:account-id:route- calculator/ExampleCalculator

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1600.

Pattern: ^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:([^/].*)?$

CalculatorName (p. 28)

The name of the updated route calculator resource.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^[-._\w]+$UpdateTime (p. 28)

The timestamp for when the route calculator was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

Type: Timestamp

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 54).

AccessDeniedException

The request was denied because of insufficient access or permissions. Check with an administrator toverify your permissions.

HTTP Status Code: 403InternalServerException

The request has failed to process because of an unknown server error, exception, or failure.

HTTP Status Code: 500

API Version 2020-11-1929

Amazon Location Service Routes API ReferenceSee Also

ResourceNotFoundException

The resource that you've entered was not found in your AWS account.

HTTP Status Code: 404ThrottlingException

The request was denied because of request throttling.

HTTP Status Code: 429ValidationException

The input failed to meet the constraints specified by the AWS service.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

API Version 2020-11-1930

Amazon Location Service Routes API Reference

Data TypesThe Amazon Location Service Routes API contains several data types that various actions use. Thissection describes each data type in detail.

NoteThe order of each element in a data type structure is not guaranteed. Applications should notassume a particular order.

The following data types are supported:

• CalculateRouteCarModeOptions (p. 32)• CalculateRouteMatrixSummary (p. 33)• CalculateRouteSummary (p. 35)• CalculateRouteTruckModeOptions (p. 37)• Leg (p. 38)• LegGeometry (p. 40)• ListRouteCalculatorsResponseEntry (p. 41)• RouteMatrixEntry (p. 43)• RouteMatrixEntryError (p. 44)• Step (p. 46)• TruckDimensions (p. 48)• TruckWeight (p. 50)• ValidationExceptionField (p. 51)

API Version 2020-11-1931

Amazon Location Service Routes API ReferenceCalculateRouteCarModeOptions

CalculateRouteCarModeOptionsContains details about additional route preferences for requests that specify TravelMode as Car.

ContentsAvoidFerries

Avoids ferries when calculating routes.

Default Value: false

Valid Values: false | true

Type: Boolean

Required: NoAvoidTolls

Avoids tolls when calculating routes.

Default Value: false

Valid Values: false | true

Type: Boolean

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

API Version 2020-11-1932

Amazon Location Service Routes API ReferenceCalculateRouteMatrixSummary

CalculateRouteMatrixSummaryA summary of the calculated route matrix.

ContentsDataSource

The data provider of traffic and road network data used to calculate the routes. Indicates one of theavailable providers:• Esri

• Here

For more information about data providers, see Amazon Location Service data providers.

Type: String

Required: YesDistanceUnit

The unit of measurement for route distances.

Type: String

Valid Values: Kilometers | Miles

Required: YesErrorCount

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

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 160000.

Required: YesRouteCount

The count of cells in the route matrix. Equal to the number of DeparturePositions multiplied bythe number of DestinationPositions.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 160000.

Required: Yes

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2

API Version 2020-11-1933

Amazon Location Service Routes API ReferenceSee Also

• AWS SDK for Ruby V3

API Version 2020-11-1934

Amazon Location Service Routes API ReferenceCalculateRouteSummary

CalculateRouteSummaryA summary of the calculated route.

ContentsDataSource

The data provider of traffic and road network data used to calculate the route. Indicates one of theavailable providers:• Esri

• Here

For more information about data providers, see Amazon Location Service data providers.

Type: String

Required: YesDistance

The total distance covered by the route. The sum of the distance travelled between every stop onthe route.

NoteIf Esri is the data source for the route calculator, the route distance can’tbe greater than 400 km. If the route exceeds 400 km, the response is a 400RoutesValidationException error.

Type: Double

Valid Range: Minimum value of 0.

Required: YesDistanceUnit

The unit of measurement for route distances.

Type: String

Valid Values: Kilometers | Miles

Required: YesDurationSeconds

The total travel time for the route measured in seconds. The sum of the travel time between everystop on the route.

Type: Double

Valid Range: Minimum value of 0.

Required: YesRouteBBox

Specifies a geographical box surrounding a route. Used to zoom into a route when displaying it in amap. For example, [min x, min y, max x, max y].

The first 2 bbox parameters describe the lower southwest corner:

API Version 2020-11-1935

Amazon Location Service Routes API ReferenceSee Also

• The first bbox position is the X coordinate or longitude of the lower southwest corner.• The second bbox position is the Y coordinate or latitude of the lower southwest corner.

The next 2 bbox parameters describe the upper northeast corner:• The third bbox position is the X coordinate, or longitude of the upper northeast corner.• The fourth bbox position is the Y coordinate, or latitude of the upper northeast corner.

Type: Array of doubles

Array Members: Fixed number of 4 items.

Required: Yes

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

API Version 2020-11-1936

Amazon Location Service Routes API ReferenceCalculateRouteTruckModeOptions

CalculateRouteTruckModeOptionsContains details about additional route preferences for requests that specify TravelMode as Truck.

ContentsAvoidFerries

Avoids ferries when calculating routes.

Default Value: false

Valid Values: false | true

Type: Boolean

Required: NoAvoidTolls

Avoids tolls when calculating routes.

Default Value: false

Valid Values: false | true

Type: Boolean

Required: NoDimensions

Specifies the truck's dimension specifications including length, height, width, and unit ofmeasurement. Used to avoid roads that can't support the truck's dimensions.

Type: TruckDimensions (p. 48) object

Required: NoWeight

Specifies the truck's weight specifications including total weight and unit of measurement. Used toavoid roads that can't support the truck's weight.

Type: TruckWeight (p. 50) object

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

API Version 2020-11-1937

Amazon Location Service Routes API ReferenceLeg

LegContains the calculated route's details for each path between a pair of positions. The number of legsreturned corresponds to one fewer than the total number of positions in the request.

For example, a route with a departure position and destination position returns one leg with thepositions snapped to a nearby road:

• The StartPosition is the departure position.• The EndPosition is the destination position.

A route with a waypoint between the departure and destination position returns two legs with thepositions snapped to a nearby road:

• Leg 1: The StartPosition is the departure position . The EndPosition is the waypoint positon.• Leg 2: The StartPosition is the waypoint position. The EndPosition is the destination position.

ContentsDistance

The distance between the leg's StartPosition and EndPosition along a calculated route.• The default measurement is Kilometers unless the request specifies a DistanceUnit of Miles.

Type: Double

Valid Range: Minimum value of 0.

Required: YesDurationSeconds

The estimated travel time between the leg's StartPosition and EndPosition. The travel modeand departure time that you specify in the request determines the calculated time.

Type: Double

Valid Range: Minimum value of 0.

Required: YesEndPosition

The terminating position of the leg. Follows the format [longitude,latitude].

NoteIf the EndPosition isn't located on a road, it's snapped to a nearby road.

Type: Array of doubles

Array Members: Fixed number of 2 items.

Required: YesGeometry

Contains the calculated route's path as a linestring geometry.

Type: LegGeometry (p. 40) object

API Version 2020-11-1938

Amazon Location Service Routes API ReferenceSee Also

Required: NoStartPosition

The starting position of the leg. Follows the format [longitude,latitude].

NoteIf the StartPosition isn't located on a road, it's snapped to a nearby road.

Type: Array of doubles

Array Members: Fixed number of 2 items.

Required: YesSteps

Contains a list of steps, which represent subsections of a leg. Each step provides instructions for howto move to the next step in the leg such as the step's start position, end position, travel distance,travel duration, and geometry offset.

Type: Array of Step (p. 46) objects

Required: Yes

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

API Version 2020-11-1939

Amazon Location Service Routes API ReferenceLegGeometry

LegGeometryContains the geometry details for each path between a pair of positions. Used in plotting a route leg ona map.

ContentsLineString

An ordered list of positions used to plot a route on a map.

The first position is closest to the start position for the leg, and the last position is the closest to theend position for the leg.• For example, [[-123.117, 49.284],[-123.115, 49.285],[-123.115, 49.285]]

Type: Array of arrays of doubles

Array Members: Minimum number of 2 items.

Array Members: Fixed number of 2 items.

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

API Version 2020-11-1940

Amazon Location Service Routes API ReferenceListRouteCalculatorsResponseEntry

ListRouteCalculatorsResponseEntryA route calculator resource listed in your AWS account.

ContentsCalculatorName

The name of the route calculator resource.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^[-._\w]+$

Required: YesCreateTime

The timestamp when the route calculator resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.• For example, 2020–07-2T12:15:20.000Z+01:00

Type: Timestamp

Required: YesDataSource

The data provider of traffic and road network data. Indicates one of the available providers:• Esri

• Here

For more information about data providers, see Amazon Location Service data providers.

Type: String

Required: YesDescription

The optional description of the route calculator resource.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1000.

Required: YesPricingPlan

This member has been deprecated.

Always returns RequestBasedUsage.

Type: String

Valid Values: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement

Required: No

API Version 2020-11-1941

Amazon Location Service Routes API ReferenceSee Also

UpdateTime

The timestamp when the route calculator resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.• For example, 2020–07-2T12:15:20.000Z+01:00

Type: Timestamp

Required: Yes

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

API Version 2020-11-1942

Amazon Location Service Routes API ReferenceRouteMatrixEntry

RouteMatrixEntryThe result for the calculated route of one DeparturePosition DestinationPosition pair.

ContentsDistance

The total distance of travel for the route.

Type: Double

Valid Range: Minimum value of 0.

Required: NoDurationSeconds

The expected duration of travel for the route.

Type: Double

Valid Range: Minimum value of 0.

Required: NoError

An error corresponding to the calculation of a route between the DeparturePosition andDestinationPosition.

Type: RouteMatrixEntryError (p. 44) object

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

API Version 2020-11-1943

Amazon Location Service Routes API ReferenceRouteMatrixEntryError

RouteMatrixEntryErrorAn error corresponding to the calculation of a route between the DeparturePosition andDestinationPosition.

The error code can be one of the following:

• RouteNotFound - Unable to find a valid route with the given parameters.

• RouteTooLong - Route calculation went beyond the maximum size of a route and was terminatedbefore completion.

• PositionsNotFound - One or more of the input positions were not found on the route network.

• DestinationPositionNotFound - The destination position was not found on the route network.

• DeparturePositionNotFound - The departure position was not found on the route network.

• OtherValidationError - The given inputs were not valid or a route was not found. Moreinformation is given in the error Message

ContentsCode

The type of error which occurred for the route calculation.

Type: String

Valid Values: RouteNotFound | RouteTooLong | PositionsNotFound| DestinationPositionNotFound | DeparturePositionNotFound |OtherValidationError

Required: YesMessage

A message about the error that occurred for the route calculation.

Type: String

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

API Version 2020-11-1944

Amazon Location Service Routes API ReferenceSee Also

API Version 2020-11-1945

Amazon Location Service Routes API ReferenceStep

StepRepresents an element of a leg within a route. A step contains instructions for how to move to the nextstep in the leg.

ContentsDistance

The travel distance between the step's StartPosition and EndPosition.

Type: Double

Valid Range: Minimum value of 0.

Required: YesDurationSeconds

The estimated travel time, in seconds, from the step's StartPosition to the EndPosition. . Thetravel mode and departure time that you specify in the request determines the calculated time.

Type: Double

Valid Range: Minimum value of 0.

Required: YesEndPosition

The end position of a step. If the position the last step in the leg, this position is the same as the endposition of the leg.

Type: Array of doubles

Array Members: Fixed number of 2 items.

Required: YesGeometryOffset

Represents the start position, or index, in a sequence of steps within the leg's line string geometry.For example, the index of the first step in a leg geometry is 0.

Included in the response for queries that set IncludeLegGeometry to True.

Type: Integer

Valid Range: Minimum value of 0.

Required: NoStartPosition

The starting position of a step. If the position is the first step in the leg, this position is the same asthe start position of the leg.

Type: Array of doubles

Array Members: Fixed number of 2 items.

Required: Yes

API Version 2020-11-1946

Amazon Location Service Routes API ReferenceSee Also

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

API Version 2020-11-1947

Amazon Location Service Routes API ReferenceTruckDimensions

TruckDimensionsContains details about the truck dimensions in the unit of measurement that you specify. Used to filterout roads that can't support or allow the specified dimensions for requests that specify TravelMode asTruck.

ContentsHeight

The height of the truck.• For example, 4.5.

Type: Double

Valid Range: Minimum value of 0.

Required: NoLength

The length of the truck.• For example, 15.5.

Type: Double

Valid Range: Minimum value of 0.

Required: NoUnit

Specifies the unit of measurement for the truck dimensions.

Default Value: Meters

Type: String

Valid Values: Meters | Feet

Required: NoWidth

The width of the truck.• For example, 4.5.

Type: Double

Valid Range: Minimum value of 0.

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++

API Version 2020-11-1948

Amazon Location Service Routes API ReferenceTruckWeight

TruckWeightContains details about the truck's weight specifications. Used to avoid roads that can't support or allowthe total weight for requests that specify TravelMode as Truck.

ContentsTotal

The total weight of the truck.• For example, 3500.

Type: Double

Valid Range: Minimum value of 0.

Required: NoUnit

The unit of measurement to use for the truck weight.

Default Value: Kilograms

Type: String

Valid Values: Kilograms | Pounds

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

API Version 2020-11-1950

Amazon Location Service Routes API ReferenceValidationExceptionField

ValidationExceptionFieldThe input failed to meet the constraints specified by the AWS service in a specified field.

Contentsmessage

A message with the reason for the validation exception error.

Type: String

Required: Yesname

The field name where the invalid entry was detected.

Type: String

Required: Yes

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

API Version 2020-11-1951

Amazon Location Service Routes API Reference

Common ParametersThe following list contains the parameters that all actions use for signing Signature Version 4 requestswith a query string. Any action-specific parameters are listed in the topic for that action. For moreinformation about Signature Version 4, see Signature Version 4 Signing Process in the Amazon WebServices General Reference.

Action

The action to be performed.

Type: string

Required: YesVersion

The API version that the request is written for, expressed in the format YYYY-MM-DD.

Type: string

Required: YesX-Amz-Algorithm

The hash algorithm that you used to create the request signature.

Condition: Specify this parameter when you include authentication information in a query stringinstead of in the HTTP authorization header.

Type: string

Valid Values: AWS4-HMAC-SHA256

Required: ConditionalX-Amz-Credential

The credential scope value, which is a string that includes your access key, the date, the region youare targeting, the service you are requesting, and a termination string ("aws4_request"). The value isexpressed in the following format: access_key/YYYYMMDD/region/service/aws4_request.

For more information, see Task 2: Create a String to Sign for Signature Version 4 in the Amazon WebServices General Reference.

Condition: Specify this parameter when you include authentication information in a query stringinstead of in the HTTP authorization header.

Type: string

Required: ConditionalX-Amz-Date

The date that is used to create the signature. The format must be ISO 8601 basic format(YYYYMMDD'T'HHMMSS'Z'). For example, the following date time is a valid X-Amz-Date value:20120325T120000Z.

Condition: X-Amz-Date is optional for all requests; it can be used to override the date used forsigning requests. If the Date header is specified in the ISO 8601 basic format, X-Amz-Date is

API Version 2020-11-1952

Amazon Location Service Routes API Reference

not required. When X-Amz-Date is used, it always overrides the value of the Date header. Formore information, see Handling Dates in Signature Version 4 in the Amazon Web Services GeneralReference.

Type: string

Required: ConditionalX-Amz-Security-Token

The temporary security token that was obtained through a call to AWS Security Token Service (AWSSTS). For a list of services that support temporary security credentials from AWS Security TokenService, go to AWS Services That Work with IAM in the IAM User Guide.

Condition: If you're using temporary security credentials from the AWS Security Token Service, youmust include the security token.

Type: string

Required: ConditionalX-Amz-Signature

Specifies the hex-encoded signature that was calculated from the string to sign and the derivedsigning key.

Condition: Specify this parameter when you include authentication information in a query stringinstead of in the HTTP authorization header.

Type: string

Required: ConditionalX-Amz-SignedHeaders

Specifies all the HTTP headers that were included as part of the canonical request. For moreinformation about specifying signed headers, see Task 1: Create a Canonical Request For SignatureVersion 4 in the Amazon Web Services General Reference.

Condition: Specify this parameter when you include authentication information in a query stringinstead of in the HTTP authorization header.

Type: string

Required: Conditional

API Version 2020-11-1953

Amazon Location Service Routes API Reference

Common ErrorsThis section lists the errors common to the API actions of all AWS services. For errors specific to an APIaction for this service, see the topic for that API action.

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 400IncompleteSignature

The request signature does not conform to AWS standards.

HTTP Status Code: 400InternalFailure

The request processing has failed because of an unknown error, exception or failure.

HTTP Status Code: 500InvalidAction

The action or operation requested is invalid. Verify that the action is typed correctly.

HTTP Status Code: 400InvalidClientTokenId

The X.509 certificate or AWS access key ID provided does not exist in our records.

HTTP Status Code: 403InvalidParameterCombination

Parameters that must not be used together were used together.

HTTP Status Code: 400InvalidParameterValue

An invalid or out-of-range value was supplied for the input parameter.

HTTP Status Code: 400InvalidQueryParameter

The AWS query string is malformed or does not adhere to AWS standards.

HTTP Status Code: 400MalformedQueryString

The query string contains a syntax error.

HTTP Status Code: 404MissingAction

The request is missing an action or a required parameter.

HTTP Status Code: 400

API Version 2020-11-1954

Amazon Location Service Routes API Reference

MissingAuthenticationToken

The request must contain either a valid (registered) AWS access key ID or X.509 certificate.

HTTP Status Code: 403MissingParameter

A required parameter for the specified action is not supplied.

HTTP Status Code: 400NotAuthorized

You do not have permission to perform this action.

HTTP Status Code: 400OptInRequired

The AWS access key ID needs a subscription for the service.

HTTP Status Code: 403RequestExpired

The request reached the service more than 15 minutes after the date stamp on the request or morethan 15 minutes after the request expiration date (such as for pre-signed URLs), or the date stampon the request is more than 15 minutes in the future.

HTTP Status Code: 400ServiceUnavailable

The request has failed due to a temporary failure of the server.

HTTP Status Code: 503ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 400ValidationError

The input fails to satisfy the constraints specified by an AWS service.

HTTP Status Code: 400

API Version 2020-11-1955