Use route handle with forbidden transport mode

Critical notice on the response level in case of pedestrian or bicycle mode

This request specifies the transport mode pedestrian, which is not allowed on all segments encoded by the route handle:

curl -X GET \
    'https://router.hereapi.com/v8/routes/{routeHandle}?transportMode=pedestrian&apikey={YOUR_API_KEY}'
{
  "notices": [
    {
      "title": "Route handle decoding failed due to forbidden segments for the specified transport mode.",
      "code": "violatedTransportModeInRouteHandleDecoding",
      "severity": "critical"
    }
  ],
  "routes": []
}

This behavior is the same for the following transport modes:

  • pedestrian
  • bicycle
  • motorized vehicle (car, truck, bus, and so on) using segments closed for all types of vehicles (for example, a route through a public park).

Critical notice on the section level in case of motorized vehicle

This request specifies a transport mode truck that is not allowed on the path encoded by the route handle:

curl -X GET \
    'https://router.hereapi.com/v8/routes/{routeHandle}?transportMode=truck&apikey={YOUR_API_KEY}'
{
    "routes": [
        {
            "id": "d584feb7-b219-4ba3-9ece-198562807e53",
            "sections": [
                {
                    "id": "5a9bf2a5-e7a1-4400-96bb-7d0ee1adccbc",
                    "type": "vehicle",
                    "departure": {
                        "time": "2021-12-16T14:15:23+01:00",
                        "place": {
                            "type": "place",
                            "location": {"lat": 52.4993361, "lng": 13.2066244},
                            "originalLocation": {"lat": 52.499341, "lng": 13.206617}
                        }
                    },
                    "arrival": {
                        "time": "2021-12-16T14:16:22+01:00",
                        "place": {
                            "type": "place",
                            "location": {"lat": 52.4979022, "lng": 13.2046294},
                            "originalLocation": {"lat": 52.497887, "lng": 13.204659}
                        }
                    },
                    "notices": [
                        {
                            "title": "Violated vehicle restriction.",
                            "code": "violatedVehicleRestriction",
                            "severity": "critical"
                        }
                    ],
                    "transport": { "mode": "truck" }
                }
            ]
        }
    ]
}

All motorized vehicles (car, truck, bus, and so on) exhibit this behavior when using a segment that is closed for their mode of transportation, but open for some other vehicle type.

results matching ""

    No results matching ""