shop.stock.depleted
Version 1 of the shop.stock.depleted webhook event.
A published Shop listing's finite stock reached zero: the last counted unit was bought, or the last unclaimed code was drawn from its pool. This is the operational signal a tenant needs to restock before Players hit a sold-out listing, and it is the one catalog event with no polling substitute. It is emitted by the system rather than by a tenant action, so it carries no actor; sold-out is a published, readable state, not an error.
| Event type | shop.stock.depleted |
| Schema version | 1 |
| Routing key | event.shop.stock.depleted.v1 |
| Produced by | Reward Management |
| Schema | urn:defendr:contract:shop:stock-depleted:1 |
data fields
| Field | Type | Required | Description |
|---|---|---|---|
listingKey | string | yes | |
revision | integer | yes | |
policy | "counted", "code-pool" | yes | |
remaining | 0 | yes | Always zero: the event exists to report depletion. |
depletedAt | string (date-time) | yes |
Some fields are required only in particular states. The JSON Schema below is authoritative.
Example delivery
Signed with the example secret whsec_placeholder_example_webhooks_signing_secret, so you can check your verifier against it. See Verifying signatures.
POST /your/webhook/endpoint HTTP/1.1
content-type: application/json
webhook-id: whd_00000000-0000-4000-8000-000000000032
webhook-timestamp: 1800000000
webhook-signature: v1,ZRF0rFEUIF92YN6/EykLa7QSxwnCsQac+lZXsbBh4Ew=
tanitar-event-type: shop.stock.depleted
tanitar-schema-version: 1
tanitar-delivery-attempt: 1
{"messageId":"evt_00000000-0000-4000-8000-000000000032","kind":"event","type":"shop.stock.depleted","schemaVersion":1,"occurredAt":"2027-01-15T10:00:00.000Z","producer":"reward-management-service","accountId":"acc_11111111-1111-4111-8111-111111111111","correlationId":"corr_00000000-0000-4000-8000-000000000032","data":{"listingKey":"tournament-ticket","revision":2,"policy":"code-pool","remaining":0,"depletedAt":"2026-09-27T00:00:00.000Z"}}The same body, formatted:
{
"messageId": "evt_00000000-0000-4000-8000-000000000032",
"kind": "event",
"type": "shop.stock.depleted",
"schemaVersion": 1,
"occurredAt": "2027-01-15T10:00:00.000Z",
"producer": "reward-management-service",
"accountId": "acc_11111111-1111-4111-8111-111111111111",
"correlationId": "corr_00000000-0000-4000-8000-000000000032",
"data": {
"listingKey": "tournament-ticket",
"revision": 2,
"policy": "code-pool",
"remaining": 0,
"depletedAt": "2026-09-27T00:00:00.000Z"
}
}JSON Schema
urn:defendr:contract:shop:stock-depleted:1
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:defendr:contract:shop:stock-depleted:1",
"title": "Shop listing stock depleted",
"description": "A published Shop listing's finite stock reached zero: the last counted unit was bought, or the last unclaimed code was drawn from its pool. This is the operational signal a tenant needs to restock before Players hit a sold-out listing, and it is the one catalog event with no polling substitute. It is emitted by the system rather than by a tenant action, so it carries no actor; sold-out is a published, readable state, not an error.",
"type": "object",
"additionalProperties": false,
"required": [
"listingKey",
"revision",
"policy",
"remaining",
"depletedAt"
],
"properties": {
"listingKey": {
"type": "string",
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"revision": {
"type": "integer",
"minimum": 1
},
"policy": {
"enum": [
"counted",
"code-pool"
]
},
"remaining": {
"const": 0,
"description": "Always zero: the event exists to report depletion."
},
"depletedAt": {
"type": "string",
"format": "date-time"
}
}
}