Routing API v7 Developer's Guide

Constructing a Request

A request to the Routing API v7 includes the basic elements shown in the following table and, in addition, it may contain resource-specific parameters.

Table 1. Basic request elements
Element Value/Example Description
Base URL https://route.ls.hereapi.com Production environment when you use an API Key or an authentication token. For the available authentication options, see the Identity & Access Management Developer Guide.
Legacy Base URL https://route.api.here.com Production environment when you use an app_id/app_code pair. For the available authentication options, see the Identity & Access Management Developer Guide.
Path /routing/7.2/  
Resource
calculateroute
getroute
getroutingzones

All support GET. The calculateroute supports POST partially (only waypoints, avoidlinks and avoidareas in the same format as in the REST URL).

Specify request details via query parameters.

Format

Supported formats:

  • json
  • xml
 
API Key &apiKey={YOUR_API_KEY} Substitute your own unique apiKey. For more information on authentication, see the Identity & Access Management Developer Guide.
Application Code - Legacy &app_code={YOUR_APP_CODE} Substitute your own unique app_code. For more information on authentication, see the Identity & Access Management Developer Guide.
Application ID &app_id={YOUR_APP_ID} Substitute your own unique app_id. For more information on authentication, see the Identity & Access Management Developer Guide.

Table 2. Basic request elements for calculate isoline service
Element Value/Example Description
Base URL https://isoline.route.ls.hereapi.com Production environment
Legacy Base URL https://isoline.route.api.here.com Production environment
Path /routing/7.2/  
Resource
calculateisoline

Supports only GET, specify request details via query parameters

Format

Supported formats:

  • json
  • xml
 
API Key &apiKey={YOUR_API_KEY} Substitute your own unique apiKey. For more information on authentication, see the Identity & Access Management Developer Guide.
Application Code &app_code={YOUR_APP_CODE}. Substitute your own unique app_code. For more information on authentication, see the Identity & Access Management Developer Guide.
Application ID &app_id={YOUR_APP_ID} Substitute your own unique app_id. For more information on authentication, see the Identity & Access Management Developer Guide.
Table 3. Basic request elements for calculate matrix service
Element Value/Example Description
Base URL https://matrix.route.ls.hereapi.com Production environment
Legacy Base URL https://matrix.route.api.here.com Production environment
Path
 /routing/7.2/
 
Resource
calculatematrix

Supports GET and partially POST (only start points and destinations in the same format as in the REST URL).

Specify request details via query parameters

Format

Supported formats:

  • json
  • xml
 
API Key &apiKey={YOUR_API_KEY} Substitute your own unique apiKey. For more details on authentication, see the Identity & Access Management Developer Guide.
Application Code - Legacy &app_code={YOUR_APP_CODE} Substitute your own unique app_code. For more details on authentication, see the Identity & Access Management Developer Guide.
Application ID - Legacy &app_id={YOUR_APP_ID} Substitute your own unique app_id. For more details on authentication, see the Identity & Access Management Developer Guide.

GET request

Note: The following examples use a HERE API Key to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide.

Here is an example of a routing request that uses the HTTP GET method:

https://route.ls.hereapi.com/routing/7.2/calculateroute.json
?apiKey={YOUR_API_KEY}
&waypoint0=geo!52.5,13.4
&waypoint1=geo!52.5,13.45
&mode=fastest;car;traffic:disabled

The following example shows how to retrieve the same search data in XML format:

https://route.ls.hereapi.com/routing/7.2/calculateroute.xml
?apiKey={YOUR_API_KEY}
&waypoint0=geo!52.5,13.4
&waypoint1=geo!52.5,13.45
&mode=fastest;car;traffic:disabled