Warning for Environmental Zone Violation with Route Matching API
Title
-----
Why Warning Code 24 (ENVIRONMENTAL ZONE VIOLATION) is not returned by Route Matching API
https://docs.here.com/routing/docs/warning-codes
Applies To
----------
HERE Route Matching API v8
match/routelinks
Environmental Zone Restrictions
Warning Code 24: ENVIRONMENTAL ZONE VIOLATION
Summary
-------
A Route Matching API request traversing an environmental zone in Lyon, France does not return warning code 24 (ENVIRONMENTAL ZONE VIOLATION), even though the route is expected to violate environmental zone restrictions.
This behavior occurs because environmental zone checks are not performed unless the request explicitly includes the excludeZoneTypes=environmental parameter.
Symptoms
--------
A Route Matching API request similar to the following does not return warning code 24:<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 />
Although the matched route passes through an environmental zone, the response does not contain the warning
"24 ENVIRONMENTAL ZONE VIOLATION"
Expected Behavior
-----------------
To enable environmental zone validation, add the following query parameter to the request:
"excludeZoneTypes=environmental"
Example Query:
curl --location 'https://routematching.hereapi.com/v8/match/routelinks?routeMatch=1&excludeZoneTypes=environmental&apiKey=' <br />
--header 'Content-Type: text/plain' <br />
--data 'latitude, longitude, timestamp
45.753685389639145, 4.84766624101221, 2025-07-18T09:00:00Z
...
45.752004822000934, 4.852648892785473, 2025-07-18T09:45:00Z'
When excludeZoneTypes=environmental is specified, the Route Matching API evaluates environmental zone restrictions and returns warning code 24 for routes that enter an environmental zone.
Note
If excludeZoneTypes is omitted, zone restrictions are not evaluated and no environmental zone warning is returned. Supported values currently include:environmental
vignettecongestionPricing
For additional details, please see:
Warning Codes: https://docs.here.com/routing/docs/warning-codes
* Route Matching API Reference: https://docs.here.com/routing/reference/here-route-matching-v8-api-matchroutev8compatibilitytov2get
Updated 3 days ago