# Ordered route list from optimized waypoints

**URL:** https://ask.openrouteservice.org/t/ordered-route-list-from-optimized-waypoints/4688
**Category:** openrouteservice
**Created:** [March 22, 2023, 2:04am UTC](https://ask.openrouteservice.org/t/ordered-route-list-from-optimized-waypoints/4688 "2023-03-22T02:04:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ianmease8](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/ianmease8/32/2190_2.png) [@ianmease8](https://ask.openrouteservice.org/u/ianmease8)
#### Post date: [March 22, 2023, 2:04am UTC](https://ask.openrouteservice.org/t/ordered-route-list-from-optimized-waypoints/4688/1 "2023-03-22T02:04:24Z")

</div>

I have a quick question, I was wondering if there was a way once the route was made, to get out the waypoints in the order that they should be hit,  
ie i do a start point 5 points of interest and a end point, and it tells me start point 5 3 1 4 2 end point,

---

<div class="post-metadata">

### Author: ![amandus](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/amandus/32/669_2.png) [@amandus](https://ask.openrouteservice.org/u/amandus)
#### Post date: [March 22, 2023, 10:38am UTC](https://ask.openrouteservice.org/t/ordered-route-list-from-optimized-waypoints/4688/2 "2023-03-22T10:38:28Z")

</div>

Hi @ianmease8,

depends on the criteria of the order. If you want the shortest route between all of them, that’s what the [`/optimization` endpoint](https://openrouteservice.org/dev/#/api-docs/optimization/post) is for.

We also have that functionality in our [QGIS plugin](https://plugins.qgis.org/plugins/ORStools/) if you’d rather use a graphical UI.

Best regards

---

<div class="post-metadata">

### Author: ![ianmease8](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/ianmease8/32/2190_2.png) [@ianmease8](https://ask.openrouteservice.org/u/ianmease8)
#### Post date: [March 22, 2023, 1:44pm UTC](https://ask.openrouteservice.org/t/ordered-route-list-from-optimized-waypoints/4688/3 "2023-03-22T13:44:55Z")

</div>

Hi @amandus,  
Thank you for your quick response, Please correct me if im wrong, /directions with optimized true, creates the path between locations, /optimization will tell you what jobs to do in the order to do them, is that a correct understanding? Thanks again for your help

---

<div class="post-metadata">

### Author: ![jschnell](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jschnell/32/971_2.png) [@jschnell](https://ask.openrouteservice.org/u/jschnell)
#### Post date: [March 24, 2023, 4:00pm UTC](https://ask.openrouteservice.org/t/ordered-route-list-from-optimized-waypoints/4688/4 "2023-03-24T16:00:41Z")

</div>

Hey,

the `/directions` endpoint doesn’t offer an `optimized` parameter, so I’m a bit confused as to where this is coming from.

When looking at the QGIS plugin, there is [this issue](https://github.com/GIScience/orstools-qgis-plugin/issues/145) regarding returning the order of waypoints.

Regarding the `/optimization`-endpoint, the response should include `routes.steps`, which will list all points that the vehicle will go through.  
Additionally, you can use `"options":{"g":"true"}` to also get the route geometry.

Best regards
