swagger: '2.0'
info:
version: 2020-08-01-preview
title: Microsoft Azure AccessControlClient AccessConnector Route API
schemes:
- https
tags:
- name: Route
paths:
/route/matrix/{format}:
post:
x-publish: true
description: '
**Applies to**: S1 pricing tier.
The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. For every given origin, the service calculates the cost of routing from that origin to every given destination. The set of origins and the set of destinations can be thought of as the column and row headers of a table and each cell in the table contains the costs of routing from the origin to the destination for that cell. As an example, let''s say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from the restaurant. To solve this use case, they can call Matrix Route API.
For each route, the travel times and distances are returned. You can use the computed costs to determine which detailed routes to calculate using the Route Directions API.
The maximum size of a matrix for async request is **700** and for sync request it''s **100** (the number of origins multiplied by the number of destinations).
### Submit Synchronous Route Matrix Request
If your scenario requires synchronous requests and the maximum size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).
```
POST https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key}
```
### Submit Asynchronous Route Matrix Request
The Asynchronous API is appropriate for processing big volumes of relatively complex routing requests. When you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available. If `waitForResults` parameter in the request is set to true, user will get a 200 response if the request is finished under 120 seconds.
The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25. 10x70 (it does not need to be square).
The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.
```
POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}
```
Here''s a typical sequence of asynchronous operations:
1. Client sends a Route Matrix POST request to Azure Maps
2. The server will respond with one of the following:
> HTTP `202 Accepted` - Route Matrix request has been accepted.
> HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad Request or any other Error status code.
3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL to download the results of the request. This status URI looks like the following:
```
GET https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key}
```
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
### Download Sync Results
When you make a POST request for Route Matrix Sync API, the service returns 200 response code for successful request and a response array. The response body will contain the data and there will be no possibility to retrieve the results later.
### Download Async Results
When a request issues a `202 Accepted` response, the request is being processed using our async pipeline. You will be given a URL to check the progress of your async request in the location header of the response. This status URI looks like the following:
```
GET https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key}
```
The URL provided by the location header will return the following responses when a `GET` request is issued.
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some time.
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.'
operationId: microsoftAzureRoutePostroutematrix
x-ms-long-running-operation: true
x-ms-long-running-operation-options:
final-state-via: location
x-ms-examples:
MatrixRoute:
$ref: ./examples/PostMatrixRouteCalculate.json
parameters:
- $ref: '#/parameters/ClientId'
- $ref: '#/parameters/SubscriptionKey'
- $ref: '#/parameters/ApiVersion'
- $ref: '#/parameters/JsonFormat'
- name: waitForResults
in: query
description: Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**.
required: false
type: boolean
default: false
- $ref: '#/parameters/ComputeTravelTimeFor'
- $ref: '#/parameters/SectionType'
- $ref: '#/parameters/ArriveAt'
- $ref: '#/parameters/DepartAt'
- $ref: '#/parameters/VehicleAxleWeight'
- $ref: '#/parameters/VehicleLength'
- $ref: '#/parameters/VehicleHeight'
- $ref: '#/parameters/VehicleWidth'
- $ref: '#/parameters/VehicleMaxSpeed'
- $ref: '#/parameters/VehicleWeightMatrix'
- $ref: '#/parameters/Windingness'
- $ref: '#/parameters/Hilliness'
- $ref: '#/parameters/TravelMode'
- $ref: '#/parameters/Avoid'
- $ref: '#/parameters/Traffic'
- $ref: '#/parameters/RouteType'
- $ref: '#/parameters/VehicleLoadType'
- name: routeMatrixBody
description: The matrix of origin and destination coordinates to compute the route distance, travel time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35 origins and 20 destinations or 25 origins and 25 destinations for async API.
in: body
required: true
schema:
$ref: '#/definitions/RouteMatrixRequestBody'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/RouteMatrixResponse'
'202':
$ref: '#/responses/202Async'
'400':
$ref: '#/responses/400'
'401':
$ref: '#/responses/401'
'403':
$ref: '#/responses/403'
'404':
$ref: '#/responses/404'
'500':
$ref: '#/responses/500'
produces:
- application/json
summary: Microsoft Azure Post Route Matrix Format
tags:
- Route
/route/directions/{format}:
get:
x-publish: true
description: '**Applies to**: S0 and S1 pricing tiers.
Returns a route between an origin and a destination, passing through waypoints if they are specified. The route will take into account factors such as current traffic and the typical road speeds on the requested day of the week and time of day.
Information returned includes the distance, estimated travel time, and a representation of the route geometry. Additional routing information such as optimized waypoint order or turn by turn instructions is also available, depending on the options selected.
Routing service provides a set of parameters for a detailed description of vehicle-specific Consumption Model. Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for detailed explanation of the concepts and parameters involved.'
operationId: microsoftAzureRouteGetroutedirections
x-ms-examples:
GetRouteDirections:
$ref: ./examples/GetRouteDirections.json
parameters:
- $ref: '#/parameters/ClientId'
- $ref: '#/parameters/SubscriptionKey'
- $ref: '#/parameters/ApiVersion'
- $ref: '#/parameters/TextFormat'
- name: query
in: query
description: The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints.
required: true
type: string
- name: maxAlternatives
in: query
description: 'Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5'
required: false
type: integer
minimum: 0
maximum: 5
default: 0
- $ref: '#/parameters/AlternativeRouteType'
- name: minDeviationDistance
in: query
description: All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt
required: false
type: integer
default: 0
- $ref: '#/parameters/ArriveAt'
- $ref: '#/parameters/DepartAt'
- name: minDeviationTime
in: query
description: "All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:\n - The origin point of the _calculateRoute_ Request must be on\n (or very near) the input reference route.\n - If this is not the case, an error is returned.\n - However, the origin point does not need to be at the beginning\n of the input reference route (it can be thought of as the current\n vehicle position on the reference route).\n - The reference route, returned as the first route in the _calculateRoute_\n Response, will start at the origin point specified in the _calculateRoute_\n Request. The initial part of the input reference route up until the origin\n point will be excluded from the Response.\n - The values of _minDeviationDistance_ and _minDeviationTime_ determine\n how far alternative routes will be guaranteed to follow the reference\n route from the origin point onwards.\n - The route must use _departAt_.\n - The _vehicleHeading_ is ignored."
required: false
type: integer
default: 0
- $ref: '#/parameters/RouteInstructionsType'
- name: language
in: query
description: 'The language parameter determines the language of the guidance messages. Proper nouns (the names of streets, plazas, etc.) are returned in the specified language, or if that is not available, they are returned in an available language that is close to it. Allowed values are (a subset of) the IETF language tags. The currently supported languages are listed in the [Supported languages section](https://docs.microsoft.com/azure/azure-maps/supported-languages).
Default value: en-GB'
required: false
type: string
- $ref: '#/parameters/ComputeBestOrder'
- $ref: '#/parameters/RouteRepresentation'
- $ref: '#/parameters/ComputeTravelTimeFor'
- $ref: '#/parameters/VehicleHeading'
- $ref: '#/parameters/Report'
- $ref: '#/parameters/SectionType'
- $ref: '#/parameters/VehicleAxleWeight'
- $ref: '#/parameters/VehicleWidth'
- $ref: '#/parameters/VehicleHeight'
- $ref: '#/parameters/VehicleLength'
- $ref: '#/parameters/VehicleMaxSpeed'
- $ref: '#/parameters/VehicleWeight'
- $ref: '#/parameters/VehicleCommercial'
- $ref: '#/parameters/Windingness'
- $ref: '#/parameters/Hilliness'
- $ref: '#/parameters/TravelMode'
- $ref: '#/parameters/Avoid'
- $ref: '#/parameters/Traffic'
- $ref: '#/parameters/RouteType'
- $ref: '#/parameters/VehicleLoadType'
- $ref: '#/parameters/VehicleEngineType'
- $ref: '#/parameters/ConstantSpeedConsumptionInLitersPerHundredkm'
- $ref: '#/parameters/CurrentFuelInLiters'
- $ref: '#/parameters/AuxiliaryPowerInLitersPerHour'
- $ref: '#/parameters/FuelEnergyDensityInMJoulesPerLiter'
- $ref: '#/parameters/AccelerationEfficiency'
- $ref: '#/parameters/DecelerationEfficiency'
- $ref: '#/parameters/UphillEfficiency'
- $ref: '#/parameters/DownhillEfficiency'
- $ref: '#/parameters/ConstantSpeedConsumptionInkWhPerHundredkm'
- $ref: '#/parameters/CurrentChargeInkWh'
- $ref: '#/parameters/MaxChargeInkWh'
- $ref: '#/parameters/AuxiliaryPowerInkW'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/RouteDirectionsResponse'
'400':
$ref: '#/responses/400'
'401':
$ref: '#/responses/401'
'403':
$ref: '#/responses/403'
'404':
$ref: '#/responses/404'
'500':
$ref: '#/responses/500'
summary: Microsoft Azure Get Route Directions Format
tags:
- Route
post:
x-publish: true
description: '**Applies to**: S0 and S1 pricing tiers.
Returns a route between an origin and a destination, passing through waypoints if they are specified. The route will take into account factors such as current traffic and the typical road speeds on the requested day of the week and time of day.
Information returned includes the distance, estimated travel time, and a representation of the route geometry. Additional routing information such as optimized waypoint order or turn by turn instructions is also available, depending on the options selected.
Routing service provides a set of parameters for a detailed description of a vehicle-specific Consumption Model. Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for detailed explanation of the concepts and parameters involved.'
operationId: microsoftAzureRoutePostroutedirections
x-ms-examples:
PostRouteDirections:
$ref: ./examples/PostRouteDirections.json
parameters:
- $ref: '#/parameters/ClientId'
- $ref: '#/parameters/SubscriptionKey'
- $ref: '#/parameters/ApiVersion'
- $ref: '#/parameters/TextFormat'
- name: query
in: query
description: The Coordinates through which the route is calculated. Needs two coordinates at least. Delimited by colon. First one is the origin and the last is the destination of the route. The coordinates are in a lat,long format. Optional coordinates in between act as WayPoints in the route.
required: true
type: string
- name: maxAlternatives
in: query
description: 'Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5'
required: false
type: integer
minimum: 0
maximum: 5
default: 0
- $ref: '#/parameters/AlternativeRouteType'
- name: minDeviationDistance
in: query
description: All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt
required: false
type: integer
default: 0
- name: minDeviationTime
in: query
description: "All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:\n - The origin point of the _calculateRoute_ Request must be on\n (or very near) the input reference route.\n - If this is not the case, an error is returned.\n - However, the origin point does not need to be at the beginning\n of the input reference route (it can be thought of as the current\n vehicle position on the reference route).\n - The reference route, returned as the first route in the _calculateRoute_\n Response, will start at the origin point specified in the _calculateRoute_\n Request. The initial part of the input reference route up until the origin\n point will be excluded from the Response.\n - The values of _minDeviationDistance_ and _minDeviationTime_ determine\n how far alternative routes will be guaranteed to follow the reference\n route from the origin point onwards.\n - The route must use _departAt_.\n - The _vehicleHeading_ is ignored."
required: false
type: integer
default: 0
- $ref: '#/parameters/RouteInstructionsType'
- name: language
in: query
description: The language parameter determines the language of the guidance messages. It does not affect proper nouns (the names of streets, plazas, etc.) It has no effect when instructionsType=coded. Allowed values are (a subset of) the IETF language tags described
required: false
type: string
- $ref: '#/parameters/ComputeBestOrder'
- $ref: '#/parameters/RouteRepresentation'
- $ref: '#/parameters/ComputeTravelTimeFor'
- $ref: '#/parameters/VehicleHeading'
- $ref: '#/parameters/Report'
- $ref: '#/parameters/SectionType'
- $ref: '#/parameters/ArriveAt'
- $ref: '#/parameters/DepartAt'
- $ref: '#/parameters/VehicleAxleWeight'
- $ref: '#/parameters/VehicleLength'
- $ref: '#/parameters/VehicleHeight'
- $ref: '#/parameters/VehicleWidth'
- $ref: '#/parameters/VehicleMaxSpeed'
- $ref: '#/parameters/VehicleWeight'
- $ref: '#/parameters/VehicleCommercial'
- $ref: '#/parameters/Windingness'
- $ref: '#/parameters/Hilliness'
- $ref: '#/parameters/TravelMode'
- $ref: '#/parameters/Avoid'
- $ref: '#/parameters/Traffic'
- $ref: '#/parameters/RouteType'
- $ref: '#/parameters/VehicleLoadType'
- $ref: '#/parameters/VehicleEngineType'
- $ref: '#/parameters/ConstantSpeedConsumptionInLitersPerHundredkm'
- $ref: '#/parameters/CurrentFuelInLiters'
- $ref: '#/parameters/AuxiliaryPowerInLitersPerHour'
- $ref: '#/parameters/FuelEnergyDensityInMJoulesPerLiter'
- $ref: '#/parameters/AccelerationEfficiency'
- $ref: '#/parameters/DecelerationEfficiency'
- $ref: '#/parameters/UphillEfficiency'
- $ref: '#/parameters/DownhillEfficiency'
- $ref: '#/parameters/ConstantSpeedConsumptionInkWhPerHundredkm'
- $ref: '#/parameters/CurrentChargeInkWh'
- $ref: '#/parameters/MaxChargeInkWh'
- $ref: '#/parameters/AuxiliaryPowerInkW'
- name: routeDirectionsRequestBody
description: 'Used for reconstructing a route and for calculating zero or more alternative routes to this reference route. The provided sequence of coordinates is used as input for route reconstruction. The alternative routes are calculated between the origin and destination points specified in the base path parameter locations. If both minDeviationDistance and minDeviationTime are set to zero, then these origin and destination points are expected to be at (or very near) the beginning and end of the reference route, respectively. Intermediate locations (waypoints) are not supported when using supportingPoints.
Setting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the following consequences:
* The origin point of the calculateRoute request must be on (or very near) the input reference route. If this is not the case, an error is returned. However, the origin point does not need to be at the beginning of the input reference route (it can be thought of as the current vehicle position on the reference route).
* The reference route, returned as the first route in the calculateRoute response, will start at the origin point specified in the calculateRoute request. The initial part of the input reference route up until the origin point will be excluded from the response.
* The values of minDeviationDistance and minDeviationTime determine how far alternative routes will be guaranteed to follow the reference route from the origin point onwards.
* The route must use departAt.
* The vehicleHeading is ignored.'
in: body
required: true
schema:
$ref: '#/definitions/RouteDirectionsRequestBody'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/RouteDirectionsResponse'
'400':
$ref: '#/responses/400'
'401':
$ref: '#/responses/401'
'403':
$ref: '#/responses/403'
'404':
$ref: '#/responses/404'
'500':
$ref: '#/responses/500'
summary: Microsoft Azure Post Route Directions Format
tags:
- Route
/route/range/{format}:
get:
x-publish: true
description: '__Route Range (Isochrone) API__
**Applies to**: S1 pricing tier.
This service will calculate a set of locations that can be reached from the origin point based on fuel, energy, time or distance budget that is specified. A polygon boundary (or Isochrone) is returned in a counterclockwise orientation as well as the precise polygon center which was the result of the origin point.
The returned polygon can be used for further processing such as [Search Inside Geometry](https://docs.microsoft.com/rest/api/maps/search/postsearchinsidegeometry) to search for POIs within the provided Isochrone.'
operationId: microsoftAzureRouteGetrouterange
x-ms-examples:
GetRouteRange:
$ref: ./examples/GetRouteRange.json
parameters:
- $ref: '#/parameters/ClientId'
- $ref: '#/parameters/SubscriptionKey'
- $ref: '#/parameters/ApiVersion'
- $ref: '#/parameters/TextFormat'
- name: query
in: query
description: The Coordinate from which the range calculation should start.
required: true
type: string
- name: fuelBudgetInLiters
in: query
description: Fuel budget in liters that determines maximal range which can be travelled using the specified Combustion Consumption Model.
When fuelBudgetInLiters is used, it is mandatory to specify a detailed Combustion Consumption Model.
Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
required: false
type: number
format: float
- name: energyBudgetInkWh
in: query
description: Electric energy budget in kilowatt hours (kWh) that determines maximal range which can be travelled using the specified Electric Consumption Model.
When energyBudgetInkWh is used, it is mandatory to specify a detailed Electric Consumption Model.
Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
required: false
type: number
format: float
- name: timeBudgetInSec
in: query
description: Time budget in seconds that determines maximal range which can be travelled using driving time. The Consumption Model will only affect the range when routeType is eco.
Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
required: false
type: number
format: float
- name: distanceBudgetInMeters
in: query
description: Distance budget in meters that determines maximal range which can be travelled using driving distance. The Consumption Model will only affect the range when routeType is eco.
Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
required: false
type: number
format: float
- $ref: '#/parameters/DepartAt'
- $ref: '#/parameters/RouteType'
- $ref: '#/parameters/Traffic'
- $ref: '#/parameters/Avoid'
- $ref: '#/parameters/TravelMode'
- $ref: '#/parameters/Hilliness'
- $ref: '#/parameters/Windingness'
- $ref: '#/parameters/VehicleAxleWeight'
- $ref: '#/parameters/VehicleWidth'
- $ref: '#/parameters/VehicleHeight'
- $ref: '#/parameters/VehicleLength'
- $ref: '#/parameters/VehicleMaxSpeed'
- $ref: '#/parameters/VehicleWeight'
- $ref: '#/parameters/VehicleCommercial'
- $ref: '#/parameters/VehicleLoadType'
- $ref: '#/parameters/VehicleEngineType'
- $ref: '#/parameters/ConstantSpeedConsumptionInLitersPerHundredkm'
- $ref: '#/parameters/CurrentFuelInLiters'
- $ref: '#/parameters/AuxiliaryPowerInLitersPerHour'
- $ref: '#/parameters/FuelEnergyDensityInMJoulesPerLiter'
- $ref: '#/parameters/AccelerationEfficiency'
- $ref: '#/parameters/DecelerationEfficiency'
- $ref: '#/parameters/UphillEfficiency'
- $ref: '#/parameters/DownhillEfficiency'
- $ref: '#/parameters/ConstantSpeedConsumptionInkWhPerHundredkm'
- $ref: '#/parameters/CurrentChargeInkWh'
- $ref: '#/parameters/MaxChargeInkWh'
- $ref: '#/parameters/AuxiliaryPowerInkW'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/RouteRangeResponse'
'400':
$ref: '#/responses/400'
'401':
$ref: '#/responses/401'
'403':
$ref: '#/responses/403'
'404':
$ref: '#/responses/404'
'500':
$ref: '#/responses/500'
summary: Microsoft Azure Get Route Range Format
tags:
- Route
/route/directions/batch/{format}:
post:
x-publish: true
description: '**Route Directions Batch API**
**Applies to**: S1 pricing tier.
The Route Directions Batch API sends batches of queries to [Route Directions API](https://docs.microsoft.com/en-us/rest/api/maps/route/getroutedirections) using just a single API call. You can call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **700** queries and sync API up to **100** queries.
### 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/directions/batch/sync/json?api-version=1.0&subscription-key={subscription-key}
```
### Submit Asynchronous Batch Request
The Asynchronous API is appropriate for processing big volumes of relatively complex route requests
- It allows the retrieval of results in a separate call (multiple downloads are possible).
- The asynchronous API is optimized for reliability and is not expected to run into a timeout.
- The number of batch items is limited to **700** for this API.
When you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.
The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after the expiration period.
Please note that asynchronous batch request is a long-running operation. Here''s a typical sequence of operations:
1. Client sends a Route Directions Batch `POST` request to Azure Maps
2. The server will respond with one of the following:
> HTTP `202 Accepted` - Batch request has been accepted.
> HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.
3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.
This status URI looks like following:
``` GET https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0 ```
Note:- Please remember to add AUTH information (subscription-key/azure_auth - See [Security](#security)) to the _status URI_ before running it.
4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
### POST Body for Batch Request
To send the _route directions_ 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 3 _route directions_ queries:
```json
{
"batchItems": [
{ "query": "?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false" },
{ "query": "?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest" },
{ "query": "?query=48.923159,-122.557362:32.621279,-116.840362" }
]
}
```
A _route directions_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _route directions_ [URI parameters](https://docs.microsoft.com/en-us/rest/api/maps/route/getroutedirections#uri-parameters). The string values in the _route directions_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should also be properly URL-encoded.
The async API allows caller to batch up to **700** queries and sync API up to **100** queries, and the batch should contain at least **1** query.
### Download Asynchronous Batch Results
To download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:
```
https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
```
Here''s the typical sequence of operations for downloading the batch results:
1. Client sends a `GET` request using the _download URL_.
2. The server will respond with one of the following:
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
### Batch Response Model
The returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:
- [`RouteDirectionsResponse`](https://docs.microsoft.com/en-us/rest/api/maps/route/getroutedirections#routedirectionsresponse) - If the query completed successfully.
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
Here''s a sample Batch Response with 1 _successful_ and 1 _failed_ result:
```json
{
"summary": {
"successfulRequests": 1,
"totalRequests": 2
},
"batchItems": [
{
"statusCode": 200,
"response": {
"routes": [
{
"summary": {
"lengthInMeters": 1758,
"travelTimeInSeconds": 387,
"trafficDelayInSeconds": 0,
"departureTime": "2018-07-17T00:49:56+00:00",
"arrivalTime": "2018-07-17T00:56:22+00:00"
},
"legs": [
{
"summary": {
"lengthInMeters": 1758,
"travelTimeInSeconds": 387,
"trafficDelayInSeconds": 0,
"departureTime": "2018-07-17T00:49:56+00:00",
"arrivalTime": "2018-07-17T00:56:22+00:00"
},
"points": [
{
"latitude": 47.62094,
"longitude": -122.34892
},
{
"latitude": 47.62094,
"longitude": -122.3485
},
{
"latitude": 47.62095,
"longitude": -122.3476
}
]
}
],
"sections": [
{
"startPointIndex": 0,
"endPointIndex": 40,
"sectionType": "TRAVEL_MODE",
"travelMode": "bicycle"
}
]
}
]
}
},
{
"statusCode": 400,
"response":
{
"error":
{
"code": "400 BadRequest",
"message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive."
}
}
}
]
}
```'
operationId: microsoftAzureRoutePostroutedirectionsbatch
x-ms-long-running-operation: true
x-ms-long-running-operation-options:
final-state-via: location
x-ms-examples:
A Route Directions Batch API call containing 3 Route Directions API queries:
$ref: ./examples/PostRouteDirectionsBatch.json
parameters:
- $ref: '#/parameters/ClientId'
- $ref: '#/parameters/SubscriptionKey'
- $ref: '#/parameters/ApiVersion'
- $ref: '#/parameters/JsonFormat'
- name: routeDirectionsBatchRequestBody
in: body
description: The list of route directions queries/requests to process. The list can contain a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
required: true
schema:
$ref: '#/definitions/BatchRequestBody'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/BatchResponse'
'202':
$ref: '#/responses/202Async'
'400':
$ref: '#/responses/400'
'401':
$ref: '#/responses/401'
'403':
$ref: '#/responses/403'
'404':
$ref: '#/responses/404'
'500':
$ref: '#/responses/500'
produces:
- application/json
summary: Microsoft Azure Post Route Directions Batch Format
tags:
- Route
definitions:
GeoJSONGeometry:
description: A valid `GeoJSON` geometry object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details.
type: object
discriminator: type
required:
- type
properties:
type:
description: Specifies the `GeoJSON` geometry type. Must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection.
type: string
enum:
- Point
- MultiPoint
- LineString
- MultiLineString
- Polygon
- MultiPolygon
- GeometryCollection
x-ms-enum:
name: GeoJSONGeometryType
modelAsString: true
values:
- value: Point
description: '`GeoJSON Point` geometry.'
- value: MultiPoint
description: '`GeoJSON MultiPoint` geometry.'
- value: LineString
description: '`GeoJSON LineString` geometry.'
- value: MultiLineString
description: '`GeoJSON MultiLineString` geometry.'
- value: Polygon
description: '`GeoJSON Polygon` geometry.'
- value: MultiPolygon
description: '`GeoJSON MultiPolygon` geometry.'
- value: GeometryCollection
description: '`GeoJSON GeometryCollection` geometry.'
BatchResponse:
description: This object is returned from a successful Batch service call
type: object
properties:
summary:
description: Summary for the batch request
type: object
readOnly: true
properties:
successfulRequests:
description: Number of successful requests in the batch
type: integer
readOnly: true
totalRequests:
description: Total number of requests in the batch
type: integer
readOnly: true
batchItems:
description: Array containing the batch results
type: array
readOnly: true
items:
type: object
MultiPolygon:
description: A valid `GeoJSON MultiPolygon` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.7) for details.
type: object
allOf:
- $ref: '#/definitions/GeoJSONGeometry'
- properties:
type:
description: Specifies the `type` for the object. Value should always be equal to "MultiPolygon".
type: string
coordinates:
description: Contains a list of valid `GeoJSON` Polygon objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude).
type: array
items:
type: array
items:
$ref: '#/definitions/GeoJSONLinearRing'
required:
- coordinates
RouteResultLegSummary:
description: Summary object for route section.
type: object
readOnly: true
properties:
lengthInMeters:
description: Length In Meters property
type: integer
readOnly: true
travelTimeInSeconds:
description: Estimated travel time in seconds property that includes the delay due to real-time traffic. Note that even when traffic=false travelTimeInSeconds still includes the delay due to traffic. If DepartAt is in the future, travel time is calculated using time-dependent historic traffic data.
type: integer
readOnly: true
trafficDelayInSeconds:
description: Estimated delay in seconds caused by the real-time incident(s) according to traffic information. For routes planned with departure time in the future, delays is always 0. To return additional travel times using different types of traffic information, parameter computeTravelTimeFor=all needs to be added.
type: integer
readOnly: true
departureTime:
description: Departure Time property
type: string
readOnly: true
arrivalTime:
description: Arrival Time property
type: string
readOnly: true
noTrafficTravelTimeInSeconds:
description: Estimated travel time calculated as if there are no delays on the route due to traffic conditions (e.g. congestion). Included only if computeTravelTimeFor = all is used in the query.
type: integer
readOnly: true
historicTrafficTravelTimeInSeconds:
description: Estimated travel time calculated using time-dependent historic traffic data. Included only if computeTravelTimeFor = all is used in the query.
type: integer
readOnly: true
liveTrafficIncidentsTravelTimeInSeconds:
description: Estimated travel time calculated using real-time speed data. Included only if computeTravelTimeFor = all is used in the query.
type: integer
readOnly: true
fuelConsumptionInLiters:
description: Estimated fuel consumption in liters using the Combustion Consumption Model. Included if vehicleEngineType is set to _combustion_ and constantSpeedConsumptionInLitersPerHundredkm is specified. The value will be non-negative.
type: number
format: float
readOnly: true
batteryConsumptionInkWh:
description: Estimated electric energy consumption in kilowatt hours (kWh) using the Electric Consumption Model. Included if vehicleEngineType is set to electric and constantSpeedConsumptionInkWhPerHundredkm is specified. The value of batteryConsumptionInkWh includes the recuperated electric energy and can therefore be negative (which indicates gaining energy). If both maxChargeInkWh and currentChargeInkWh are specified, recuperation will be capped to ensure that the battery charge level never exceeds maxChargeInkWh. If neither maxChargeInkWh nor currentChargeInkWh are specified, unconstrained recuperation is assumed in the consumption calculation.
type: number
format: float
readOnly: true
BatchRequestBody:
description: This type represents the request body for the Batch service.
type: object
properties:
batchItems:
description: The list of queries/requests to process
type: array
items:
description: Batch Query object
type: object
properties:
query:
description: Partial query string
type: string
RouteMatrixResult:
description: Matrix result object
type: object
readOnly: true
properties:
statusCode:
description: StatusCode property for the current cell in the input matrix.
type: integer
readOnly: true
response:
$ref: '#/definitions/RouteMatrixResultResponse'
MultiPoint:
description: A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details.
type: object
allOf:
- $ref: '#/definitions/GeoJSONGeometry'
- properties:
type:
description: Specifies the `type` for the geometry. Value should always be equal to "MultiPoint".
type: string
coordinates:
description: Coordinates for the `MultiPoint` geometry.
type: array
items:
$ref: '#/definitions/GeoJSONPosition'
required:
- coordinates
RouteMatrixResponse:
description: This object is returned from a successful Route Matrix call. For ex, if 2 origins and 3 destinations are provided, there are going to 2 arrays with 3 elements in each. Each element's content depends on the options provided in the query.
type: object
properties:
formatVersion:
description: Format Version property
type: string
readOnly: true
matrix:
description: Results as a 2 dimensional array of route summaries.
type: array
readOnly: true
items:
type: array
readOnly: true
items:
$ref: '#/definitions/RouteMatrixResult'
summary:
$ref: '#/definitions/RouteMatrixSummary'
RouteRangeResponse:
description: This object is returned from a successful Route Reachable Range call
type: object
properties:
formatVersion:
description: Format Version property
type: string
readOnly: true
reachableRange:
$ref: '#/definitions/RouteRange'
report:
$ref: '#/definitions/RouteResponseReport'
Point:
description: A valid `GeoJSON Point` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.2) for details.
type: object
allOf:
- $ref: '#/definitions/GeoJSONGeometry'
- properties:
type:
description: Specifies the `type` for the geometry. Value should always be equal to "Point".
type: string
coordinates:
$ref: '#/definitions/GeoJSONPosition'
required:
- coordinates
RouteResultInstructionGroup:
description: Groups a sequence of instruction elements which are related to each other. The sequence range is constrained with firstInstructionIndex and lastInstructionIndex. When human-readable text messages are requested for guidance (instructionType=text or tagged), then the instructionGroup has a summary message returned when available.
type: object
properties:
firstInstructionIndex:
description: Index of the first instruction.
type: integer
readOnly: true
lastInstructionIndex:
description: Index of the last instruction.
type: integer
readOnly: true
groupLengthInMeters:
description: Length of the group.
type: integer
readOnly: true
groupMessage:
description: Summary message when human-readable text messages are requested for guidance (instructionType=text or tagged).
type: string
readOnly: true
RouteResultSectionTec:
description: Details of the traffic event, using definitions in the [TPEG2-TEC](https://www.iso.org/standard/63116.html) standard. Can contain effectCode and causes elements.
type: object
properties:
effectCode:
description: The effect on the traffic flow. Contains a value in the tec001:EffectCode table, as defined in the [TPEG2-TEC](https://www.iso.org/standard/63116.html) standard. Can be used to color-code traffic events according to severity.
type: integer
readOnly: true
causes:
description: Causes array
type: array
items:
$ref: '#/definitions/RouteResultSectionTecCause'
RouteRange:
description: Reachable Range
type: object
properties:
center:
description: Center point of the reachable range
$ref: '#/definitions/Coordinate'
boundary:
description: Polygon boundary of the reachable range represented as a list of points.
type: array
readOnly: true
items:
$ref: '#/definitions/Coordinate'
RouteOptimizedWaypoint:
description: Optimized way point object.
type: object
properties:
providedIndex:
description: Way point index provided by the user.
type: integer
readOnly: true
optimizedIndex:
description: Optimized way point index from the system.
type: integer
readOnly: true
RouteResultInstruction:
description: A set of attributes describing a maneuver, e.g. 'Turn right', 'Keep left', 'Take the ferry', 'Take the motorway', 'Arrive'.
type: object
properties:
routeOffsetInMeters:
description: Distance from the start of the route to the point of the instruction.
type: integer
readOnly: true
travelTimeInSeconds:
description: Estimated travel time up to the point corresponding to routeOffsetInMeters.
type: integer
readOnly: true
point:
$ref: '#/definitions/Coordinate'
pointIndex:
description: The index of the point in the list of polyline "points" corresponding to the point of the instruction.
type: integer
readOnly: true
instructionType:
description: Type of the instruction, e.g., turn or change of road form.
type: string
enum:
- TURN
- ROAD_CHANGE
- LOCATION_DEPARTURE
- LOCATION_ARRIVAL
- DIRECTION_INFO
- LOCATION_WAYPOINT
x-ms-enum:
name: GuidanceInstructionType
modelAsString: true
values:
- value: TURN
description: Turn.
- value: ROAD_CHANGE
description: Road Change.
- value: LOCATION_DEPARTURE
description: Departure location.
- value: LOCATION_ARRIVAL
description: Arrival location.
- value: DIRECTION_INFO
description: Direction information.
- value: LOCATION_WAYPOINT
description: Way point location.
roadNumbers:
description: 'The road number(s) of the next significant road segment(s) after the maneuver, or of the road(s) to be followed. Example: ["E34", "N205"]'
type: array
items:
type: string
readOnly: true
readOnly: true
exitNumber:
description: The number(s) of a highway exit taken by the current maneuver. If an exit has multiple exit numbers, they will be separated by "," and possibly aggregated by "-", e.g., "10, 13-15".
type: string
readOnly: true
street:
description: Street name of the next significant road segment after the maneuver, or of the street that should be followed.
type: string
readOnly: true
signpostText:
description: The text on a signpost which is most relevant to the maneuver, or to the direction that should be followed.
type: string
readOnly: true
countryCode:
description: 3-character [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-3 country code. E.g. USA.
type: string
readOnly: true
stateCode:
description: A subdivision (e.g., state) of the country, represented by the second part of an [ISO 3166-2](https://www.iso.org/standard/63546.html) code. This is only available for some countries/regions like the US, Canada, and Mexico.
type: string
readOnly: true
junctionType:
description: The type of the junction where the maneuver takes place. For larger roundabouts, two separate instructions are generated for entering and leaving the roundabout.
type: string
readOnly: true
enum:
- REGULAR
- ROUNDABOUT
- BIFURCATION
x-ms-enum:
name: JunctionType
modelAsString: true
values:
- value: REGULAR
description: regular
- value: ROUNDABOUT
description: roundabout
- value: BIFURCATION
description: bifurcation
turnAngleInDecimalDegrees:
description: "Indicates the direction of an instruction. If junctionType indicates a turn instruction:\n\n * 180 = U-turn\n * [-179, -1] = Left turn\n * 0 = Straight on (a '0 degree' turn)\n * [1, 179] = Right turn\n\nIf junctionType indicates a bifurcation instruction:\n\n * <0 - keep left\n * \\>0 - keep right"
type: integer
readOnly: true
roundaboutExitNumber:
description: This indicates which exit to take at a roundabout.
type: string
readOnly: true
possibleCombineWithNext:
description: It is possible to optionally combine the instruction with the next one. This can be used to build messages like "Turn left and then turn right".
type: boolean
readOnly: true
drivingSide:
description: Indicates left-hand vs. right-hand side driving at the point of the maneuver.
type: string
readOnly: true
enum:
- LEFT
- RIGHT
x-ms-enum:
name: DrivingSide
modelAsString: true
values:
- value: LEFT
description: Left side.
- value: RIGHT
description: Right side.
maneuver:
description: A code identifying the maneuver.
type: string
readOnly: true
enum:
- ARRIVE
- ARRIVE_LEFT
- ARRIVE_RIGHT
- DEPART
- STRAIGHT
- KEEP_RIGHT
- BEAR_RIGHT
- TURN_RIGHT
- SHARP_RIGHT
- KEEP_LEFT
- BEAR_LEFT
- TURN_LEFT
- SHARP_LEFT
- MAKE_UTURN
- ENTER_MOTORWAY
- ENTER_FREEWAY
- ENTER_HIGHWAY
- TAKE_EXIT
- MOTORWAY_EXIT_LEFT
- MOTORWAY_EXIT_RIGHT
- TAKE_FERRY
- ROUNDABOUT_CROSS
- ROUNDABOUT_RIGHT
- ROUNDABOUT_LEFT
- ROUNDABOUT_BACK
- TRY_MAKE_UTURN
- FOLLOW
- SWITCH_PARALLEL_ROAD
- SWITCH_MAIN_ROAD
- ENTRANCE_RAMP
- WAYPOINT_LEFT
- WAYPOINT_RIGHT
- WAYPOINT_REACHED
x-ms-enum:
name: GuidanceManeuver
modelAsString: true
values:
- value: ARRIVE
description: You have arrived.
- value: ARRIVE_LEFT
description: You have arrived. Your destination is on the left.
- value: ARRIVE_RIGHT
description: You have arrived. Your destination is on the right.
- value: DEPART
description: Leave.
- value: STRAIGHT
description: Keep straight on.
- value: KEEP_RIGHT
description: Keep right.
- value: BEAR_RIGHT
description: Bear right.
- value: TURN_RIGHT
description: Turn right.
- value: SHARP_RIGHT
description: Turn sharp right.
- value: KEEP_LEFT
description: Keep left.
- value: BEAR_LEFT
description: Bear left.
- value: TURN_LEFT
description: Turn left.
- value: SHARP_LEFT
description: Turn sharp left.
- value: MAKE_UTURN
description: Make a U-turn.
- value: ENTER_MOTORWAY
description: Take the motorway.
- value: ENTER_FREEWAY
description: Take the freeway.
- value: ENTER_HIGHWAY
description: Take the highway.
- value: TAKE_EXIT
description: Take the exit.
- value: MOTORWAY_EXIT_LEFT
description: Take the left exit.
- value: MOTORWAY_EXIT_RIGHT
description: Take the right exit.
- value: TAKE_FERRY
description: Take the ferry.
- value: ROUNDABOUT_CROSS
description: Cross the roundabout.
- value: ROUNDABOUT_RIGHT
description: At the roundabout take the exit on the right.
- value: ROUNDABOUT_LEFT
description: At the roundabout take the exit on the left.
- value: ROUNDABOUT_BACK
description: Go around the roundabout.
- value: TRY_MAKE_UTURN
description: Try to make a U-turn.
- value: FOLLOW
description: Follow.
- value: SWITCH_PARALLEL_ROAD
description: Switch to the parallel road.
- value: SWITCH_MAIN_ROAD
description: Switch to the main road.
- value: ENTRANCE_RAMP
description: Take the ramp.
- value: WAYPOINT_LEFT
description: You have reached the waypoint. It is on the left.
- value: WAYPOINT_RIGHT
description: You have reached the waypoint. It is on the right.
- value: WAYPOINT_REACHED
description: You have reached the waypoint.
message:
description: A human-readable message for the maneuver.
type: string
readOnly: true
combinedMessage:
description: 'A human-readable message for the maneuver combined with the message from the next instruction. Sometimes it is possible to combine two successive instructions into a single instruction making it easier to follow. When this is the case the possibleCombineWithNext flag will be true. For example:
```
10. Turn left onto Einsteinweg/A10/E22 towards Ring Amsterdam
11. Follow Einsteinweg/A10/E22 towards Ring Amsterdam
```
The possibleCombineWithNext flag on instruction 10 is true. This indicates to the clients of coded guidance that it can be combined with instruction 11. The instructions will be combined automatically for clients requesting human-readable guidance. The combinedMessage field contains the combined message:
```
Turn left onto Einsteinweg/A10/E22 towards Ring Amsterdam
then follow Einsteinweg/A10/E22 towards Ring Amsterdam.
```'
type: string
readOnly: true
RouteResultGuidance:
description: Contains guidance related elements. This field is present only when guidance was requested and is available.
type: object
readOnly: true
properties:
instructions:
description: A list of instructions describing maneuvers.
type: array
readOnly: true
items:
$ref: '#/definitions/RouteResultInstruction'
instructionGroups:
description: Groups a sequence of instruction elements which are related to each other.
type: array
readOnly: true
items:
$ref: '#/definitions/RouteResultInstructionGroup'
ODataErrorResponse:
type: object
description: This response object is returned when an error occurs in the Azure Maps API.
properties:
error:
$ref: '#/definitions/ODataError'
RouteResultSectionTecCause:
description: The cause of the traffic event. Can contain mainCauseCode and subCauseCode elements. Can be used to define iconography and descriptions.
type: object
properties:
mainCauseCode:
description: The main cause of the traffic event. Contains a value in the tec002:CauseCode table, as defined in the [TPEG2-TEC](https://www.iso.org/standard/63116.html) standard.
type: integer
readOnly: true
subCauseCode:
description: The subcause of the traffic event. Contains a value in the sub cause table defined by the mainCauseCode, as defined in the [TPEG2-TEC](https://www.iso.org/standard/63116.html) standard.
type: integer
readOnly: true
GeoJSONLinearRing:
description: Though a linear ring is not explicitly represented as a GeoJSON geometry type, it helps in defining the polygon as an array of linear rings. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.6) for details.
type: array
items:
$ref: '#/definitions/GeoJSONPosition'
GeoJSONGeometryCollection:
description: A valid `GeoJSON GeometryCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.8) for details.
type: object
properties:
type:
description: Specifies the `type` for the object. Value should always be equal to "GeometryCollection".
type: string
geometries:
description: Contains a list of valid `GeoJSON` geometry objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude).
type: array
items:
$ref: '#/definitions/GeoJSONGeometry'
required:
- geometries
RouteDirectionsRequestBody:
type: object
description: Post body parameters for Route directions.
properties:
supportingPoints:
description: "A GeoJSON Geometry collection representing sequence of coordinates used as input for route reconstruction and for calculating zero or more alternative routes to this reference route.\n - The provided sequence of supporting points is used as input for route reconstruction.\n - The alternative routes are calculated between the origin and destination points specified in the base path parameter locations.\n - If both _minDeviationDistance_ and _minDeviationTime_ are set to zero, then these origin and destination points are\n expected to be at (or very near) the beginning and end of the reference route, respectively.\n - Intermediate locations (_waypoints_) are not supported when using <_supportingPoints_>.\n - The reference route may contain traffic incidents of type _ROAD_CLOSURE_, which are\n ignored for the calculation of the reference route's travel time and traffic delay."
allOf:
- $ref: '#/definitions/GeoJSONGeometryCollection'
- properties:
geometries:
type: array
items:
$ref: '#/definitions/Point'
avoidVignette:
description: 'This is a list of 3-character, ISO 3166-1, alpha-3 country codes of countries/regions in which all toll roads with vignettes are to be avoided, e.g. "AUS,CHE". Toll roads with vignettes in countries/regions not in the list are unaffected. Note: It is an error to specify both **avoidVignette** and **allowVignette**.'
type: array
items:
type: string
allowVignette:
description: 'This is a list of 3-character, ISO 3166-1, alpha-3 country codes of countries/regions in which toll roads with vignettes are allowed, e.g. "AUS,CHE". Specifying **allowVignette** with some countries/regions X is equivalent to specifying **avoidVignette** with all countries/regions but X. Specifying **allowVignette** with an empty list is the same as avoiding all toll roads with vignettes. Note: It is an error to specify both **avoidVignette** and **allowVignette**.'
type: array
items:
type: string
avoidAreas:
description: A GeoJSON MultiPolygon representing list of areas to avoid. Only rectangle polygons are supported. The maximum size of a rectangle is about 160x160 km. Maximum number of avoided areas is **10**. It cannot cross the 180th meridian. It must be between -80 and +80 degrees of latitude.
$ref: '#/definitions/MultiPolygon'
RouteDirectionsSummary:
description: Summary object
type: object
readOnly: true
properties:
lengthInMeters:
description: Length In Meters property
type: integer
readOnly: true
travelTimeInSeconds:
description: Estimated travel time in seconds property that includes the delay due to real-time traffic. Note that even when traffic=false travelTimeInSeconds still includes the delay due to traffic. If DepartAt is in the future, travel time is calculated using time-dependent historic traffic data.
type: integer
readOnly: true
trafficDelayInSeconds:
description: Estimated delay in seconds caused by the real-time incident(s) according to traffic information. For routes planned with departure time in the future, delays is always 0. To return additional travel times using different types of traffic information, parameter computeTravelTimeFor=all needs to be added.
type: integer
readOnly: true
departureTime:
description: Departure Time property
type: string
readOnly: true
arrivalTime:
description: Arrival Time property
type: string
readOnly: true
RouteResponseReport:
description: Reports the effective settings used in the current call.
type: object
properties:
effectiveSettings:
description: Effective parameters or data used when calling this Route API.
type: array
readOnly: true
items:
$ref: '#/definitions/RouteResponseReportEffectiveSetting'
RouteMatrixSummary:
description: Summary object
type: object
readOnly: true
properties:
successfulRoutes:
description: Number of successful routes in the response.
type: integer
readOnly: true
totalRoutes:
description: Total number of routes requested. Number of cells in the input matrix.
type: integer
readOnly: true
RouteDirectionsResponse:
description: This object is returned from a successful Route Directions call
type: object
properties:
formatVersion:
description: Format Version property
type: string
readOnly: true
routes:
description: Routes array
type: array
readOnly: true
items:
$ref: '#/definitions/RouteDirectionsResult'
optimizedWaypoints:
description: "Optimized sequence of waypoints. It shows the index from the user provided waypoint sequence for the original and optimized list. For instance, a response: \n\n```\n\n\n\n\n\n```\n\nmeans that the original sequence is [0, 1, 2] and optimized sequence is [1, 2, 0]. Since the index starts by 0 the original is \"first, second, third\" while the optimized is \"second, third, first\"."
type: array
readOnly: true
items:
$ref: '#/definitions/RouteOptimizedWaypoint'
report:
$ref: '#/definitions/RouteResponseReport'
RouteDirectionsResult:
type: object
properties:
summary:
$ref: '#/definitions/RouteDirectionsSummary'
legs:
description: Legs array
type: array
readOnly: true
items:
$ref: '#/definitions/RouteResultLeg'
sections:
description: Sections array
type: array
readOnly: true
items:
$ref: '#/definitions/RouteResultSection'
guidance:
$ref: '#/definitions/RouteResultGuidance'
RouteResultLeg:
type: object
properties:
summary:
$ref: '#/definitions/RouteResultLegSummary'
points:
description: Points array
type: array
readOnly: true
items:
$ref: '#/definitions/Coordinate'
RouteResponseReportEffectiveSetting:
description: Effective parameter or data used when calling this Route API.
type: object
properties:
key:
description: Name of the parameter used.
type: string
readOnly: true
value:
description: Value of the parameter used.
type: string
readOnly: true
Coordinate:
description: A location represented as a latitude and longitude.
type: object
properties:
latitude:
description: Latitude property
type: number
format: double
readOnly: true
longitude:
description: Longitude property
type: number
format: double
readOnly: true
RouteResultSection:
type: object
properties:
startPointIndex:
description: Start Point Index property
type: integer
readOnly: true
endPointIndex:
description: End Point Index property
type: integer
readOnly: true
sectionType:
description: Section Type property
type: string
readOnly: true
travelMode:
description: Travel Mode property
type: string
readOnly: true
simpleCategory:
description: Type of the incident. Can currently be JAM, ROAD_WORK, ROAD_CLOSURE, or OTHER. See "tec" for detailed information.
type: string
readOnly: true
effectiveSpeedInKmh:
description: Effective speed of the incident in km/h, averaged over its entire length.
type: integer
readOnly: true
delayInSeconds:
description: Delay in seconds caused by the incident.
type: integer
readOnly: true
magnitudeOfDelay:
description: 'The magnitude of delay caused by the incident. These values correspond to the values of the response field ty of the [Get Traffic Incident Detail API](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentdetail). '
readOnly: true
type: string
enum:
- '0'
- '1'
- '2'
- '3'
- '4'
x-ms-enum:
name: MagnitudeOfDelay
modelAsString: true
values:
- value: '0'
description: Unknown.
- value: '1'
description: Minor.
- value: '2'
description: Moderate.
- value: '3'
description: Major.
- value: '4'
description: Undefined, used for road closures and other indefinite delays.
tec:
$ref: '#/definitions/RouteResultSectionTec'
RouteMatrixRequestBody:
description: An object with a matrix of coordinates.
type: object
properties:
origins:
$ref: '#/definitions/MultiPoint'
destinations:
$ref: '#/definitions/MultiPoint'
RouteMatrixResultResponse:
description: Response object of the current cell in the input matrix.
type: object
readOnly: true
properties:
routeSummary:
$ref: '#/definitions/RouteResultLegSummary'
ODataError:
type: object
description: This object is returned when an error occurs in the Azure Maps API.
properties:
code:
type: string
readOnly: true
description: The ODataError code.
message:
type: string
readOnly: true
description: If available, a human-readable description of the error.
details:
type: array
items:
$ref: '#/definitions/ODataError'
target:
type: string
readOnly: true
description: If available, the target causing the error.
GeoJSONPosition:
description: A valid `GeoJSON Position` geometry type. A `Position` is an array of numbers with two or more elements. The first two elements are _longitude_ and _latitude_, precisely in that order. _Altitude/Elevation_ is an optional third element. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.1) for details.
type: array
items:
type: number
format: double
parameters:
DownhillEfficiency:
name: downhillEfficiency
in: query
description: 'Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
Must be paired with **uphillEfficiency**.
The range of values allowed are 0.0 to 1/**uphillEfficiency**.
Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73'
required: false
type: number
format: float
x-ms-parameter-location: method
RouteRepresentation:
name: routeRepresentation
in: query
description: Specifies the representation of the set of routes provided as response. This parameter value can only be used in conjunction with computeBestOrder=true.
required: false
type: string
default: polyline
enum:
- polyline
- summaryOnly
- none
x-ms-enum:
name: RouteRepresentation
modelAsString: true
values:
- value: polyline
description: Includes route geometry in the response.
- value: summaryOnly
description: Summary as per polyline but excluding the point geometry elements for the routes in the response.
- value: none
description: Includes only the optimized waypoint indices but does not include the route geometry in the response.
x-ms-parameter-location: method
SectionType:
name: sectionType
in: query
description: Specifies which of the section types is reported in the route response.
For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car
required: false
type: string
default: travelMode
enum:
- carTrain
- country
- ferry
- motorway
- pedestrian
- tollRoad
- tollVignette
- traffic
- travelMode
- tunnel
x-ms-enum:
name: SectionType
modelAsString: true
values:
- value: carTrain
description: Get sections if the route includes car trains.
- value: country
description: countries/regions the route has parts in.
- value: ferry
description: Get sections if the route includes ferries.
- value: motorway
description: Get sections if the route includes motorways.
- value: pedestrian
description: Get sections which are suited for pedestrians.
- value: tollRoad
description: Get sections which require a toll to be payed.
- value: tollVignette
description: Get sections which require a toll vignette to be present.
- value: traffic
description: Get sections which contain traffic information.
- value: travelMode
description: Get sections in relation to the request parameter `travelMode`.
- value: tunnel
description: Get sections if the route includes tunnels.
x-ms-parameter-location: method
SubscriptionKey:
name: subscription-key
description: One of the Azure Maps keys provided from an Azure Map Account. Please refer to this [article](https://docs.microsoft.com/azure/azure-maps/how-to-manage-authentication) for details on how to manage authentication.
type: string
in: query
required: false
x-ms-parameter-location: client
Avoid:
name: avoid
in: query
description: Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used.
required: false
type: string
enum:
- tollRoads
- motorways
- ferries
- unpavedRoads
- carpools
- alreadyUsedRoads
- borderCrossings
x-ms-enum:
name: Avoid
modelAsString: true
values:
- value: tollRoads
description: Avoids toll roads.
- value: motorways
description: Avoids motorways
- value: ferries
description: Avoids ferries
- value: unpavedRoads
description: Avoids unpaved roads
- value: carpools
description: Avoids routes that require the use of carpool (HOV/High Occupancy Vehicle) lanes.
- value: alreadyUsedRoads
description: Avoids using the same road multiple times. Most useful in conjunction with `routeType`=thrilling.
- value: borderCrossings
description: Avoids border crossings in route calculation.
x-ms-parameter-location: method
ComputeBestOrder:
name: computeBestOrder
in: query
description: Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType _shortest_. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation _none_.
required: false
type: boolean
default: false
x-ms-parameter-location: method
ComputeTravelTimeFor:
name: computeTravelTimeFor
in: query
description: Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time.
required: false
type: string
default: none
enum:
- none
- all
x-ms-enum:
name: ComputeTravelTimeFor
modelAsString: true
values:
- value: none
description: Does not compute additional travel times.
- value: all
description: Computes travel times for all types of traffic information and specifies all results in the fields noTrafficTravelTimeInSeconds, historicTrafficTravelTimeInSeconds and liveTrafficIncidentsTravelTimeInSeconds being included in the summaries in the route response.
x-ms-parameter-location: method
AlternativeRouteType:
name: alternativeType
in: query
description: Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route.
required: false
type: string
default: anyRoute
enum:
- anyRoute
- betterRoute
x-ms-enum:
name: AlternativeRouteType
modelAsString: true
values:
- value: anyRoute
description: Allow any alternative route to be returned irrespective of how it compares to the reference route in terms of optimality.
- value: betterRoute
description: Return an alternative route only if it is better than the reference route according to the given planning criteria.
x-ms-parameter-location: method
ApiVersion:
name: api-version
description: Version number of Azure Maps API. Current version is 1.0
type: string
in: query
required: true
default: '1.0'
x-ms-parameter-location: client
VehicleLength:
name: vehicleLength
in: query
description: Length of the vehicle in meters. A value of 0 means that length restrictions are not considered.
required: false
type: number
format: float
default: 0
x-ms-parameter-location: method
VehicleHeight:
name: vehicleHeight
in: query
description: Height of the vehicle in meters. A value of 0 means that height restrictions are not considered.
required: false
type: number
format: float
default: 0
x-ms-parameter-location: method
Traffic:
name: traffic
in: query
description: "Possible values: \n * true - Do consider all available traffic information during routing\n * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored \n during routing, the effect of historic traffic on effective road speeds is still incorporated."
required: false
type: boolean
default: true
x-ms-parameter-location: method
VehicleWeightMatrix:
name: vehicleWeight
in: query
description: Weight of the vehicle in kilograms.
required: false
type: integer
default: 0
x-ms-parameter-location: method
DepartAt:
name: departAt
in: query
description: The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00).
type: string
format: date-time
required: false
x-ms-parameter-location: method
VehicleCommercial:
name: vehicleCommercial
in: query
description: Vehicle is used for commercial purposes and thus may not be allowed to drive on some roads.
required: false
type: boolean
default: false
x-ms-parameter-location: method
ArriveAt:
name: arriveAt
in: query
description: The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime.
type: string
format: date-time
required: false
x-ms-parameter-location: method
DecelerationEfficiency:
name: decelerationEfficiency
in: query
description: 'Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
Must be paired with **accelerationEfficiency**.
The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91'
required: false
type: number
format: float
x-ms-parameter-location: method
AuxiliaryPowerInLitersPerHour:
name: auxiliaryPowerInLitersPerHour
in: query
description: 'Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
Sensible Values : 0.2'
required: false
type: number
format: float
x-ms-parameter-location: method
VehicleWeight:
name: vehicleWeight
in: query
description: 'Weight of the vehicle in kilograms.
* It is mandatory if any of the *Efficiency parameters are set.
* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
* In all other cases, this parameter is ignored.
Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900'
required: false
type: integer
default: 0
x-ms-parameter-location: method
AuxiliaryPowerInkW:
name: auxiliaryPowerInkW
in: query
description: 'Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
Sensible Values : 1.7'
required: false
type: string
x-ms-parameter-location: method
JsonFormat:
name: format
description: Desired format of the response. Only `json` format is supported.
type: string
in: path
required: true
enum:
- json
x-ms-enum:
name: JsonFormat
modelAsString: true
values:
- value: json
description: '[The JavaScript Object Notation Data Interchange Format](https://tools.ietf.org/html/rfc8259)'
x-ms-parameter-location: method
VehicleLoadType:
name: vehicleLoadType
in: query
description: 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/regions. Values beginning with USHazmat are for US routing while otherHazmat should be used for all other countries/regions. vehicleLoadType can be specified multiple times. This parameter is currently only considered for travelMode=truck.
required: false
type: string
enum:
- USHazmatClass1
- USHazmatClass2
- USHazmatClass3
- USHazmatClass4
- USHazmatClass5
- USHazmatClass6
- USHazmatClass7
- USHazmatClass8
- USHazmatClass9
- otherHazmatExplosive
- otherHazmatGeneral
- otherHazmatHarmfulToWater
x-ms-enum:
name: VehicleLoadType
modelAsString: true
values:
- value: USHazmatClass1
description: Explosives
- value: USHazmatClass2
description: Compressed gas
- value: USHazmatClass3
description: Flammable liquids
- value: USHazmatClass4
description: Flammable solids
- value: USHazmatClass5
description: Oxidizers
- value: USHazmatClass6
description: Poisons
- value: USHazmatClass7
description: Radioactive
- value: USHazmatClass8
description: Corrosives
- value: USHazmatClass9
description: Miscellaneous
- value: otherHazmatExplosive
description: Explosives
- value: otherHazmatGeneral
description: Miscellaneous
- value: otherHazmatHarmfulToWater
description: Harmful to water
x-ms-parameter-location: method
VehicleEngineType:
name: vehicleEngineType
in: query
description: Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**.
required: false
type: string
enum:
- combustion
- electric
default: combustion
x-ms-enum:
name: VehicleEngineType
modelAsString: true
values:
- value: combustion
description: Internal combustion engine.
- value: electric
description: Electric engine.
x-ms-parameter-location: method
UphillEfficiency:
name: uphillEfficiency
in: query
description: 'Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
Must be paired with **downhillEfficiency**.
The range of values allowed are 0.0 to 1/**downhillEfficiency**.
Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74'
required: false
type: number
format: float
x-ms-parameter-location: method
VehicleAxleWeight:
name: vehicleAxleWeight
in: query
description: Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered.
required: false
type: integer
default: 0
x-ms-parameter-location: method
ConstantSpeedConsumptionInkWhPerHundredkm:
name: constantSpeedConsumptionInkWhPerHundredkm
in: query
description: 'Specifies the speed-dependent component of consumption.
Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
* by linear interpolation, if the given speed lies in between two speeds in the list
* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
Sensible Values : 50,8.2:130,21.3
This parameter is required for **Electric consumption model**.'
required: false
type: string
x-ms-parameter-location: method
Hilliness:
name: hilliness
in: query
description: Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling.
required: false
type: string
default: normal
enum:
- low
- normal
- high
x-ms-enum:
name: Hilliness
modelAsString: true
values:
- value: low
description: low
- value: normal
description: normal
- value: high
description: high
x-ms-parameter-location: method
MaxChargeInkWh:
name: maxChargeInkWh
in: query
description: 'Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle''s battery.
This parameter co-exists with **currentChargeInkWh** parameter.
Minimum value has to be greater than or equal to **currentChargeInkWh**.
Sensible Values : 85'
required: false
type: string
x-ms-parameter-location: method
Windingness:
name: windingness
in: query
description: Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling.
required: false
type: string
default: normal
enum:
- low
- normal
- high
x-ms-enum:
name: Windingness
modelAsString: true
values:
- value: low
description: low
- value: normal
description: normal
- value: high
description: high
x-ms-parameter-location: method
VehicleMaxSpeed:
name: vehicleMaxSpeed
in: query
description: "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. \n\n* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.\n\n* 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."
required: false
type: integer
default: 0
x-ms-parameter-location: method
TravelMode:
name: travelMode
in: query
description: The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used.
required: false
type: string
default: car
enum:
- car
- truck
- taxi
- bus
- van
- motorcycle
- bicycle
- pedestrian
x-ms-enum:
name: TravelMode
modelAsString: true
values:
- value: car
description: The returned routes are optimized for cars.
- value: truck
description: The returned routes are optimized for commercial vehicles, like for trucks.
- value: taxi
description: The returned routes are optimized for taxis. BETA functionality.
- value: bus
description: The returned routes are optimized for buses, including the use of bus only lanes. BETA functionality.
- value: van
description: The returned routes are optimized for vans. BETA functionality.
- value: motorcycle
description: The returned routes are optimized for motorcycles. BETA functionality.
- value: bicycle
description: The returned routes are optimized for bicycles, including use of bicycle lanes.
- value: pedestrian
description: The returned routes are optimized for pedestrians, including the use of sidewalks.
x-ms-parameter-location: method
VehicleWidth:
name: vehicleWidth
in: query
description: Width of the vehicle in meters. A value of 0 means that width restrictions are not considered.
required: false
type: number
format: float
default: 0
x-ms-parameter-location: method
ConstantSpeedConsumptionInLitersPerHundredkm:
name: constantSpeedConsumptionInLitersPerHundredkm
in: query
description: "\n\nSpecifies the speed-dependent component of consumption.\n\nProvided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:\n\n * by linear interpolation, if the given speed lies in between two speeds in the list\n\n * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list\n\nThe list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.\n\nConsumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.\n\nSimilarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.\n\nThe valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.\n\nSensible Values : 50,6.3:130,11.5\n\n**Note** : This parameter is required for **The Combustion Consumption Model**."
required: false
type: number
format: float
x-ms-parameter-location: method
CurrentChargeInkWh:
name: currentChargeInkWh
in: query
description: 'Specifies the current electric energy supply in kilowatt hours (kWh).
This parameter co-exists with **maxChargeInkWh** parameter.
The range of values allowed are 0.0 to **maxChargeInkWh**.
Sensible Values : 43'
required: false
type: string
x-ms-parameter-location: method
TextFormat:
name: format
description: Desired format of the response. Value can be either _json_ or _xml_.
type: string
in: path
required: true
enum:
- json
- xml
x-ms-enum:
name: TextFormat
modelAsString: true
values:
- value: json
description: '[The JavaScript Object Notation Data Interchange Format](https://tools.ietf.org/html/rfc8259)'
- value: xml
description: '[The Extensible Markup Language](https://www.w3.org/TR/xml/)'
x-ms-parameter-location: method
VehicleHeading:
name: vehicleHeading
in: query
description: The directional heading of the vehicle in degrees starting at true North and continuing in clockwise direction. North is 0 degrees, east is 90 degrees, south is 180 degrees, west is 270 degrees. Possible values 0-359
required: false
type: integer
minimum: 0
maximum: 359
x-ms-parameter-location: method
CurrentFuelInLiters:
name: currentFuelInLiters
in: query
description: 'Specifies the current supply of fuel in liters.
Sensible Values : 55'
required: false
type: number
format: float
x-ms-parameter-location: method
RouteType:
name: routeType
in: query
description: The type of route requested.
required: false
type: string
default: fastest
enum:
- fastest
- shortest
- eco
- thrilling
x-ms-enum:
name: RouteType
modelAsString: true
values:
- value: fastest
description: The fastest route.
- value: shortest
description: The shortest route by distance.
- value: eco
description: A route balanced by economy and speed.
- value: thrilling
description: Includes interesting or challenging roads and uses as few motorways as possible. You can choose the level of turns included and also the degree of hilliness. See the hilliness and windingness parameters for how to set this. There is a limit of 900 km on routes planned with `routeType`=thrilling
x-ms-parameter-location: method
AccelerationEfficiency:
name: accelerationEfficiency
in: query
description: 'Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
Must be paired with **decelerationEfficiency**.
The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66'
required: false
type: number
format: float
x-ms-parameter-location: method
Report:
name: report
in: query
description: Specifies which data should be reported for diagnosis purposes. The only possible value is _effectiveSettings_. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller.
required: false
type: string
x-ms-parameter-location: method
ClientId:
name: x-ms-client-id
description: Specifies which account is intended for usage in conjunction with the Microsoft Entra ID security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Microsoft Entra ID security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
type: string
in: header
required: false
x-ms-parameter-location: client
RouteInstructionsType:
name: instructionsType
in: query
description: If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none
required: false
type: string
enum:
- coded
- text
- tagged
x-ms-enum:
name: RouteInstructionsType
modelAsString: true
values:
- value: coded
description: Returns raw instruction data without human-readable messages.
- value: text
description: Returns raw instructions data with human-readable messages in plain text.
- value: tagged
description: 'Returns raw instruction data with tagged human-readable messages to permit formatting. A human-readable message is built up from repeatable identified elements. These are tagged to allow client applications to format them correctly. The following message components are tagged when instructionsType=tagged: street, roadNumber, signpostText, exitNumber, roundaboutExitNumber.
Example of tagged ''Turn left'' message:
```
Turn left onto A4/E19
towards Den Haag
```'
x-ms-parameter-location: method
FuelEnergyDensityInMJoulesPerLiter:
name: fuelEnergyDensityInMJoulesPerLiter
in: query
description: 'Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
This parameter is required if any ***Efficiency** parameter is set.
Sensible Values : 34.2'
required: false
type: number
format: float
x-ms-parameter-location: method
responses:
'401':
description: Access denied due to invalid subscription key or invalid Microsoft Entra ID bearer token. Make sure to provide a valid key for an active Azure subscription and Maps resource. Otherwise, verify the [WWW-Authenticate](https://tools.ietf.org/html/rfc6750#section-3.1) header for error code and description of the provided Microsoft Entra ID bearer token.
schema:
$ref: '#/definitions/ODataErrorResponse'
headers:
WWW-Authenticate:
type: string
description: Bearer realm="https://atlas.microsoft.com/", error="invalid_token", error_description="The access token expired"
202Async:
description: '**Supported only for async request.**
Request Accepted: The request has been accepted for processing. Please use the URL in the Location Header to retry or access the results.'
headers:
Location:
type: string
description: New URL to check for the results of the long-running operation.
'404':
description: 'Not Found: the requested resource could not be found, but it may be available again in the future.'
schema:
$ref: '#/definitions/ODataErrorResponse'
'400':
description: 'Bad request: one or more parameters were incorrectly specified or are mutually exclusive.'
schema:
$ref: '#/definitions/ODataErrorResponse'
'403':
description: Permission, capacity, or authentication issues.
schema:
$ref: '#/definitions/ODataErrorResponse'
'500':
description: An error occurred while processing the request. Please try again later.
schema:
$ref: '#/definitions/ODataErrorResponse'
x-ms-parameterized-host:
hostTemplate: '{endpoint}'
useSchemePrefix: false
parameters:
- $ref: '#/parameters/Endpoint'