GuidesAPI Reference
Guides

Get total toll cost excluding vignette price

1The 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 (summary,tolls&currency=Eur&spans=tollSystems&transportMode=car&tolls[summaries]=total).

📘

Note

Requesting toll cost information for routes counts as an additional transaction.

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

The response doesn't specify the individual vignette prices as the driver doesn't need this information.

"summary": {
  "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.

"tolls": [
  {
    ...,
    "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"
  }
]

Related information