Toll Cost Extension API Developer's Guide

Resource "tollcost.json"

Structure

The response is provided in JSON format. Depending on the chosen rollup(s), one or multiple of following elements will be in the result.

Note: If no request parameter &rollup=... is passed, then the response is structured differently (deprecated legacy format).

&rollup = none

{
  errors: [..., ..., ...],
  warnings: [..., ..., ...],
  onError: ...,
  routeTollItems: [
    {
      linkIds: [..., ..., ...],
      tollType: ...,
      country: ...,
      conditionId: ...,
      tollSystem: [
        {
          id: ...,
          name: ...,
          languageCode: ...
        },
        ...
      ],
      tollStructures: [
        {
          linkIds: [..., ...],
          name: ...,
          languageCode: ...,
          latitude: ...,
          longitude: ...,
          conditionId: ...
        },
        ...
      ],
      tollCostAlternatives: [
        {
          amount: ...,
          currency: ...,
          amountInTargetCurrency: ...,
          methodOfPayment: ...,
          daylightHours: ...,
          discountAvailable: ...,
          vehicleSpecification: {
            category: ...,
            trailerType: ...,
            minNrOfAxlesVehicle: ...,
            maxNrOfAxlesVehicle: ...,
            emissionType: ...,
            minVehicleHeight_cm: ...,
            minVehicleWeight_kg: ...,
            hazardousType: ...,
            ...
          }
        },
        ...
      ],
    },
    ...
  ]
}

&rollup = total

{
  errors: [..., ..., ...],
  warnings: [..., ..., ...],
  onError: ...,
  totalCost: {
          amount: ...,
          currency: ...
  }
}

&rollup = tollsys

{
  errors: [..., ..., ...],
  warnings: [..., ..., ...],
  onError: ...,
  costsByTollSystem: [
    {
      tollSystemId: ...,
      name: ...,
      languageCode: ...,
      amountInTargetCurrency: ...
    },
    ...
  ]
}

&rollup = country

{
  errors: [..., ..., ...],
  warnings: [..., ..., ...],
  onError: ...,
  costsByCountry: [
    {
      country: ...,
      amountInTargetCurrency: ...
    },
    ...
  ]
}

&rollup = country;tollsys

{
  errors: [..., ..., ...],
  warnings: [..., ..., ...],
  onError: ...,
  costsByCountryAndTollSystem: [
    {
      country: ...,
      tollSystemId: ...,
      name: ...,
      languageCode: ...,
      amountInTargetCurrency: ...
    },
    ...
  ]
}

Elements and Values

routeTollItems Top level element for &rollup = none. Contains a list of toll items. Each element adds to the total cost.

routeTollItems[].linkIds List of links for which this cost applies. Note: If the payment is on a certain link or booth, then not necessarily all links are listed here but at least the links of the payment location(s).

routeTollItems[].tollType Toll system type: A = Administrative area access cost. a = Toll road link with administrative access fee, where the fee has been payed (somewhere else) when entering or leaving the administrative area. F = Cost per road link. K = Toll road section without toll booths. S = Toll road section with toll booth(s). p = Toll road link, where the fee has been payed (somewhere else) at the start or end of thise toll section. U = Toll road with unknown cost.

routeTollItems[].country ISO-3 country code.

routeTollItems[].conditionId Core map id of road link's "usage fee required" condition.

routeTollItems[].tollSystemId List of toll system ids that operate this toll section.

routeTollItems[].tollStructures Element containing 1 or 2 toll booths. If the toll section has only 1 booth, then it can be at the start or at the end. If the section has 2 booths, then the first one is at the start, the second at the end.

routeTollItems[].tollStructures[].linkIds List of 2 link ids. The first link is in front of the booth, the second one behind the booth, seen in driving direction.

routeTollItems[].tollStructures[].name Toll booth name or nearby city name.

routeTollItems[].tollStructures[].languageCode ISO-3 language code of the toll booth name.

routeTollItems[].tollStructures[].latitude Latitude of toll booth position [WGS84 degree].

routeTollItems[].tollStructures[].longitude Longitude of toll booth position [WGS84 degree].

routeTollItems[].tollStructures[].conditionId Core map id of toll booth's "toll structure" condition.

routeTollItems[].tollCostAlternatives Element containing alternative cost options for the toll section. Alternatives can be payment in different currencies, with different payment types, for different (matching) vehicle types, for different (matching) date/times or different pass/subscription options/validities. If no date/time is given, or the vehicle type not specified accurately, then more cost alternatives will be listed. For rollups (e.g. cost summaries per country), the cheapest of the alternatives will be chosen.

routeTollItems[].tollCostAlternatives[].amount Total amount to pay for traversing the booth or link.

routeTollItems[].tollCostAlternatives[].currency ISO currency code of the cost amount. This is the currency in which the toll is actually payed. If toll can be payed in multiple currencies then any of those is chosen.

routeTollItems[].tollCostAlternatives[].methodOfPayment Bit mask of following: 1 = Cash, 2 = Bank card, 4 = Credit card, 8 = Pass / subscription, 16 = Transponder, 32 = Video toll charge, 64 = Exact cash, 128 = Travel card.

routeTollItems[].tollCostAlternatives[].daylightHours Bit mask of following: 2 = cost during daylight hours, 4 = cost during non-daylight hours.

routeTollItems[].tollCostAlternatives[].discountAvailable True if a discount or exemption is available under certain circumstances.

routeTollItems[].tollCostAlternatives[].pass Toll can be paid by purchasing a pass. Follwoing attributes describe the pass: idUnique identifier for a pass (not for each instance, not for each time period), e.g. annual Swiss vignette for passenger cars has one id. annualIf true then the pass is valid until end of December of the year. extendedAnnualIf true then the pass is valid until end of January of the following year. nrOfMonthsValidity period. Either nrOfMonths or nrOfDays or none is specified. nrOfDaysValidity period. Either nrOfMonths or nrOfDays or none is specified. seniorPassSpecial offer for senior people available.

routeTollItems[].tollCostAlternatives[].vehicleSpecification Element containing attributes to restrict the vehicle properties for which this cost applies. Non-listed items are unspecified, e.g. if only maxVehicleHeight_cm is specified but no minVehicleHeight_cm, then the cost applies to all vehicles up to that height. The values are the same as the corresponding request parameters (appended by Min or Max as appropriate), but the units are always cm and kg and are not appended to the value string.

totalCost Top level element for &rollup = total. Contains amount and currency. Currency is the target currency.

costsByTollSystem Top level element for &rollup = tollsys. Contains a list of elements with tollSystemId, amount and currency. Currency is the target currency.

costsByCountry Top level element for &rollup = country. Contains a list of elements with country, amount and currency. Currency is the target currency.

costsByCountryAndTollSystem Top level element for &rollup = country;tollsys. Contains a list of elements with country, tollSystemId, amount and currency. Currency is the target currency.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.