tce api tollcost.json returns no costs - here-api

For example this url returns no costs:
https://tce.api.here.com/2/tollcost.json?app_id=xxxx&app_code=xxxx&tollVehicleType=3&rollup=country&currency=EUR&route=-1201736915;-1126692456
Here's the response:
{"errors":[],"warnings":[],"costsByCountry":[],"onError":false}
If instead using the the fleet api calculateroute.json with the same coordinates:
https://fleet.api.here.com/2/calculateroute.json?app_id=xxxx&app_code=yyyy&waypoint0=49.45276,8.51315&detail=1&waypoint1=46.18977,6.24859&routelegattributes=none&routeattributes=none&maneuverattributes=none&linkattributes=none&legattributes=none&currency=EUR&tollVehicleType=3&mode=fastest;truck;traffic:disabled&rollups=country&alternatives=0
The response contains cost 93.89€:
"cost":{"totalCost":"93.89","currency":"EUR","details":{"driverCost":"0.0","vehicleCost":"0.0","tollCost":"93.89","optionalValue":0.0}}
Shouldn't both apis return the same cost?

HERE API provides two APIs one is to calculate toll cost optimised route using toll cost extension services and second one to get the route with Toll cost.
Here is the link for the documentation
Hope this helps.

Related

Difference between tce.api.here.com and fleet.ls.hereapi.com

i am modifying my code to use the new apiKey instead of app_code and i have a problem with the new https://fleet.ls.hereapi.com/2/tollcost service.
When i try to feed a route bigger than 600-800 linkID's i am getting the following error:
414 Request-URI Too Large
I dont have any problems with the old service.
I was trying to reduce the linkID count but the result is altered too.
Can i somehow compress the list of linkID's ?
The TCE API(tce.api.here.com) is legacy api and deprecated (but is still in functionality status) and will be not improved and not bug-fixed.
Please use the Fleet Telematics API to calculate toll cost instead of TCE API.
Fleet Telematics API is being improved and supported.

How to get Timezone info, Timezone id in particular, in HERE API Batch geocoding process

I am moving from Google to Here-Api Geocoding service.I need to implement batch geocoding using HERE Batch Geocoder API. Till now I am able to get almost all of the needed info from Batch Geocoder API. However, I am not able to find a way to get TimeZone info in Batch Geocoder API response.
For example,I was able to get Timezone object through Here Forward Geocoding API- by set query parameters 'gen=9&&locationattributes=adminInfo,timeZone', but this two APIs-Geocoding and Batch Geocoder API seems to work slightly different.
I tried various combinations of query params using this generic URL:
http://batch.geocoder.cit.api.here.com/6.2/jobs?action=run&app_code=[your-app-code]&app_id=[your-app-id]&gen=8&header=true&indelim=|&outdelim=|&outcols=displayLatitude,displayLongitude,navigationLatitude,navigationLongitude,mapViewTopLeftLatitude,mapViewTopLeftLongitude,mapViewBottomRightLatitude,mapViewBottomRightLongitude,locationLabel,houseNumber,street,district,city,county,state,postalCode,country,relevance,matchLevel,matchType,matchCode,mapReferenceId,responseAdditionalData,addressAdditionalData&addressattributes=all&locationattributes=all&responseattributes=all&maxresults=5&outputcombined=true&mailto=[yourname#domain.com]
I took it from a response here:
How and what do responseattributes return for the Here Batch Geocoder API?
However, neither in posted URL nor in HERE Api documentation I found a way to include in "outcols" information for Timezone(i need only the TimeZone Id anyway).My logic is basically that if params gen=9 and locationattributes=adminInfo,timeZone are set it should work in Batch geocoding(as it works in Forward Geocoding API).
Looking at the documentation it seems to me that Timezone info is not included in batch geocoding response at all, which is a problem for me since I need Timezone Id and in this way after Batch geocoding I need to make request for each entry to set Timezone id.
In short, I need to take TimeZone info(TimeZone Id) from HERE Batch Geocoder API
The BatchGeocoder Service does not support time zones only the Geocoder Service does support this right now.

Sabre service to get flight availability and price excluding BargainFinderMax

Is any Sabre service to get flight availability and price (from given start and end airports and dates).
But excluding BargainFinderMax service (this service is not in our contract).
A possible service it is: OTA_AirLowFareSearchLLSRQ

REQUEST_DENIED when using Google Maps AutoComplete

I am unable to use Google Maps AutoComplete. I have read all the articles about this problem, and I still get REQUEST_DENIED:
The following services are turned ON:
Google Maps API v3
Places API
Prediction API
Simple API Access:
API key: **
Referers: Any referer allowed
Activated on: (A few days ago)
Activated by: ** – you
I have even activated my credit card (don't know if that makes a difference for traffic under the quota):
The following happens (tested both from a browser and command line cURL):
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=New&types=(cities)&key=$apikey
{
"predictions" : [],
"status" : "REQUEST_DENIED"
}
How do I make this work?
From the documentation
Required parameters
input — The text string on which to search. The Place service will return candidate matches based on this string and order results based on their perceived relevance.
sensor — Indicates whether or not the Place request came from a device using a location sensor (e.g. a GPS) to determine the location sent in this request. This value must be either true or false.
key — Your application's API key. This key identifies your application for purposes of quota management. Visit the APIs Console to select an API Project and obtain your key. Maps API for Business customers must use the API project created for them as part of their Places for Business purchase.
I don't see "sensor" in your example request.

Get specific data from Multi-Channel Funnels Reporting API?

In my application, i get the data on traffic and conversions from my account using Google Analytics Core Reporting API and Multi-Channel-Funnels Reporting API.
For to get a traffic data, I use the GET command from Core Reporting API.
In this command I give, among other things, necessary to display parameters (dimensions and metrics), and filtering options data for my request - filter and segment (I use dynamic segments).
Here's an example of one of the queries:
GET https://www.googleapis.com/analytics/v3/data/ga?
ids=ga:XXXXXXXXXX &
start-date=2013-03-05 &
end-date=2013-04-04 &
metrics=ga:visits,ga:pageviewsPerVisit,ga:avgTimeOnSite,ga:percentNewVisits,ga:entranceBounceRate &
dimensions=ga:source,ga:keyword &
filters=ga:visits>0 &
segment=dynamic::ga:medium==CPA,ga:medium==CPC,ga:medium==cpm;ga:campaign!#img_ &
sort=-ga:visits &
key={YOUR_API_KEY}
This query returns me the results of the traffic data match the condition of filter and segment.
But when i wanted to return the data conversion for the same data with the MCF Reporting API, i encountered a problem.
GET command from MCF Reporting API does not contain the "Segment", and the filter does not allow write OR conditions.
Although the web interface Google Analytics has the ability to apply segments for data conversion. I've read. that we can apply Channel Groupings to the query results in the web interface, but they are tied to the account. And because I'm using a service account for authentication and working with API, to me they are not available. I do not know how to apply them in the API.
How do I filter the melon for the conversion in the request that they udoletvoryali Writing the above condition?
Is there a way to solve my problem?
Thanks, sorry for my English.

Resources