Constructing a Request
A request to the Routing API includes the basic elements shown in the following table and, in addition, it may contain resource-specific parameters.
Element | Value/Example | Description |
---|---|---|
Base URL | https://route.api.here.com | Production environment |
Path | /routing/7.2/ | |
Resource | | All support GET. The Specify request details via query parameters. |
Format | Supported formats:
| |
Application Code | &app_code={YOUR_APP_CODE} | Substitute your own unique app_code |
Application ID | &app_id={YOUR_APP_ID} | Substitute your own unique app_id |
Element | Value/Example | Description |
---|---|---|
Base URL | https://isoline.route.api.here.com | Production environment |
Path | /routing/7.2/ | |
Resource | | Supports only GET, specify request details via query parameters |
Format | Supported formats:
| |
Application Code | | Substitute your own unique app_code |
Application ID | | Substitute your own unique app_id |
Element | Value/Example | Description |
---|---|---|
Base URL | https://matrix.route.api.here.com | Production environment |
Path | | |
Resource | | 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:
| |
Application Code | &app_code={YOUR_APP_CODE} | Substitute your own unique app_code |
Application ID | &app_id={YOUR_APP_ID} | Substitute your own unique app_id |
GET request
Here is an example of a routing request, which uses the HTTP GET method:
https://route.api.here.com/routing/7.2/calculateroute.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&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.api.here.com/routing/7.2/calculateroute.xml
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&waypoint0=geo!52.5,13.4
&waypoint1=geo!52.5,13.45
&mode=fastest;car;traffic:disabled