v5

latestSwagger 2.02026-07-1310125222.6 KB

The Route Range Batch API sends batches of up to 100 queries as a single call to the Route Range API. This API enables efficient processing of multiple queries in one request, reducing the need for individual calls.

Submit Synchronous Batch Request

The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to 100 for this API.

POST https://atlas.microsoft.com/route/range:batch?api-version=2025-01-01

POST Body for Batch Request

To send the route range queries you will use a POST request where the request body will contain the batchItems array in json format and the Content-Type header will be set to application/json. Here's a sample request body containing 2 route_range queries:

{
  "batchItems": [
    {
      "optionalId": "bbc9c0f6-ab52-49d8-a788-a658fa654c94",
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          5.86605,
          50.9745
        ]
      },
      "properties": {
        "timeBudgetInSec": 6000
      }
    },
    {
      "optionalId": "300af787-589b-4088-accd-56828542e293",
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          -122.201669,
          47.615076
        ]
      },
      "properties": {
        "timeBudgetInSec": 2000
      }
    }
  ]
}

A route range batchItem object can accept any of the supported snap to roads Request body

The batch should contain at least 1 query.

Batch Response Model

The batch response contains a summary component that indicates the totalRequests that were part of the original batch request and successfulRequests i.e. queries which were executed successfully. The batch response also includes a batchItems array which contains a response for each and every query in the batch request. The batchItems will contain the results in the exact same order the original queries were sent in the batch request. Each item is of one of the following types:

  • RouteRangeResponse - If the query completed successfully.

  • Error - If the query failed. The response will contain a code and a message in this case.

post/route/range:batch

Query parameters

api-versionstring required

The API version to use for this operation.

Headers

x-ms-client-idstring

Indicates the account intended for use with the Microsoft Entra ID security model. This unique ID for the Azure Maps account can be obtained from the Azure Maps management plane Account API. For more information on using Microsoft Entra ID security in Azure Maps, see Manage authentication in Azure Maps.

Request body

Response

The request has succeeded.