Skip to main content
POST
/
table
/
sync
Proxy
curl --request POST \
  --url https://routing.solvice.io/table/sync \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "coordinates": [
    [
      123
    ]
  ],
  "sources": [
    123
  ],
  "destinations": [
    123
  ],
  "annotations": [
    "<string>"
  ],
  "vehicleType": "CAR",
  "engine": "OSM",
  "departureTime": "2022-03-10T12:15:50.000Z",
  "interpolate": true,
  "exclude": [
    "TOLL"
  ]
}
'
{
  "tableId": 123,
  "durations": [
    [
      123
    ]
  ],
  "distances": [
    [
      123
    ]
  ],
  "sources": [
    {
      "hint": "<string>",
      "distance": 123,
      "name": "<string>",
      "location": [
        123
      ]
    }
  ],
  "destinations": [
    {
      "hint": "<string>",
      "distance": 123,
      "name": "<string>",
      "location": [
        123
      ]
    }
  ]
}
Request a distance matrix with the synchronous /table/sync endpoint. This will be limited to a 50x50 matrix.

Authorizations

Authorization
string
header
required

Api Key based authentication (apikey)

Body

application/json

Table Dto

coordinates
number<double>[][]
required

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

Minimum array length: 2
sources
integer<int32>[] | null

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

destinations
integer<int32>[] | null

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> | null

The vehicle type for which the table is requested

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

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

Available options:
OSM,
TOMTOM,
GOOGLE,
ANYMAP,
CUSTOM
departureTime
string<date-time> | null

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

Example:

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

interpolate
boolean | null

Enable linear interpolation between time slices for more accurate results based on departure time

exclude
enum<string>[] | null

Exclude certain road types from routing

Available options:
TOLL,
MOTORWAY,
FERRY,
TUNNEL,
BRIDGE

Response

Get table response directly.

Table Response

tableId
integer<int64>

Table response id. Not to be confused with table request id.

durations
number<double>[][] | null

Time distance matrix. In order of sources to destinations indexes in request.

distances
number<double>[][] | null

Distance matrix. In order of sources to destinations indexes in request.

sources
object[] | null

Actual sources snapped to map.

destinations
object[] | null

Actual destinations snapped to map.