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.
Endpoints
Section titled “Endpoints”| Method | Endpoint | Description |
|---|---|---|
POST | https://dev-api.roadgis.dev/directions/v1 | Compute a route, preserving stop order |
POST | https://dev-api.roadgis.dev/directions/v1/optimized | Compute a route, reordering stops for minimum travel time |
Both endpoints share the same request and response format.
Routing profiles
Section titled “Routing profiles”| Profile | Description |
|---|---|
auto | Standard car routing |
truck | Truck routing — avoids low bridges, weight restrictions |
Location input types
Section titled “Location input types”Each location in a request can be one of three types — mixed in any combination within the same request.
| Type | When to use |
|---|---|
latLng | You already have coordinates |
address | Free-form address string |
address_structured | Postcode + city + street from a structured data source |
See Location Types for details and examples.
Response format
Section titled “Response format”Every response includes:
code—Okon success, a machine-readable error code otherwisewaypoints— one entry per resolved location, in travel orderroutes— route summary and per-leg geometryexcluded_waypoints— locations that could not be geocoded, when applicable
See Routing for the full response schema.