Inbound demand of a site over a window (dock-scheduling read model)
GET/inbound-demand
The BOOKED INBOUND dock appointments at a site whose door window STARTS in the half-open window [window_start, window_end), read from the LOCAL read model this service builds from dock-scheduling's DockAppointmentBooked / Rescheduled / Cancelled / NoShow CloudEvents (docs/adr/0017, source switched by docs/adr/0020; never a live call). A rescheduled appointment counts at its new window; a cancelled or no-show one never counts, whatever the arrival order of the events (the producer's aggregate version is the ordering guard). OUTBOUND appointments are never counted. labour_minutes is what the standard declared for path_id attributes to them; with no standard it is 0 and standard_missing is true when appointments exist. Each appointment is attributed to the site_id of its events, so location is that site code; a site with no appointment reads 0. 200 with appointments 0 and as_of null when nothing is known.
Request
Responses
- 200
- 400
- 500
The inbound demand (possibly empty).
location or path_id missing, window_start/window_end missing or not RFC 3339, or a window whose end is not after its start.
An unexpected failure (a store or outbox error). Answered as problem+json (internal-error). A 5xx answer is never stored under an Idempotency-Key and rolls back the aggregate change and its outbox rows, so the retry re-executes.