Dispatch last-mile delivery tasks to drivers using the Onfleet API

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

Steps

  1. Authenticate all requests using HTTP Basic Auth with your Onfleet API key as the username and an empty password
  2. POST to https://onfleet.com/api/v2/tasks with a destination (address or lat/lng), recipient (name, phone), and optional notes, pickupTask flag, and completionRequirements (e.g. signature, photo)
  3. Assign the task to a worker by including the worker field in the creation body, or leave it unassigned for auto-dispatch
  4. Trigger auto-dispatch for a team by POST to https://onfleet.com/api/v2/teams/{teamId}/dispatch; Onfleet optimizes task assignment to on-duty drivers
  5. Track driver location and task status in real time by listening to Onfleet webhooks (register via the dashboard or API) for task events such as taskStarted, taskCompleted, and taskFailed
  6. Query GET https://onfleet.com/api/v2/tasks/{taskId} to retrieve the latest completion details including proof of delivery

Known gotchas

Related routes

Create and auto-dispatch last-mile tasks using the Onfleet REST API
docs.onfleet.com · 6 steps · unrated
Auto-dispatch a team's pending tasks to on-duty Onfleet drivers via the API
docs.onfleet.com · 5 steps · unrated
Implement real-time driver location tracking for a last-mile delivery using a polling or webhook push model
food-general · 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