I have two routes in Italy.
Gad-Oulx - Genova. The toll cost returned is 58.70 EUR without VAT.
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¤cy=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!45.04354,6.84545;;6,7,2,8,9,10&waypoint1=geo!stopOver!44.4104,8.93898;;6,7,2,8,9,10&app_id=APPID&app_code=APPCODE
Brennero - Bologna. The toll cost returned is 63.10 EUR with VAT.
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¤cy=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.00142,11.50413;;6,7,2,8,9,10&waypoint1=geo!stopOver!44.50483,11.34519;;6,7,2,8,9,10&app_id=APPID&app_code=APPCODE
There is a way to get a flag to determine if the returned value contains or not the VAT ?
It totally depends on the region whether VAT is applied or not. Here toll costs represents the total toll amount and do not provide information on whether vat is inclusive.
Related
I have a question about setting up a tax enforcement under a particular condition.
Now my ecommerce is set up to calculate taxes based on billing address.
Therefore:
If the customer is European, the taxes are calculated based on the percentage of his country.
If the customer is from outside Europe, the tax is zero.
However, it is happening that some customers set the non-European billing address and the billing address in Europe, so the taxes are not calculated.
According to a recent court ruling, in these cases the taxation of the country in which the selling company is based, in my case Italy, should be applied, therefore taxation at 22%.
How can I set this rule with a function?
Thank you!
The route from 46.371399% 2C2.569599 to 50.53027% 2C9.68613 costs 254.4 euros in France, and 74.2 euros back in France. Why such difference?
254.4 euros
https://fleet.ls.hereapi.com/2/calculateroute.json?xnlp=jsonAttributes%3D41&app_id=&app_code=&apikey=&mode=truck%3Bfastest%3Btraffic%3Adisabled&language=en-GB&representation=overview&metricSystem=metric&routeattributes=wp%2Csc%2Csm%2Csh%2Cbb%2Clg%2Cno%2Cshape&legattributes=wp%2Cmn%2Cli%2Cle%2Ctt&maneuverattributes=po%2Csh%2Ctt%2Cle%2Cti%2Cli%2Cpt%2Cpl%2Crn%2Cnr%2Cdi&linkattributes=sh%2Cle%2Csl%2Cds%2Ctr&instructionformat=html&trailersCount=0&alternatives=0¤cy=EUR&trailerType=2&vehicleNumberAxles=2&trailerNumberAxles=3&hybrid=0&height=4m&trailerHeight=400&vehicleWeight=8000&limitedWeight=40t&width=225&length=16.5m&disabledEquipped=0&minimalPollution=0&hov=0&passengersCount=1&commercial=1&heightAbove1stAxle=300&fuelType=Diesel&detail=1&rollup=none%2Ccountry%3Btollsys&requestId=1631897604381&excludeCountries=CHE&truckRestrictionPenalty=strict&emissionType=6&shippedhazardousgoods=0&waypoint0=geo!46.371399%2C2.569599&waypoint1=geo!50.53027%2C9.68613&jsoncallback=H.service.jsonp.handleResponse(17)
74.2 euros
https://fleet.ls.hereapi.com/2/calculateroute.json?xnlp=jsonAttributes%3D41&app_id=&app_code=&apikey=&mode=truck%3Bfastest%3Btraffic%3Adisabled&language=en-GB&representation=overview&metricSystem=metric&routeattributes=wp%2Csc%2Csm%2Csh%2Cbb%2Clg%2Cno%2Cshape&legattributes=wp%2Cmn%2Cli%2Cle%2Ctt&maneuverattributes=po%2Csh%2Ctt%2Cle%2Cti%2Cli%2Cpt%2Cpl%2Crn%2Cnr%2Cdi&linkattributes=sh%2Cle%2Csl%2Cds%2Ctr&instructionformat=html&trailersCount=0&alternatives=0¤cy=EUR&trailerType=2&vehicleNumberAxles=2&trailerNumberAxles=3&hybrid=0&height=4m&trailerHeight=400&vehicleWeight=8000&limitedWeight=40t&width=225&length=16.5m&disabledEquipped=0&minimalPollution=0&hov=0&passengersCount=1&commercial=1&heightAbove1stAxle=300&fuelType=Diesel&detail=1&rollup=none%2Ccountry%3Btollsys&requestId=1631897604381&excludeCountries=CHE&truckRestrictionPenalty=strict&emissionType=6&shippedhazardousgoods=0&waypoint1=geo!46.371399%2C2.569599&waypoint0=geo!50.53027%2C9.68613&jsoncallback=H.service.jsonp.handleResponse(17)
On the way forward, the route uses the paid highway section from "Montluçon" to "Saint-Maurice", which costs 244.20€ according to the HERE API, for trucks matching specified input parameters.
According to the current pricesheet from the French highway operator APRR, this section costs indeed 244.20€. See page 177, vehicle column Class 4. Therefore the high amount is not a data error.
The high difference comes from the fact that on the way back, the route exits the paid section much earlier at "Chalon-Sud", so the section to pay is "Saint-Maurice" to "Chalon-Sud", which costs 64€ for Class 4 vehicles.
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.
When I ask for toll costs I don't get ferry costs (to be implemented I hope). But in the route cost I see vehicle costs. If I understand correctly only the costs per km are taking into account for a vehicle (so I have to add hour costs to km). To my suprise the costs also takes km while on ferry into account.
I entered 50 cents per km, and I see about 30 euro of vehicle costs between Dover and Calais.
Here is a link
{"faultCode":"s9205992a-ff30-4188-8a82-e721643f247c","responseCode":"401","message":"This is not a valid app_id and app_code pair. Please verify that the values are not swapped between the app_id and app_code and the values provisioned by HERE (either by your customer representative or via http://developer.here.com/myapps) were copied correctly into the request."}
Vehicle costs are calculated irrespective of the vehicle being driven or not in the current routing api. However there are plans of implementing the above ask soon. Watch out for updates in the development page.
Total distance as per your query: 56.743 km
Vehicle km cost defined: 0.5 cents
Total Vehicle cost calculated: 56.743 * 0.5 = 28.37 Euro
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¤cy=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