Skip to content

Directions Overview

The Directions API computes routes between two or more locations. It supports multiple routing profiles, automatic stop reordering, and accepts addresses directly — no separate geocoding step required.

MethodEndpointDescription
POSThttps://dev-api.roadgis.dev/directions/v1Compute a route, preserving stop order
POSThttps://dev-api.roadgis.dev/directions/v1/optimizedCompute a route, reordering stops for minimum travel time

Both endpoints share the same request and response format.

ProfileDescription
autoStandard car routing
truckTruck routing — avoids low bridges, weight restrictions

Each location in a request can be one of three types — mixed in any combination within the same request.

TypeWhen to use
latLngYou already have coordinates
addressFree-form address string
address_structuredPostcode + city + street from a structured data source

See Location Types for details and examples.

Every response includes:

  • codeOk on success, a machine-readable error code otherwise
  • waypoints — one entry per resolved location, in travel order
  • routes — route summary and per-leg geometry
  • excluded_waypoints — locations that could not be geocoded, when applicable

See Routing for the full response schema.