Get total toll cost excluding vignette price

The driver has all vignettes that the specified route requires: tolls[vignettes]=all. The following requests the total cost of all tolls along the route added up (travelSummary,tolls&currency=Eur&spans=tollSystems&transportMode=car&tolls[summaries]=total).

curl -X GET \
https://router.hereapi.com/v8/routes?origin=49.03392,10.601304&destination=44.505213,11.229968&return=polyline,travelSummary,tolls&currency=Eur&spans=tollSystems&transportMode=car&tolls[summaries]=total&tolls[vignettes]=all

The response does not specify the individual vignette prices as the driver does not need this information.

"travelSummary": {
  "duration": 26911,
    "length": 674821,
    "baseDuration": 26085,
    "tolls": {
      "total": {
        "type": "value",
        "currency": "EUR",
        "value": 36.3
     }
  }
}

The spans section of the response specifies the locations of the various toll systems encountered on the route, as offsets into the polyline.

"spans": [
        {
               "offset": 0
        },
        {           
               "offset": 7987,
            "tollSystems": [
                    0
            ]
        },
        {
            "offset": 8303,
              "tollSystems": [
                    1
            ]
        },
        {
             "offset": 9151
        },
        {
            "offset": 9248,
            "tollSystems": [
                    2
            ]
        },
        {
            "offset": 17156,
            "tollSystems": [
                    3,
                    2
            ]
        },
        {
            "offset": 17157,
            "tollSystems": [
                    2
            ]
        },
        {
            "offset": 17162
        }
    ],

Toll collection locations and toll system related information is available in the lower sections of the response.

        "tollCollectionLocations": [
                                {
                                    "name": "Vipiteno",
                                    "location": {
                                        "lat": 46.88487,
                                        "lng": 11.43465
                                    }
                                },
                                {
                                    "name": "Bologna",
                                    "location": {
                                        "lat": 44.52436,
                                        "lng": 11.24518
                                    }
                                }
                            ]
                        }
                    ],
                    "tollSystems": [
                        {
                            "id": 508,
                            "name": "VIGNETTE AUSTRIA",
                            "languageCode": "ENG"
                        },
                        {
                            "id": 5224,
                            "name": "ASFINAG BRENNER AUTOBAHN",
                            "languageCode": "ENG"
                        },
                        {
                            "id": 5048,
                            "name": "AUTOSTRADE PER L'ITALIA S.P.A.",
                            "languageCode": "ENG"
                        },
                        {
                            "id": 7311,
                            "name": "AUTOSTRADE PER L'ITALIA S.P.A.",
                            "languageCode": "ENG"
                        }
                    ]
                }
            ]

results matching ""

    No results matching ""