Plan a delivery route with Spoke
create_routeOptimizes and saves one driving route for one driver with 1–20 delivery stops, from the addresses and settings the user confirmed in the address panel. Use this when a user asks what order to visit delivery addresses, wants an efficient driving route between multiple stops, or wants a route they can open and share. Takes the single-use token the panel issues when the user clicks Optimize route. Returns the stops in optimized order, estimated duration and distance, the route geometry, and route links. Every call creates a new route, and anyone with the returned link can view its addresses. Does not enforce delivery time windows, and not for package tracking, public transit, multiple drivers, or live-traffic estimates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirmationToken | No | Single-use token returned when the user clicks Optimize in the address panel. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stops | Yes | ||
| routeUrl | Yes | ||
| driverUrl | Yes | ||
| startTime | Yes | ||
| dispatchUrl | Yes | ||
| distanceUnit | Yes | ||
| ignoredFields | Yes | ||
| distanceMeters | Yes | ||
| estimateNotice | Yes | ||
| durationMinutes | Yes | ||
| encodedPolyline | Yes | Saved driving route overview in Google encoded polyline format (precision 5). Empty when route geometry is unavailable. | |
| timeAtStopMinutes | Yes |