POST
/
table
curl --request POST \
  --url https://routing.solvice.io/table \
  --header 'Content-Type: application/json' \
  --data '{
  "coordinates": [
    [
      4.9,
      50.2
    ],
    [
      4.8,
      50.4
    ],
    [
      5,
      50.9
    ],
    [
      5.05,
      50.9
    ]
  ],
  "sources": [
    0,
    1,
    2,
    3
  ],
  "destinations": [
    0,
    1,
    2,
    3
  ]
}'
{
  "id": 123,
  "tableResponseId": 123,
  "status": "IN_PROGRESS",
  "updatedAt": "<string>",
  "createdAt": "<string>"
}

Request a distance matrix with the asynchronous /table endpoint. In the result you can find the table response id to fetch in /table/{response_id}. For very large matrices (eg 2000x2000 and more), the /table/{request_id}/progress endpoint can provide more information.

Body

application/json

Table Dto

coordinates
array | null
required

The coordinates this request will use, coordinates as [{lon},{lat}] values, in decimal degrees.

sources
integer[] | null
required

An array of index elements (0 <= integer < #coordinates) to use location with given index as source. Default is to use all.

destinations
integer[] | null
required

An array of index elements (0 <= integer < #coordinates) to use location with given index as destination. Default is to use all.

annotations
string[] | null

Return the requested table or tables in response. Can be ['duration'] (return the duration matrix, default) or ['duration', distance'] (return both the duration matrix and the distance matrix).

vehicleType
enum<string>

The vehicle type for which the table is requested

Available options:
CAR,
BIKE,
TRUCK,
ELECTRIC_CAR,
ELECTRIC_BIKE
engine
enum<string>

Routing data engine being used: OpenStreetMap (OSM) or TomTom.

Available options:
OSM,
TOMTOM
departureTime
string

The departure time for which you want to calculate the route. This will take into account predictive travel time based on TomTom data.

Example:

"2022-03-10T16:15:50.000Z"

Response

200 - application/json
OK
id
integer
tableResponseId
integer
status
enum<string>
Available options:
IN_PROGRESS,
SUCCEEDED,
FAILED
updatedAt
string | null
createdAt
string | null