Calculate a Route

A basic route request consists of an origin, departure, and transportMode. The resulting response will contain a list of routes. The list may be empty if no routes were possible.

The origin and destination can be a latitude and longitude pairs and represent the beginning and end of the requested route.

transportMode controls what mode of transport is used for the route. pedestrian, car, truck are currently available.

If the request specifies alternatives, the response may provide additional routes.

If the request specifies return with summary or travelSummary, then the sections will provide additional summary information such as length and duration.

A route will include one or more sections.

In case that no route is possible, an empty list of routes and a notice will be returned.

Example

curl -X GET \
  'https://router.hereapi.com/v8/routes?transportMode=car&origin=52.5308,13.3847&destination=52.5323,13.3789&return=summary'
{
    "routes": [
        {
            "id": "bfaed7d0-19c7-4e72-81b7-24eeb148b62b",
            "sections": [
                {
                    "arrival": {
                        "place": {
                            "location": {
                                "lat": 52.53232637420297,
                                "lng": 13.378873988986015
                            },
                            "type": "place"
                        },
                        "time": "2019-12-09T16:05:05+01:00"
                    },
                    "departure": {
                        "place": {
                            "location": {
                                "lat": 52.53098367713392,
                                "lng": 13.384566977620125
                            },
                            "type": "place"
                        },
                        "time": "2019-12-09T16:03:02+01:00"
                    },
                    "id": "85357f8f-00ad-447e-a510-d8c02e0b264f",
                    "summary": {
                        "duration": 123,
                        "length": 538
                    },
                    "transport": {
                        "mode": "car"
                    },
                    "type": "vehicle"
                }
            ]
        }
    ]
}

results matching ""

    No results matching ""