Skip to main content
POST
Distance Matrix
Compute travel distances and durations between multiple origins and destinations at once.

Optimal Planning

The distance matrix is essential for logistics and dispatching. It allows you to quickly find the nearest driver or service point across the road network.

Request Body

  • coordinates: A list of all unique points involved.
  • sources: Indices into the coordinates list for start points.
  • destinations: Indices into the coordinates list for end points.

Note on Large Requests

The maximum number of source-destination pairs in a single request is limited. Contact us if you need to perform high-volume computations.

Authorizations

Authorization
string
header
required

JWT Bearer token for authentication. Example: "Bearer YOUR_API_TOKEN_HERE"

Body

application/json

Coordinates with source and destination indices

Coordinates with source and destination indices

coordinates
object[]
required

List of geographic coordinates (at least one required)

destinations
integer[]

Zero-based indices into coordinates identifying destination points. If omitted, all coordinates are used as destinations.

Example:
sources
integer[]

Zero-based indices into coordinates identifying source points. If omitted, all coordinates are used as sources.

Example:

Response

OK

data
object

Response payload

error
string

Error message (only present when ok is false)

Example:

""

ok
boolean

Whether the request was successful

Example:

true