[Routing] Detect LEZ (Low Emission Zone) with Route Matching

The short answer is using the parameter "&excludeZoneTypes=environmental"**

Question

There is a warning code "24 ENVIRONMENTAL ZONE VIOLATION" that could be returned by the Route Matching API:

https://www.here.com/docs/bundle/route-matching-api-developer-guide/page/topics/warning-codes.html

Testing with a list of locations through
Lyon, France that are in LEZ (Low Emission Zone), the warning is not returned.

<br />curl --request POST \--url 'https://routematching.hereapi.com/v8/match/routelinks?apiKey=&routeMatch=1&drivingReport=1&mode=fastest%253Btruck%253Btraffic%253Aenabled&attributes=LINK_ATTRIBUTE_FCn(*)%2CLINK_ATTRIBUTE2_FCn(*)%2CROAD_ADMIN_FCn(*)%2CROAD_GEOM_FCn(*)%2CROAD_NAME_FCn(*)%2CROAD_ROUGHNESS_FCn(*)%2CROUNDABOUT_FCn(*)&emissionType=1&fuelType=diesel' \--header 'Content-Type: text/plain' \--header 'User-Agent: insomnia/11.1.0' \--data 'latitude, longitude, timestamp45.753685389639145, 4.84766624101221, 2025-07-18T09:00:00Z45.753369052432454, 4.848663654769563, 2025-07-18T09:05:00Z45.753266253296616, 4.848904472561134, 2025-07-18T09:10:00Z45.7531015576537, 4.8493765484633435, 2025-07-18T09:15:00Z45.75280210978508, 4.850191952294431, 2025-07-18T09:20:00Z45.75271601822548, 4.850556738218865, 2025-07-18T09:25:00Z45.75246148588119, 4.851243394076623, 2025-07-18T09:30:00Z45.75237913693302, 4.851624273497724, 2025-07-18T09:35:00Z45.75218823663133, 4.852144629889932, 2025-07-18T09:40:00Z45.752004822000934, 4.852648892785473, 2025-07-18T09:45:00Z'<br />

Answer

For getting the expected warning code 24, there is no need to specify truck mode, attributes layers, emission type, or fuel type.

The only parameter that needed is "
&excludeZoneTypes=environmental" as the following request shows:

<br />curl --location 'https://routematching.hereapi.com/v8/match/routelinks?mode=car&routeMatch=1&excludeZoneTypes=environmental&apiKey=api_key' \--header 'Content-Type: application/json' \--data 'latitude, longitude, timestamp45.753685389639145, 4.84766624101221, 2025-07-18T09:00:00Z45.753369052432454, 4.848663654769563, 2025-07-18T09:05:00Z45.753266253296616, 4.848904472561134, 2025-07-18T09:10:00Z45.7531015576537, 4.8493765484633435, 2025-07-18T09:15:00Z45.75280210978508, 4.850191952294431, 2025-07-18T09:20:00Z45.75271601822548, 4.850556738218865, 2025-07-18T09:25:00Z45.75246148588119, 4.851243394076623, 2025-07-18T09:30:00Z45.75237913693302, 4.851624273497724, 2025-07-18T09:35:00Z45.75218823663133, 4.852144629889932, 2025-07-18T09:40:00Z45.752004822000934, 4.852648892785473, 2025-07-18T09:45:00Z'<br />

The response is like follows, which contains the warning code 24 as expected:



Note**

This parameter "excludeZoneTypes" is mentioned in the Route Matching API reference:

https://www.here.com/docs/bundle/route-matching-api-v8-api-reference/page/index.html



Despite it says the parameter is "Only for routeMatch=0, not supported for route matching", it works well with routeMatch=1.

Actually, if you use routeMatch=0 for the above testing query, on contrast, the following error will happen:

<br />{ "issues": [ { "message": "Less than 2 waypoints given. Way points must be specified as waypoint0 ... waypointN with latitude, longitude in WGS-84 degree." }, { "message": "Request id: 9d3c3456-4150-4f4d-be33-77c98eb337b9" } ], "error_id": "9d3c3456-4150-4f4d-be33-77c98eb337b9", "response_code": "400 Bad Request"}<br />