Routing API v7 Developer's Guide

Get Route

Use the getroute resource to request a previously calculated route by providing the RouteId.
../routing/7.2/getroute.{format}?routeId=<ROUTEID>&<parameter>=<value>... 
Parameter Description
apiKey A 43-byte Base64 URL-safe encoded string used for the authentication of the client application. As a logged in user, you can generate it at https://developer.here.com/projects. API Keys never expire but you can invalidate your API Keys at any time. You cannot have more than two API Keys for one app at the same time.

You must include an apiKey with every request. For more information on authentication, see the Identity & Access Management Developer Guide.

app_id

A 20 bytes Base64 URL-safe encoded string used for the authentication of the client application.

If you use the app ID/app code option, you need to include an app_id and app_code with every request. For more information on authentication, see the Identity & Access Management Developer Guide.

app_code

A 20 bytes Base64 URL-safe encoded string used for the authentication of the client application.

If you use the app ID/app code option, you need to include an app_id and app_code with every request. For more information on authentication, see the Identity & Access Management Developer Guide.

waypoint List of waypoints that define a route. The first element marks the startpoint, the last the endpoint. Waypoints in between are interpreted as via points.

See also WaypointParameterType

waypoint0=geo!52.5,13.4
requestId Clients may pass in an arbitrary string to trace request processing through the system. The RequestId is mirrored in the MetaInfo element of the response structure.
routeId Route identifier for which the detailed route information is being requested.
mode

The routing mode determines how the route is calculated. When used in a getroute request, the type and mode of transport must be the same as in the original request(feature is ignored), whilst traffic mode can be changed.

See also RoutingModeType

Type;TransportModes;TrafficMode;Feature

&mode=fastest;car;traffic:disabled;motorway:-2
departure Time when travel is expected to start. Traffic speed and incidents are taken into account when calculating the route, where applicable (note that in case of a past departure time the historical traffic is limited to one year). You can use now to specify the current time. Specify either departure or arrival, not both. Type: xs:dateTime.
departure=2018-07-04T17:00:00+02
When the optional timezone offset is not specified time is assumed to be local.
metricSystem Defines the measurement system used in instruction text. When imperial is selected, units used are based on the language specified in the request. Defaults to metric when not specified. xs:string. Enum [imperial | metric]
viewBounds

If the view bounds are given in the request then only route shape points which fit into these bounds will be returned. The route shape beyond the view bounds is reduced to the points which are referenced by links, legs or maneuvers. A common use case for this is the drag and drop scenario where the client is only interested in a rough visual update of the route in the currently visible bounds. See also BoundingBox.

viewbounds=37.7902858,-122.4027371;
37.7890649,-122.3993039
generalizationTolerances Specifies the desired tolerances for generalizations of the base route geometry. Tolerances are given in degrees of longitude or latitude on a spherical approximation of the Earth. One meter is approximately equal to 0:00001 degrees at typical latitudes. Type: xs:list of xs:double.
generalizationtolerances=0.1,0.01
instructionFormat Defines the representation format of the maneuver's instruction text. InstructionFormatType instructionformat=Enum [ text | html]
language

A list of languages for all textual information, the first supported language is used. If there are no matching supported languages the response is an error. Defaults to en-us. See Languages for a list of supported languages.

jsonAttributes Flag to control JSON output. Combine parameters by adding their values. See also JSON Representation.
jsonattributes=9
jsonCallback

Name of a user-defined function used to wrap the JSON response.

representation

Define which elements are included in the response as part of the data representation of the route. See also RouteRepresentationModeType.

Enum [ overview | display | dragNDrop | navigation | linkPaging | turnByTurn ]

routeAttributes

Define which attributes are included in the response as part of the data representation of the route. Defaults to waypoints, summary, legs It is strongly advised to always request notes in order to be informed in case any restrictions were violated in the calculated route. See also RouteAttributeType.

Enum [ waypoints | summary | summaryByCountry | shape | boundingBox | legs | notes | routeId | groups | tickets | incidents | zones ]

maneuverAttributes

Define which attributes are included in the response as part of the data representation of the route maneuvers. Defaults to position, length, travelTime. See also ManeuverAttributeType

Enum [ position | shape | travelTime | length | time | link | platform | roadName | nextRoadName | roadNumber | nextRoadNumber | signPost | notes | action | direction | freewayExit | freewayJunction | indices | baseTime | trafficTime | waitTime | boundingBox | roadShield | shapeQuality | nextManeuver | startAngle ]

linkAttributes

Define which attributes are included in the response as part of the data representation of the route links. Defaults to shape, speedLimit, . See also RouteLinkAttributeType.

Enum [ consumption | dynamicSpeedInfo | flags | functionalClass | indices | length | maneuver | nextLink | nextStopName | remainDistance | remainTime | roadName | roadNumber | shape | speedLimit | timeDependentRestriction | timezone | truckRestrictions ]

legAttributes

Define which attributes are included in the response as part of the data representation of the route legs. Defaults to maneuvers, waypoint, length, travelTime. See also RouteLegAttributeType.

Enum [ waypoint | maneuvers | links | length | travelTime | shape | indices | boundingBox | baseTime | trafficTime | summary ]

returnElevation

If set to true, all shapes inside routing response will consist of 3 values instead of 2. Third value will be elevation. If there are no elevation data available for given shape point, elevation will be interpolated from surrounding points. In case there is no elevation data available for any of the shape points, elevation will be 0.0. If jsonattributes=32, elevation cannot be returned.

returnelevation=true

Examples

Note: Since routeId is not a permanent identifier it can change with the map version. If the example getroute request is failing, then the below exampled calculate route request needs to be recalculated to acquire a fresh and valid routeId. The routeId parameter should be then replaced by the new one in the example getroute request.

Recalculation

https://route.ls.hereapi.com/routing/7.2/getroute.xml
?apiKey={YOUR_API_KEY}
&routeId=<YOUR_ROUTE_ID>
&mode=fastest;car
&maneuverattributes=position,link
&linkattributes=shape,DynamicSpeedInfo
&requestid=<YOUR_TRACKING_ID>
Note: This example uses a HERE API Key to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide.