Symptom
A call to the HPR creation API returns a successful HTTP 200 response with a creation confirmation. However, when listing existing HPR profiles via the API or the xServer Dashboard, the newly created HPR does not appear.
Example creation request body that triggers this behavior:
{
"label": "Example HPR profil van with tunnelRestrictionCode B",
"scope": "globalscope",
"storedProfile": "default",
"requestProfile": {
"vehicleProfile": {
"load": {
"tunnelRestrictionCode": "B"
}
}
},
"coordinateFormat": "EPSG:4326",
"highPerformanceRoutingNetworkOptions": {
"geographicRestrictions": {
"allowedCountries": ["DE", "FR"]
}
}
}
Cause
The PTV_TruckAttributes feature layer is missing from the HPR creation request. This feature layer is required for ADR-related attributes (including tunnelRestrictionCode) to be correctly integrated into the HPR network at build time.
When the feature layer is absent, the HPR creation may fail silently or produce an incomplete network that is not listed as a valid HPR.
Resolution
Include the PTV_TruckAttributes feature layer in the requestProfile when creating the HPR. For use cases involving ADR tunnel restrictions, also include the tunnelRestrictionCode in the vehicleProfile so it is embedded in the HPR network:
{
"label": "HPR van with ADR tunnel restriction B",
"scope": "globalscope",
"storedProfile": "default",
"requestProfile": {
"featureLayerProfile": {
"themes": [
{
"id": "PTV_TruckAttributes",
"enabled": true
}
]
},
"vehicleProfile": {
"load": {
"tunnelRestrictionCode": "B"
}
}
},
"coordinateFormat": "EPSG:4326",
"highPerformanceRoutingNetworkOptions": {
"geographicRestrictions": {
"allowedCountries": ["DE", "FR"]
}
}
}
After recreation, verify the HPR appears in the list before generating any Distance Matrix from it.
Note: if the vehicle configuration varies (different load states, different ADR codes), consider creating separate HPRs per configuration, or use the xRoute VehicleParametersAtWaypoint approach for dynamic per-leg recalculation (see KB-001, KB-002).
Related articles
PTV xServer 2: Dynamic vehicle state changes not supported in ExistingDistanceMatrix planTours
PTV xServer 2 :ADR tunnel restrictions not applied in planTours when using ExistingDistanceMatrix
PTV xServer 2: Route divergence after changing vehicle parameters (height, weight)
PTV xServer 2: HPR created successfully via API but does not appear in the HPR list