Skip to main content
POST
/
v1
/
routes
Compute a driving route between two addresses
curl --request POST \
  --url https://api.example.com/v1/routes \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "origin": "<string>",
  "destination": "<string>"
}
'
{
  "route": {
    "total_distance_miles": 2015.3,
    "total_duration_minutes": 1834.2,
    "start": {
      "lat": 34.0522,
      "lng": -118.2437
    },
    "end": {
      "lat": 41.8781,
      "lng": -87.6298
    },
    "polyline": "encoded_polyline_string..."
  },
  "request_id": "req_abc123def456"
}

Documentation Index

Fetch the complete documentation index at: https://nozle.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

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 own Route 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 polyline field uses the standard Google Polyline Algorithm Format
  • Maximum route length depends on routing provider — extremely long routes may return an error

Authorizations

X-API-Key
string
header
required

Body

application/json
origin
string
required
Required string length: 1 - 200
destination
string
required
Required string length: 1 - 200

Response

Route computed successfully.

route
Route · object
required

Internal route representation. Flat shape — upstream adapters normalize Google/Mapbox responses into this before it hits B2B code.

request_id
string
required