Delivery API
Load and unload
Open the door, confirm the load, and finish one prep station at a time.
At each stop there are two calls: start opens the door, finish confirms. Only finish moves the delivery on.
| Stop | Open the door | Confirm | Then |
|---|---|---|---|
Pickup (at_pickup) | POST /delivery/{id}/load/start | POST /delivery/{id}/load/finish | going_to_dropoff |
Dropoff (at_dropoff) | POST /delivery/{id}/unload/start | POST /delivery/{id}/unload/finish | delivered |
finishcloses the door and sends the bot on.finishin any other state is a400, also right after a successfulfinish. Do not retry it blindly: read the delivery.
Several prep stations
An order can come from several stations, like counters in a food hall. Create one package per station:
"packages": [
{ "reference": "burger-pkg", "station": "Burger Shop" },
{ "reference": "pizza-pkg", "station": "Neapolitan" }
]Each station then finishes its own part with POST /delivery/{id}/load/finish/target:
{ "station": "Burger Shop" }Or one package with { "package": "burger-pkg" }. Each package reports loaded, and the bot leaves when every package is loaded. Repeating a target is safe.
After a
409on the targeted route, do not fall back to the plainload/finish: it loads everything and sends the bot off.
Bots whose lid a person closes
On bots with manual_close_door: true (see Get a bot), finish does nothing: the load or unload completes a few seconds after the lid reports closed. Calling finish anyway is harmless.
Dropoff auto-close
At locations where Robot.com turned it on, unload/start starts a timer. When it runs out, the bot closes its lid, checks the compartment is empty, and completes the delivery as unload/finish would. A later unload/finish answers 200.
The door on its own
The Engine API can open or close a bot's door outside this flow: Open or close a bot door. It needs a key with the engine scope.