Toll Cost Extension API Developer's Guide

Find Cost-Optimized Route

To find a cost-optimized route for a car using the fastest route, send the following GET request.
https://tce.cit.api.here.com/2/calculateroute.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&waypoint0=49.33729606975952,0.5986232869327068
&waypoint1=49.493527937780975,0.10129541603788539
&mode=fastest;car
&cost_optimize=1
The response to the above request includes the following high level elements:
  • Metadata about the request
  • Information about the route
  • Information about the toll cost calculation assumptions and results
{
  "response": {
    "metaInfo": {
      "timestamp": "2016-09-16T07:38:31Z",
      "mapVersion": "8.30.63.157",
      "moduleVersion": "7.2.72.0-55447",
      "interfaceVersion": "2.6.25"
    },
    "route": [{
      route information removed for readability    
    }],
    "language": "en-us"
  },
  "errors": [],
  "warnings": [{
    "category": 1,
    "context": "No target currency specified. Cost totals will be returned in EUR"
  }],
  "onError": false,
  "costs": {
    "totalCost": "2.6",
    "currency": "EUR",
    "details": {
      "driverCost": "0.0",
      "vehicleCost": "0.0",
      "tollCost": "2.6"
    }
  }
}