Here Maps Telematics TOLLS API - specifying roundtrip - here-api

I am working with Telematics API https://fleet.ls.hereapi.com/2/calculateroute.json to calculate the toll costs. Can I please ask if anyone has used or aware if there is a special parameter to denote one way or round trip. I am using waypoints to represent round trip as in waypoint0 = source, waypoint1=destination, waypoint2=source to represent my round trip. The values returned are high compared to the ones indicated by local teams who use that toll regularly
As example 59.9133301,10.7389701 -> 60.6244351,11.3831208 -> 59.9133301,10.7389701 shows 816 NOK but real value is only 660. A one way from 59.9133301,10.7389701 -> 60.6244351,11.3831208 shows 340 NOK which may be right
So is there another way on API to ask for toll cost combined for both directions?
Thank you for your assistance

Please share you complete request. I am unable to reproduce the issue.
You can refer to these example request:
Round Trip request :
https://fleet.ls.hereapi.com/2/calculateroute.json?jsonAttributes=41&waypoint0=59.9133301,10.7389701&detail=1&waypoint1=60.6244351,11.3831208&waypoint2=59.9133301,10.7389701&maneuverAttributes=none&linkAttributes=none,sh&legAttributes=none,li&currency=NOK&departure=&tollVehicleType=2&trailerType=0&trailersCount=0&vehicleNumberAxles=2&trailerNumberAxles=0&hybrid=0&emissionType=5&fuelType=petrol&height=1.67m&trailerHeight=0&vehicleWeight=1739&limitedWeight=1.739t&disabledEquipped=0&minimalPollution=0&hov=0&passengersCount=2&tiresCount=4&commercial=0&heightAbove1stAxle=1m&width=1.8m&length=4.41m&mode=fastest;car;traffic:disabled&rollups=none,country;tollsys&&tollPass=transponder&apikey=<apikey>&jsoncallback=parseRouting
Result TollCost: 244.8
One way request :
https://fleet.ls.hereapi.com/2/calculateroute.json?jsonAttributes=41&waypoint0=59.9133301,10.7389701&detail=1&waypoint1=60.62544,11.37563&maneuverAttributes=none&linkAttributes=none,sh&legAttributes=none,li&currency=NOK&departure=&tollVehicleType=2&trailerType=0&trailersCount=0&vehicleNumberAxles=2&trailerNumberAxles=0&hybrid=0&emissionType=5&fuelType=petrol&height=1.67m&trailerHeight=0&vehicleWeight=1739&limitedWeight=1.739t&disabledEquipped=0&minimalPollution=0&hov=0&passengersCount=2&tiresCount=4&commercial=0&heightAbove1stAxle=1m&width=1.8m&length=4.41m&mode=fastest;car;traffic:disabled&rollups=none,country;tollsys&&tollPass=transponder&apikey=<apikey>&jsoncallback=parseRoutingResponse
Result toll cost 113.6
Back to source
https://fleet.ls.hereapi.com/2/calculateroute.json?jsonAttributes=41&detail=1&waypoint0=60.6244351,11.3831208&waypoint1=59.9133301,10.7389701&maneuverAttributes=none&linkAttributes=none,sh&legAttributes=none,li&currency=NOK&departure=&tollVehicleType=2&trailerType=0&trailersCount=0&vehicleNumberAxles=2&trailerNumberAxles=0&hybrid=0&emissionType=5&fuelType=petrol&height=1.67m&trailerHeight=0&vehicleWeight=1739&limitedWeight=1.739t&disabledEquipped=0&minimalPollution=0&hov=0&passengersCount=2&tiresCount=4&commercial=0&heightAbove1stAxle=1m&width=1.8m&length=4.41m&mode=fastest;car;traffic:disabled&rollups=none,country;tollsys&&tollPass=transponder&apikey=<apikey>&jsoncallback=parseRoutingResponse
Result tollcost 131.2
Toll cost of route (1) = toll cost of route (2+3)

Related

API - HERE Routing - How to get miles driven per each state?

For any given route e.g. Brooklyn, NY to Seattle, WA, I need to calculate amount of miles we drove via each state.
I have tested multiple routing APIs and non of them return anything I could use in calculation. (I testes MapQuest, google and TomTom)
I spoke to HERE.com sales rep and he told me HERE-apis return that info but after running test calls it does not look to me that this is the case.
Does anyone know how to format query on HERE-api to get info I am looking for or any other way?
HERE Routing API does not support a feature to calculate to calculate the sum of amount miles grouping by State level. But probably you can do post process for the calculation the sum of amount miles based on road network in State level.

HERE Toll cost calculation information missing

I am trying to implement a route calculator with the HERE API. I should show the toll costs of the given route for the user. However, I have some questions, I could not find any answer in the documentation for:
Are the given toll costs net value, i.e. is VAT included or not? Based on my test requests, it looks like there are some countries where VAT is included, and it is excluded in others. Are there any arguments in the result from HERE providing information on this?
One can specify the currency in which the costs are calculated, but I could not find any information on the exchange rates applied. I would like to show this also for the user. Is it possible to get this in the result, too? Or maybe is the source of this data public?
As the toll costs and the toll roads may change over time, I would like to also show the time of data for the user. Is there any argument for this given back by HERE in the result?
I assume you are using the HERE Fleet Telematics API.
VAT is expected to always be included. No, there is no such argument in the API.
No, you cannot get this information in the results. The only trick I can suggest, is to make 2 consecutive calls to the API, one using the first currency and another one using the second currency, and therefore derive from these results the applied exchange rate.
There's no such argument. You should assume that HERE's toll cost data is always fresh.
Toll cost calculation is provided via Here Fleet Telematics API.
Total toll cost includes the VAT
And as per the documentation the below details can be retrieved.
In addition, toll cost detail can be requested on different levels, using the "rollups" parameter:
a. total summary only
b. cost per road link
c. cost per country
d. cost per toll system
Exchange rates are not provided rather currency can be provided.
There is no history of route calculation provided , all the data that are provided are latest.

