Compute a driving route between two addresses
API Reference
POST /v1/routes
Returns the route’s geometry, total distance, and total duration in our flat Route shape. Use this when you don’t have your own routing infrastructure. If you do, construct Route objects directly and pass them to downstream endpoints — this endpoint exists for convenience, not as a required first step.
POST
Compute a driving route between two addresses
The
/v1/routes endpoint computes a driving route between two points. It returns route geometry, total distance, and estimated duration.
When to Use
Use this endpoint when you don’t have your own routing infrastructure. Partners with existing routing layers should skip this endpoint and pass their ownRoute object directly to /v1/stations/enrich-distances and /v1/optimize.
Notes
- Addresses can be specified as natural language strings (e.g., “Los Angeles, CA”) or as “lat,lng” coordinate pairs
- Routes are computed using driving directions optimized for typical road conditions
- The returned
polylinefield uses the standard Google Polyline Algorithm Format - Maximum route length depends on routing provider — extremely long routes may return an error
Authorizations
Body
application/json