Search code examples
here-apihere-maps-rest

How to get RouteId for my getroute request?


I have Freemium plan on HERE and I'm using routing REST service.

When I request a detailed car route between two way points with a getroute request https://route.api.here.com/routing/7.2/getroute.json?app_id=APPID&app_code=APPCODE&waypoint0=geo!47.4183889,9.7318127&waypoint1=geo!47.4315312,9.8954753&mode=fastest;car;traffic:disabled, I have to set routeId parameter, otherwise I will receive an error "Parameter \"routeid\" is not specified".

How can I get my routeId? I expected I will receive it with a calculateroute results, but it is not in the json response.


Solution

  • Hi getRoute request is used to retrieve more information about a previously calculated route. So, routeId must be available to you as part of your earlier calculateRoute response. For getting the routeId, you must specify routeAttributes to routeId "&routeattributes=ri". Please see the documentation here (routeAttributes) -