Create cube (sync)
curl --request POST \
--url https://routing.solvice.io/cube/sync \
--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
]
],
"sources": [
0,
1,
2,
3
],
"destinations": [
0,
1,
2,
3
]
}
'import requests
url = "https://routing.solvice.io/cube/sync"
payload = {
"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]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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]
})
};
fetch('https://routing.solvice.io/cube/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://routing.solvice.io/cube/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://routing.solvice.io/cube/sync"
payload := strings.NewReader("{\n \"coordinates\": [\n [\n 4.9,\n 50.2\n ],\n [\n 4.8,\n 50.4\n ],\n [\n 5,\n 50.9\n ],\n [\n 5.05,\n 50.9\n ]\n ],\n \"sources\": [\n 0,\n 1,\n 2,\n 3\n ],\n \"destinations\": [\n 0,\n 1,\n 2,\n 3\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://routing.solvice.io/cube/sync")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"coordinates\": [\n [\n 4.9,\n 50.2\n ],\n [\n 4.8,\n 50.4\n ],\n [\n 5,\n 50.9\n ],\n [\n 5.05,\n 50.9\n ]\n ],\n \"sources\": [\n 0,\n 1,\n 2,\n 3\n ],\n \"destinations\": [\n 0,\n 1,\n 2,\n 3\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://routing.solvice.io/cube/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"coordinates\": [\n [\n 4.9,\n 50.2\n ],\n [\n 4.8,\n 50.4\n ],\n [\n 5,\n 50.9\n ],\n [\n 5.05,\n 50.9\n ]\n ],\n \"sources\": [\n 0,\n 1,\n 2,\n 3\n ],\n \"destinations\": [\n 0,\n 1,\n 2,\n 3\n ]\n}"
response = http.request(request)
puts response.read_body{
"destinations": [
{
"hint": "eX5AgduYjYYsAAAAlAAAAHIAAAAAAAAAxBf6QX7HzELIz51CAAAAACwAAACUAAAAcgAAAAAAAAAVtwAAlMNKAIj__QKgxEoAwP39AgEAXwRPrDVe",
"distance": 54.20808645369059,
"name": "Avenue de la Restauration",
"location": [
4.899732,
50.200456
]
},
{
"hint": "o_v2gPMxk4KXAAAAQwAAAJsAAADWAwAA4YOXQ0HtBEOh05pDGnn1RJcAAABDAAAAmwAAANYDAAAVtwAAEyhJAG0BAQMAPkkAAAsBAwMAXxRPrDVe",
"distance": 483.4921257061384,
"name": "Route des Trois Communes",
"location": [
4.794387,
50.397549
]
},
{
"hint": "WvwMgrAseoRNAAAAAAAAALwAAAAAAAAAvYZVQgAAAAAK0AFDAAAAAE0AAAAAAAAAvAAAAAAAAAAVtwAAI1ZMAPmtCANAS0wAIKwIAwYAXw9PrDVe",
"distance": 202.89814553989248,
"name": "Wittebos",
"location": [
5.002787,
50.900473
]
},
{
"hint": "GtVBggTgEIkDAAAADwAAAMUAAAAAAAAAbWKjQHMstUHaEZlDAAAAAAMAAAAPAAAAxQAAAAAAAAAVtwAA-Q5NAN2rCAOQDk0AIKwIAwsAHw5PrDVe",
"distance": 10.496399718824598,
"name": "Tiensestraat",
"location": [
5.050105,
50.899933
]
}
],
"coordinates": [
[
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
]
],
"sources": [
{
"hint": "eX5AgduYjYYsAAAAlAAAAHIAAAAAAAAAxBf6QX7HzELIz51CAAAAACwAAACUAAAAcgAAAAAAAAAVtwAAlMNKAIj__QKgxEoAwP39AgEAXwRPrDVe",
"distance": 54.20808645369059,
"name": "Avenue de la Restauration",
"location": [
4.899732,
50.200456
]
},
{
"hint": "o_v2gPMxk4KXAAAAQwAAAJsAAADWAwAA4YOXQ0HtBEOh05pDGnn1RJcAAABDAAAAmwAAANYDAAAVtwAAEyhJAG0BAQMAPkkAAAsBAwMAXxRPrDVe",
"distance": 483.4921257061384,
"name": "Route des Trois Communes",
"location": [
4.794387,
50.397549
]
},
{
"hint": "WvwMgrAseoRNAAAAAAAAALwAAAAAAAAAvYZVQgAAAAAK0AFDAAAAAE0AAAAAAAAAvAAAAAAAAAAVtwAAI1ZMAPmtCANAS0wAIKwIAwYAXw9PrDVe",
"distance": 202.89814553989248,
"name": "Wittebos",
"location": [
5.002787,
50.900473
]
},
{
"hint": "GtVBggTgEIkDAAAADwAAAMUAAAAAAAAAbWKjQHMstUHaEZlDAAAAAAMAAAAPAAAAxQAAAAAAAAAVtwAA-Q5NAN2rCAOQDk0AIKwIAwsAHw5PrDVe",
"distance": 10.496399718824598,
"name": "Tiensestraat",
"location": [
5.050105,
50.899933
]
}
]
}{
"code": "<string>",
"message": "<string>",
"timestamp": 123
}{
"code": "<string>",
"message": "<string>",
"timestamp": 123
}{
"code": "<string>",
"message": "<string>",
"timestamp": 123
}Cube
/cube/sync
Request a cube synchronously. Returns the cube response directly instead of creating an asynchronous job.
POST
/
cube
/
sync
Create cube (sync)
curl --request POST \
--url https://routing.solvice.io/cube/sync \
--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
]
],
"sources": [
0,
1,
2,
3
],
"destinations": [
0,
1,
2,
3
]
}
'import requests
url = "https://routing.solvice.io/cube/sync"
payload = {
"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]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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]
})
};
fetch('https://routing.solvice.io/cube/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://routing.solvice.io/cube/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://routing.solvice.io/cube/sync"
payload := strings.NewReader("{\n \"coordinates\": [\n [\n 4.9,\n 50.2\n ],\n [\n 4.8,\n 50.4\n ],\n [\n 5,\n 50.9\n ],\n [\n 5.05,\n 50.9\n ]\n ],\n \"sources\": [\n 0,\n 1,\n 2,\n 3\n ],\n \"destinations\": [\n 0,\n 1,\n 2,\n 3\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://routing.solvice.io/cube/sync")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"coordinates\": [\n [\n 4.9,\n 50.2\n ],\n [\n 4.8,\n 50.4\n ],\n [\n 5,\n 50.9\n ],\n [\n 5.05,\n 50.9\n ]\n ],\n \"sources\": [\n 0,\n 1,\n 2,\n 3\n ],\n \"destinations\": [\n 0,\n 1,\n 2,\n 3\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://routing.solvice.io/cube/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"coordinates\": [\n [\n 4.9,\n 50.2\n ],\n [\n 4.8,\n 50.4\n ],\n [\n 5,\n 50.9\n ],\n [\n 5.05,\n 50.9\n ]\n ],\n \"sources\": [\n 0,\n 1,\n 2,\n 3\n ],\n \"destinations\": [\n 0,\n 1,\n 2,\n 3\n ]\n}"
response = http.request(request)
puts response.read_body{
"destinations": [
{
"hint": "eX5AgduYjYYsAAAAlAAAAHIAAAAAAAAAxBf6QX7HzELIz51CAAAAACwAAACUAAAAcgAAAAAAAAAVtwAAlMNKAIj__QKgxEoAwP39AgEAXwRPrDVe",
"distance": 54.20808645369059,
"name": "Avenue de la Restauration",
"location": [
4.899732,
50.200456
]
},
{
"hint": "o_v2gPMxk4KXAAAAQwAAAJsAAADWAwAA4YOXQ0HtBEOh05pDGnn1RJcAAABDAAAAmwAAANYDAAAVtwAAEyhJAG0BAQMAPkkAAAsBAwMAXxRPrDVe",
"distance": 483.4921257061384,
"name": "Route des Trois Communes",
"location": [
4.794387,
50.397549
]
},
{
"hint": "WvwMgrAseoRNAAAAAAAAALwAAAAAAAAAvYZVQgAAAAAK0AFDAAAAAE0AAAAAAAAAvAAAAAAAAAAVtwAAI1ZMAPmtCANAS0wAIKwIAwYAXw9PrDVe",
"distance": 202.89814553989248,
"name": "Wittebos",
"location": [
5.002787,
50.900473
]
},
{
"hint": "GtVBggTgEIkDAAAADwAAAMUAAAAAAAAAbWKjQHMstUHaEZlDAAAAAAMAAAAPAAAAxQAAAAAAAAAVtwAA-Q5NAN2rCAOQDk0AIKwIAwsAHw5PrDVe",
"distance": 10.496399718824598,
"name": "Tiensestraat",
"location": [
5.050105,
50.899933
]
}
],
"coordinates": [
[
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
]
],
"sources": [
{
"hint": "eX5AgduYjYYsAAAAlAAAAHIAAAAAAAAAxBf6QX7HzELIz51CAAAAACwAAACUAAAAcgAAAAAAAAAVtwAAlMNKAIj__QKgxEoAwP39AgEAXwRPrDVe",
"distance": 54.20808645369059,
"name": "Avenue de la Restauration",
"location": [
4.899732,
50.200456
]
},
{
"hint": "o_v2gPMxk4KXAAAAQwAAAJsAAADWAwAA4YOXQ0HtBEOh05pDGnn1RJcAAABDAAAAmwAAANYDAAAVtwAAEyhJAG0BAQMAPkkAAAsBAwMAXxRPrDVe",
"distance": 483.4921257061384,
"name": "Route des Trois Communes",
"location": [
4.794387,
50.397549
]
},
{
"hint": "WvwMgrAseoRNAAAAAAAAALwAAAAAAAAAvYZVQgAAAAAK0AFDAAAAAE0AAAAAAAAAvAAAAAAAAAAVtwAAI1ZMAPmtCANAS0wAIKwIAwYAXw9PrDVe",
"distance": 202.89814553989248,
"name": "Wittebos",
"location": [
5.002787,
50.900473
]
},
{
"hint": "GtVBggTgEIkDAAAADwAAAMUAAAAAAAAAbWKjQHMstUHaEZlDAAAAAAMAAAAPAAAAxQAAAAAAAAAVtwAA-Q5NAN2rCAOQDk0AIKwIAwsAHw5PrDVe",
"distance": 10.496399718824598,
"name": "Tiensestraat",
"location": [
5.050105,
50.899933
]
}
]
}{
"code": "<string>",
"message": "<string>",
"timestamp": 123
}{
"code": "<string>",
"message": "<string>",
"timestamp": 123
}{
"code": "<string>",
"message": "<string>",
"timestamp": 123
}Authorizations
Body
application/json
Cube Dto
Response
Get cube response directly.
Cube Response