How to send a request to the Transit Routing API
To send a request to the Public Transit Routing API v8, you need the required request parameters shown in the following table:
Table 1. Required request parameters
| Name | Format | Description |
|---|---|---|
| Base URL | string, https://transit.router.hereapi.com | Production environment |
| Version | string, /v8 | The API version to use |
| Resource | string, /routes | The endpoint to access the resource |
origin | string, "{lat},{lng}" | The origin WGS-84 compliant coordinates of the request |
destination | string, "{lat},{lng}" | The destination WGS-84 compliant coordinates of the request |
For more information, see how to Calculate a Transit Route.
Notes
The response to the above request delivers the following high-level elements:
- metadata – a
notices(optional) object with a list of issues related to the response - response – a
routesobject with a list of sections for each transit route alternative.
For more information on the request parameters, see the Routing section of the Public Transit API Reference
Updated yesterday