# Retrieve solution of a route optimization job Take the job id and fetch the solution for the vehicle routing problem from this URL: You get the job id by sending a vehicle routing problem to the batch mode URL. Endpoint: GET /vrp/solution/{jobId} Version: 1.0.0 Security: api_key ## Path parameters: - `jobId` (string, required) Request solution with jobId ## Response 200 fields (application/json): - `copyrights` (array) Example: ["GraphHopper","OpenStreetMap contributors"] - `status` (string) Indicates the current status of the job Enum: "waiting_in_queue", "processing", "finished" - `waiting_time_in_queue` (integer) Waiting time in ms Example: 300000 - `processing_time` (integer) Processing time in ms. If job is still waiting in queue, processing_time is 0 Example: 900000 - `solution` (object) Only available if status field indicates . - `solution.distance` (integer) Overall distance travelled in meter, i.e. the sum of each route's transport distance Example: 1200 - `solution.transport_time` (integer) Overall time travelled in seconds, i.e. the sum of each route's transport time. Example: 12000 - `solution.max_operation_time` (integer) Operation time of longest route in seconds. Example: 4000 - `solution.waiting_time` (integer) Overall waiting time in seconds. Example: 200 - `solution.service_duration` (integer) Overall service time in seconds. Example: 1200 - `solution.preparation_time` (integer) Overall preparation time in seconds. - `solution.completion_time` (integer) Overall completion time in seconds, i.e. the sum of each routes/drivers operation time. Example: 12000 - `solution.no_vehicles` (integer) Number of employed vehicles. Example: 10 - `solution.no_unassigned` (integer) Number of jobs that could not be assigned to final solution. Example: 1 - `solution.routes` (array) An array of routes - `solution.routes.vehicle_id` (string) Id of vehicle that operates route Example: "driver-stefan" - `solution.routes.distance` (integer) Distance of route in meter Example: 10000 - `solution.routes.transport_time` (integer) Transport time of route in seconds Example: 1800 - `solution.routes.completion_time` (integer) Completion time of route in seconds Example: 1800 - `solution.routes.waiting_time` (integer) Waiting time of route in seconds - `solution.routes.service_duration` (integer) Service duration of route in seconds - `solution.routes.preparation_time` (integer) Preparation time of route in seconds - `solution.routes.activities` (array) Array of activities - `solution.routes.activities.type` (string) type of activity Enum: "start", "end", "service", "pickupShipment", "deliverShipment", "pickup", "delivery", "break" - `solution.routes.activities.id` (string) Id referring to the underlying service or shipment, i.e. the shipment or service this activity belongs to - `solution.routes.activities.location_id` (string) Id that refers to address - `solution.routes.activities.address` (object) Address of activity - `solution.routes.activities.address.location_id` (string) Specifies the id of the location. Example: "550e8400-e29b-11d4-a716-446655440000" - `solution.routes.activities.address.name` (string) Name of location. Example: "Queens Victoria Street 70, Second Floor, Flat 245" - `solution.routes.activities.address.lon` (number) Longitude of location. Example: -0.092869 - `solution.routes.activities.address.lat` (number) Latitude of location. Example: 51.512665 - `solution.routes.activities.address.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. Example: "Queens Victoria Street 70" - `solution.routes.activities.address.snapped_waypoint` (object) Access point to the (road)network. It is only available if is true (be default it is false). - `solution.routes.activities.arr_time` (integer) Arrival time at this activity in seconds. If type is , this is not available (since it makes no sense to have at start). However, is available and actually means \"departure time\" at start location. It is important to note that does not necessarily mean \"start of underlying activity\", it solely means arrival time at activity location. If this activity has no time windows and if there are no further preparation times, is equal to activity start time. - `solution.routes.activities.end_time` (integer) End time of and thus departure time at this activity. If type is , this is not available (since it makes no sense to have an at end) at each activity is equal to the departure time at the activity location. - `solution.routes.activities.end_date_time` (string) Translation of unix timestamp in to end date time string with zone offset. It will be in the following ISO-8601 format: 2007-12-03T10:15:30+01:00. - `solution.routes.activities.arr_date_time` (string) Translation of unix timestamp in to arrival date time string with zone offset. It will be in the following ISO-8601 format: 2007-12-03T10:15:30+01:00. - `solution.routes.activities.waiting_time` (integer) Waiting time at this activity in seconds. A waiting time can occur if the activity has at least one time window. If < a waiting time of - occurs. - `solution.routes.activities.preparation_time` (integer) preparation time at this activity in seconds - `solution.routes.activities.distance` (integer) cumulated distance from start to this activity in m - `solution.routes.activities.driving_time` (integer) cumulated driving time from start to this driver activity in seconds - `solution.routes.activities.load_before` (array) Array with size/capacity dimensions before this activity - `solution.routes.activities.load_after` (array) Array with size/capacity dimensions after this activity - `solution.routes.points` (array) Array of route planning points - `solution.routes.points.type` (string) - `solution.routes.points.coordinates` (array) - `solution.unassigned` (object) - `solution.unassigned.services` (array) An array of ids of unassigned services Example: ["service-1","service-3"] - `solution.unassigned.shipments` (array) An array of ids of unassigned shipments Example: ["shipment-5"] - `solution.unassigned.breaks` (array) An array of ids of unassigned breaks - `solution.unassigned.details` (array) An array of details, i.e. reason for unassigned services or shipments - `solution.unassigned.details.id` (string) Id of unassigned service/shipment - `solution.unassigned.details.code` (integer) Reason code Code | Reason :------|:--------- 1 | cannot serve required skill 2 | cannot be visited within time window 3 | does not fit into any vehicle due to capacity 4 | cannot be assigned due to max distance constraint of vehicles 21 | could not be assigned due to relation constraint 22 | could not be assigned due to allowed vehicle constraint 23 | could not be assigned due to max-time-in-vehicle constraint 24 | driver does not need a break 25 | could not be assigned due to disallowed vehicle constraint 26 | could not be assigned due to max drive time constraint 27 | could not be assigned due to max job constraint 28 | could not be assigned due to max activity constraint 29 | could not be assigned due to group relation constraint 30 | could not be assigned due to driving time break 50 | underlying location cannot be accessed over road network by at least one vehicle - `solution.unassigned.details.reason` (string) Human readable reason as listed above - `solution.costs` (integer) - `solution.time` (integer) Use instead. ## Response 400 fields (application/json): - `message` (string) Short error message Example: "Bad Request" - `hints` (array) Optional error information. - `hints.message` (string) error message Example: "unsupported json property [vehiles]. allowed properties: [vehicles, vehicle_types, services, shipments, relations, algorithm, objectives, cost_matrices, configuration]" - `hints.details` (string) Details Example: "class java.lang.IllegalArgumentException" - `status` (string) status Example: "finished" ## Response 404 fields (application/json): - `message` (string) Error message Example: "Invalid job_id 73314c89-ee4b-459c-aca4-0ad6d6e558da" - `status` (string) status Example: "finished"