Vehicle types and measures
When you submit a route matching request, you can specify a vehicle type and vehicle measures to ensure the routing engine applies the correct road access rules, speed profiles, and toll costs.
The vehicle type and measures affect:
- Estimated time of arrival (ETA) and driving speed
- Road access and turn restrictions
- Environmental zone access
- Toll cost calculation
Vehicle types
Use the vehicleType parameter to specify the type of vehicle. The following vehicle types are supported:
| Vehicle type | Description |
|---|---|
bdouble | Australian truck-and-trailer combination |
bicycle | Bicycle |
bus | Bus |
car | Passenger car |
carHOV | High-occupancy vehicle (carpool) |
emergency | Emergency vehicle |
motorcycle | Motorcycle |
motohome | Motorhome |
pedestrian | Pedestrian |
roadtrain | Road train |
taxi | Taxi |
tractorTruck | Tractor truck (semi-trailer truck) |
truck | Rigid truck |
Specify the vehicle type using the mode query parameter. The format is &mode=fastest;{vehicleType}—for example, &mode=fastest;truck.
To grant the permissions of multiple vehicle types simultaneously, provide a comma-separated list—for example, &mode=fastest;car,truck.
Toll vehicle type
The tollVehicleType parameter specifies the vehicle category used to determine applicable toll costs. This parameter is independent from vehicleType, but the two values must not contradict each other.
Truck measures
In addition to the vehicle type, you can provide physical and operational measures that affect routing decisions for trucks and other large vehicles. These measures influence ETA, road access, turn restrictions, environmental zone access, and toll costs.
Pass each measure as a separate query parameter in the request URL—for example, &height=400cm&limitedWeight=7.5t.
The following measures are supported:
Trailer and combination
trailerType— Trailer type:caravan,trailer,rvTrailer, orboatTrailer. Affects toll cost and truck or recreational-vehicle restrictions.trailersCount— Number of trailers. Affects toll cost and truck restrictions.
Dimensions
Dimension values accept the following units: cm (centimeters), m (meters), or in (inches).
height— Overall height of the vehicle including trailers. Affects truck restrictions and toll cost.trailerHeight— Height of the trailer(s). Affects toll cost and truck or recreational-vehicle restrictions.heightAbove1stAxle— Height of the vehicle above the first axle. Affects toll cost.length— Total vehicle length including trailers. Affects truck restrictions and toll cost.trailerLength— Length of the trailer(s). Affects truck and recreational vehicle restrictions.width— Width of the vehicle and trailer(s). Affects truck restrictions.
Weight
Weight values accept the following units: t (metric tons), kg (kilograms), or lbs (pounds).
limitedWeight— Actual total weight of the vehicle including payload and trailers or caravans including their payload. Affects truck restrictions, speed profile, toll cost, and environmental zone restrictions.vehicleWeight— Actual total weight of the vehicle including payload, but excluding trailers' weight and payload. Affects toll cost.trailerWeight— Actual total weight of trailers including their payload. Belongs tovehicleWeight. Affects toll cost.weightPerAxle— Actual total weight per axle including payload. Affects toll cost and truck restrictions.weightPerAxleGroup— Actual total weight per axle group, specified as a semicolon-separated list of name-value tuples (for example,single:12;tandem:18). Affects truck restrictions.
Axles and tires
vehicleNumberAxles— Number of vehicle axles, excluding trailer axles. Affects toll cost and truck restrictions.trailerNumberAxles— Number of trailer axles. Affects toll cost and truck restrictions.tiresCount— Total number of tires, including tires on the base vehicle and any attached trailers. Affects toll cost.
Powertrain and environment
fuelType— Fuel type powering the vehicle. Affects environmental zone restrictions and toll cost.emissionType— Emission category of the vehicle. Affects toll cost and environmental zone restrictions.hybrid— Indicates whether the vehicle has a hybrid engine (fuel and electric). Affects toll cost.
Cargo and use
shippedHazardousGoods— Comma-separated list of hazardous goods categories. Affects toll cost and truck restrictions.commercial— Indicates whether the vehicle is registered for commercial use. Affects toll cost.disabledEquipped— Indicates whether the vehicle is equipped to carry people with disabilities. Affects toll cost.passengersCount— Actual number of passengers. Affects toll cost.
Note
For toll cost calculation, some additional measures apply. See Toll cost calculation and route optimization.
Example request
The following example shows a POST request for a rigid truck with height, weight, width, and emission type specified.
curl -X POST \
-H 'Content-Type: application/json' \
--data-binary @PATH_TO_GPS_TRACE_FILE \
'https://routematching.hereapi.com/v8/match/routelinks?'\
'routeMatch=1&'\
'mode=fastest;truck&'\
'height=400cm&'\
'limitedWeight=7.5t&'\
'width=250cm&'\
'emissionType=5&'\
'apiKey=YOUR_API_KEY'Replace YOUR_API_KEY with your HERE API key. Replace PATH_TO_GPS_TRACE_FILE with the path to your GPS trace file.
Measure changes at waypoints
Truck measures can change during a route—for example, when the vehicle loads or unloads goods at intermediate waypoints. You can specify measure deltas at each waypoint for the following properties:
- Height
- Length
- Weight
- Width
- Hazardous goods
Note
For the parameter syntax used to specify measure deltas at individual waypoints, refer to the API reference.
Vehicle type-specific behavior
Bus
- Uses truck speed profiles.
- Ignores no-through-traffic zones.
- Disables real-time traffic and traffic pattern impact on bus lanes.
Taxi
- Uses car speed profiles.
- Disables real-time traffic and traffic pattern impact on taxi lanes.
High-occupancy vehicle (carHOV)
- Uses car speed profiles.
- Disables real-time traffic and traffic pattern impact on HOV lanes.
Emergency vehicle
- Access and turn restrictions for emergency vehicles are explicitly coded in the map.
- Legal turn restrictions are generally ignored; physical restrictions are obeyed.
- Ignores no-through-traffic zones.
- Traverses gates and uses private roads.
- Ignores environmental zone restrictions.
- Obeys truck restrictions for weight and height, but ignores generic "no trucks" restrictions.
- Obeys one-way restrictions unless you set
&oneway=penalty:0.5, which allows routing against the allowed driving direction when the time benefit exceeds 0.5 seconds per meter. - Uses car speed profiles.
Bicycle
- Access restrictions and preferred routes for bicycles are explicitly coded in the map.
- One-way exceptions for bicycles are explicitly coded in the map.
- Obeys all restrictions (access, turn, through-traffic, and gate restrictions).
- Uses car speed profiles, with a driving speed limit of 20 km/h unless you override it using
&maxSpeed=15. - Obeys one-way restrictions unless you set
&oneway=penalty:0.125, which allows routing against the allowed driving direction when the time benefit exceeds 0.125 seconds per meter.