Delivery API

Load and unload

Open the door, confirm the load, and finish one prep station at a time.

Markdown

At each stop there are two calls: start opens the door, finish confirms. Only finish moves the delivery on.

StopOpen the doorConfirmThen
Pickup (at_pickup)POST /delivery/{id}/load/startPOST /delivery/{id}/load/finishgoing_to_dropoff
Dropoff (at_dropoff)POST /delivery/{id}/unload/startPOST /delivery/{id}/unload/finishdelivered
  • finish closes the door and sends the bot on.
  • finish in any other state is a 400, also right after a successful finish. 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:

JSON
"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:

JSON
{ "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 409 on the targeted route, do not fall back to the plain load/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.