Compute a route through ordered locations with structured preferences
Forwards locations + RoutingPreferences to the self-hosted Valhalla `/route` endpoint. The API owns the translation from Routess preferences (SurfaceType, avoidFerries, avoidHighways) to Valhalla costing options, so the browser never sees provider-specific knobs.
application/json- body
activity*stringActivity that determines the Valhalla costing model (bicycle vs pedestrian).
"run""cycle""walk"preferences*Routes preferences inputs that shape the route. Translated to Valhalla costing server-side.
locations*array<>Locations to route through, in order. Capped at 25.
2 <= items <= 25walkingSpeedKmh?numberWalking speed in kilometers per hour. Only applied to pedestrian routing.
0.5 <= value <= 25Route legs and snapped locations
application/json- response
legs*array<>locations*array<>curl -X POST 'https://api.routess.com/routing/route' \ -H 'Content-Type: application/json' \ -d '{ "activity": "cycle", "preferences": { "surfacePreference": "mixed", "avoidFerries": true, "avoidHighways": true }, "locations": [ { "lat": 50.8467, "lon": 4.3525 }, { "lat": 50.8467, "lon": 4.3525 } ]}'{ "legs": [ { "shape": "string", "summary": { "length": 0, "time": 0 } } ], "locations": [ { "lat": 0, "lon": 0, "original_index": 0 } ]}Match a recorded shape against the road network
Forwards the shape to the self-hosted Valhalla `trace_attributes` endpoint and returns per-edge surface data. Used by the web app to render surface composition for a Route.
Generate loop route candidates from high-level parameters
Runs the RouteGeneration pipeline (ADR-0029): a fan of candidate loops around the start point, snap-validated, routed through Valhalla, scored on Overlap/distance/surface/shape, and reduced to up to 3 diverse candidates. A response with an empty candidate list carries a structured failure code that drives retry suggestions. Each request fans out into ~10-25 Valhalla calls, hence the strict per-IP throttle.