Skip to main content
POST
/
table
/
upload
Upload Table
curl --request POST \
  --url https://routing.solvice.io/table/upload \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "coordinates": [
    [
      4.9,
      50.2
    ],
    [
      4.8,
      50.4
    ],
    [
      5,
      50.9
    ],
    [
      5.05,
      50.9
    ]
  ],
  "durations": [
    [
      0,
      1976.1,
      5772.3,
      5642.6
    ],
    [
      2010.2,
      0,
      4783.9,
      4654.2
    ],
    [
      5817.2,
      4797.4,
      0,
      508.6
    ],
    [
      5705.3,
      4685.5,
      530.2,
      0
    ]
  ]
}'
{
  "id": 123,
  "status": "IN_PROGRESS",
  "errorMessage": "<string>",
  "hash": 123,
  "nrOfSources": 123,
  "nrOfDestinations": 123,
  "tableResponseId": 123,
  "updatedAt": "<string>",
  "createdAt": "<string>"
}
Upload a custom table. Then fetch it with the returned id.

Authorizations

Authorization
string
header
required

Api Key based authentication (apikey)

Body

application/json

Upload pre-computed distance/duration matrix

coordinates
number[][]
required

The coordinates for this matrix, as [{lon},{lat}] values, in decimal degrees.

Minimum length: 2
durations
number[][]
required

Pre-computed duration matrix. Rows are sources, columns are destinations.

sources
integer[] | null

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

destinations
integer[] | null

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

distances
number[][] | null

Pre-computed distance matrix. Optional - only needed if distance data is available.

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 this matrix was computed.

Examples:

"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

sourceWaypoints
object[] | null

Source waypoints snapped to map. Optional if waypoint data is available.

destinationWaypoints
object[] | null

Destination waypoints snapped to map. Optional if waypoint data is available.

Response

Table uploaded successfully

id
integer

Table id.

status
enum<string> | null

Table status (IN_PROGRESS, SUCCEEDED, FAILED).

Available options:
IN_PROGRESS,
AGGREGATING,
SUCCEEDED,
FAILED
errorMessage
string | null

Error message if the Cube failed.

hash
integer | null

Hash of the Cube request

nrOfSources
integer | null

Number of sources in the table

nrOfDestinations
integer | null

Number of destinations in the table

tableResponseId
integer

Table response id.

updatedAt
string | null

Last update time of the table.

createdAt
string | null

Creation time of the table.

I