# stock\_batch.purchased

Stock batch purchased

A stock batch was bought and queued for production, by you or by auto-reorder; `origin` says which. One checkout buying several batches sends one event per batch, sharing `purchase_reference`.

Sent as a signed POST to every endpoint subscribed to `stock_batch.purchased`. Signing, retries and deduplication work the same for every event; see [how delivery works](https://public-api.dapi.digital/docs/guides/webhooks.md#delivery).

## Payload

The event.

-   `id` (string): Unique identifier of the event, prefixed with `evt_`. Treat it as an opaque string: store it and compare it, never parse it.
-   `object` (string): Names the type of this object. Always `event`.
-   `type` (string)
-   `created_at` (timestamp): When it happened.
-   `data` (object): The object as it is now, exactly as its GET endpoint returns it, and what changed.
    -   `object` (StockBatch): One purchase of a stock in one region: how many units were bought, how many are made and how many orders have used.
        
        Described in [the stock batch object](https://public-api.dapi.digital/docs/reference/stocks.md#stock_batch_object).
        
    -   `previous` (object or null): The fields that changed, with their values before the change. Null when nothing changed, as on creation.
    -   `region` (value or null): Always null: only `stock.low` names a region.

## Related events

-   [`stock_batch.completed`](https://public-api.dapi.digital/docs/reference/events/stock_batch.completed.md)

**Payload**

```json
{
  "id": "evt_bfP0GSqKoZFrD72H5Os0rc7HV9XP6eQJu",
  "object": "event",
  "type": "stock_batch.purchased",
  "created_at": "2026-10-14T10:02:00Z",
  "data": {
    "object": {
      "id": "bat_bfP0GSqKoZFrD72H5Os0rc7HV9XP6eQJu",
      "object": "stock_batch",
      "stock": {
        "id": "stk_bfP0GSqKoZFrD72H5Os0rc7HV9XP6eQJu",
        "object": "stock",
        "name": "Clicker 50 pack"
      },
      "region": {
        "id": "reg_bfP0GSqKoZFrD72H5Os0rc7HV9XP6eQJu",
        "object": "region",
        "name": "Western Europe"
      },
      "status": "queued",
      "batches": 2,
      "units": {
        "purchased": 100,
        "made": 60,
        "used": 20,
        "available": 40
      },
      "price_paid": {
        "amount": 60000,
        "currency": "usd"
      },
      "unit_price": {
        "amount": 600,
        "currency": "usd"
      },
      "purchase_reference": "ST-8KD2X",
      "origin": "manual",
      "purchased_at": "2026-09-30T10:00:00Z",
      "completed_at": null
    },
    "previous": null,
    "region": null
  }
}
```

---

3DAPI API Docs. This page on the web: https://public-api.dapi.digital/docs/reference/events/stock_batch.purchased. Index of every page: https://public-api.dapi.digital/docs/llms.txt.
