Routing API v7 Developer's Guide

Requesting a Time Aware Route

To calculate directions that take into account time dependent restrictions, use the CalculateRouteRequest service specifying the start (waypoint0), the destination (waypoint1), and the departure time.

Note that you also have to specify an apiKey or app_id and app_code if you are using the app_id/app_code authentication (see the Identity & Access Management Developer Guide), type of route calculation and whether to take traffic into account.

The following example requests the fastest route for a car in the presence of a restricted left turn from 3pm to 6pm outside of the restricted time.

https://route.ls.hereapi.com/routing/7.2/calculateroute.json
?apiKey={YOUR_API_KEY}
&mode=fastest;car;
&waypoint0=geo!37.743385,-122.422835
&waypoint1=geo!37.743878,-122.423686
&departure=2014-03-12T10:00:00
&routeattributes=sh,bb,gr
Note: This example uses a HERE API Key to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide.
Figure 1. Example of allowed time restricted maneuver

If the departure time is set to 2014-03-12T16:00:00, which is inside the forbidden period, the route will instead avoid the maneuver

Figure 2. Example of time restricted maneuver