Get route handle for shorter route

This request specifies originalRouteHandle with origin to get an updated shorter route and a new route handle describing it:

curl -X GET \
    'https://router.hereapi.com/v8/routes/{originalRouteHandle}&origin=52.536431,13.391695&return=summary,routeHandle&transportMode=car&apikey={YOUR_API_KEY}'
{
  "routes": [
    {
      "id": "b4507a14-5c64-4a7a-a16f-c6c2390777b5",
      "sections": [
        {
          "id": "2edf3530-b525-4d75-9d75-39af8072d79e",
          "type": "vehicle",
          "departure": {
            "time": "2021-06-29T13:43:01+02:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.53645,
                "lng": 13.39169
              },
              "originalLocation": {
                "lat": 52.536431,
                "lng": 13.3916949
              }
            }
          },
          "arrival": {
            "time": "2021-06-29T13:47:37+02:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.5394429,
                "lng": 13.4106148
              },
              "originalLocation": {
                "lat": 52.539451,
                "lng": 13.410595
              }
            }
          },
          "summary": {
            "duration": 276,
            "length": 1728,
            "baseDuration": 183
          },
          "transport": {
            "mode": "car"
          }
        }
      ],
      "routeHandle": "{newRouteHandle}"
    }
  ]
}

results matching ""

    No results matching ""