Matrix Routing can be done with a synchronous request or an asynchronous request. All modes are available for both synchronous and asynchronous requests, however synchronous requests have additional limitations on matrix size. See Modes for a detailed description of available modes.
Depending on the type of request, you need to follow different steps to get the result. Regardless of request type, you need to specify a
regionDefinition. You can define a region containing the origins and destinations, or if you don't want to define the region yourself, simply request
autoCircle as the
regionDefinition type. See Region. If you want to calculate a matrix with routes of arbitrary length, use region definition
world. In this case you either need to specify one of the predefined profile IDs or, if you want to define custom options, limit the size of the matrix. See Profiles.