Availability Events
Read the append-only demand-management log that records demand, stock, recalculation, and shortage events.
Overview
Availability events are the demand-management log. Each row is append-only (created_at only — events are never updated) and records why availability changed: a demand was created, updated, or released; stock moved; snapshots were recalculated; or a shortage was detected or cleared.
The event vocabulary is AvailabilityEventType (demand_created, demand_updated, demand_released, stock_changed, availability_recalculated, demand_overdue, shortage_detected, and the other cases on that enum). Writers are DemandObserver (demand lifecycle), RecalculationPipeline (snapshot refresh), and PipelineShortageEmitter (shortage detect/clear).
The ref on each event is availability_event:{id}.
API
| Method | URL | Summary | Ability | Weight |
|---|---|---|---|---|
GET | /api/v1/availability_events | List availability events, newest first | availability:read | 1 |
GET | /api/v1/availability_events/{availability_event} | Show a single availability event | availability:read | 1 |
Both endpoints require availability.view and the availability:read token ability. The index is filtered to the actor's accessible warehouses; show returns 404 (non-disclosure) for events outside that set. Owners and all_warehouses roles bypass the warehouse scope.
Filter the index with q[...] predicates — for example q[event_type_eq]=shortage_detected, q[catalogue_item_id_eq]=7, q[created_at_gteq]=2026-07-01. Default sort is newest first.
The curated MCP tool list-availability-events wraps the index. There is no write API and no curated write tool — the log is produced only by the engine.
Related
- Availability Engine — how snapshots and recalculation determine stock.
- Equipment Availability — the planning grid operators read.
- Shortages — how shortfalls are detected and resolved.