curl --request POST \
--url https://routing.solvice.io/route/batch \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"routes": [
{
"coordinates": [
[
123
]
],
"bearings": [
[
123
]
],
"radiuses": [
123
],
"hints": [
"<string>"
],
"generate_hints": true,
"alternatives": 5,
"steps": true,
"annotations": [
"<string>"
],
"geometries": "<string>",
"overview": "<string>",
"continue_straight": true,
"approaches": [
"<string>"
],
"waypoints": [
123
],
"snapping": "<string>",
"vehicleType": "CAR",
"routingEngine": "OSM",
"departureTime": "2024-03-15T08:30:00.000Z",
"interpolate": true,
"exclude": [
"TOLL"
],
"slice": 123
}
]
}
'{
"results": [
{
"index": 123,
"result": {
"routes": [
{
"geometry": "{wkqHi~{\\tLb\\uEvH{mA{`@{~Bnr@gSwKkQsp@iDkjBsn@uS}rAtr@ccBt}AuhBxEal@_Ow}AblCqfA~a@mn@{A_Vz~@w|@x{@{PmP{CikA}Sg|@ec@ve@y[xzEyGbLmLmJolA~yCwaB|_B",
"legs": [
{
"steps": [],
"summary": "",
"weight": 1976.1,
"duration": 1976.1,
"distance": 31561.2
}
],
"weight_name": "routability",
"weight": 1976.1,
"duration": 1976.1,
"distance": 31561.2
}
],
"waypoints": [
{
"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
]
}
]
},
"error": {
"message": "<string>",
"code": "<string>"
}
}
],
"successful": 123,
"failed": 123,
"total": 123
}Process multiple route requests in a single API call. Each route in the batch is calculated independently, reducing API overhead for bulk operations.
curl --request POST \
--url https://routing.solvice.io/route/batch \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"routes": [
{
"coordinates": [
[
123
]
],
"bearings": [
[
123
]
],
"radiuses": [
123
],
"hints": [
"<string>"
],
"generate_hints": true,
"alternatives": 5,
"steps": true,
"annotations": [
"<string>"
],
"geometries": "<string>",
"overview": "<string>",
"continue_straight": true,
"approaches": [
"<string>"
],
"waypoints": [
123
],
"snapping": "<string>",
"vehicleType": "CAR",
"routingEngine": "OSM",
"departureTime": "2024-03-15T08:30:00.000Z",
"interpolate": true,
"exclude": [
"TOLL"
],
"slice": 123
}
]
}
'{
"results": [
{
"index": 123,
"result": {
"routes": [
{
"geometry": "{wkqHi~{\\tLb\\uEvH{mA{`@{~Bnr@gSwKkQsp@iDkjBsn@uS}rAtr@ccBt}AuhBxEal@_Ow}AblCqfA~a@mn@{A_Vz~@w|@x{@{PmP{CikA}Sg|@ec@ve@y[xzEyGbLmLmJolA~yCwaB|_B",
"legs": [
{
"steps": [],
"summary": "",
"weight": 1976.1,
"duration": 1976.1,
"distance": 31561.2
}
],
"weight_name": "routability",
"weight": 1976.1,
"duration": 1976.1,
"distance": 31561.2
}
],
"waypoints": [
{
"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
]
}
]
},
"error": {
"message": "<string>",
"code": "<string>"
}
}
],
"successful": 123,
"failed": 123,
"total": 123
}API key authentication. Include your API key in the Authorization header.
Request DTO for batch route processing
Array of route requests to process in batch
2 - 20 elementsShow child attributes
Batch routes processed successfully. Batch processing is handled by the external routing service.
Response DTO for batch route processing
Array of individual route results
Show child attributes
Number of routes that processed successfully
Number of routes that failed to process
Total number of routes in the batch