Routing API v7 Developer's Guide

Requesting a Time Aware Route for a High Occupancy Vehicle

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 carHOV that goes through a part of the Interstate 66, which is HOV-2 only westbound from 4:00 to 6:30 p.m.

https://route.ls.hereapi.com/routing/7.2/calculateroute.json
?apiKey={YOUR_API_KEY}
&mode=fastest;carHOV;
&waypoint0=geo!38.892187,-77.048850
&waypoint1=geo!38.901885,-77.197964
&departure=2014-03-12T16: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.

The query results in a route using the High Occupancy Vehicle (HOV) lane restricted Interstate 66.

Figure 1. Example of HOV restricted road usage

On the other hand, if you specify car instead of carHOV as the transport mode, the resulting route avoids the HOV-2 road during the forbidden period.

Figure 2. Example of HOV restricted road avoidance