Error Message: "through traffic restriction might apply" (Here Maps Fleet Telematics API)

When using Fleet Telematics API I have been getting the error message quite often -- about 10% of the routes I want to calculate: "Couldn't reach way point 1 (start links 781909352 -781909352 dest links 881144574 -881144574 881144579 -881144579 ), link 881144574's through traffic restriction might apply, link 881144579's through traffic restriction might apply"
Sample query: http://fleet.api.here.com/2/calculateroute.json?mode=fastest;truck;traffic:disabled&driver_cost=20&currency=EUR&rollups=total,country,tollsys,country;tollsys&commercial=1&shippedHazardousGoods=0&waypoint0=52.51,13.42&waypoint1=45.747353, 11.733903&tollVehicleType=3&vehicle_cost=0.5&fuelType=Diesel&emissionType=6&length=1500cm&height=270cm&heightAbove1stAxle=120cm&vehicleWeight=7000kg&vehicleNumberAxles=2&trailerType=2&trailersCount=1&trailerNumberAxles=4&trailerHeight=270cm
What are these numbers after the word "links"? Do they give more information about what the restriction might be? And if so, how do I access that information?
When I manually adjust the waypoint latitude and longitude a bit to move it to a nearby bigger road, a route is able to be found. But for me this needs to be automated to work. If I could increase the radius around the waypoint that would be considered a "success" to find a route, that would solve my problem.
The numbers after the word "links' are link IDs with the - indicating an opposite direction of travel. The error means the algorithm cannot get a valid route that goes through those two waypoints without violating the restrictions that you have provided (as parameters). You can add a routeMatch parameter with value 1 so the algorithm will treat you waypoints as GPS trace and find the most probable trace along the route.

Truck Routing and Toll Cost Calculation for Romania

I have the following request :
https://tce.cit.api.here.com/2/calculateroute.json?mode=fastest;truck;traffic:disabled&departure=now&avoidseasonalclosures=true&cost_optimize=1&metricsystem=metric&truckRestrictionPenalty=soft&driver_cost=15&vehicle_cost=0.85&currency=EUR&vehicletype=diesel,24&truckType=tractorTruck&tollVehicleType=3&hybrid=0&emissionType=6&passengersCount=1&commercial=1&trailerType=2&trailersCount=1&vehicleNumberAxles=2&trailerNumberAxles=3&tiresCount=12&height=4.0m&width=2.50m&length=16.5m&heightAbove1stAxle=3.5m&trailerHeight=4.0m&vehicleWeight=12.0t&limitedWeight=40.0t&weightPerAxle=10.0t&maneuverAttributes=none&combineChange=true&routeAttributes=none,no,wp,lg&legAttributes=none,li,sh&linkAttributes=none,fl,le&detail=1&alternatives=1&rollup=none,total,country&jsonattributes=41&waypoint0=geo!stopOver!47.05185,21.93873;;6,7,2,8,9,10&waypoint1=geo!stopOver!44.85142,24.87989;;6,7,2,8,9,10&app_id=APPID&app_code=APPCODE
The resulting route is a bad one.
The restrictions for trucks are not there on the real roads.
The correct route is given by the following request :
https://route.cit.api.here.com/routing/7.2/calculateroute.json?app_id=APPID&app_code=APPCODE&mode=fastest;car;traffic:disabled&departure=now&avoidseasonalclosures=true&metricsystem=metric&truckRestrictionPenalty=soft&trailersCount=1&height=4.0&width=2.50&length=16.5&limitedWeight=40.0&weightPerAxle=10.0&maneuverAttributes=none&combineChange=true&routeattributes=none,no,wp,lg,summary&linkattributes=none,fl,le&legattributes=none,li,sh&detail=1&alternatives=1&jsonattributes=41&waypoint0=geo!stopOver!47.05185,21.93873;;6,7,2,8,9,10&waypoint1=geo!stopOver!44.85142,24.87989;;6,7,2,8,9,10
Also the toll cost returned by both requests are wrong.
The returned value for one day is 11 RON and the amount in target currency is 2.36 EUR.
The correct value for one day is 11 EUR.
The bridge costs are correct.
Where can i report problems regarding the toll cost calculation and the truck restrictions ?
There is a request to get the list of truck restrictions on a route ?
The toll costs values are returned with VAT or without VAT. Can i get both values ? (with and without VAT)
The toll costs currencies are displayed correctly now. Please comment if you still see issues. stackoverflow.com/questions/50911406/toll-cost-vat-here-api

Here FindSequence Limit Waypoint

I need to get an optimized sequence of a route with up to max 120 waypoints.
I was trying to use "Here API" but with trial plan (I guess) even though I enter 10/20/30/40 destinations (waypoints), it always calculates only the top 5 destinations.
Is a plan problem?
thanks!
Maurizio
I'm using it successfully with up to 119 waypoints. I'm a customer (not trial).
Endpoint I'm using: https://wse.api.here.com/2/findsequence.json
Hope it helps

Resources