GuidesAPI Reference
Guides

How to calculate a route with specific U-turn permission at stopover waypoint

While U-turn permissions can be avoided globally for a route by using the global setting avoid[features]=uTurns, the behavior can be overridden for each stopover via individually by setting the waypoint option uTurnPermission to allow or avoid.

The resulting route will allow or avoid u-turns at each stopover via waypoint according to the value of the uTurnPermission parameter when it's set, or following global settings if the uTurnPermission parameter isn't set.

curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'origin=52.507079%2C13.396498&'\
'destination=52.507079%2C13.393774&'\
'via=52.506783%2C13.388813%3BuTurnPermission%3Davoid&'\
'return=polyline%2Csummary%2Cactions%2Cinstructions&'\
'transportMode=car&'\
'departureTime=any&'\
'apiKey=YOUR_API_KEY'

The image shows two routes. The blue route has the uTurnPermission option set to allow. The purple route has uTurnPermission option set to avoid at the via waypoint 1.

Route with uTurnPermission set for the stopover via waypoint