---
title: "Use to get the best route between an origin and destination for automobile,
commercial trucks and walking routes."
method: POST
path: "/route/directions"
---

# Use to get the best route between an origin and destination for automobile,
commercial trucks and walking routes.

`POST /route/directions`

The `Route Directions` API is an HTTP `POST` request that returns the ideal
route between an origin and destination for automobile (driving), commercial
trucks and walking routes. The route passes through a series of waypoints if
specified. A waypoint is a geographical location defined by longitude and
latitude that is used for navigational purposes. The route considers factors
such as current traffic and the typical road speeds on the requested day of the
week and time of day.

The API returns the distance, estimated travel time, and a representation of
the route geometry. More routing information such as an optimized waypoint
order or turn by turn instructions is also available, depending on the
parameters used.

The Route Directions considers local laws, vehicle dimensions, cargo type, max
speed, bridge and tunnel heights to calculate the truck specific routes and
avoid complex maneuvers and difficult roads. Not all trucks can travel the same
routes as other vehicles due to certain restrictions based on the vehicle
profile or cargo type. For example, highways often have separate speed limits
for trucks, some roads don't allow trucks with flammable or hazardous
materials, and there can be height and weight restriction on bridges.

Up to 150 waypoints and 10 viaWaypoints between any two waypoints is supported.
Each set of waypoints creates a separate route Leg. ViaWaypoints define the
route path and can be used for route creation through specific locations, but
they don't create route Legs.

For information about routing availability in countries/regions, see [Azure
Maps routing
coverage](https://learn.microsoft.com/azure/azure-maps/routing-coverage?pivots=latest).

## Query parameters

- `api-version` string, required

## Headers

- `x-ms-client-id` string
- `Accept-Language` string

## Response `200`

The request has succeeded.

- RouteDirectionsResponse — `GeoJSON` `FeatureCollection` object that contains a list of Features. For more information, see [RFC 7946, section 3.3](https://www.rfc-editor.org/rfc/rfc7946#section-3.3).
  - `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` FeaturesItem[] — `GeoJSON` feature object that contains Geometry object and additional properties. For more information, see [RFC 7946, Section 3.2](https://www.rfc-editor.org/rfc/rfc7946#section-3.2).
    - `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` RouteDirectionsGeometry — A valid `GeoJSON` Geometry object. For more information, see [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946).
      - `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` FeatureProperties — Specifies the feature properties of the route like itinerary, route Legs and geometry, travel summary.
      - `type` 'ManeuverPoint' | 'Waypoint' | 'RoutePath', required — Output type.
    - `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]

## 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)
