In some cases, you may want to avoid the entire category of the zones. This can be done with
avoid[zoneCategories] option. For example, the following command can be used to avoid Berlin environmental zones by avoiding all zones of type
curl -X GET \ 'https://router.hereapi.com/v8/routes?destination=52.451857,13.41379&origin=52.565889,13.417365&transportMode=car&avoid[zoneCategories]=environmental'
The blue line in the above image shows the route that avoids all the environmental zones. By comparison, the pale blue line shows the route which passes through the city without avoidance.
You can replace the avoidance option with
here:cm:envzone:2 is the ID referring to "
BERLIN UMWELTZONE", which dominates the central area of Berlin, so that avoiding this zone effectively avoids the environmental zone in this case.
For a request that demonstrates how to get an ID, see Get routing zone ID.