GuidesAPI Reference
Guides

How to send a request to the Intermodal Routing API v8

To send a request to the Intermodal Routing API v8, the basic elements shown in the following table are required: Table 1. Required request parameters

NameFormatDescription
Base URLstring, https://intermodal.router.hereapi.comProduction environment
Versionstring, /v8The API version to use
Resourcestring, /routesThe endpoint to access the resource
originstring, "{lat},{lng}"The origin WGS-84 compliant coordinates of the request
destinationstring, "{lat},{lng}"The destination WGS-84 compliant coordinates of the request

For more information, see the following response examples:

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 routes object with a list of sections for each transit route alternative.

Useful Common Request Parameters

For a comprehensive list of request parameters available to the Intermodal Routing API, see the Routing section of the Intermodal Routing API Reference.

These are some commonly used request parameters available for all services of the Intermodal Routing API:

  • Set the departureTime parameter to request a route for a later time. By default, a route starting right now is computed.

  • By default, the Intermodal Routing API v8 returns only one optimal intermodal route. The optional parameter alternatives represents the number of alternative routes to return aside from the optimal route. By default, alternatives=0 is assumed and only one optimal route is returned.

    In cases where also a pedestrian route is available it will be also returned. This may lead to two routes being returned in total (one intermodal route and one pedestrian route) even though only one is expected when alternatives=0 is given.

  • By default, the routes object only contains departure, arrival and transport mode nodes for each section of the journey. Set the return parameter for additional attributes such as fare information (if present), turn-by-turn navigation or geometry information about the route taken.

    See the API Reference for more details.

  • To limit the number of changes permitted in the route response, set the changes parameter to a value from 0 to 6. By default, an unlimited number of changes is permitted.