Toll Cost Extension API Developer's Guide

Reading a Toll Cost Extension API Response

The Toll Cost Extension API has two types of responses with the following structures.

Response for the Tollcost Resource

The resource tollcost.json provides a response that includes the following components:
  • A countries object that wraps the tollcost information for each country the route traverses.
  • A roadSectionsCosts object that covers the routes (as represented by linksIds) and conditions of the toll as well as the structures involved with collecting the tolls.
  • An adminAdmissionCosts object that captures the same information as for the road section costs, just for the entering of an administrative area (for instance, the congestion charge for entering London).
  • Objects containing information on usage fees (usageFeeRequiredLinks) and toll systems (tollSystemsNames).
  • Metainformation about the processing of the request, as captured in the errors, warnings, and onError objects.
Example response structure for the tollcost.json resource:
{
  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: ...,
            ...
          }
        },
        ...
      ],
    },
    ...
  ]
}

Response for the Calculateroute Resource

The resource calculateroute.json provides a response that includes the following components:
  • Router response that includes all of the attributes specified in the request (response).
  • Metainformation about the processing of the request, as captured in the errors, warnings, and onError objects.
  • A costs object that includes overall costs and the detailed breakdown for driver, vehicle, and toll cost usage.
  • An optional detailedTollCosts object that provides detailed toll costs encountered along the returned route (must be requested).
All of the costs are returned in the specified currency parameter.

Example response srtructure for the calculateroute.json resource:
{
  "response": {...},
  "errors": [
    ...,
    ...,
    ...
  ],
  "warnings": [ 
    ...,
    ...,
    ...
  ],
  "onError": ...,
  "costs": {
    "totalCost": ...,
    "currency": ...,
    "details": {
      "driverCost": ...,
      "vehicleCost": ...,
      "tollCost": ...
    }
  },
  "tollCost": {
    "routeTollItems": [
      {...}
      ...
    ]
  }
}

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.