POST
/
route

Request a route for 2 or more coordinates (synchronously) It will return total distance and travel time as well as the geometry to plot it on a map.

Body

application/json
coordinates
array | null
required

The coordinates this request will use, coordinates as [{lon},{lat}] values, in decimal degrees.

bearings
array | null

Limits the search to segments with given bearing in degrees towards true north in clockwise direction. Can be null or an array of [{value},{range}] with integer 0 .. 360,integer 0 .. 180.

radiuses
integer[] | null

Limits the coordinate snapping to streets in the given radius in meters. Can be null double >= 0.

hints
string[] | null

Hints for the coordinate snapping. Array of base64 encoded strings.

generate_hints
boolean | null

Whether or not adds a Hint to the response which can be used in subsequent requests. (optional, default true)

alternatives
integer | null

Search for up to this many alternative routes. Please note that even if alternative routes are requested, a result cannot be guaranteed. (optional, default 0)

steps
boolean | null

Return route steps for each route leg. (optional, default false)

annotations
string[] | null

An array with strings of duration, nodes, distance, weight, datasources, speed (optional)

geometries
string | null

Returned route geometry format (influences overview and per step). Can also be geojson. (optional, default polyline)

overview
string | null

Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all (false). (optional, default simplified)

continue_straight
boolean | null

Forces the route to keep going straight at waypoints and don't do a uturn even if it would be faster. Default value depends on the profile.

approaches
string[] | null

Keep waypoints on curb side. Can be null (unrestricted, default) or curb.

waypoints
integer[] | null

Indices to coordinates to treat as waypoints. If not supplied, all coordinates are waypoints. Must include first and last coordinate index

snapping
string | null
vehicleType
enum<string>

The vehicle type for which the table is requested

Available options:
CAR,
BIKE,
TRUCK,
ELECTRIC_CAR,
ELECTRIC_BIKE

Response

201 - application/json
routes
object[] | null

Represents a route through (potentially multiple) waypoints.

waypoints
object[] | null

List of waypoints to get from A to B.