EndpointsRouting

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.

POST
/routing/route

Request Body

application/json
  1. body
activity*string

Activity that determines the Valhalla costing model (bicycle vs pedestrian).

Value in"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.

Items2 <= items <= 25
walkingSpeedKmh?number

Walking speed in kilometers per hour. Only applied to pedestrian routing.

Range0.5 <= value <= 25

Response Body

Route legs and snapped locations

application/json
  1. 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    }  ]}