Skip to main content

Get the staffing gap for a path within a committed shift plan

GET 

/paths/:pathId/staffing-gap

Read-model projection: plannedHeads (from the committed ShiftPlan for siteCode+shiftId) vs. currently active LaborAssignment count for pathId. Raises PathUnderstaffed when active assignments fall short of plannedHeads. This surfaces the gap only — it never decides or performs a rebalance; that stays a human call recorded via POST /associates/{id}/assignments. ShiftPlan is keyed by site+shift, so both are needed as query parameters alongside the path in the URL — a path's planned heads only make sense within one committed plan. siteCode is the canonical name (ADR 0035): it is the plan lookup key AND the associate scope (activeHeads counts only associates with an active shift at that site, ADR 0034). buildingId is the DEPRECATED alias for the plan lookup ONLY: a call that gives just buildingId is NOT scoped by site and counts fleet-wide, exactly as before. One of the two is required (neither is 400 missing-building-id). When both are given, buildingId is the plan key and siteCode the scope, as ADR 0034 defined.

Request​

Responses​

Staffing gap for this path within the committed plan.