Delivery API
Track a delivery
States, polling and the tracker link.
States
A delivery's progress is one field: state.
| State | Meaning |
|---|---|
draft | Created with draft: true. Nothing happens until you publish it with PATCH and draft: false. |
pending | Waiting for a bot. |
going_to_pickup | A bot is on its way to the pickup. |
at_pickup | The bot is at the pickup. Load it now. |
going_to_dropoff | Loaded and on its way. |
at_dropoff | The bot is at the dropoff. Unload it now. |
delivered | Handed off. Final. |
going_to_return, at_return, returned | Canceled after loading, with a return set: the bot brings the order back. returned is final. |
canceled | Someone called it off. Final. |
failed | It could not be completed. Final. |
Pickup-only orders have their own states: see Pickup-only orders.
Next to state:
pausedis true while the delivery is on hold.statekeeps the leg it was on.arrivingis true while the bot approaches its next stop. Do not load on it: wait forat_pickup.
Follow a delivery
- Poll
GET /delivery/{id}, or use your own id with?id_type=external. - Or get every change at your URL: Webhooks.
- Give your customer
tracker_url, a live tracking page.
Timing
estimates.pickupandestimates.dropoffsay when the bot arrives and finishes at each stop.source: actualmeans it already happened.POST /delivery/etagives arrival times before you create a delivery.GET /delivery/{id}/routereturns the path left to drive, to draw on a map.
Cancel or pause
POST /delivery/{id}/cancelworks at any state before the end. After loading, with areturn_pointoroptions.return_enabled, the bot brings the order back.POST /delivery/{id}/pausestops the bot and alerts our operations team;resumecontinues. It is not an emergency stop.