# Event types

> Every webhook event and when it is sent.

Source: https://docs.delivr.no/webhooks/events/

Subscribe to the events you need with `PUT /v1/merchant/webhook/events`, or leave the list empty to get all of them. `webhook.test` is always delivered. Every event has the same envelope; see [Receiving webhooks](/webhooks/).

## Status events

| Event                   | Sent when                                                                                                                                                                            | Useful `data`                  |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------ |
| `order.placed`          | The order is placed (`placed`, or `awaiting_goods` on demand). For a held order, when the sale completes. A successor order sends its own. **Create the order in your system here.** | `predecessorId` on a successor |
| `order.scheduled`       | A window order is booked on its window.                                                                                                                                              | `window`                       |
| `order.searching`       | On demand: goods released, driver search started.                                                                                                                                    |                                |
| `order.driver_assigned` | On demand: a driver accepted. Sent on the first accept only.                                                                                                                         | `sale` on a held order         |
| `order.picked_up`       | The driver has the goods.                                                                                                                                                            |                                |
| `order.delivered`       | Delivered.                                                                                                                                                                           | `proofOfDelivery`              |
| `order.cancelled`       | Cancelled.                                                                                                                                                                           | `reason`                       |
| `order.failed`          | Failed. Your fallback policy may follow.                                                                                                                                             | `reason`                       |

## Fulfilment events

| Event                    | Sent when                                                                                                                                        | Useful `data`              |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
| `order.ready_at_changed` | You stated when the goods will be ready.                                                                                                         | `readyAt`                  |
| `order.ready_overdue`    | The goods are due (`readyBy`) and not reported ready. Send `processing` or `ready`, or the order fails `goods_not_ready` after the grace period. |                            |
| `order.window_changed`   | Booked on another window than quoted, after `onWindowFull: reschedule`.                                                                          | `window`, `previousWindow` |

## Fallback events

| Event                      | Sent when                              | Useful `data`                             |
| -------------------------- | -------------------------------------- | ----------------------------------------- |
| `order.awaiting_recipient` | The recipient may choose a window.     | `choiceDeadline`                          |
| `order.successor_created`  | A failed order got a window successor. | `successorId`                             |
| `order.fallback_cancelled` | No successor follows the failed order. | `fallbackReason` (`expired`, `no_window`) |

## Assisted checkout

| Event        | Sent when                                                                                                                                  |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `order.held` | An order is held for a sale still pending at your checkout. It is **not** an order-creation trigger: `order.placed` follows `POST …/sale`. |

## Test

| Event          | Sent when                                                                                |
| -------------- | ---------------------------------------------------------------------------------------- |
| `webhook.test` | You call `POST /v1/merchant/webhooks/test`. `data.test` is `true` and there is no order. |

The [API reference](/api/) has the full schema of every event.