Get a turn-by-turn route
POST/v2/route
Returns a turn-by-turn route between two points. Endpoints can be supplied as hex codes or raw lat/lng coordinates — exactly one form per endpoint.
Modes: driving (default), foot, bicycle, motor_scooter (okada), truck (heavy-goods costing; honours OSM height/weight/width restrictions).
Narration: Controls whether steps include landmark-based instructions:
street— standard street-name instructions only (default)landmark— rewrite instructions to reference nearby landmarksboth— include both the standard and landmark-enriched instruction
Alternatives: Up to 2 alternative routes are returned in alternatives.
Traffic: eta_s is traffic-adjusted using Ghana-specific time-of-day
multipliers (morning/evening rush, market days). duration_s is the raw
Valhalla estimate with no traffic applied.
Verbal instructions: verbal_instruction on each step is a pre-built
voice prompt suitable for text-to-speech ("In 300 metres, turn right onto
Ring Road Central").
Request
Responses
- 200
- 400
- 404
- 409
- 422
- 503
Route calculated successfully
Invalid request body or missing endpoint fields
No route found between the supplied points
Refused (FLOOD_ALERT_ACTIVE). avoid_flood_zones was requested,
no route avoids the zones, AND an official GMet flood warning is in
effect over the route — so the only available route would steer
into a live, confirmed flood. The error message carries the GMet
headline. Retrying without avoid_flood_zones will return a route;
do that only if the user explicitly accepts the risk.
Invalid coordinates or unsupported mode
Routing service temporarily unavailable
Response Headers
Seconds to wait before retrying