Routing API v7 Developer's Guide

Enabling a Truck Route Violating a Restriction

A position derived from a postal code or a city is imprecise and may be located in the area forbidden for a given truck. To calculate a truck route using imprecise positions, like an approximate city-to-city route, use the calculateroute service specifying the truck restriction penalty type soft (truckRestrictionPenalty=soft). Note that the soft penalty requires the route notes to be enabled in the response.

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).

In the following example we request a route for a truck which is 5 meters high. The truckRestrictionsPenalty is set to soft and notes are enabled both in the routeAttributes and maneuverAttributes. The route ends on a link forbidden for vehicles higher than 4 meters. The returned route for the given truck uses this link. The response includes notes indicating that the route violates the truck restriction.
Note: This example uses a HERE API Key to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide.

Example response for route violating truck restriction

    <Maneuver ...>