Route optimization API
00 Prerequisites
The Route Optimization API can be used to solve traveling salesman or vehicle routing problems. It implements several open source projects and libraries like jSprit, som-tsp, TSPVIS, GH, Optimizer-API and wraps this into a beautiful unified API, inspired by the data logic behind jSprit.
The API is complex and requires that the results are further processed and transformed by the received program.
Because this API is actually designed exclusively for internal systems of Stadt.Land.Netz, we do not offer free implementation support. Of course we help where we can, but we would charge for this separately.
We do not accept feature requests for the API.
01 Restrictions, Terms of use & Fair-Use-Rules
Usage is limited to the common contract period, but is additionally subject to the restrictions that an individual VIA instance also has (number of vehicles, number of students with concurrent scheduling). The soft-limit is 150 persons and 50 vehicles.
In addition, we limit usage for all customers (including "normal" VIA customers) to average 10,000, maximum 50.000 credits per day, which is a kind of internal "currency". Each call costs us server and computation time as well as partial license fees from various other API vendors that are used.
If you exceed this limit many times or heavily during the day, we might charge you more or revoke the API-access , either until the end of the day or completely.
We can't influence how often and how much route optimizations are done. In principle, it would be possible to re-optimize every hour, which would cause very high costs on our side. We prevent an excessive use of the system via the number of credits.
You can dampen it by implementing an appropriate caching and optimization strategy:
- No identical request should be sent twice.
- Keep the requests as small as possible.
- Use rather many small request than few big requests.
- Don’t re-optimize if there wasn’t a change on a route.
- Monitor the credits we tell you over the
request header
.
- Don’t use optimization for simple route calculation, if you need this we offer another API for that or use a service like Google or HereMaps.
It is up to you to lower the amount of needed requests.
If we see an extensive and/or abusive usage then we’re also allowed to restrict the API access. By using the API you agree, that you have no right for a compensation once the API access is withdrawn due to violation of the terms of use or these fair-use-rule.
However, as long as the calculations stay within the bounds of what we have seen with regular VIA users, you will not reach those limits.
If we see a misuse of the API or if the implementation causes a disproportionate amount of work on our side, then we reserve the right to close the access with timely notice even earlier.
You’re only allowed to use and serve the API for common customers. Each API-Key is only allowed to serve one single end-customer.
02 Calling the endpoints
The base-URL is https://routing.server.stadtlandnetz.de
We share the traffic and computational load over several servers and across multiple sub-systems. The unified API capsules these sub parts into one single, fast and reliable API structure.
curl -X POST -H "Content-Type: application/json" "https://routing.server.stadtlandnetz.de/api/1/vrp?key=YOUR_CREATED_API_KEY" --data "@tsp.json"
1 POST
route optimization problem | synchronous
To solve a new vehicle routing problem, make a HTTP POST to this URL
https://routing.server.stadtlandnetz.de/api/1/vrp?key=<your_key>
It returns the solution to this problem in the JSON response.
Please note that this URL is very well suited to solve minor problems. Larger vehicle routing problems, which take longer than 10 seconds to solve, cannot be solved. To solve them, please use the batch mode URL instead.
11 Request
REQUEST BODY SCHEMA: application/json
The request that contains the vehicle routing problem to be solved.
vehicles
Array of objects
non-empty/required
Specifies the available vehicles.
vehicle_id
,required
,string
Specifies the ID of the vehicle. Ids must be unique, i.e. if there are two vehicles with the same ID, an error is returned.
type_id
string
Default: "default-type"
The type ID assigns a vehicle type to this vehicle. You can specify types in the array of vehicle types. If you omit the type ID, the default type is used. The default type is a
car
with a capacity of 0.
start_address
object (Address)
location_id
required
string
Specifies the id of the location
name
string
Name of location
lon
required
number <double>
Longitude of location
lat
required
number <double>
Latitude of location
street_hint
string
Optional parameter. Specifies a hint for each address to better snap the coordinates (lon,lat) to road network. E.g. if there is an address or house with two or more neighboring streets you can control for which street the closest location is looked up.
curbside
string
Default: "any”
Enum: "right" "left" "any”
Optional parameter. Specifies on which side a point should be relative to the driver when she leaves/arrives at a start/target/via point. Only supported for motor vehicles and OpenStreetMap.
end_address
object (Address)
location_id
required
string
Specifies the id of the location
name
string
Name of location
lon
required
number <double>
Longitude of location
lat
required
number <double>
Latitude of location
street_hint
string
Optional parameter. Specifies a hint for each address to better snap the coordinates (lon,lat) to road network. E.g. if there is an address or house with two or more neighboring streets you can control for which street the closest location is looked up.
curbside
string
Default: "any”
Enum: "right" "left" "any”
Optional parameter. Specifies on which side a point should be relative to the driver when she leaves/arrives at a start/target/via point. Only supported for motor vehicles and OpenStreetMap.
break
TimeWindowBreak (object)
orDriveTimeBreak (object)
TimeWindowBreak
earliest
required
integer
Specifies the earliest start time of the break in seconds.
latest
required
integer
Specifies the latest start time of break in seconds.
duration
required
integer
Specifies the duration of the break in seconds.
OR
DriveTimeBreak
duration
required
integer
Specifies the duration of the break in seconds
max_driving_time
required
integer
Specifies the max driving time (in a row) without break in seconds.
initial_driving_time
integer
Specifies the initial (current) driving time of a driver to allow dynamic adaptations in seconds..
possible_split
Array of integers
Array specifying how a break duration (in seconds) can be split into several smaller breaks
return_to_depot
boolean
Default: true
If it is false, the algorithm decides where to end the vehicle route. It ends in one of your customers' locations. The end is chosen such that it contributes to the overall objective function, e.g. min transport_time. If it is true, you can either specify a specific end location (which is then regarded as end depot) or you can leave it and the driver returns to its start location.
earliest_start
integer
Default: 0
Earliest start of vehicle in seconds. It is recommended to use the unix timestamp.
latest_end
integer
Default: 9223372036854776000
Latest end of vehicle in seconds, i.e. the time the vehicle needs to be at its end location at latest.
skills
Array of strings
Array of skills, i.e. array of string (not case sensitive).
max_distance
integer
Specifies the maximum distance (in meters) a vehicle can go.
max_driving_time
integer
Specifies the maximum drive time (in seconds) a vehicle/driver can go, i.e. the maximum time on the road (service and waiting times are not included here)
max_jobs
integer
Specifies the maximum number of jobs a vehicle can load.
min_jobs
integer
Specifies the minimum number of jobs a vehicle should load. This is a soft constraint, i.e. if it is not possible to fulfill “min_jobs”, we will still try to get as close as possible to this constraint.
max_activities
integer
Specifies the maximum number of activities a vehicle can conduct.
move_to_end_address
boolean
Indicates whether a vehicle should be moved even though it has not been assigned any jobs.
vehicle_types
Array of objects
Specifies the available vehicle types. These types can be assigned to vehicles.
type_id
required
string
Specifies the id of the vehicle type. If a vehicle needs to be of this type, it should refer to this with its type_id attribute.
profile
string (VehicleProfileId)
Default: "car"
Specifies the vehicle profile of this type. The profile is used to determine the network, speed and other physical attributes to use for routing the vehicle or pedestrian. See the section about routing profiles for more details and valid profile values.
capacity
Array of integers
Default: [0]
Specifies an array of capacity dimension values which need to be int values. For example, if there are two dimensions such as volume and weight then it needs to be defined as [ 1000, 300 ] assuming a maximum volume of 1000 and a maximum weight of 300.
speed_factor
number <double>
Default: 1
Specifies a speed factor for this vehicle type. If the vehicle that uses this type needs to be only half as fast as what is actually calculated with our routing engine then set the speed factor to 0.5.
cost_per_meter
number <double>
EXPERIMENTALCost parameter per distance unit, here meter is used
cost_per_second
number <double>
EXPERIMENTALCost parameter per time unit, here second is used
cost_per_activation
number <double>
EXPERIMENTALCost parameter vehicle activation, i.e. fixed costs per vehicle
services
Array of objects
Specifies the orders of the type "service". These are, for example, pick-ups, deliveries or other stops that are to be approached by the specified vehicles. Each of these orders contains only one location.
id
required
string
Specifies the id of the service. Ids need to be unique so there must not be two services/shipments with the same id.
type
string
Default: "service”
Specifies type of service. This makes a difference if items are loaded or unloaded, i.e. if one of the size dimensions > 0. If it is specified as
service
orpickup
, items are loaded and will stay in the vehicle for the rest of the route (and thus consumes capacity for the rest of the route). If it is adelivery
, items are implicitly loaded at the beginning of the route and will stay in the route until delivery (and thus releases capacity for the rest of the route).Enum: "service" "pickup" "delivery”
priority
integer
Default: 2
Specifies the priority. Can be 1 = high priority to 10 = low priority. Often there are more services/shipments than the available vehicle fleet can handle. Then you can set priorities to differentiate high priority tasks from those that could be left unassigned. I.e. the lower the priority the earlier these tasks are omitted in the solution.
name
string
Meaningful name for service, e.g. "deliver Herr Mustermann".
address
object (Address)
location_id
required
string
Specifies the id of the location
name
string
Name of location
lon
required
number <double>
Longitude of location
lat
required
number <double>
Latitude of location
street_hint
string
Optional parameter. Specifies a hint for each address to better snap the coordinates (lon,lat) to road network. E.g. if there is an address or house with two or more neighboring streets you can control for which street the closest location is looked up.
curbside
string
Default: "any”
Enum: "right" "left" "any”
Optional parameter. Specifies on which side a point should be relative to the driver when she leaves/arrives at a start/target/via point. Only supported for motor vehicles and OpenStreetMap.
duration
integer
Default: 0
Specifies the duration of the service in seconds, i.e. how long it takes at the customer site.
preparation_time
integer
Default: 0
Specifies the preparation time in seconds. It can be used to model parking lot search time since if you have 3 identical locations in a row, it only falls due once.
time_windows
Array of objects (TimeWindow)
earliest
integer
Default: 0
Specifies the opening time of the time window in seconds, i.e. the earliest time the service can start.
latest
integer
Default: 9223372036854776000
Specifies the closing time of the time window in seconds, i.e. the latest time the service can start.
size
Array of integers
Default: [0]
Size can have multiple dimensions and should be in line with the capacity dimension array of the vehicle type. For example, if the item that needs to be delivered has two size dimension, volume and weight, then specify it as follow [ 20, 5 ] assuming a volume of 20 and a weight of 5.
required_skills
Array of strings
Specifies an array of required skills, i.e. array of string (not case sensitive). For example, if this service needs to be conducted by a companion with clinical education having a
medical_companion
and awheelchair_fixation
then specify the array as follows:["medical_companion","wheelchair_fixation"]
. This means that the service can only be done by a vehicle (technician) that has the skillsmedical_companion
ANDwheelchair_fixation
in its skill array. Otherwise it remains unassigned.
allowed_vehicles
Array of strings
Specifies an array of allowed vehicles, i.e. array of vehicle ids. For example, if this service can only be conducted EITHER by
driver_bruno
ORdriver_adrian
specify this as follows:["driver_bruno","driver_adrian"]
.
disallowed_vehicles
Array of strings
Specifies an array of disallowed vehicles, i.e. array of vehicle ids.
max_time_in_vehicle
integer
Default: 9223372036854776000
Specifies the maximum time in seconds a delivery can stay in the vehicle. Currently, it only works with services of "type":"delivery".
shipments
Array of objects
id
required
string
Specifies the id of the shipment. Ids need to be unique so there must not be two services/shipments with the same id.
name
string
Meaningful name for shipment, e.g. "pickup and deliver Peter Lustig".
priority
integer
Default: 2
Specifies the priority. Can be 1 = high priority to 10 = low priority. Often there are more services/shipments than the available vehicle fleet can handle. Then you can set priorities to differentiate high priority tasks from those that could be left unassigned. I.e. the lower the priority the earlier these tasks are omitted in the solution.
pickup
required
object (Stop)
address
object (Address)
location_id
required
string
Specifies the id of the location
name
string
Name of location
lon
required
number <double>
Longitude of location
lat
required
number <double>
Latitude of location
street_hint
string
Optional parameter. Specifies a hint for each address to better snap the coordinates (lon,lat) to road network. E.g. if there is an address or house with two or more neighboring streets you can control for which street the closest location is looked up.
curbside
string
Default: "any”
Enum: "right" "left" "any”
Optional parameter. Specifies on which side a point should be relative to the driver when she leaves/arrives at a start/target/via point. Only supported for motor vehicles and OpenStreetMap.
duration
integer
Default: 0
Specifies the duration of the pickup or delivery in seconds, e.g. how long it takes unload items at the customer site.
preparation_time
integer
Default: 0
Specifies the preparation time in seconds. It can be used to model parking lot search time since if you have 3 identical locations in a row, it only falls due once.
time_windows
Array of objects (TimeWindow)
Specifies an array of time window objects (see time window object below). For example, if an item needs to be delivered between 7am and 10am then specify the array as follows: [ { "earliest": 25200, "latest" : 32400 } ] (starting the day from 0 in seconds).
earliest
integer
Default: 0
Specifies the opening time of the time window in seconds, i.e. the earliest time the service can start.
latest
integer
Default: 9223372036854776000
Specifies the closing time of the time window in seconds, i.e. the latest time the service can start.
delivery
required
object (Stop)
address
object (Address)
location_id
required
string
Specifies the id of the location
name
string
Name of location
lon
required
number <double>
Longitude of location
lat
required
number <double>
Latitude of location
street_hint
string
Optional parameter. Specifies a hint for each address to better snap the coordinates (lon,lat) to road network. E.g. if there is an address or house with two or more neighboring streets you can control for which street the closest location is looked up.
curbside
string
Default: "any”
Enum: "right" "left" "any”
Optional parameter. Specifies on which side a point should be relative to the driver when she leaves/arrives at a start/target/via point. Only supported for motor vehicles and OpenStreetMap.
duration
integer
Default: 0
Specifies the duration of the pickup or delivery in seconds, e.g. how long it takes unload items at the customer site.
preparation_time
integer
Default: 0
Specifies the preparation time in seconds. It can be used to model parking lot search time since if you have 3 identical locations in a row, it only falls due once.
time_windows
Array of objects (TimeWindow)
Specifies an array of time window objects (see time window object below). For example, if an item needs to be delivered between 7am and 10am then specify the array as follows: [ { "earliest": 25200, "latest" : 32400 } ] (starting the day from 0 in seconds).
earliest
integer
Default: 0
Specifies the opening time of the time window in seconds, i.e. the earliest time the service can start.
latest
integer
Default: 9223372036854776000
Specifies the closing time of the time window in seconds, i.e. the latest time the service can start.
size
Array of integers
Default: [0]
Size can have multiple dimensions and should be in line with the capacity dimension array of the vehicle type. For example, if the item that needs to be delivered has two size dimension, volume and weight, then specify it as follow [ 20, 5 ] assuming a volume of 20 and a weight of 5.
required_skills
Array of strings
Specifies an array of required skills, i.e. array of string (not case sensitive). For example, if this service needs to be conducted by a companion with clinical education having a
medical_companion
and awheelchair_fixation
then specify the array as follows:["medical_companion","wheelchair_fixation"]
. This means that the service can only be done by a vehicle (technician) that has the skillsmedical_companion
ANDwheelchair_fixation
in its skill array. Otherwise it remains unassigned.
allowed_vehicles
Array of strings
Specifies an array of allowed vehicles, i.e. array of vehicle ids. For example, if this service can only be conducted EITHER by
driver_bruno
ORdriver_adrian
specify this as follows:["driver_bruno","driver_adrian"]
.
disallowed_vehicles
Array of strings
Specifies an array of disallowed vehicles, i.e. array of vehicle ids.
max_time_in_vehicle
integer
Default: 9223372036854776000
Specifies the maximum time in seconds a delivery can stay in the vehicle. Currently, it only works with services of "type":"delivery".
relations
Array of JobRelation (object)
type
required
string
Specifies the type of relation. It must be either of type
in_same_route
,in_sequence
,in_direct_sequence
orneighbor
.in_same_route
: As the name suggest, it enforces the specified services or shipments to be in the same route. It can be specified as follows:{ "type": "in_same_route", "ids": ["serv_i_id","serv_j_id"] }
This enforces service i to be in the same route as service j no matter which vehicle will be employed. If a specific vehicle (driver) is required to conduct this, just add a
vehicle_id
like this:{ "type": "in_same_route", "ids": ["serv_i_id","serv_j_id"], "vehicle_id": "vehicle1" }
This not only enforce service i and j to be in the same route, but also makes sure that both services are in the route of
vehicle1
.Tip: This way initial loads and vehicle routes can be modelled. For example, if your vehicles are already on the road and new orders come in, then vehicles can still be rescheduled subject to the orders that have already been assigned to these vehicles.
in_sequence
: This relation type enforces n jobs to be in sequence. It can be specified as{ "type": "in_sequence", "ids": ["serv_i_id","serv_j_id"] }
which means that service j need to be in the same route as service i AND it needs to occur somewhere after service i. As described above if a specific vehicle needs to conduct this, just add
vehicle_id
.
in_direct_sequence
: This enforces n services or shipments to be in direct sequence. It can be specified as{ "type": "in_direct_sequence", "ids": ["serv_i_id","serv_j_id","serv_k_id"] }
yielding service j to occur directly after service i, and service k to occur directly after service j i.e. in strong order. Again, a vehicle can be assigned a priority by adding a
vehicle_id
to the relation.
neighbor
: This specifies a neighbor relationship, i.e., if services i and j are to be neighbors, i must be either immediately before or after j. I can be specified as follows:{ "type": "neighbor", "ids": ["serv_i_id","serv_j_id"] }
Special IDs: If you look at the previous example and you want service i to be the first in the route, use the special ID
start
as follows:{ "type": "in_direct_sequence", "ids": ["start","serv_i_id","serv_j_id","serv_k_id"] }
Latter enforces the direct sequence of i, j and k at the beginning of the route. If this sequence should be bound to the end of the route, use the special ID
end
like this:{ "type": "in_direct_sequence", "ids": ["serv_i_id","service_j_id","serv_k_id","end"] }
If you deal with services then you need to use the 'id' of your services in the field 'ids'. To also consider sequences of the pickups and deliveries of your shipments, you need to use a special ID, i.e. use the shipment id plus the keyword
_pickup
or_delivery
. For example, to ensure that the pickup and delivery of the shipment with the id 'my_shipment' are direct neighbors, you need the following specification:{ "type": "in_direct_sequence", "ids": ["my_ship_pickup","my_ship_delivery"] }
ids
required
Array of strings
Specifies an array of shipment and/or service ids that are in relation. If you deal with services then you need to use the id of your services in ids. To also consider sequences of the pickups and deliveries of your shipments, you need to use a special ID, i.e. use your shipment id plus the keyword
_pickup
or_delivery
. If you want to place a service or shipment activity at the beginning of your route, use the special IDstart
. In turn, useend
to place it at the end of the route.
vehicle_id
string
Id of pre-assigned vehicle, i.e. the vehicle id that is determined to conduct the services and shipments in this relation.
objectives
Array of objects (Objective)
Specifies an objective function. The vehicle routing problem is solved in such a way that this objective function is minimized.
type
required
string
Type of objective function, i.e.
min
ormin-max
.Enum: "min" "min-max”
min
: Minimizes the objective value.
min-max
: Minimizes the maximum objective value.
For instance,
min
→vehicles
minimizes the number of employed vehicles.
min
->completion_time
minimizes the sum of your vehicle routes' completion time.
If you use, for example,
min-max
→completion_time
, it minimizes the maximum of your vehicle routes' completion time, i.e. it minimizes the overall makespan. This only makes sense if you have more than one vehicle.
value
required
string
Default: "transport_time”
Enum: "completion_time" "transport_time" "vehicles" "activities”
The value of the objective function. The objective value
transport_time
solely considers the time your drivers spend on the road, i.e. transport time. In contrary totransport_time
,completion_time
also takes waiting times at customer sites into account.If you want to minimize
vehicles
first and, second,completion_time
, you can also combine different objectives like this:"objectives" : [ { "type": "min", "value": "vehicles" }, { "type": "min", "value": "completion_time" } ]
12 Supported Routing Profiles
The Routing, Matrix and Route Optimization APIs support the following profiles:
Name | Description | Restrictions |
---|---|---|
car | Car mode | car access, weight=2500kg, width=2m, height=2m |
car_delivery | Car mode | car access including delivery and private roads. Use only in case your drivers are allowed to access these roads. |
car_avoid_ferry | Car mode | car that heavily penalizes ferries |
car_avoid_motorway | Car mode | car that heavily penalizes motorways |
car_avoid_toll | Car mode | car that heavily penalizes tolls |
small_truck | Small truck like a Mercedes Sprinter, Ford Transit or Iveco Daily | height=2.7m, width=2+0.34m, length=5.5m, weight=2080+1400 kg |
small_truck_delivery | Small truck | Like small_truck but including delivery and private roads. Use only in case your drivers are allowed to access these roads. |
truck | Truck like a MAN or Mercedes-Benz Actros | height=3.7m, width=2.6+0.34m, length=12m, weight=13000+13000 kg, hgv=yes, 3 Axes |
scooter | Moped mode | Fast inner city, often used for food delivery, is able to ignore certain bollards, maximum speed of roughly 50km/h. weight=300kg, width=1m, height=2m |
scooter_delivery | Moped mode | Like scooter but including delivery and private roads. Use only in case your drivers are allowed to access these roads. |
foot | Pedestrian or walking without dangerous SAC-scales | foot access |
hike | Pedestrian or walking with priority for more beautiful hiking tours and potentially a bit longer than foot . Walking duration is influenced by elevation differences. | foot access |
bike | Trekking bike avoiding hills | bike access |
mtb | Mountainbike | bike access |
racingbike | Bike preferring roads | bike access |
13 Request
Request
curl -X POST -H "Content-Type: application/json" "https://routing.server.stadtlandnetz.de/api/1/vrp?key=api_key" -d '{ "vehicles": [ { "vehicle_id": "my_vehicle", "start_address": { "location_id": "berlin", "lon": 13.406, "lat": 52.537 } } ], "services": [ { "id": "hamburg", "name": "visit_hamburg", "address": { "location_id": "hamburg", "lon": 9.999, "lat": 53.552 } }, { "id": "munich", "name": "visit_munich", "address": { "location_id": "munich", "lon": 11.57, "lat": 48.145 } } ]}'
14 Result
200 A response containing the solution
200 Result
{ "copyrights": [ "Stadt.Land.Netz", "OpenStreetMap contributors" ], "job_id": "d62fcadd-c84a-4298-90b5-28550125bec5", "status": "finished", "waiting_time_in_queue": 0, "processing_time": 459, "solution": { "costs": 438, "distance": 17994, "time": 4094, "transport_time": 4094, "completion_time": 4172, "max_operation_time": 2465, "waiting_time": 78, "service_duration": 0, "preparation_time": 0, "no_vehicles": 2, "no_unassigned": 0, "routes": [ { "vehicle_id": "vehicle-2", "distance": 10618, "transport_time": 2465, "completion_time": 2465, "waiting_time": 0, "service_duration": 0, "preparation_time": 0, "points": [ { "coordinates": [ [ 13.40608, 52.53701 ], [ 13.40643, 52.53631 ], [ 13.40554, 52.53616 ], [ 13.4054, 52.53608 ], [ 13.40445, 52.53513 ], [ 13.40436, 52.53509 ], [ 13.40428, 52.53508 ], [ 13.40463, 52.53419 ], [ 13.40451, 52.53419 ], [ 13.4034, 52.53401 ], [ 13.403, 52.53359 ], [ 13.40291, 52.53354 ], [ 13.40268, 52.53347 ], [ 13.39888, 52.53259 ], [ 13.39839, 52.53253 ], [ 13.39812, 52.53251 ], [ 13.39616, 52.53243 ], [ 13.39579, 52.5324 ], [ 13.38973, 52.53173 ], [ 13.39163, 52.53025 ], [ 13.38797, 52.52935 ], [ 13.38763, 52.52996 ] ], "type": "LineString" }, { "coordinates": [ [ 13.38763, 52.52996 ], [ 13.38739, 52.53039 ], [ 13.38724, 52.53036 ], [ 13.38464, 52.52929 ], [ 13.38538, 52.52871 ], [ 13.38634, 52.52792 ], [ 13.38638, 52.52779 ], [ 13.38657, 52.52763 ], [ 13.38676, 52.52741 ], [ 13.38698, 52.52713 ], [ 13.38704, 52.52701 ], [ 13.38753, 52.524 ], [ 13.3877, 52.52307 ], [ 13.3878, 52.52282 ], [ 13.38788, 52.52252 ], [ 13.38802, 52.52174 ], [ 13.38519, 52.52009 ], [ 13.38539, 52.5191 ], [ 13.38548, 52.51852 ], [ 13.38042, 52.51819 ], [ 13.38071, 52.5167 ], [ 13.38076, 52.51652 ], [ 13.38084, 52.51634 ], [ 13.3821, 52.51396 ], [ 13.38055, 52.51365 ] ], "type": "LineString" }, { "coordinates": [ [ 13.38055, 52.51365 ], [ 13.38229, 52.514 ], [ 13.38363, 52.51429 ], [ 13.3848, 52.51445 ], [ 13.38504, 52.51358 ], [ 13.39124, 52.51397 ], [ 13.3911, 52.51488 ], [ 13.39303, 52.51499 ], [ 13.39317, 52.5141 ], [ 13.39548, 52.51419 ], [ 13.39571, 52.51421 ] ], "type": "LineString" }, { "coordinates": [ [ 13.39571, 52.51421 ], [ 13.39695, 52.51434 ], [ 13.39674, 52.51523 ], [ 13.39742, 52.51531 ], [ 13.39873, 52.51558 ], [ 13.39846, 52.51599 ], [ 13.39825, 52.51729 ], [ 13.39805, 52.51755 ], [ 13.39892, 52.51761 ], [ 13.39917, 52.51764 ], [ 13.39964, 52.51775 ], [ 13.40009, 52.51791 ], [ 13.40034, 52.51797 ], [ 13.4021, 52.51864 ], [ 13.40288, 52.51896 ], [ 13.40375, 52.51936 ], [ 13.40498, 52.52001 ], [ 13.40463, 52.5203 ], [ 13.40311, 52.52144 ], [ 13.40442, 52.52189 ], [ 13.40448, 52.52192 ], [ 13.40451, 52.52195 ], [ 13.40473, 52.52199 ], [ 13.40504, 52.52208 ], [ 13.40572, 52.52235 ], [ 13.40687, 52.52294 ], [ 13.40693, 52.52299 ], [ 13.40706, 52.52319 ], [ 13.40738, 52.52378 ], [ 13.40787, 52.52443 ], [ 13.4079, 52.52453 ], [ 13.40938, 52.52401 ], [ 13.40962, 52.52398 ], [ 13.41001, 52.52395 ], [ 13.41072, 52.52391 ], [ 13.41215, 52.52389 ], [ 13.41233, 52.52386 ], [ 13.4131, 52.5235 ], [ 13.41288, 52.52333 ], [ 13.41475, 52.52247 ], [ 13.41496, 52.52264 ], [ 13.41523, 52.52251 ], [ 13.41633, 52.52338 ], [ 13.41631, 52.52346 ], [ 13.41654, 52.52364 ], [ 13.41684, 52.52351 ] ], "type": "LineString" }, { "coordinates": [ [ 13.41684, 52.52351 ], [ 13.41654, 52.52364 ], [ 13.41631, 52.52346 ], [ 13.4163, 52.52344 ], [ 13.41587, 52.52363 ], [ 13.41572, 52.5235 ], [ 13.41409, 52.5242 ], [ 13.41454, 52.52461 ], [ 13.41454, 52.52466 ], [ 13.41358, 52.52508 ], [ 13.41366, 52.52514 ], [ 13.41344, 52.52525 ], [ 13.4133, 52.52514 ], [ 13.41316, 52.5252 ], [ 13.41107, 52.52585 ], [ 13.41118, 52.52606 ], [ 13.41118, 52.52616 ], [ 13.41095, 52.52664 ], [ 13.41097, 52.52678 ], [ 13.41084, 52.52706 ], [ 13.41057, 52.52747 ], [ 13.41028, 52.52809 ], [ 13.41032, 52.52821 ], [ 13.4102, 52.52847 ], [ 13.40999, 52.52875 ], [ 13.40984, 52.52905 ], [ 13.40982, 52.52914 ], [ 13.40984, 52.52926 ], [ 13.4104, 52.52998 ], [ 13.4105, 52.53001 ], [ 13.41064, 52.53016 ], [ 13.41082, 52.5303 ], [ 13.41198, 52.53107 ], [ 13.4122, 52.53128 ], [ 13.41232, 52.53143 ], [ 13.41247, 52.53192 ], [ 13.41267, 52.53245 ], [ 13.41275, 52.53259 ], [ 13.41215, 52.5327 ], [ 13.40731, 52.53463 ], [ 13.40608, 52.53701 ] ], "type": "LineString" } ], "activities": [ { "type": "start", "location_id": "berlin", "address": { "location_id": "berlin", "lat": 52.537, "lon": 13.406 }, "end_time": 1554804329, "end_date_time": null, "distance": 0, "driving_time": 0, "preparation_time": 0, "waiting_time": 0, "load_after": [ 0 ] }, { "type": "pickupShipment", "id": "7fe77504-7df8-4497-843c-02d70b6490ce", "location_id": "13.387613_52.529961", "address": { "location_id": "13.387613_52.529961", "lat": 52.529961, "lon": 13.387613 }, "arr_time": 1554804789, "arr_date_time": null, "end_time": 1554804789, "end_date_time": null, "waiting_time": 0, "distance": 2012, "driving_time": 460, "preparation_time": 0, "load_before": [ 0 ], "load_after": [ 1 ] }, { "type": "deliverShipment", "id": "7fe77504-7df8-4497-843c-02d70b6490ce", "location_id": "13.380575_52.513614", "address": { "location_id": "13.380575_52.513614", "lat": 52.513614, "lon": 13.380575 }, "arr_time": 1554805344, "arr_date_time": null, "end_time": 1554805344, "end_date_time": null, "waiting_time": 0, "distance": 4560, "driving_time": 1015, "preparation_time": 0, "load_before": [ 1 ], "load_after": [ 0 ] }, { "type": "service", "id": "s-4", "location_id": "13.395767_52.514038", "address": { "location_id": "13.395767_52.514038", "lat": 52.514038, "lon": 13.395767 }, "arr_time": 1554805632, "arr_date_time": null, "end_time": 1554805632, "end_date_time": null, "waiting_time": 0, "distance": 5887, "driving_time": 1303, "preparation_time": 0, "load_before": [ 0 ], "load_after": [ 1 ] }, { "type": "service", "id": "s-3", "location_id": "13.416882_52.523543", "address": { "location_id": "13.416882_52.523543", "lat": 52.523543, "lon": 13.416882 }, "arr_time": 1554806253, "arr_date_time": null, "end_time": 1554806253, "end_date_time": null, "waiting_time": 0, "distance": 8486, "driving_time": 1924, "preparation_time": 0, "load_before": [ 1 ], "load_after": [ 2 ] }, { "type": "end", "location_id": "berlin", "address": { "location_id": "berlin", "lat": 52.537, "lon": 13.406 }, "arr_time": 1554806794, "arr_date_time": null, "distance": 10618, "driving_time": 2465, "preparation_time": 0, "waiting_time": 0, "load_before": [ 2 ] } ] }, { "vehicle_id": "vehicle-1", "distance": 7376, "transport_time": 1629, "completion_time": 1707, "waiting_time": 78, "service_duration": 0, "preparation_time": 0, "points": [ { "coordinates": [ [ 13.40608, 52.53701 ], [ 13.40674, 52.53571 ], [ 13.40433, 52.53313 ], [ 13.40271, 52.53149 ], [ 13.40246, 52.53121 ], [ 13.40148, 52.52999 ], [ 13.40128, 52.52993 ], [ 13.40118, 52.52988 ], [ 13.40133, 52.5296 ], [ 13.40138, 52.52951 ], [ 13.40167, 52.52914 ], [ 13.40188, 52.52895 ], [ 13.398, 52.52885 ], [ 13.39289, 52.52748 ], [ 13.39354, 52.5264 ], [ 13.39358, 52.52628 ], [ 13.39324, 52.52575 ], [ 13.39334, 52.52573 ], [ 13.39339, 52.52584 ] ], "type": "LineString" }, { "coordinates": [ [ 13.39339, 52.52584 ], [ 13.3934, 52.52599 ], [ 13.39358, 52.52628 ], [ 13.39354, 52.5264 ], [ 13.39242, 52.52823 ], [ 13.39381, 52.52852 ], [ 13.38973, 52.53173 ], [ 13.38717, 52.5315 ], [ 13.38678, 52.5315 ], [ 13.38641, 52.53147 ], [ 13.38617, 52.53143 ], [ 13.38607, 52.53155 ], [ 13.38526, 52.53225 ], [ 13.38501, 52.53252 ], [ 13.38316, 52.53418 ], [ 13.38179, 52.5355 ], [ 13.38084, 52.53523 ], [ 13.38081, 52.53531 ], [ 13.3795, 52.53677 ], [ 13.37941, 52.53682 ], [ 13.37935, 52.53683 ], [ 13.37919, 52.53682 ], [ 13.37617, 52.5361 ], [ 13.37502, 52.53698 ], [ 13.37584, 52.53734 ] ], "type": "LineString" }, { "coordinates": [ [ 13.37584, 52.53734 ], [ 13.37566, 52.53726 ], [ 13.37515, 52.53763 ], [ 13.37644, 52.53841 ], [ 13.37807, 52.53935 ], [ 13.37946, 52.5402 ], [ 13.3796, 52.54019 ], [ 13.37984, 52.54021 ], [ 13.37988, 52.54012 ], [ 13.38062, 52.53936 ], [ 13.38169, 52.53832 ], [ 13.38236, 52.5377 ], [ 13.38363, 52.53661 ], [ 13.38492, 52.53555 ], [ 13.38613, 52.53447 ], [ 13.38757, 52.53338 ], [ 13.38791, 52.53354 ], [ 13.38812, 52.53368 ], [ 13.38833, 52.53392 ], [ 13.38977, 52.53518 ], [ 13.39003, 52.53539 ], [ 13.39256, 52.53701 ], [ 13.39316, 52.53739 ], [ 13.39327, 52.53744 ], [ 13.3936, 52.53757 ], [ 13.40155, 52.53982 ], [ 13.40357, 52.53715 ], [ 13.40372, 52.53719 ], [ 13.40465, 52.53727 ], [ 13.4048, 52.53726 ], [ 13.4059, 52.53736 ], [ 13.40608, 52.53701 ] ], "type": "LineString" } ], "activities": [ { "type": "start", "location_id": "berlin", "address": { "location_id": "berlin", "lat": 52.537, "lon": 13.406 }, "end_time": 1554804329, "end_date_time": null, "distance": 0, "driving_time": 0, "preparation_time": 0, "waiting_time": 0, "load_after": [ 0 ] }, { "type": "service", "id": "s-2", "location_id": "13.393364_52.525851", "address": { "location_id": "13.393364_52.525851", "lat": 52.525851, "lon": 13.393364 }, "arr_time": 1554804743, "arr_date_time": null, "end_time": 1554804743, "end_date_time": null, "waiting_time": 0, "distance": 1884, "driving_time": 414, "preparation_time": 0, "load_before": [ 0 ], "load_after": [ 1 ] }, { "type": "service", "id": "s-1", "location_id": "13.375854_52.537338", "address": { "location_id": "13.375854_52.537338", "lat": 52.537338, "lon": 13.375854 }, "arr_time": 1554805251, "arr_date_time": null, "end_time": 1554805329, "end_date_time": null, "waiting_time": 78, "distance": 4205, "driving_time": 922, "preparation_time": 0, "load_before": [ 1 ], "load_after": [ 2 ] }, { "type": "end", "location_id": "berlin", "address": { "location_id": "berlin", "lat": 52.537, "lon": 13.406 }, "arr_time": 1554806036, "arr_date_time": null, "distance": 7376, "driving_time": 1629, "preparation_time": 0, "waiting_time": 0, "load_before": [ 2 ] } ] } ], "unassigned": { "services": [], "shipments": [], "breaks": [], "details": [] } } }
RESPONSE HEADERS
X-RateLimit-Limit integer
Your current daily credit limit.X-RateLimit-Remaining integer
Your remaining credits until the reset.X-RateLimit-Reset integer
The number of seconds that you have to wait before a reset of the credit count is done.X-RateLimit-Credits integer
The credit costs for this request. Note it could be a decimal and even negative number, e.g. when an async request failed.
RESPONSE SCHEMA: application/json
copyrights Array of strings status string
Indicates the current status of the jobEnum: "waiting_in_queue" "processing" "finished"waiting_time_in_queue integer <int64>
Waiting time in msprocessing_time integer <int64>
Processing time in ms. If job is still waiting in queue, processing_time is 0solution object (Solution)
Only available if status field indicatesfinished
.
400 Error occurred when reading the request. Request is invalid.
400 Result
{ "message": "Bad Request", "hints": [ { "message": "unsupported json property [vehiles]. allowed properties: [vehicles, vehicle_types, services, shipments, relations, algorithm, objectives, cost_matrices, configuration]", "details": "class java.lang.IllegalArgumentException" } ], "status": "finished" }
RESPONSE SCHEMA: application/json
message string
Short error messagehints Array of objects (ErrorMessage)
Optional error information.status stringDefault: "finished"
status
500 Error occurred on server side.
500 Result
{ "code": 500, "message": "There has been an internal server error." }
RESPONSE SCHEMA: application/json
code integer <int32>Default: 500 message string
Details
2 POST
route optimization problem (batch mode)
21 General
Use the same Request-Structure as described under point 11.
To solve a vehicle routing problem, perform the following steps:
1.) Make a HTTP POST to this URL
https://routing.server.stadtlandnetz.de/api/1/vrp/optimize?key=<your_key>
It returns a job id (job_id).
2.) Take the job id and fetch the solution for the vehicle routing problem from this URL:
https://routing.server.stadtlandnetz.de/api/1/vrp/solution/<job_id>?key=<your_key>
We recommend to query the solution every 500ms until it returns 'status=finished'.
Note: Since the workflow is a bit more cumbersome and since you lose some time in fetching the solution, you should always prefer the synchronous endpoint. You should use the batch mode only for long running problems.
22 Request
Request
curl -X POST -H "Content-Type: application/json" "https://routing.server.stadtlandnetz.de/api/1/vrp/optimize?key=api_key" -d '{ "vehicles": [ { "vehicle_id": "my_vehicle", "start_address": { "location_id": "berlin", "lon": 13.406, "lat": 52.537 } } ], "services": [ { "id": "hamburg", "name": "visit_hamburg", "address": { "location_id": "hamburg", "lon": 9.999, "lat": 53.552 } }, { "id": "munich", "name": "visit_munich", "address": { "location_id": "munich", "lon": 11.57, "lat": 48.145 } } ]}'
23 Result
200 A jobId you can use to retrieve your solution from the server - see solution endpoint.
200 Result
{ "job_id": "44886560-b584-4da5-b245-768151dacd8f" }
RESPONSE HEADERS
X-RateLimit-Limit integer
Your current daily credit limit.X-RateLimit-Remaining integer
Your remaining credits until the reset.X-RateLimit-Reset integer
The number of seconds that you have to wait before a reset of the credit count is done.X-RateLimit-Credits integer
The credit costs for this request. Note it could be a decimal and even negative number, e.g. when an async request failed.
RESPONSE SCHEMA: application/json
job_id string <uuid>
UUID. Unique id for your job/request with which you can fetch your solution
400 Error occurred when reading the request. Request is invalid.
400 Result
{ "message": "Bad Request", "hints": [ { "message": "unsupported json property [vehiles]. allowed properties: [vehicles, vehicle_types, services, shipments, relations, algorithm, objectives, cost_matrices, configuration]", "details": "class java.lang.IllegalArgumentException" } ], "status": "finished" }
RESPONSE SCHEMA: application/json
message string
Short error messagehints Array of objects (ErrorMessage)
Optional error information.status stringDefault: "finished"
status
500 Error occurred on server side.
500 Result
{ "code": 500, "message": "There has been an internal server error." }
RESPONSE SCHEMA: application/json
code integer <int32>Default: 500 message string
Details
3 GET
the solution (batch mode)
31 General
Take the job id and fetch the solution for the vehicle routing problem from this URL:
https://routing.server.stadtlandnetz.de/api/1/vrp/solution/<job_id>?key=<your_key>
You get the job id by sending a vehicle routing problem to the batch mode URL.
32 Request
Request
curl -X GET "https://routing.server.stadtlandnetz.de/api/1/vrp/solution/job_id?key=api_key"
33 Result
200 A response containing the solution
200 Result
{ "copyrights": [ "Stadt.Land.Netz", "OpenStreetMap contributors" ], "job_id": "d62fcadd-c84a-4298-90b5-28550125bec5", "status": "finished", "waiting_time_in_queue": 0, "processing_time": 459, "solution": { "costs": 438, "distance": 17994, "time": 4094, "transport_time": 4094, "completion_time": 4172, "max_operation_time": 2465, "waiting_time": 78, "service_duration": 0, "preparation_time": 0, "no_vehicles": 2, "no_unassigned": 0, "routes": [ { "vehicle_id": "vehicle-2", "distance": 10618, "transport_time": 2465, "completion_time": 2465, "waiting_time": 0, "service_duration": 0, "preparation_time": 0, "points": [ { "coordinates": [ [ 13.40608, 52.53701 ], [ 13.40643, 52.53631 ], [ 13.40554, 52.53616 ], [ 13.4054, 52.53608 ], [ 13.40445, 52.53513 ], [ 13.40436, 52.53509 ], [ 13.40428, 52.53508 ], [ 13.40463, 52.53419 ], [ 13.40451, 52.53419 ], [ 13.4034, 52.53401 ], [ 13.403, 52.53359 ], [ 13.40291, 52.53354 ], [ 13.40268, 52.53347 ], [ 13.39888, 52.53259 ], [ 13.39839, 52.53253 ], [ 13.39812, 52.53251 ], [ 13.39616, 52.53243 ], [ 13.39579, 52.5324 ], [ 13.38973, 52.53173 ], [ 13.39163, 52.53025 ], [ 13.38797, 52.52935 ], [ 13.38763, 52.52996 ] ], "type": "LineString" }, { "coordinates": [ [ 13.38763, 52.52996 ], [ 13.38739, 52.53039 ], [ 13.38724, 52.53036 ], [ 13.38464, 52.52929 ], [ 13.38538, 52.52871 ], [ 13.38634, 52.52792 ], [ 13.38638, 52.52779 ], [ 13.38657, 52.52763 ], [ 13.38676, 52.52741 ], [ 13.38698, 52.52713 ], [ 13.38704, 52.52701 ], [ 13.38753, 52.524 ], [ 13.3877, 52.52307 ], [ 13.3878, 52.52282 ], [ 13.38788, 52.52252 ], [ 13.38802, 52.52174 ], [ 13.38519, 52.52009 ], [ 13.38539, 52.5191 ], [ 13.38548, 52.51852 ], [ 13.38042, 52.51819 ], [ 13.38071, 52.5167 ], [ 13.38076, 52.51652 ], [ 13.38084, 52.51634 ], [ 13.3821, 52.51396 ], [ 13.38055, 52.51365 ] ], "type": "LineString" }, { "coordinates": [ [ 13.38055, 52.51365 ], [ 13.38229, 52.514 ], [ 13.38363, 52.51429 ], [ 13.3848, 52.51445 ], [ 13.38504, 52.51358 ], [ 13.39124, 52.51397 ], [ 13.3911, 52.51488 ], [ 13.39303, 52.51499 ], [ 13.39317, 52.5141 ], [ 13.39548, 52.51419 ], [ 13.39571, 52.51421 ] ], "type": "LineString" }, { "coordinates": [ [ 13.39571, 52.51421 ], [ 13.39695, 52.51434 ], [ 13.39674, 52.51523 ], [ 13.39742, 52.51531 ], [ 13.39873, 52.51558 ], [ 13.39846, 52.51599 ], [ 13.39825, 52.51729 ], [ 13.39805, 52.51755 ], [ 13.39892, 52.51761 ], [ 13.39917, 52.51764 ], [ 13.39964, 52.51775 ], [ 13.40009, 52.51791 ], [ 13.40034, 52.51797 ], [ 13.4021, 52.51864 ], [ 13.40288, 52.51896 ], [ 13.40375, 52.51936 ], [ 13.40498, 52.52001 ], [ 13.40463, 52.5203 ], [ 13.40311, 52.52144 ], [ 13.40442, 52.52189 ], [ 13.40448, 52.52192 ], [ 13.40451, 52.52195 ], [ 13.40473, 52.52199 ], [ 13.40504, 52.52208 ], [ 13.40572, 52.52235 ], [ 13.40687, 52.52294 ], [ 13.40693, 52.52299 ], [ 13.40706, 52.52319 ], [ 13.40738, 52.52378 ], [ 13.40787, 52.52443 ], [ 13.4079, 52.52453 ], [ 13.40938, 52.52401 ], [ 13.40962, 52.52398 ], [ 13.41001, 52.52395 ], [ 13.41072, 52.52391 ], [ 13.41215, 52.52389 ], [ 13.41233, 52.52386 ], [ 13.4131, 52.5235 ], [ 13.41288, 52.52333 ], [ 13.41475, 52.52247 ], [ 13.41496, 52.52264 ], [ 13.41523, 52.52251 ], [ 13.41633, 52.52338 ], [ 13.41631, 52.52346 ], [ 13.41654, 52.52364 ], [ 13.41684, 52.52351 ] ], "type": "LineString" }, { "coordinates": [ [ 13.41684, 52.52351 ], [ 13.41654, 52.52364 ], [ 13.41631, 52.52346 ], [ 13.4163, 52.52344 ], [ 13.41587, 52.52363 ], [ 13.41572, 52.5235 ], [ 13.41409, 52.5242 ], [ 13.41454, 52.52461 ], [ 13.41454, 52.52466 ], [ 13.41358, 52.52508 ], [ 13.41366, 52.52514 ], [ 13.41344, 52.52525 ], [ 13.4133, 52.52514 ], [ 13.41316, 52.5252 ], [ 13.41107, 52.52585 ], [ 13.41118, 52.52606 ], [ 13.41118, 52.52616 ], [ 13.41095, 52.52664 ], [ 13.41097, 52.52678 ], [ 13.41084, 52.52706 ], [ 13.41057, 52.52747 ], [ 13.41028, 52.52809 ], [ 13.41032, 52.52821 ], [ 13.4102, 52.52847 ], [ 13.40999, 52.52875 ], [ 13.40984, 52.52905 ], [ 13.40982, 52.52914 ], [ 13.40984, 52.52926 ], [ 13.4104, 52.52998 ], [ 13.4105, 52.53001 ], [ 13.41064, 52.53016 ], [ 13.41082, 52.5303 ], [ 13.41198, 52.53107 ], [ 13.4122, 52.53128 ], [ 13.41232, 52.53143 ], [ 13.41247, 52.53192 ], [ 13.41267, 52.53245 ], [ 13.41275, 52.53259 ], [ 13.41215, 52.5327 ], [ 13.40731, 52.53463 ], [ 13.40608, 52.53701 ] ], "type": "LineString" } ], "activities": [ { "type": "start", "location_id": "berlin", "address": { "location_id": "berlin", "lat": 52.537, "lon": 13.406 }, "end_time": 1554804329, "end_date_time": null, "distance": 0, "driving_time": 0, "preparation_time": 0, "waiting_time": 0, "load_after": [ 0 ] }, { "type": "pickupShipment", "id": "7fe77504-7df8-4497-843c-02d70b6490ce", "location_id": "13.387613_52.529961", "address": { "location_id": "13.387613_52.529961", "lat": 52.529961, "lon": 13.387613 }, "arr_time": 1554804789, "arr_date_time": null, "end_time": 1554804789, "end_date_time": null, "waiting_time": 0, "distance": 2012, "driving_time": 460, "preparation_time": 0, "load_before": [ 0 ], "load_after": [ 1 ] }, { "type": "deliverShipment", "id": "7fe77504-7df8-4497-843c-02d70b6490ce", "location_id": "13.380575_52.513614", "address": { "location_id": "13.380575_52.513614", "lat": 52.513614, "lon": 13.380575 }, "arr_time": 1554805344, "arr_date_time": null, "end_time": 1554805344, "end_date_time": null, "waiting_time": 0, "distance": 4560, "driving_time": 1015, "preparation_time": 0, "load_before": [ 1 ], "load_after": [ 0 ] }, { "type": "service", "id": "s-4", "location_id": "13.395767_52.514038", "address": { "location_id": "13.395767_52.514038", "lat": 52.514038, "lon": 13.395767 }, "arr_time": 1554805632, "arr_date_time": null, "end_time": 1554805632, "end_date_time": null, "waiting_time": 0, "distance": 5887, "driving_time": 1303, "preparation_time": 0, "load_before": [ 0 ], "load_after": [ 1 ] }, { "type": "service", "id": "s-3", "location_id": "13.416882_52.523543", "address": { "location_id": "13.416882_52.523543", "lat": 52.523543, "lon": 13.416882 }, "arr_time": 1554806253, "arr_date_time": null, "end_time": 1554806253, "end_date_time": null, "waiting_time": 0, "distance": 8486, "driving_time": 1924, "preparation_time": 0, "load_before": [ 1 ], "load_after": [ 2 ] }, { "type": "end", "location_id": "berlin", "address": { "location_id": "berlin", "lat": 52.537, "lon": 13.406 }, "arr_time": 1554806794, "arr_date_time": null, "distance": 10618, "driving_time": 2465, "preparation_time": 0, "waiting_time": 0, "load_before": [ 2 ] } ] }, { "vehicle_id": "vehicle-1", "distance": 7376, "transport_time": 1629, "completion_time": 1707, "waiting_time": 78, "service_duration": 0, "preparation_time": 0, "points": [ { "coordinates": [ [ 13.40608, 52.53701 ], [ 13.40674, 52.53571 ], [ 13.40433, 52.53313 ], [ 13.40271, 52.53149 ], [ 13.40246, 52.53121 ], [ 13.40148, 52.52999 ], [ 13.40128, 52.52993 ], [ 13.40118, 52.52988 ], [ 13.40133, 52.5296 ], [ 13.40138, 52.52951 ], [ 13.40167, 52.52914 ], [ 13.40188, 52.52895 ], [ 13.398, 52.52885 ], [ 13.39289, 52.52748 ], [ 13.39354, 52.5264 ], [ 13.39358, 52.52628 ], [ 13.39324, 52.52575 ], [ 13.39334, 52.52573 ], [ 13.39339, 52.52584 ] ], "type": "LineString" }, { "coordinates": [ [ 13.39339, 52.52584 ], [ 13.3934, 52.52599 ], [ 13.39358, 52.52628 ], [ 13.39354, 52.5264 ], [ 13.39242, 52.52823 ], [ 13.39381, 52.52852 ], [ 13.38973, 52.53173 ], [ 13.38717, 52.5315 ], [ 13.38678, 52.5315 ], [ 13.38641, 52.53147 ], [ 13.38617, 52.53143 ], [ 13.38607, 52.53155 ], [ 13.38526, 52.53225 ], [ 13.38501, 52.53252 ], [ 13.38316, 52.53418 ], [ 13.38179, 52.5355 ], [ 13.38084, 52.53523 ], [ 13.38081, 52.53531 ], [ 13.3795, 52.53677 ], [ 13.37941, 52.53682 ], [ 13.37935, 52.53683 ], [ 13.37919, 52.53682 ], [ 13.37617, 52.5361 ], [ 13.37502, 52.53698 ], [ 13.37584, 52.53734 ] ], "type": "LineString" }, { "coordinates": [ [ 13.37584, 52.53734 ], [ 13.37566, 52.53726 ], [ 13.37515, 52.53763 ], [ 13.37644, 52.53841 ], [ 13.37807, 52.53935 ], [ 13.37946, 52.5402 ], [ 13.3796, 52.54019 ], [ 13.37984, 52.54021 ], [ 13.37988, 52.54012 ], [ 13.38062, 52.53936 ], [ 13.38169, 52.53832 ], [ 13.38236, 52.5377 ], [ 13.38363, 52.53661 ], [ 13.38492, 52.53555 ], [ 13.38613, 52.53447 ], [ 13.38757, 52.53338 ], [ 13.38791, 52.53354 ], [ 13.38812, 52.53368 ], [ 13.38833, 52.53392 ], [ 13.38977, 52.53518 ], [ 13.39003, 52.53539 ], [ 13.39256, 52.53701 ], [ 13.39316, 52.53739 ], [ 13.39327, 52.53744 ], [ 13.3936, 52.53757 ], [ 13.40155, 52.53982 ], [ 13.40357, 52.53715 ], [ 13.40372, 52.53719 ], [ 13.40465, 52.53727 ], [ 13.4048, 52.53726 ], [ 13.4059, 52.53736 ], [ 13.40608, 52.53701 ] ], "type": "LineString" } ], "activities": [ { "type": "start", "location_id": "berlin", "address": { "location_id": "berlin", "lat": 52.537, "lon": 13.406 }, "end_time": 1554804329, "end_date_time": null, "distance": 0, "driving_time": 0, "preparation_time": 0, "waiting_time": 0, "load_after": [ 0 ] }, { "type": "service", "id": "s-2", "location_id": "13.393364_52.525851", "address": { "location_id": "13.393364_52.525851", "lat": 52.525851, "lon": 13.393364 }, "arr_time": 1554804743, "arr_date_time": null, "end_time": 1554804743, "end_date_time": null, "waiting_time": 0, "distance": 1884, "driving_time": 414, "preparation_time": 0, "load_before": [ 0 ], "load_after": [ 1 ] }, { "type": "service", "id": "s-1", "location_id": "13.375854_52.537338", "address": { "location_id": "13.375854_52.537338", "lat": 52.537338, "lon": 13.375854 }, "arr_time": 1554805251, "arr_date_time": null, "end_time": 1554805329, "end_date_time": null, "waiting_time": 78, "distance": 4205, "driving_time": 922, "preparation_time": 0, "load_before": [ 1 ], "load_after": [ 2 ] }, { "type": "end", "location_id": "berlin", "address": { "location_id": "berlin", "lat": 52.537, "lon": 13.406 }, "arr_time": 1554806036, "arr_date_time": null, "distance": 7376, "driving_time": 1629, "preparation_time": 0, "waiting_time": 0, "load_before": [ 2 ] } ] } ], "unassigned": { "services": [], "shipments": [], "breaks": [], "details": [] } } }
RESPONSE HEADERS
X-RateLimit-Limit integer
Your current daily credit limit.X-RateLimit-Remaining integer
Your remaining credits until the reset.X-RateLimit-Reset integer
The number of seconds that you have to wait before a reset of the credit count is done.X-RateLimit-Credits integer
The credit costs for this request. Note it could be a decimal and even negative number, e.g. when an async request failed.
RESPONSE SCHEMA: application/json
copyrights Array of strings status string
Indicates the current status of the jobEnum: "waiting_in_queue" "processing" "finished"waiting_time_in_queue integer <int64>
Waiting time in msprocessing_time integer <int64>
Processing time in ms. If job is still waiting in queue, processing_time is 0solution object (Solution)
Only available if status field indicatesfinished
.
400 Error occurred on client side such as invalid input.
400 Result
{ "message": "Bad Request", "hints": [ { "message": "unsupported json property [vehiles]. allowed properties: [vehicles, vehicle_types, services, shipments, relations, algorithm, objectives, cost_matrices, configuration]", "details": "class java.lang.IllegalArgumentException" } ], "status": "finished" }
RESPONSE SCHEMA: application/json
message string
Short error messagehints Array of objects (ErrorMessage)
Optional error information.status stringDefault: "finished"
status
404 Requested solution could not be found.
404 Result
{ "message": "Invalid job_id 73314c89-ee4b-459c-aca4-0ad6d6e558da", "status": "finished" }
RESPONSE SCHEMA: application/json
message string
Error messagestatus stringDefault: "finished"
status
500 Error occurred on server side.
500 Result
{ "code": 500, "message": "There has been an internal server error." }
RESPONSE SCHEMA: application/json
code integer <int32>Default: 500 message string
Details