Matrices

Compare source–target pairs for dispatch, nearest-rider selection, and travel-time analysis.

Many journeys in one request

A matrix compares every source with every target. Three sources and two targets produce six elements. It is useful for comparing riders, depots, pickups, or delivery destinations.

Every source, every targetIllustration
Source 1Source 2Source 3Target 1Target 2
3 sources2 targets6 comparisons
Every source is compared with every target. Three sources and two targets create six pairs.

Start with source–target pairs

cURL
curl -X POST 'https://api.uat.audisory.com/v1/matrix' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "sources": [
    [
      30.0619,
      -1.9441
    ],
    [
      30.108,
      -1.954
    ],
    [
      30.043,
      -1.939
    ]
  ],
  "targets": [
    [
      30.122,
      -1.942
    ]
  ],
  "profile": "moto"
}'

Keep direction and ordering

Results follow source and target ordering. Travel from A to B can differ from B to A because of direction-dependent access and road-network constraints. Keep your own identifiers alongside each coordinate so you can map results back to your application.

Size requests intentionally

Credit cost follows elements, not the number of HTTP calls. Choose a travel profile consistently and handle unavailable pairs according to the response schema. A matrix provides travel estimates; it does not optimize a vehicle fleet or return turn-by-turn routes.

Explore the request schema
FieldTypeDescription
sourcesrequiredarrayOrigins.
Nested fields
{
  "type": "array",
  "description": "A WGS84 position as `[longitude, latitude]`, in that order.",
  "minItems": 2,
  "maxItems": 2,
  "prefixItems": [
    {
      "type": "number",
      "format": "double",
      "description": "Longitude in decimal degrees.",
      "minimum": -180,
      "maximum": 180
    },
    {
      "type": "number",
      "format": "double",
      "description": "Latitude in decimal degrees.",
      "minimum": -90,
      "maximum": 90
    }
  ],
  "x-go-type": "[]float64",
  "examples": [
    [
      30.0619,
      -1.9441
    ]
  ]
}
targetsrequiredarrayDestinations.
Nested fields
{
  "type": "array",
  "description": "A WGS84 position as `[longitude, latitude]`, in that order.",
  "minItems": 2,
  "maxItems": 2,
  "prefixItems": [
    {
      "type": "number",
      "format": "double",
      "description": "Longitude in decimal degrees.",
      "minimum": -180,
      "maximum": 180
    },
    {
      "type": "number",
      "format": "double",
      "description": "Latitude in decimal degrees.",
      "minimum": -90,
      "maximum": 90
    }
  ],
  "x-go-type": "[]float64",
  "examples": [
    [
      30.0619,
      -1.9441
    ]
  ]
}
profilestringThe vehicle and behaviour model used for costing. `moto` is the motorcycle-taxi profile and the one most Rwandan traffic actually uses.

["moto","car","truck","bicycle","pedestrian","pedestrian_loaded"]

departure_timestringDeparture time, applied to every element.

See the generated matrix reference or use the authenticated playground with your own key.