Skip to main content

Fleet Optimization API

Multi-vehicle route optimization (VRP) powered by VROOM: you send JSON describing vehicles and tasks, you get back the optimal assignment and visit order. Distances come from the real OSRM road network — not straight lines.
Try it first? Switch the Live Demo to the Fleet Optimization tab: two vehicles, six tasks, one API call to assign and sequence everything.

Endpoint

Quickstart

Input: vehicles and tasks

Vehicle

Job

There are also shipments (pickup-then-delivery pairs) and more advanced fields — the full schema is in the Optimize (OpenAPI) section of the API Reference (auto-generated three-panel pages).
Time windows accept relative seconds or absolute UNIX timestamps — just be consistent within one request.

Getting route geometry back

Add "geometry": true to the request body and every route carries a polyline:

Response essentials

Time Windows

How time windows interact with timing fields A task’s time_windows constrain when its service starts; early arrivals wait. Two ways to express them:
  • Relative: [0, 14400] = within 4 hours of the planning horizon start
  • Absolute: real UNIX timestamps — then arrival values in the output are timestamps too

Size limits

  • Distance Matrix — compute matrices for your own solvers
  • VROOM API docs — the upstream full input/output schema (our hosted version is compatible)