# Delivery API

> Send an order, a bot carries it from pickup to dropoff.

A delivery is one order a robot carries from a pickup to a dropoff. You create it; REMI assigns a bot, drives it, and reports every step.

```steps
pending: Waiting for a bot
going_to_pickup: Heading to pickup
at_pickup: Loading
going_to_dropoff: On the way
at_dropoff: Unloading
delivered: Done
```

## How it works

1. Register your places once: a [location and its points](https://docs.remi.robot.com/delivery/setup).
2. [Create a delivery](https://docs.remi.robot.com/delivery/reference#createDelivery) with a pickup, a dropoff and its packages.
3. REMI assigns a free bot and starts it. Follow it by polling or with [webhooks](https://docs.remi.robot.com/delivery/webhooks).
4. At the pickup, staff [load the bot](https://docs.remi.robot.com/delivery/loading). At the dropoff, the customer takes the order.

## The calls you will use

| Call | When |
| --- | --- |
| `POST /delivery` | Create a delivery. |
| `GET /delivery/{id}` | Read it. |
| `POST /delivery/{id}/load/start`, `/load/finish` | At the pickup: open the door, then confirm the load. |
| `POST /delivery/{id}/unload/start`, `/unload/finish` | At the dropoff: open the door, then confirm the hand-off. |
| `POST /delivery/{id}/cancel` | Call it off. |

Everything else is in the [API reference](https://docs.remi.robot.com/delivery/reference).

## Two kinds of delivery

- `standard`: a bot delivers it. The default.
- `pickup_only`: the customer collects it at the counter, with no bot. See [Pickup-only orders](https://docs.remi.robot.com/delivery/pickup-only).
