GuidesAPI Reference
Guides

Public Transit Routing

This document highlights the most important changes necessary to migrate to the new version (v8).

📘

Note

The missing API versions from v3 to v8 are due to internal version alignment.

Request

This section describes changes in the request.

Parameters Added

This migration does not introduce new parameters.

Parameters Changed

The following parameters are changed in this migration.

Base URL, Version, Resource

ParameterPublic Transit Routing v3Public Transit Routing v8
Base URLstring, https://transit.ls.hereapi.comstring, https://transit.router.hereapi.com
Versionstring, /v3string, /v8
Resourcestring /routestring, /routes

dep vs origin

This migration renames dep parameter (v3) to origin (v8).

deporigin
Formatstring, {lat},{lng}[,{name}]string, {lat},{lng}[;name={name}]
BehaviorSets WGS-84 compliant departure coordinates.Sets WGS-84 compliant origin coordinates.

arr vs destination

This migration renames arr parameter (v3) to destination (v8).

arrdestination
Formatstring, {lat},{lng}[,{name}]string, {lat},{lng}[;name={name}]
BehaviorSets WGS-84 compliant arrival coordinates.Sets WGS-84 compliant destination coordinates.

time vs departureTime/arrivalTime

This migration renames time parameter (v3) to departureTime/arrivalTime (v8).

timedepartureTime/arrivalTime
FormatDateTime,
YYYY-mm-ddTHH:MM:SS(.NNN)(Z|+/-AA:BB)DateTime,
YYYY-mm-ddTHH:MM:SS(.NNN)(Z|+/-AA:BB)
BehaviorSpecifies the departure/arrival time (ISO 8601). When the optional timezone offset is not specified, time is assumed to be local.Sets departure time. See RFC 3339, section 5.6.

max vs alternatives

This migration renames max parameter (v3) to alternatives (v8).

maxalternatives
Formatinteger, 1-6integer 0-5
BehaviorSets the max number of routes to be returned in the response. By default, it is set to 3.Sets the number of alternative routes to return aside from the optimal route. By default, it is set to 0.

walk vs pedestrian[maxDistance], pedestrian[speed]

walkpedestrian[maxDistance], pedestrian[speed]
Formatinteger 0-6000, integer 50-200integer 0-6000, float 0.5-2
BehaviorMaximum walking distance (meters) and speed (meters per second) . By default, it is set to 2000,100.Maximum walking distance (meters) and speed (meters per second). By default, it is set to 2000,1.

details, graph, maneuvers vs return=intermediate,polyline,actions

This migration renames details, graph, maneuvers parameter (v3) to intermediate, polyline, actions (v8).

They can be set through the return (v8) parameter. By default, all options are disables.

details, graph, maneuversreturn=intermediate,polyline,actions
Formatboolean, 1/0array of strings intermediate,polyline,...
BehaviorEnables/Disables response options. By default, only details is enabled.All options are disabled by default.
📘

Note

The following attributes were added to the sections parameter in response:

  • travelSummary: Enables summary for the travel portion of the section.
  • fares: List of fares/tickets to cover a section of the route.

Parameters Removed

The following parameters are removed in this migration.

Format

This migration removes the Format parameter (v3). The response is always returned in JSON format (v8).

arrival

This migration removes arrival parameter (v3) as the departureTime/arrivalTime parameters can now be set individually (v8).

strict

This migration removes strict parameter (v3). By default, it is set to 0 (v8).

routingMode

This migration removes routingMode parameter (v3). By default, it is set to realtime (v8).

Response

This section describes changes in the response.

Parameters Added

This migration introduces the following parameters in (v8) response:

  • notices: To response object, and routes, and sections parameters
  • spans: For more information, see the Routing API v8 Developer Guide
  • type: Similar to mode parameter (v3)
  • preActions, actions, postActions: Similar to Guidance parameter (v3). For more information, see Action Concept
  • intermediateStops
  • fares: Similar to Tariff parameter (v3)
  • travelSummary: Similar to Journey parameter (v3)
  • agency: Similar to Operators parameter (v3)
  • attributions
  • transport: Similar to Transport in Dep parameter (v3) in sections. For more information, see Transport Concept

Parameters Changed

This migration introduces the following changes to parameters in response (v8):

  • renames the Connection parameter (v3) to routes (v8)
  • renames the Sec parameter (v3) to sections (v8)
  • renames the Dep and Arr parameters (v3) to departure and arrival (v8)
  • renames the Stn parameter (v3) to place (v8)
  • renames the distance parameter (v3) to length (v8)
  • changes the integer mode parameter (v3) to string (v8)
  • renames the x, and y parameters (v3) to lng, and lat (v8)
  • renames the graph parameter (v3) to polyline (v8) and changes its format to Flexible Polyline

Parameters Removed

This migration removes the following parameters in (v8) response:

  • Res
  • valid_until
  • context
  • serviceUrl
  • mode: From sections parameter (v3)
  • transfers
  • duration: From sections parameter (v3)
  • Guidance
  • Freq: From Dep parameter (v3) in sections
  • Journey
  • Tariff
  • Transport
  • Operators

Codes

The following table describes the response codes changed in this migration.

v3 error codev8 error codeStatus codeDescription
GW100E602000400 Bad requestWrong parameter type or parameter missing
I4N/A401 Unauthorized for wrong credential, 403 Forbidden for access not allowedN/A
GW0001N/A200 OKReturns empty routes list and notice object
GW0002E602100, E602101, E602102504 Gateway Timeout, 503 Service Unavailable, 502 Bad GatewayBackend failed to provide a response
GW0006E602103500 Internal Server ErrorUnexpected error
GW0007N/A200 OKNo support for this API in this area
K9360E602104400 Bad requestInvalid Period
📘

Note

Public Transit Routing v3 example uses a HERE API Key to authenticate the request. HERE Token Credentials authentication is only possible in Public Transit Routing v8. For information on other possible authentication options, see the Identity & Access Management Guide.