---
title: "POST /route/range:batch"
method: POST
path: "/route/range:batch"
---

# POST /route/range:batch

`POST /route/range:batch`

The Route Range Batch API sends batches of up to **100** queries as a single
call to the [Route Range
API](https://learn.microsoft.com/rest/api/maps/route/post-route-range?view=rest-maps-2025-01-01).
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](/rest/api/maps/route/post-snap-to-roads?view=rest-maps-2025-01-01#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`](/rest/api/maps/route/post-route-range#response) - If
the query completed successfully.

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

## Query parameters

- `api-version` string, required

## Headers

- `x-ms-client-id` string

## Request body

- RouteRangeBatchRequestBody — The list of route range queries/requests to process. The list can contain a max of 100 queries and must contain at least 1 query.
  - `batchItems` RouteRangeBatchRequestItem[] — The list of queries to process.
    - `optionalId` string — Id of the request which would show in corresponding batchItem.
    - `type` 'Feature', required — Specifies the `GeoJSON` type. The only supported object type is Feature. For more information, see [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946).
    - `geometry` RouteRangePointGeometry, required — A valid `GeoJSON` Geometry object. Please refer to [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946) for details.
      - `type` 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | 'Polygon' | 'MultiPolygon' | 'GeometryCollection' | 'Feature' | 'FeatureCollection', required — Specifies the `GeoJSON` type. Must be one of the nine valid GeoJSON object types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Feature and FeatureCollection.
    - `properties` InputRouteRangeProperties, required — Specifies the parameters to use for the calculation of isochrone polygon.
      - `departAt` string, date-time — The date and time of departure from the origin point formatted as a dateTime value defined by [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339#section-5.6). When a time zone offset is not specified, UTC will be assumed. If the `departAt` is not set, the default value is the current time. Example: "departAt": "2023-06-01T09:30:00.000-07:00"
      - `isSimplifiedPolygon` boolean — Use this to specify if you need simplified polygons that reduces the number of polygon vertices while preserving the shape. The API returns low definition polygon by default.
      - `optimizeRoute` 'shortest' | 'fastestWithoutTraffic' | 'fastestWithTraffic' — Specifies the parameter to use to optimize the route. If not defined, the default is "fastestWithoutTraffic" which returns the route to minimize the travel time without using current traffic information. Example: "optimizeRoute":"shortest"
      - `avoid` RouteRangeAvoidEnum[] — Specifies restrictions that the route calculation should honor when determining the reachable locations. Avoid supports multiple values in a request. Example: "avoid": ["limitedAccessHighways", "tollRoads"]
      - `vehicleSpec` RouteRangeVehicleSpec — Specifies the vehicle attributes such as vehicle height, weight, max speed, type of cargo, etc. to consider when calculating the reachable locations. This helps avoid low bridge clearances, road restrictions, difficult right turns to provide the optimized truck route based on the vehicle specifications. Vehicle attributes are specified within the vehicleSpec property.
        - `isVehicleCommercial` boolean — Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads.
        - `length` number, double — Length of the vehicle in meters. A value of 0 means that length restrictions are not considered.
        - `width` number, double — Width of the vehicle in meters. A value of 0 means that width restrictions are not considered.
        - `height` number, double — Height of the vehicle in meters. A value of 0 means that height restrictions are not considered.
        - `weight` integer — Weight of the vehicle in kilograms. A value of 0 means that weight restrictions are not considered.
        - `maxSpeed` integer — Maximum speed of the vehicle in km/hour. The max speed in the vehicle profile is used to check whether a vehicle is allowed on motorways. A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning. A non-zero value may be overridden during route planning. For example, the current traffic flow is 60 km/hour. If the vehicle maximum speed is set to 50 km/hour, the routing engine will consider 60 km/hour as this is the current situation. If the maximum speed of the vehicle is provided as 80 km/hour but the current traffic flow is 60 km/hour, then routing engine will again use 60 km/hour.
        - `axleWeight` integer — Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered.
        - `loadType` VehicleLoadTypeEnum[] — Types of cargo that may be classified as hazardous materials and restricted from some roads. Available vehicleLoadType values are US Hazmat classes 1 through 9, plus generic classifications for use in other countries. Values beginning with USHazmat are for US routing while otherHazmat should be used for all other countries. vehicleLoadType supports multiple values in a request.
        - `adrTunnelRestrictionCode` 'B' | 'C' | 'D' | 'E' — The ADR tunnel restriction code. ADR is a European agreement concerning the international carriage of dangerous goods by road. The ADR tunnel restriction code is used to determine whether a vehicle is allowed to pass through a tunnel with restrictions on the carriage of dangerous goods.
        - `axleCount` integer — The number of axles on the vehicle.
      - `distanceBudgetInMeters` number, float — The distance budget specifies the maximum range in meters which can be traveled from the origin waypoint. It cannot be set when `timeBudgetInSec` is specified. When `isSimplifiedPolygon` is false, the maximum distance supported is 90000 meters; otherwise, it is 500,000 meters. Example: "distanceBudgetInMeters":5000
      - `timeBudgetInSec` number, float — The time budget specifies the maximum time in seconds available for travel, defining how far one can go within this time constraint from the origin waypoint. It cannot be set when `distanceBudgetInMeters` is specified. When `isSimplifiedPolygon` is false, the maximum time supported is 3600 seconds; otherwise, it is 21,600 seconds. Example: "timeBudgetInSec":3600
      - `travelMode` 'driving' | 'truck' — Specifies the travel profile to consider when calculating the range polygon. If not specified, the default value is "driving". Example: "travelMode":"driving"

## Response `200`

The request has succeeded.

- RouteRangeBatchResponse — This object is returned from a successful Route Range Batch service call.
  - `summary` RouteRangeBatchResponseSummary — Summary for the batch request
    - `successfulRequests` integer — Number of successful requests in the batch
    - `totalRequests` integer — Total number of requests in the batch
  - `batchItems` RouteRangeBatchResponseItem[] — Array containing the batch results.
    - `optionalId` string — Id of the request which would show in corresponding batchItem.
    - `type` 'FeatureCollection' — Specifies the `GeoJSON` type. The only supported object type is `FeatureCollection`. For more information, see [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946).
    - `features` RouteRangeFeaturesItem[] — `GeoJSON` feature object that contains Geometry object and additional properties. Refer to [RFC 7946, Section 3.2](https://www.rfc-editor.org/rfc/rfc7946#section-3.2) for details.
      - `type` 'Feature' — Specifies the `GeoJSON` type. The only supported object type is Feature. For more information, see [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946).
      - `geometry` RouteRangeGeometry — A valid `GeoJSON` Geometry object. Please refer to [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946) for details.
        - `type` 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | 'Polygon' | 'MultiPolygon' | 'GeometryCollection' | 'Feature' | 'FeatureCollection', required — Specifies the `GeoJSON` type. Must be one of the nine valid GeoJSON object types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Feature and FeatureCollection.
      - `bbox` number[] — A rectangular area on the earth defined as a bounding box object. The sides of the rectangles are defined by latitude and longitude values. For more information, see [RFC 7946, Section 5](https://www.rfc-editor.org/rfc/rfc7946#section-5). Example: "bbox": [-10.0, -10.0, 10.0, 10.0]
      - `properties` RouteRangeFeatureProperties — Route Ranges properties.
        - `type` 'center' | 'boundary' — The feature types for the feature objects returned in the response.
    - `error` CommonErrorDetail — The error detail.
      - `code` string — The error code.
      - `message` string — The error message.
      - `target` string — The error target.
      - `details` CommonErrorDetail[] — The error details.
      - `additionalInfo` ErrorAdditionalInfo[] — The error additional info.
        - `type` string — The additional info type.
        - `info` object — The additional info.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/maps-route.md) · [All operations](https://skmtc.net/azure/apis/maps-route/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/maps-route/revisions/4b7b4a919999/schema)
