Routing API Developer's Guide

Get Route

Use the getroute resource to request a previously calculated route by providing the RouteId. As currently calculation of RouteId for Public Transport is not possible, getroute cannot be used for Public Transport.
../routing/7.2/getroute.{format}?routeId=<ROUTEID>&<parameter>=<value>... 
Parameter Description
app_id

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

You must include an app_id with every request. To get an app_id assigned to you, please see Acquiring Credentials.

app_code

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

You must include an app_code with every request. To get an app_code assigned to you, please see Acquiring Credentials.

waypoint List of waypoints that define a route. The first element marks the start, the last the end point. 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. You can use now to specify the current time. Specify either departure or arrival, not both. Type: xs:dateTime.
departure=2013-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 and additionally lines if publicTransport or publicTransportTimeTable mode is used. See also RouteAttributeType.

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

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 | publicTransportLine | platform | roadName | nextRoadName | roadNumber | nextRoadNumber | signPost | notes | action | direction | freewayExit | freewayJunction | indices | baseTime | trafficTime | waitTime | boundingBox | roadShield | shapeQuality | nextManeuver | publicTransportTickets | 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 [shape | length | speedLimit | dynamicSpeedInfo | truckRestrictions | flags | roadNumber | roadName | timezone | nextLink | publicTransportLine | remainTime | remainDistance | maneuver | functionalClass | nextStopName | indices ]

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.

Example Request 1

https://route.cit.api.here.com/routing/7.2/getroute.xml
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&routeId=<YOUR_ROUTE_ID>
&mode=fastest;car
&maneuverattributes=position,link
&linkattributes=shape,DynamicSpeedInfo
&requestid=<YOUR_TRACKING_ID>

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.