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": [
    [
      123
    ]
  ],
  "durations": [
    [
      123
    ]
  ],
  "sources": [
    123
  ],
  "destinations": [
    123
  ],
  "distances": [
    [
      123
    ]
  ],
  "annotations": [
    "<string>"
  ],
  "vehicleType": "CAR",
  "engine": "OSM",
  "departureTime": "2022-03-10T12:15:50.000Z",
  "interpolate": true,
  "exclude": [
    "TOLL"
  ],
  "sourceWaypoints": [
    {
      "hint": "<string>",
      "distance": 123,
      "name": "<string>",
      "location": [
        123
      ]
    }
  ],
  "destinationWaypoints": [
    {
      "hint": "<string>",
      "distance": 123,
      "name": "<string>",
      "location": [
        123
      ]
    }
  ]
}
'
{
  "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<double>[][]
required

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

Minimum array length: 2
durations
number<double>[][]
required

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

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.

distances
number<double>[][] | 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.

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

Table id.

status
enum<string> | null

Table status (IN_PROGRESS, SUCCEEDED, FAILED).

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

Error message if the Cube failed.

hash
integer<int32> | null

Hash of the Cube request

nrOfSources
integer<int32> | null

Number of sources in the table

nrOfDestinations
integer<int32> | null

Number of destinations in the table

tableResponseId
integer<int64>

Table response id.

updatedAt
string | null

Last update time of the table.

createdAt
string | null

Creation time of the table.