curl --request POST \
--url https://routing.solvice.io/cube/sync \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"coordinates": [
[
123
]
],
"sources": [
123
],
"destinations": [
123
],
"vehicleType": "CAR",
"date": "2022-03-10T00:00:00.000Z",
"responseType": "<string>"
}
'{
"tableId": 123,
"durations": [
[
123
]
],
"distances": [
[
123
]
],
"sources": [
{
"hint": "<string>",
"distance": 123,
"name": "<string>",
"location": [
123
]
}
],
"destinations": [
{
"hint": "<string>",
"distance": 123,
"name": "<string>",
"location": [
123
]
}
],
"durationSlices": [
[
[
123
]
]
],
"coefficients": [
[
[
123
]
]
],
"slices": [
{
"sliceNumber": 123,
"startHour": 123,
"endHour": 123
}
]
}Request a cube synchronously. Returns the cube response directly instead of creating an asynchronous job.
curl --request POST \
--url https://routing.solvice.io/cube/sync \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"coordinates": [
[
123
]
],
"sources": [
123
],
"destinations": [
123
],
"vehicleType": "CAR",
"date": "2022-03-10T00:00:00.000Z",
"responseType": "<string>"
}
'{
"tableId": 123,
"durations": [
[
123
]
],
"distances": [
[
123
]
],
"sources": [
{
"hint": "<string>",
"distance": 123,
"name": "<string>",
"location": [
123
]
}
],
"destinations": [
{
"hint": "<string>",
"distance": 123,
"name": "<string>",
"location": [
123
]
}
],
"durationSlices": [
[
[
123
]
]
],
"coefficients": [
[
[
123
]
]
],
"slices": [
{
"sliceNumber": 123,
"startHour": 123,
"endHour": 123
}
]
}API key authentication. Include your API key in the Authorization header.
Cube Dto
The coordinates this request will use, coordinates as [{lon},{lat}] values, in decimal degrees.
2An array of index elements (0 <= integer < #coordinates) to use location with given index as source. Default is to use all.
An array of index elements (0 <= integer < #coordinates) to use location with given index as destination. Default is to use all.
The vehicle type for which the table is requested
CAR, BIKE, TRUCK, ELECTRIC_CAR, ELECTRIC_BIKE The date for which you want to calculate the cube. This will take into account predictive travel time based on TomTom data. Format YYYY-MM-DD. Default is current date.
"2022-03-10T00:00:00.000Z"
Specifies the type of response to return. Currently only 'matrix' is supported (returns travel time matrices for each time slice).
Get cube response directly.
Cube Response
Table response id. Not to be confused with table request id.
Time distance matrix. In order of sources to destinations indexes in request.
Distance matrix. In order of sources to destinations indexes in request.
Actual sources snapped to map.
Show child attributes
Actual destinations snapped to map.
Show child attributes
Time distance matrix. In order of sources to destinations indexes in request.
Travel Time cube. In order of sources to destinations indexes in request. Inner array is list of 6 coefficients.
Time slice information indicating which time periods each slice represents.
Show child attributes