RouteRequest
from objectrequired
One end of a route — supply either hex or point, not both.
AfriHex code at resolution 7
AF-GH-7-0GXTJJB0ZZZZZpoint object
Raw coordinate
-0.18675.604Device compass bearing in degrees (0 = north). On dual-carriageway roads it disambiguates which carriageway the endpoint snaps to, so routes don't begin with a phantom U-turn. Omit when unknown.
Possible values: >= 0 and <= 359
270to objectrequired
One end of a route — supply either hex or point, not both.
AfriHex code at resolution 7
AF-GH-7-0GXTJJB0ZZZZZpoint object
Raw coordinate
-0.18675.604Device compass bearing in degrees (0 = north). On dual-carriageway roads it disambiguates which carriageway the endpoint snaps to, so routes don't begin with a phantom U-turn. Omit when unknown.
Possible values: >= 0 and <= 359
270Travel mode. motor_scooter covers okada (motorbike) routes.
Possible values: [driving, foot, bicycle, motor_scooter]
drivingdrivingControls landmark narration in step instructions.
street— standard instructions onlylandmark— rewritten to reference nearby landmarksboth— includes both forms
Possible values: [street, landmark, both]
streetlandmarkBCP-47 language tag for verbal instructions (Valhalla supports 30+ languages).
en-USen-USPolygons to avoid when routing. Each element is a closed exterior ring
of [lng, lat] pairs. Useful for cash-in-transit safety (avoid known
high-risk corridors), flood-closure rerouting, or custom no-go zones.
Possible values: >= 2, <= 2
[[[-0.195,5.61],[-0.185,5.61],[-0.185,5.6],[-0.195,5.6],[-0.195,5.61]]]avoid_locations object[]
Individual road points to avoid (snapped to nearest road segment).
Route around curated flood-prone zones — the recurring trouble spots
along Accra's Odaw drainage basin (Kaneshie First Light, Kwame Nkrumah
Circle/Odawna, Alajo, Agbogbloshie) and the Weija dam spillway. Turn
this on during heavy rain to keep riders out of flooded interchanges.
The zones are merged with any avoid_polygons you supply.
falsetrueReturn a minimal payload — route polyline, distance, duration, and traffic-adjusted ETA only. No turn-by-turn steps, landmark narration, or alternative routes. Use for tracking screens and low-bandwidth clients where data cost matters more than turn instructions (typically cuts the response size by 80–90%).
falsetrue{
"from": {
"hex": "AF-GH-7-0GXTJJB0ZZZZZ",
"point": {
"lng": -0.1867,
"lat": 5.604
},
"heading": 270
},
"to": {
"hex": "AF-GH-7-0GXTJJB0ZZZZZ",
"point": {
"lng": -0.1867,
"lat": 5.604
},
"heading": 270
},
"mode": "driving",
"narration": "landmark",
"language": "en-US",
"avoid_polygons": [
[
[
-0.195,
5.61
],
[
-0.185,
5.61
],
[
-0.185,
5.6
],
[
-0.195,
5.6
],
[
-0.195,
5.61
]
]
],
"avoid_locations": [
{
"lat": 5.603,
"lng": -0.187
}
],
"avoid_flood_zones": true,
"lite": true
}