Get tolls for multi-leg route

This is a request for tolls for a multi-leg route including a paid highway with a stopover in a rest area, disregarding departure time. The driver pays the toll in the second section, after the stopover, at the highway exit booth:

curl -X GET \
'https://router.hereapi.com/v8/routes?origin=41.465218,1.912036&destination=41.447398,1.865010&via=41.455196,1.882819&return=tolls&transportMode=car&departureTime=any&apikey={YOUR_API_KEY}'
{
  "routes": [
    {
      "id": "bc63ecb7-dd44-4c76-a9e4-baec8629a5d1",
      "sections": [
        {
          "id": "319cad34-5e89-4723-90fe-5b0e50c45f43",
          "type": "vehicle",
          "departure": {
            "place": {
              "type": "place",
              "location": {
                "lat": 41.4651747,
                "lng": 1.9120686
              },
              "originalLocation": {
                "lat": 41.465218,
                "lng": 1.912036
              }
            }
          },
          "arrival": {
            "place": {
              "type": "place",
              "location": {
                "lat": 41.4551983,
                "lng": 1.8828158
              },
              "originalLocation": {
                "lat": 41.4551959,
                "lng": 1.8828189
              },
              "waypoint": 0
            }
          },
          "transport": {
            "mode": "car"
          }
        },
        {
          "id": "0ff92e1b-3bda-4dae-bc5c-7af672f22fbb",
          "type": "vehicle",
          "departure": {
            "place": {
              "type": "place",
              "location": {
                "lat": 41.4551983,
                "lng": 1.8828158
              },
              "originalLocation": {
                "lat": 41.4551959,
                "lng": 1.8828189
              },
              "waypoint": 0
            }
          },
          "arrival": {
            "place": {
              "type": "place",
              "location": {
                "lat": 41.4473975,
                "lng": 1.8650177
              },
              "originalLocation": {
                "lat": 41.447398,
                "lng": 1.8650099
              }
            }
          },
          "transport": {
            "mode": "car"
          },
          "tolls": [
            {
              "countryCode": "ESP",
              "tollSystem": "AUTOPISTAS AP2-AP7",
              "fares": [
                {
                  "id": "48a15121-4d1d-4218-b5e1-7ba8d5ffb289",
                  "name": "AUTOPISTAS AP2-AP7",
                  "price": {
                    "type": "value",
                    "currency": "EUR",
                    "value": 2.5
                  },
                  "reason": "toll",
                  "paymentMethods": [
                    "cash",
                    "bankCard",
                    "creditCard",
                    "transponder",
                    "travelCard"
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

results matching ""

    No results matching ""