Here’s an example JSON payload. When sent to the routing engine, these instructions will request the optimal route for a single vehicle, vehicle_1, starting at Killarney, East Vancouver and ending at VanDusen Botanical Gardens that needs to visit locations ABC-123, DEF-456 and GHI-789 in some order. The time windows, durations and location (latitude and longitude) of each visit are specified with the JSON object of each visit.
Create VRP Request
POSThttps://routing-engine.afi.io/vrp-long
The vrp-long endpoint finds an optimal assignment of visits to vehicles that minimizes the overall travel distance of the vehicle fleet while meeting constraints (capacities, time windows, shift times etc). This endpoint can solve both the Traveling Salesman (single vehicle) and Vehicle Routing (multiple vehicles) Problems.
The /vrp-long endpoint will trigger a long-running background task on our servers. This might take a while, so instead of returning the route solution immediately, the vrp-long endpoint returns a job_id:
which you can use to obtain the route solution when the background task is complete. To get the full route solution, use the job_id and make a GET request to the following endpoint:
The dashboard has a link (click the map icon on the right) to an interactive map based interface that you can use to explore your route solution in greater detail.
When the job is finished, the status is set to finished and the solution to the request is now in the output object of the response. You can view the input, output, running time and error messages (if any) on the dashboard at . The dashboard also allows you to add or revoke API keys and generate an automated that you can use for testing.
The map can also be accessed directly with this link: . Both the dashboard and map interface come included with the out of the box installation of our routing engine and route optimization API ( for demo and pricing).