Needs a free or paid API key.
Distance & duration matrix API
The matrix endpoint returns the distance and travel time from every origin to every destination in one request, which is what dispatch, assignment and nearest-branch features need.
One call handles up to 2,500 pairs (for example 50 × 50). Larger matrices, up to 250,000 pairs, run as asynchronous jobs. Matrices use the same routable network as the Routing API.
Example
Two origins to one destination (key required)
curl -X POST "https://navvo.io/api/v1/routing/matrix" \
-H "x-api-key: YOUR_KEY" -H "content-type: application/json" \
-d '{"payload":{"sources":[{"lat":31.95,"lon":35.91},{"lat":31.99,"lon":35.95}],
"targets":[{"lat":31.90,"lon":35.93}],"costing":"auto","units":"kilometers"}}'
Each cell
data.sources_to_targets[i][j] = { "from_index": 0, "to_index": 0, "distance": 7.4, "time": 812 }
- Large matrices: POST /routing/matrix/jobs, then poll the job.
- Distance is in the units you ask for; time is in seconds.
Endpoints
POST /routing/matrixPOST /routing/matrix/jobs
Common uses
- Assigning the nearest driver or courier
- Choosing which branch serves an order
- Planning visits for field teams