HERE LinkId from route not found in PDE (Platform Data Extension) - here-api

UPDATE: It's happening again, also with Fleet API. Please see additional examples at end of the post.
I'm using HERE's REST API to calculate a route, then ask for additional data for each link / route segment by querying HERE's Platform Data Extension (PDE). This usually works fine, but now I've run into a link id that is not recognised by PDE.
Are these services not in sync, or am I doing something wrong?
I didn't have any issue in the past weeks, and it still works fine for most link ids, so this could either be a new problem or a very singular issue. I searched in the HERE API documentation and on Stackoverflow, but couldn't find anything related.
Route request (A24 Berlin towards Hamburg): https://route.api.here.com/routing/7.2/calculateroute.json?waypoint0=geo!52.7091,13.0356&waypoint1=geo!52.7193,12.9608&mode=fastest;car;traffic:disabled&representation=navigation&app_id=xxx&app_code=yyy
The json response (below) contains a link with permanent id 1199057935 at Anschlussstelle Kremmen.
The PDE request gives an empty response: https://pde.api.here.com/1/index.json?layer=ROAD_GEOM_FCn&attributes=LINK_ID&values=1199057935&app_id=xxx&app_code=yyy
{"Layers":[]}
Instead, I would expect the data of the containing tile, e.g. what I get for 1199057936
{"Layers":[{"layer":"ROAD_GEOM_FC1","level":9,"tileXYs":[{"x":548,"y":405}]}]}
I also tried the PDE request with ROAD_GEOM_FC1 and prefixing the id with + (values=+1199057935). Other link ids of the route return the expected tile information.
For completeness, here's the link's json from the routing response:
{
"linkId":"+1199057935",
"shape":["52.7175629,12.976613","52.7177131,12.9749393"],
"firstPoint":28,
"lastPoint":29,
"length":114,
"remainDistance":1095,
"remainTime":39,
"nextLink":"+1199057936",
"maneuver":"M2",
"speedLimit":33.3333359,
"dynamicSpeedInfo":{"trafficSpeed":16.3888893,"trafficTime":7,"baseSpeed":27.5,"baseTime":4,"jamFactor":5.7118645},
"flags":["motorway"],
"functionalClass":1,
"roadNumber":"A24",
"timezone":"+0100",
"roadName":"",
"consumption":0,
"_type":"PrivateTransportLinkType"
}
UPDATE 2019-05-27:
I get a route that contains link id 1239826684 from https://route.api.here.com/routing/7.2/calculateroute.json?waypoint0=geo!52.5066,13.4299&waypoint1=geo!52.5282,13.4265&mode=fastest;car;traffic:disabled&representation=navigation&app_id=xxx&app_code=yyy
Using fleet endpoint redirects to same call as above, including link id 1239826684: https://fleet.api.here.com/2/calculateroute.json?waypoint0=geo!52.5066,13.4299&waypoint1=geo!52.5282,13.4265&mode=fastest;car;traffic:disabled&representation=navigation&app_id=xxx&app_code=yyy
PDE returns [] for that link id: https://pde.api.here.com/1/index.json?layer=ROAD_GEOM_FCn&attributes=LINK_ID&values=1239826684&app_id=xxx&app_code=yyy
Fleet API returns [] for that link id: http://fleet.cit.api.here.com/1/index.json?layer=ROAD_GEOM_FCn&attributes=LINK_ID&values=1239826684&app_id=xxx&app_code=yyy
Seems the underlying geo-data is not in sync, and using different APIs does not help. Any other solution?

You can try Fleet telematics group of API's over basic routing and PDE as Fleet Telematics provides whole routing solution .
Please find the below API request which is giving expected response for the id-1199057935
http://fleet.cit.api.here.com/1/index.json?layer=ROAD_GEOM_FCn&attributes=LINK_ID&values=1199057935&app_id=xxxx&app_code=yyyy
Response :
{
Layers: [
{
layer: "ROAD_GEOM_FC1",
level: 9,
tileXYs: [
{
x: 548,
y: 405
}
]
}
]
}
for more information kindly go through the below documentation
https://developer.here.com/documentation/fleet-telematics/api-reference.html#operation%2FindexJSONUsingGET
Hope this will help.

Related

GMB - Removal of LocationState object in Business Information API

