Get route by handle

Decodes and returns a route from a previously calculated route handle.

Alpha: This API is not yet stable and is subject to change.

A route handle encodes a previously calculated route. A route can be decoded from a handle as long the service uses the same map data which was used during encoding.

All parameters of the /routes endpoint are supported, except for origin, destination, via, alternatives and routingMode. See also the return parameter of /routes endpoint.

The transportMode parameter does not have to match the transport mode previously used for route calculation. However, when using a different transport mode, the request may fail, e.g. when the route has road segments forbidden for the provided transport mode.

Path Params
string
required

Route handle returned from a previous route calculation.

See return parameter of /routes endpoint for more information.

Query Params
string
enum
required

Mode of transport to be used for the calculation of the route.

Note: taxi and bus modes are in Alpha state. They are not yet stable and behaviour may change drastically, or even become unsupported, without warning. taxi and bus modes take into account taxi/bus restricted streets as well as streets reserved for exclusive taxi/bus access. It does not, however, consider exclusive lanes in otherwise shared streets. Also, the streets that are for exclusive access for taxi/bus are used only if either the origin or destination are on them.

Allowed:
string

Specifies the time of departure as defined by either date-time or full-date T partial-time in RFC 3339, section 5.6 (for example, 2019-06-24T01:23:45).

The requested time is converted to local time at origin. When the optional timezone offset is not specified, time is assumed to be local. The special value any can be used to indicate that time should not be taken into account during routing. If neither departureTime or arrivalTime are specified, current time at departure place will be used. All time values in the response are returned in the timezone of each location.

avoid
object

Avoid routes that violate certain features of road network or that go through user-specified geographical bounding boxes.

Note that if the origin, destination, or any via is in an avoided area or on an avoided feature, a route is produced that violates the avoid restriction. In such a case, the route is trying to minimize the violation of the avoid restrictions and can therefore include large deviations from a route that is calculated without these avoid restrictions.

It is also possible that the produced route violates the avoid restriction in between waypoints, if no other route is possible or too hard to find. One such example is requesting a route to an island that is only reachable with ferries while specifying avoid[features]=ferry.

Further, avoid can cause the route calculation to fail, if no route is possible or too hard to find.

Specify properties using array notation like avoid[features]=controlledAccessHighway,tunnel.

exclude
object

Defines properties which will be strictly excluded from route calculation.

string
enum

Units of measurement used in guidance instructions. The default is metric.

Allowed:
string
Defaults to en-US

Specifies the preferred language of the response. The value should comply with the IETF BCP 47.

return
array of objects

Defines which attributes are included in the response as part of data representation of a Route or Section.

  • polyline - Polyline for the route in Flexible Polyline Encoding. Either a 2D polyline (without elevation specified), or a 3D polyline with the 3rd dimension type Elevation (with elevation specified).
  • actions - Actions (such as maneuvers or tasks) that must be taken to complete the section.
  • instructions - Include instructions in returned actions. Instructions are localized to the requested language.
  • summary - Include summary for the section.
  • travelSummary - Include summary for the travel portion of the section.
  • turnByTurnActions - Include all information necessary to support turn by turn guidance to complete the section.
  • mlDuration - Use a region-specific machine learning model to calculate route duration. Disclaimer: This parameter is currently in beta release, and is therefore subject to breaking changes.
  • elevation - Include elevation information in coordinate and geometry types. See e.g. polyline or location.
  • routeHandle - Encode calculated route and return a handle which can be used with routes/{routeHandle} to decode the route at a later point in time.
  • passthrough - Include information on passthrough via waypoints in the section.
  • incidents - Include a list of all incidents applicable to each section. Incidents are localized to the requested language. This requires incidents to be specified as part of the return parameter.
  • routingZones - Include information about routing zones each section goes through.

Following restrictions apply when specifying return parameter:

  • If actions is requested, then polyline must also be requested as well.
  • If instructions is requested, then actions must also be requested as well.
  • If turnByTurnActions is requested, then polyline must also be requested as well.
  • If at least one attribute is requested within the spans parameter, then polyline must be request as well
spans
array of objects

Defines which attributes are included in the response spans. For example, attributes,length will enable the fields attributes and length in the route response.

This parameter also requires that the polyline option is set within the return parameter.

truck
object

Truck specific parameters.

  • shippedHazardousGoods: Comma-separated list of shipped hazardous goods in the vehicle. Possible values are:
    • explosive: Explosive material
    • gas: Gas
    • flammable: Flammable material
    • combustible: Combustible material
    • organic: Organic material
    • poison: Poison
    • radioactive: Radioactive material
    • corrosive: Corrosive material
    • poisonousInhalation: Materials that are poisonous upon inhalation
    • harmfulToWater: Materials that are harmful to water
    • other: Other types of hazardous materials
  • grossWeight: Vehicle weight including trailers and shipped goods, in kilograms.
  • weightPerAxle: Vehicle weight per axle, in kilograms.
  • height: Vehicle height, in centimeters.
  • width: Vehicle width, in centimeters.
  • length: Vehicle length, in centimeters.
  • tunnelCategory: Specifies the tunnel category used to restrict transport of specific goods. Possible values:
    • B
    • C
    • D
    • E
  • axleCount: Defines total number of axles in the vehicle.
  • type: Specifies the type of truck
    • straight: a truck on a single frame with a permanently attached cargo area
    • tractor: a towing vehicle that can pull one or more semi-trailers (aka semi-truck)
  • trailerCount: Number of trailers attached to the vehicle.
ev
object

Disclaimer: This parameter is currently in beta release, and is therefore subject to breaking changes.

EV parameters to be used for calculating consumption and for calculating EV routes with automatically added charging stations.

The following attributes are required for calculating consumption:

  • freeFlowSpeedTable
  • ascent
  • descent

The following attributes are additionally required in order to calculate reachable routes:

  • initialCharge
  • maxCharge
  • connectorTypes
  • chargingCurve
  • maxChargeAfterChargingStation
  • makeReachable set to true

All remaining attributes are optional.

vehicle
object

Disclaimer: these parameters are work in progress and functionality is not complete

Additional generic details about the vehicle for which the route is calculated.

Currently, hovOccupancy and speedCap are defined, with limited functionality

scooter
object

Scooter specific parameters.

  • allowHighway: Specifies whether scooter is allowed on highway or not. This parameter is optional. If not provided, then by default scooter is not allowed to use highway. There is a similar parameter avoid[features]=controlledAccessHighway to disallow highway usage. avoid[features] takes precedence so if this parameter is also used then scooters are not allowed to use highways even if allowHighway is used with value as true. Possible values:
    • true: scooter is allowed to use highway.
    • false: scooter is not allowed to use highway.
traffic
object

Traffic specific parameters.

Headers
string

User-provided token that can be used to trace a request or a group of requests sent to the service.

Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json