GuidesAPI Reference
Guides

Toll cost spanning across multiple toll system providers

📘

Note

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

Multiple toll system providers, single payment

The route portion between toll structures (entry-intermediate/transit-exit) could span multiple toll systems providers. The sections[*].tolls[*].tollSystems response parameter supports multiple systems, this represents a toll cost spanning multiple system providers, and the toll is paid once.

The below route represents a scenario where the toll cost is spanning across two toll systems.

Image of route where the toll cost is spanning across two toll systems
  • The origin is point A and the destination is point B.
  • The stretch within the three marked locations, Location 01/02/03, represents a stretch that has a single toll cost associated with it.
  • The stretch between location 01 and 02, span A, is associated with system-A.
  • The stretch between location 02 and 03, span B, is associated with system-B.
  • The toll cost for the entire stretch, span A + B, has a single cost. The tollSystems for this toll cost will have both system-A and system-B
📘

Note

In the example route request, if toll summaries for systems are requested, the sum of the toll cost for individual systems will be greater than the actual total toll cost. The reason is the single cost for span A + B will be in the summaries of both system-A and system-B.

Request

curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'origin=44.242084,-0.907024&'\
'destination=47.712973,1.478985&'\
'return=summary,polyline,tolls,travelSummary&'\
'currency=EUR&'\
'spans=tollSystems&'\
'transportMode=truck&'\
'routingMode=fast&'\
'vehicle[grossWeight]=40000&'\
'vehicle[type]=tractor&'\
'departureTime=any&'\
'tolls[transponders]=all&'\
'tolls[vignettes]=all&'\
'tolls[summaries]=total,tollSystem&'\
'tolls[emissionType]=euro5&'\
'apiKey=YOUR_API_KEY'

Response

The route response has:

  • Total toll cost: 155.6 EUR
  • Toll summaries for systems:
    • TollSystem_0 : 23.3 EUR
    • TollSystem_1 : 103.3 EUR
    • TollSystem_2 : 132.3 EUR

It can be seen from the response that the cost 103.3 EUR is included twice for both TollSystem_1 and TollSystem_2, because the toll cost is associated with both the systems and is paid once.

{
  "routes": [
    {
      "id": "686f8c89-ec55-4ddc-9474-4c907e4ff0d4",
      "sections": [
        {
          "id": "81efb15b-f257-49e8-b4be-6e7d334debf3",
          ...,
          "summary": {
            ...,
            "tolls": {
              "total": {
                "type": "value",
                "currency": "EUR",
                "value": 155.6
              },
              "totalBySystem": [
                {
                  "tollSystem": 0,
                  "price": {
                    "type": "value",
                    "currency": "EUR",
                    "value": 23.3
                  }
                },
                {
                  "tollSystem": 1,
                  "price": {
                    "type": "value",
                    "currency": "EUR",
                    "value": 103.3
                  }
                },
                {
                  "tollSystem": 2,
                  "price": {
                    "type": "value",
                    "currency": "EUR",
                    "value": 132.3
                  }
                }
              ]
            }
          },
          "travelSummary": {...},
          "polyline": "...",
          "spans": [
            {
              "offset": 0
            },
            {
              "offset": 188,
              "tollSystems": [
                0
              ]
            },
            {
              "offset": 418
            },
            {
              "offset": 2403,
              "tollSystems": [
                1
              ]
            },
            {
              "offset": 5920,
              "tollSystems": [
                2
              ]
            },
            {
              "offset": 7158,
              "tollSystems": [
                1,
                2
              ]
            },
            {
              "offset": 7159,
              "tollSystems": [
                2
              ]
            },
            {
              "offset": 7497
            },
            {
              "offset": 7640,
              "tollSystems": [
                2
              ]
            },
            {
              "offset": 8717
            }
          ],
          "transport": {
            "mode": "truck"
          },
          "tolls": [
            {
              "countryCode": "FRA",
              "tollSystemRef": 0,
              "tollSystem": "ATLANDES",
              "tollSystems": [
                0
              ],
              "fares": [
                {
                  "id": "b8f7aa71-8430-4bcd-9481-d642c1df4485",
                  "name": "ATLANDES",
                  "price": {
                    "type": "value",
                    "currency": "EUR",
                    "value": 23.3
                  },
                  ...
                }
              ],
              ...
            },
            {
              "countryCode": "FRA",
              "tollSystemRef": 2,
              "tollSystem": "COFIROUTE",
              "tollSystems": [
                2,
                1
              ],
              "fares": [
                {
                  "id": "28f6a887-c199-404f-8646-7063bf456be7",
                  "name": "COFIROUTE",
                  "price": {
                    "type": "value",
                    "currency": "EUR",
                    "value": 103.3
                  },
                  ...
                }
              ],
              "tollCollectionLocations": [
                {
                  "name": "VIRSAC",
                  "location": {
                    "lat": 45.02377,
                    "lng": -0.43499
                  }
                },
                {
                  "name": "TOURS-C/SORIGNY",
                  "location": {
                    "lat": 47.21845,
                    "lng": 0.65794
                  }
                }
              ]
            },
            {
              "countryCode": "FRA",
              "tollSystemRef": 2,
              "tollSystem": "COFIROUTE",
              "tollSystems": [
                2
              ],
              "fares": [
                {
                  "id": "c325a1c7-b075-4ad0-9224-d19948f5a656",
                  "name": "COFIROUTE",
                  "price": {
                    "type": "value",
                    "currency": "EUR",
                    "value": 29.0
                  },
                  ...
                }
              ],
              "tollCollectionLocations": [
                {
                  "name": "TOURS-C/MONNAIE",
                  "location": {
                    "lat": 47.49009,
                    "lng": 0.81952
                  }
                },
                {
                  "name": "MER",
                  "location": {
                    "lat": 47.72876,
                    "lng": 1.50842
                  }
                }
              ]
            }
          ],
          "tollSystems": [
            {
              "name": "ATLANDES"
            },
            {
              "name": "ASF"
            },
            {
              "name": "COFIROUTE"
            }
          ]
        }
      ]
    }
  ]
}

Multiple providers, different fares

  • A route section may have multiple toll costs (sections[*].tolls) and a toll cost may have multiple unique fares (sections[*].tolls[*].fares).
  • For a toll cost associated with a single toll system the fare name is same as the toll system name.
  • But for a toll cost associated with multiple toll systems fare name will return only one toll system name. To get the names of all the toll systems associated with a toll cost fare use sections[*].tolls[*].tollSystems. The indices in sections[*].tolls[*].tollSystems refer to the data in sections[*].tollSystems.
{
  ...,
  "tollSystemRef": 2,
  "tollSystem": "COFIROUTE",
  "tollSystems": [
    2,
    1
  ],
  ...,
  "fares": [
    {
      "id": "28f6a887-c199-404f-8646-7063bf456be7",
      "name": "COFIROUTE",
      "price": {
        "type": "value",
        "currency": "EUR",
        "value": 103.3
      }
    }
  ],
  ...
}
📘

Note

In the example, the toll cost spans across multiple system providers, so the fares are associated with multiple systems 2 and 1. Even though the toll cost is associated with multiple systems, the properties tolls[*].tollSystemRef, tolls[*].tollSystem, and tolls[*].fares[*].name support and return only one toll system 2/COFIROUTE. These properties are deprecated as they return incomplete information in case of multiple toll systems. For complete information use tolls[*].tollSystems.