Google deprecated the old GMB API v4.9 account.locations.get endpoint, and replaced it with Business Information API v1 locations.get.
Code change that affects me is:
Removal of LocationState object. The existing fields have been moved into Metadata.
The new Metadata object does not return the attributes LocationState object contained before. The ones I'm interested in are:
isVerified
isPublished
isSuspended
isDisabled
isDisconnected
etc...
My question is:
How could I get this data without using deprecated endpoints?
Try Verification API getVoiceOfMerchantState
isVerified (verify),
isPublished (hasVoiceOfMerchant=true AND hasBusinessAuthority=true),
isSuspended (complyWithGuidelines),
isDuplicate (resolveOwnershipConflict).
isDisabled & isDisconnected have no equivalent in new API
As far as I can see, based on the link you have sent it is written:
Endpoint URL:
Endpoints for all business information, attributes, categories, chains and locations search are accessible at https://mybusinessbusinessinformation.googleapis.com/v1/ instead of https://mybusiness.googleapis.com/v4/
The path name for locations endpoints has changed from
accounts/accountId/locations/locationId to locations/locationId
Maybe it was better if you could provide the request uri in the previous version so we could help you more precisely. Anyhow, what I tested in the google playground is as follows:
open [https://developers.google.com/oauthplayground]
after setting your clientId and Authorisation stuff, in the Request URI write
https://mybusinessbusinessinformation.googleapis.com/v1/locations/XXXXX?readMask=storeCode,metadata,profile,serviceArea,labels,adWordsLocationExtensions
instead of XXXXX, write your locationId
you can write different readMask fields, The possible fields for readMask are:
play with different fields to check if you have your desired one or not readMask="storeCode,regularHours,name,languageCode,title,phoneNumbers,categories,storefrontAddress,websiteUri,regularHours,specialHours,serviceArea,labels,adWordsLocationExtensions,latlng,openInfo,metadata,profile,relationshipData,moreHours";
If above does not help you, in the link below I see that all metadata attribute of a location might be:
Click [here] (https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.Metadata)

Why am I not receiving any images from the HERE Places (Search) API?

I'm trying to get images for restaurants using the HERE Places (Search) API.
I'm using the "Browse" entrypoint, and then using the href in there to get a restaurant's details. In it, I keep on getting this:
media: {
images: {
available:0
items: [ ]
}
The same for reviews and ratings.
Based on other posts here, I'm confused what the problem is, as one post seemingly says its a bug, and one post seemingly says it's just the way the API is.
First of all, "HERE Places API" is deprecated. You should migrate to "HERE Geocoding and Search API v7". Check this out https://developer.here.com/documentation/geocoding-search-api/migration_guide/index.html
As already explained in this question
Include Review,Rating and Images in places API , the API will return the place IDs of external suppliers (TripAdvisor, Yelp etc). This is true also for the latest "HERE Geocoding and Search API v7". With these IDs, you can retrieve other details (such images, reviews, etc) from external system APIs.

Receive creative name for SPONSORED_VIDEO & SPONSORED_INMAILS from LinkedIn API

Just trying to fetch the creativename for creativeTypes = SPONSORED_INMAILS AND SPONSORED_VIDEO out of the LinkedIn API but I'm only able to receive creative names of SPONSORED_STATUS_UPDATE type.
In the doc I can only read fetching data for SPONSORED_STATUS_UPDATE by using the projection variable.
https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-creatives#sponsoredvideocreativevariables
Does anyone have an idea how to get the creativename (subject) for SPONSORED_INMAILS AND SPONSORED_VIDEO?
I know It's a little bit late but with this endpoint, you can retrieve info on a video add
https://api.linkedin.com/v2/adDirectSponsoredContents/{{videoAddReffrence Urn}}
You can find the video Add reference Urn under the endpoint
https://api.linkedin.com/v2/adCreativesV2/{{add Id}}
under the key 'reference'

Why the parameter TransitRadius in HERE Routing API with public transport do not change the response

Trying to use the parameter TransitRaduis in the routing API of HERE. It works well with 'car mode' but when using it with 'public transport' it seems to me that it changes nothing !
So setting one waypoint with the following three differents ways, gives the same result !
&waypoint0=geo!37.7914050,-122.3987030
&waypoint0=geo!37.7914050,-122.3987030;50
&waypoint0=geo!37.7914050,-122.3987030;500
To request a public transport route using the CalculateRoute service you need to specify a departure time as
https://route.api.here.com/routing/7.2/calculateroute.json?app_id={YOUR_APP_ID}&app_code={YOUR_APP_CODE}&waypoint0=geo!52.530,13.326&waypoint1=geo!52.513,13.407&departure=now&mode=fastest;publicTransport&combineChange=true
For further details kindly go through the documentation
https://developer.here.com/documentation/routing/topics/request-public-transport-routes.html
Good Luck !

Fleet Telematics Route Matching, query more attributes for each route link

I'm evaluating the Fleet Telematics Route Matching service and i'm trying to retrieve more link attributes directly in the response. How can this be achieved?
I created a Freemium account on HERE.com and tried the basic example from the documentation: https://developer.here.com/documentation/route-match/topics/quick-start-gps-trace-route.html.
In the documentation of the service i found that it should be possible to get more attributes regarding the route links returned in the response: https://developer.here.com/documentation/route-match/topics/attributes-along-route.html
The following works (of course 123 is not my real app id, nor my real app code):
curl -v --request GET "https://rme.cit.api.here.com/2/matchroute.json?app_id=123&app_code=123&routemode=car&file=UEsDBBQAAAAIANmztEQSwaeZzwAAAM8BAAAQAAAAc2FtcGxlLXRyYWNlLmdweIXPTQuCMBwG8HufQnZv%2F605S0k9djEIungdZjpSJ27kPn6%2BRBgYXcYYv2cPzzG2deU8805L1YSIYoLiaHMsWvv9uBlYowOrZYhKY9oAoO973DOsugJ2hFBIz8k1K%2FNabGWjjWiy%2FJ36ShjVqqITd2lxpmo4XVKgMP6vZaCneKIyYabivzHnr4BhCbb6hoZRpnvMp86L%2BdIapxImRJxiSuh%2Bj5xq7CWY%2Bcz1EaypA10qxlfVjvOl8rxVxfzDQrk%2FFCfLRs7YpOCzA%2BZd49LoBVBLAQIUABQAAAAIANmztEQSwaeZzwAAAM8BAAAQAAAAAAAAAAEAIAAAAAAAAABzYW1wbGUtdHJhY2UuZ3B4UEsFBgAAAAABAAEAPgAAAP0AAAAAAA%3D%3D"
and returns:
{"RouteLinks":[{"linkId":25664478,"functionalClass":5,"confidence":1.0,"shape":"51.10168 0.39385 51.10184 0.39329","offset":0.62907,"mSecToReachLinkFromStart":2614,"linkLength":43.08},{"linkId":1022687683,"functionalClass":4,"confidence":1.0,"shape":"51.10184 0.39329 51.10214 0.39345","mSecToReachLinkFromStart":8376,"linkLength":35.21},{"linkId":1022687684,"functionalClass":4,"confidence":1.0,"shape":"51.10214 0.39345 51.10224 0.3935","mSecToReachLinkFromStart":10284,"linkLength":11.66},{"linkId":25664459,"functionalClass":4,"confidence":1.0,"shape":"51.10224 0.3935 51.10232 0.39354","mSecToReachLinkFromStart":11811,"linkLength":9.33},{"linkId":781742854,"functionalClass":4,"confidence":1.0,"shape":"51.10232 0.39354 51.10245 0.39361 51.10255 0.39367","mSecToReachLinkFromStart":16214,"linkLength":27.16},{"linkId":781742855,"functionalClass":4,"confidence":1.0,"shape":"51.10255 0.39367 51.10269 0.39376","mSecToReachLinkFromStart":16255,"linkLength":16.8},{"linkId":25664450,"functionalClass":4,"confidence":1.0,"shape":"51.10269 0.39376 51.10292 0.39391 51.10306 0.39401","mSecToReachLinkFromStart":19004,"linkLength":44.74},{"linkId":25664444,"functionalClass":4,"confidence":1.0,"shape":"51.10306 0.39401 51.10324 0.39413","mSecToReachLinkFromStart":29879,"linkLength":21.72},{"linkId":25664440,"functionalClass":4,"confidence":1.0,"shape":"51.10324 0.39413 51.10335 0.3942 51.1035 0.39431 51.1036 0.39439","mSecToReachLinkFromStart":37082,"linkLength":44.02},{"linkId":25664427,"functionalClass":4,"confidence":1.0,"shape":"51.1036 0.39439 51.10369 0.39446 51.10378 0.39453","mSecToReachLinkFromStart":40731,"linkLength":22.3},{"linkId":860272608,"functionalClass":4,"confidence":1.0,"shape":"51.10378 0.39453 51.10394 0.39465","mSecToReachLinkFromStart":43951,"linkLength":19.68},{"linkId":860272609,"functionalClass":4,"confidence":1.0,"shape":"51.10394 0.39465 51.10417 0.39482","mSecToReachLinkFromStart":44659,"linkLength":28.22},{"linkId":781742870,"functionalClass":4,"confidence":1.0,"shape":"51.10417 0.39482 51.10427 0.39489 51.10439 0.39497 51.10452 0.39505 51.10463 0.39512","mSecToReachLinkFromStart":48568,"linkLength":55.33},{"linkId":1022687692,"functionalClass":4,"confidence":1.0,"shape":"51.10463 0.39512 51.10483 0.39523","mSecToReachLinkFromStart":57622,"linkLength":23.55},{"linkId":1022687693,"functionalClass":4,"confidence":1.0,"shape":"51.10483 0.39523 51.10547 0.39554","offset":0.28475,"mSecToReachLinkFromStart":64944,"linkLength":74.44}],"TracePoints":[{"confidenceValue":1.0,"elevation":0.0,"headingDegreeNorthClockwise":10000.0,"headingMatched":-66.0,"lat":51.10177,"latMatched":51.10178,"linkIdMatched":25664478,"lon":0.39349,"lonMatched":0.3935,"matchDistance":1.46,"matchOffsetOnLink":0.6290743846692971,"minError":1.0,"routeLinkSeqNrMatched":0,"speedMps":0.0,"timestamp":0},{"confidenceValue":1.0,"elevation":0.0,"headingDegreeNorthClockwise":10000.0,"headingMatched":-66.0,"lat":51.10181,"latMatched":51.10182,"linkIdMatched":25664478,"lon":0.39335,"lonMatched":0.39336,"matchDistance":1.46,"matchOffsetOnLink":0.8790743846674338,"minError":1.0,"routeLinkSeqNrMatched":0,"speedMps":0.0,"timestamp":0},{"confidenceValue":1.0,"elevation":0.0,"headingDegreeNorthClockwise":10000.0,"headingMatched":22.0,"lat":51.10255,"latMatched":51.10255,"linkIdMatched":781742855,"lon":0.39366,"lonMatched":0.39367,"matchDistance":1.11,"matchOffsetOnLink":0.0,"minError":1.0,"routeLinkSeqNrMatched":5,"speedMps":0.0,"timestamp":0},{"confidenceValue":1.0,"elevation":0.0,"headingDegreeNorthClockwise":10000.0,"headingMatched":25.0,"lat":51.10398,"latMatched":51.10398,"linkIdMatched":860272609,"lon":0.39466,"lonMatched":0.39468,"matchDistance":1.87,"matchOffsetOnLink":0.1535150210712758,"minError":1.0,"routeLinkSeqNrMatched":11,"speedMps":0.0,"timestamp":0},{"confidenceValue":1.0,"elevation":0.0,"headingDegreeNorthClockwise":10000.0,"headingMatched":17.0,"lat":51.10501,"latMatched":51.10501,"linkIdMatched":1022687693,"lon":0.39533,"lonMatched":0.39532,"matchDistance":1.33,"matchOffsetOnLink":0.2847498087963734,"minError":1.0,"routeLinkSeqNrMatched":14,"* Connection #0 to host rme.cit.api.here.com left intact speedMps":0.0,"timestamp":0}],"Warnings":[],"MapVersion":"LATEST"}
However, my tries to get more attributes regarding the road links have not been successful so far. No matter which attributes i select, the following query does not work:
curl -v --request GET "https://rme.cit.api.here.com/2/matchroute.json?app_id=123&app_code=123&routemode=car&file=UEsDBBQAAAAIANmztEQSwaeZzwAAAM8BAAAQAAAAc2FtcGxlLXRyYWNlLmdweIXPTQuCMBwG8HufQnZv%2F605S0k9djEIungdZjpSJ27kPn6%2BRBgYXcYYv2cPzzG2deU8805L1YSIYoLiaHMsWvv9uBlYowOrZYhKY9oAoO973DOsugJ2hFBIz8k1K%2FNabGWjjWiy%2FJ36ShjVqqITd2lxpmo4XVKgMP6vZaCneKIyYabivzHnr4BhCbb6hoZRpnvMp86L%2BdIapxImRJxiSuh%2Bj5xq7CWY%2Bcz1EaypA10qxlfVjvOl8rxVxfzDQrk%2FFCfLRs7YpOCzA%2BZd49LoBVBLAQIUABQAAAAIANmztEQSwaeZzwAAAM8BAAAQAAAAAAAAAAEAIAAAAAAAAABzYW1wbGUtdHJhY2UuZ3B4UEsFBgAAAAABAAEAPgAAAP0AAAAAAA%3D%3D&attributes=LINK_ID"
and instead of a proper response, i just get
{"faultCode":"6a8a9966-b2eb-4a54-8f58-2f36e501bb94","responseCode":"400 Bad Request","message":"Invalid layer attribute parameter."}
Using a layer instead of an attributes does not work either:
curl -v --request GET "https://rme.cit.api.here.com/2/matchroute.json?app_id=123&app_code=123&routemode=car&file=UEsDBBQAAAAIANmztEQSwaeZzwAAAM8BAAAQAAAAc2FtcGxlLXRyYWNlLmdweIXPTQuCMBwG8HufQnZv%2F605S0k9djEIungdZjpSJ27kPn6%2BRBgYXcYYv2cPzzG2deU8805L1YSIYoLiaHMsWvv9uBlYowOrZYhKY9oAoO973DOsugJ2hFBIz8k1K%2FNabGWjjWiy%2FJ36ShjVqqITd2lxpmo4XVKgMP6vZaCneKIyYabivzHnr4BhCbb6hoZRpnvMp86L%2BdIapxImRJxiSuh%2Bj5xq7CWY%2Bcz1EaypA10qxlfVjvOl8rxVxfzDQrk%2FFCfLRs7YpOCzA%2BZd49LoBVBLAQIUABQAAAAIANmztEQSwaeZzwAAAM8BAAAQAAAAAAAAAAEAIAAAAAAAAABzYW1wbGUtdHJhY2UuZ3B4UEsFBgAAAAABAAEAPgAAAP0AAAAAAA%3D%3D&attributes=LINK_ATTRIBUTE_FC5"
This returns the same error as above.
Based on the documentation i would expect that there is some way to retrieve more link attributes directly in the response, but i cannot figure out how to do that. Obviously, i must be doing something wrong.
Please refer the following link
https://developer.here.com/documentation/route-match/topics/resource-matchroute-request.html
you can easily retrieve the attributes for the particular layers with the following command where the attributes parameter should be LINK_ATTRIBUTE_FCn(*). It is also possible to retrieve the particular information from these attributes with LINK_ATTRIBUTE_FCn(ISO_COUNTRY_CODE,RAMP,URBAN).
https://rme.cit.api.here.com/2/matchroute.json?app_id=123&app_code=123&routemode=car&file=UEsDBBQAAAAIANmztEQSwaeZzwAAAM8BAAAQAAAAc2FtcGxlLXRyYWNlLmdweIXPTQuCMBwG8HufQnZv%2F605S0k9djEIungdZjpSJ27kPn6%2BRBgYXcYYv2cPzzG2deU8805L1YSIYoLiaHMsWvv9uBlYowOrZYhKY9oAoO973DOsugJ2hFBIz8k1K%2FNabGWjjWiy%2FJ36ShjVqqITd2lxpmo4XVKgMP6vZaCneKIyYabivzHnr4BhCbb6hoZRpnvMp86L%2BdIapxImRJxiSuh%2Bj5xq7CWY%2Bcz1EaypA10qxlfVjvOl8rxVxfzDQrk%2FFCfLRs7YpOCzA%2BZd49LoBVBLAQIUABQAAAAIANmztEQSwaeZzwAAAM8BAAAQAAAAAAAAAAEAIAAAAAAAAABzYW1wbGUtdHJhY2UuZ3B4UEsFBgAAAAABAAEAPgAAAP0AAAAAAA%3D%3D&attributes=LINK_ATTRIBUTE_FCn(*)
Similarly, you can get the attributes for the other layers (i.e. ROAD_GEOM_FCn(*))
Hope this helps you.
Best Regards,
Jeyaprakash Rajagopal

Resources