Avoid_features - Parameter 'options' has incorrect value or format

I do this POST request:
https://api.openrouteservice.org/v2/directions/cycling-electric/geojson?api_key=XXXXX
Body:
{“coordinates”:[[7.054950400000001,51.331072000000006],[7.053699,51.3313918]],“radiuses”:[-1,-1],“options”:{“avoid_features”:“unpavedroads|steps|hills”}}

I tried everything, making it an array, encoding the options object… What am I doing wrong?

Is this no longer supported? How can I use this for my e-scooter? I can’t drive up stairs or unpavedroads :C

Hi @Yannick,

You can neither avoid unpavedroads nor hills for the cycling-electric profile.
Please take a look at https://openrouteservice.org/dev/#/api-docs/v2/directions/{profile}/post

You could use one of our clients to display the route and inspect where the unpaved road segments are.
e.g.

https://maps.openrouteservice.org/directions?n1=51.331481&n2=7.054835&n3=18&a=51.331086,7.054977,51.331362,7.053684&b=1f&c=0&k1=en-US&k2=km

you can find a bit more info in these 2 threads


Best regards

Is there any other way, like setting the speed on unpaved roads to 2? Because I need to walk on these roads.

Not via the api.
You would have to set up your own ors backend and adjust the speed on unpaved roads for cycling-electric. (could be this line)

We might have the option for custom profiles in the future. See graphhopper 1.0

Best regards