Route API Documentation¶
POST /solver/route¶
Query Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | Yes | Your API key |
Request Body: application/json¶
Inputs¶
| Field | Type | Required | Description |
|---|---|---|---|
tasks |
[Task] | Yes | List of routing tasks |
Task¶
| Field | Type | Required | Description |
|---|---|---|---|
mode |
String | Optional | Transport mode: "car" or "truck" (default: "car") |
origin |
[Number, Number] | Yes | Origin coordinates (latitude, longitude) (default: [0.0, 0.0]) |
destination |
[Number, Number] | Yes | Destination coordinates (latitude, longitude) (default: [0.0, 0.0]) |
waypoints |
[[Number, Number]] | Optional | Waypoints coordinates (latitude, longitude) |
alternatives |
Integer (0–5) | Optional | Number of alternative routes to calculate (default: 0) |
departure |
String (date-time) | Optional | Departure time for the task (ISO 8601 format) |
arrival |
String (date-time) | Optional | Arrival time for the task (ISO 8601 format) |
minimize |
String | Optional | Optimization criteria: "distance" or "duration" (default: "duration") |
avoid_areas |
Array of Polygons | Optional | Custom areas to avoid during routing |
avoid_features |
[String] | Optional | List of features to avoid: "tunnel", "ferry", "toll_road", "seasonal_closure", "controlled_access_highway" |
tolls |
Boolean | Optional | Calculate route with toll roads (default: false) |
vehicle |
Vehicle | Optional | Vehicle specifications for the routing task |
currency |
String | Optional | Currency code for toll calculations: "USD", "EUR", or "TRY" |
Vehicle¶
| Field | Type | Required | Description |
|---|---|---|---|
length |
Integer (0–30000) | Optional | Vehicle length in centimeters |
width |
Integer (0–5000) | Optional | Vehicle width in centimeters |
height |
Integer (0–5000) | Optional | Vehicle height in centimeters |
axle_count |
Integer (2–255) | Optional | Total number of axles including trailers |
hazardous_goods |
[String] | Optional | Types of hazardous goods being transported: "explosive", "gas", "flammable", "combustible", "organic", "poison", "radioactive", "corrosive", "poisonous_inhalation", "harmful_to_water", "other" |
Hazardous Goods¶
| Value | Description |
|---|---|
"explosive" |
Explosive materials |
"gas" |
Gaseous materials |
"flammable" |
Flammable materials |
"combustible" |
Combustible materials |
"organic" |
Organic materials |
"poison" |
Poisonous materials |
"radioactive" |
Radioactive materials |
"corrosive" |
Corrosive materials |
"poisonous_inhalation" |
Poisonous inhalation materials |
"harmful_to_water" |
Materials harmful to water |
"other" |
Other hazardous materials |
Response¶
Outputs¶
| Field | Type | Description |
|---|---|---|
tasks |
[TaskResponse] | List of routing task results |
Task Response¶
| Field | Type | Description |
|---|---|---|
routes |
[Route] | List of calculated routes |
Route¶
| Field | Type | Description |
|---|---|---|
id |
String | Unique identifier for the route |
sections |
[Section] | List of sections in the route |
notices |
[String] (optional) | List of notices for the route |
Section¶
| Field | Type | Description |
|---|---|---|
id |
String | Unique identifier for the section |
mode |
String | Transport mode: "car" or "truck" |
departure |
Location | Departure location details |
arrival |
Location | Arrival location details |
summary |
Summary | Summary of the section |
notices |
[String] (optional) | List of notices for the section |
points |
[[Number, Number]] | List of coordinates representing the route geometry |
Location¶
| Field | Type | Description |
|---|---|---|
coordinate |
[Number, Number] | Coordinates (latitude, longitude) |
type |
String | Location type: "place", "docking_station", "charging_station", "parking_lot", "access_point", or "station" |
waypoint |
Integer (optional) | Index of the waypoint if applicable |
time |
String (date-time, optional) | Timestamp at the location (ISO 8601 format) |
Summary¶
| Field | Type | Description |
|---|---|---|
distance |
Integer | Total distance of the section in meters |
duration |
Integer | Total duration of the section in seconds |
toll_cost |
Number (optional) | Total toll cost for the section |