Route with multiple via waypoints The following request specifies multiple via
waypoints. For more information on specifying multiple waypoints in a request, see Waypoint .
curl -X GET \
'https://router.hereapi.com/v8/routes?origin=52.51375,13.42462&transportMode=car&destination=52.52332,13.42800&via=52.517871,13.434175&via=52.52426,13.43000&return=polyline,summary&apiKey={YOUR_API_KEY}'
{
"routes" : [
{
"id" : "231dc3ef-cc57-4c7b-a45c-7cee127ca176" ,
"sections" : [
{
"id" : "46c52a61-9683-46f1-9697-ad0ea3e6d706" ,
"type" : "vehicle" ,
"departure" : {
"time" : "2020-09-14T11:14:37+02:00" ,
"place" : {
"type" : "place" ,
"location" : {
"lat" : 52.513748 ,
"lng" : 13.424624
} ,
"originalLocation" : {
"lat" : 52.51375 ,
"lng" : 13.42462
}
}
} ,
"arrival" : {
"time" : "2020-09-14T11:17:56+02:00" ,
"place" : {
"type" : "place" ,
"location" : {
"lat" : 52.5178863 ,
"lng" : 13.4341791
} ,
"originalLocation" : {
"lat" : 52.5178709 ,
"lng" : 13.4341749
} ,
"waypoint" : 0
}
} ,
"summary" : {
"duration" : 199 ,
"length" : 1886 ,
"baseDuration" : 199
} ,
"polyline" : "BGo9llkDg_rzZkF0G8LoQ4NoQgP8QoLgKgyB0tB4XoVoLsJ0K4IwWoQsOsJ8LwHoLoGkS0KkN8GsJ0F8GgF4D4DsE0FwHoLUgK8BkIkDkI7B0eTgUT0KjDkhBvCoa7BsT3DwgBvCoVnGg8BjNg4D3D8zB_EsxBjDwgBzFs2BrEgyBvC8V7G8uB7G4wBnBwMkI8BoBnLgP_hEgKz1CsE_nBsJrjD4E1tB" ,
"transport" : {
"mode" : "car"
}
} ,
{
"id" : "f057e6ba-8ef9-4efe-b6ca-935159b16c3c" ,
"type" : "vehicle" ,
"departure" : {
"time" : "2020-09-14T11:17:56+02:00" ,
"place" : {
"type" : "place" ,
"location" : {
"lat" : 52.5178863 ,
"lng" : 13.4341791
} ,
"originalLocation" : {
"lat" : 52.5178709 ,
"lng" : 13.4341749
} ,
"waypoint" : 0
}
} ,
"arrival" : {
"time" : "2020-09-14T11:19:46+02:00" ,
"place" : {
"type" : "place" ,
"location" : {
"lat" : 52.5242323 ,
"lng" : 13.4301462
} ,
"originalLocation" : {
"lat" : 52.52426 ,
"lng" : 13.43
} ,
"waypoint" : 1
}
} ,
"summary" : {
"duration" : 110 ,
"length" : 1011 ,
"baseDuration" : 110
} ,
"polyline" : "BG8_tlkDm0-zZchI8BrTgFrxBkNvkEoGv5BkD7QgF_O0P7fsE_EkD7GoLUgFoB0F8B8Q0FsE8BkmBkSgtBwWkS8GwH8B8GoBosCgKkhBsE0FU0FUgZjD8VgKoGkD4F8C" ,
"transport" : {
"mode" : "car"
}
} ,
{
"id" : "c05c39b2-36bf-4360-9651-b67dee7acbc6" ,
"type" : "vehicle" ,
"departure" : {
"time" : "2020-09-14T11:19:46+02:00" ,
"place" : {
"type" : "place" ,
"location" : {
"lat" : 52.5242323 ,
"lng" : 13.4301462
} ,
"originalLocation" : {
"lat" : 52.52426 ,
"lng" : 13.43
} ,
"waypoint" : 1
}
} ,
"arrival" : {
"time" : "2020-09-14T11:20:19+02:00" ,
"place" : {
"type" : "place" ,
"location" : {
"lat" : 52.5232227 ,
"lng" : 13.4280044
} ,
"originalLocation" : {
"lat" : 52.5233199 ,
"lng" : 13.428
}
}
} ,
"summary" : {
"duration" : 33 ,
"length" : 222 ,
"baseDuration" : 33
} ,
"polyline" : "BGws6lkDk42zZ3F7CnGjD7V_JrEzF3DjDzK_EvHrE7BjhBTzoBN_Z" ,
"transport" : {
"mode" : "car"
}
}
]
}
]
}
Screenshots The requested route is going from (A) to (B) with stop at waypoints (1) and (2).
Figure 1. Route with multiple via waypoints The requested route is going from (A) to (B).
Figure 2. Route with via waypoint