Auto-dispatch a team's pending tasks to on-duty Onfleet drivers via the API

domain: docs.onfleet.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create an API key in Onfleet's Settings under 'API and Webhooks' using an active trial or paid account with admin access.
  2. Call the team dispatch endpoint (POST to a team's /dispatch path) to trigger Team Auto-Dispatch, which assigns unassigned tasks on the team to on-duty workers while keeping each driver's already-assigned tasks in place and interleaving new ones into their route.
  3. Optionally pass tuning parameters such as maxTasksPerRoute (default 100, max 200), taskTimeWindow, scheduleTimeWindow, serviceTime (default 2 minutes), routeEnd, and maxAllowedDelay (default 10 minutes) to control the dispatch behavior.
  4. Use the filters.workers object (maxContainerSize, vehicleType) to further constrain which drivers are eligible when a team has drivers with different capacities or vehicle types.
  5. Store the returned dispatchId and, since auto-dispatch runs asynchronously, listen for the autoDispatchJobCompleted webhook event rather than polling to know when the dispatch finished.

Known gotchas

Related routes

Create and auto-dispatch last-mile tasks using the Onfleet REST API
docs.onfleet.com · 6 steps · unrated
Dispatch last-mile delivery tasks to drivers using the Onfleet API
onfleet.com · 6 steps · unrated
Send job dispatch and status updates to a fleet through TomTom's WEBFLEET.connect API for a TMS integration
webfleet.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans