Ordering by category results in http 500

Whenever I try to get a list of POIs, ordered by category, it results in a 500 internal server error. When I use https://api.openrouteservice.org/pois to post the following:
{“request”: “pois”,“geometry”: {“geojson”: {“type”: “Point”,“coordinates”: [5.058349000000001,52.647953]},“buffer”:1000},“limit”:100,“filters”: {“category_group_ids”:[420]},“sortby”:“category”}

which results in
{“code”:500,“message”:“Internal server error”}

If I comment out the sortby, it works fine. Since this is correct according to the docs, I am assuming this is a bug?

Just now noticed that I should probably round down the coordinates, 6 decimals or more is a little over the top: but it should not cause an HTTP-500 I think.



thanks for noticing :slight_smile:
This does indeed look like a bug :frowning: I have submitted an issue to the respective repository. You can follow the discussion and progress on this over there.

Best regards

Thank you!

I noticed it because I was looking for shops in a town, and thought to myself: wow, that is a long list, it would be convenient if I could order that by category - that would save me scrolling.
My current workaround is to allow a finer selection of shops, and not request the entire category group. And of course I could sort myself on the client side, but that became a bit slow.


1 Like