Register (or upsert) one capacity constraint
POST/process-capacities
Upserts one named constraint (LABOR, LOCATION, EQUIPMENT, STATION, CONVEYOR, BUFFER or REPLENISHMENT) on the ProcessCapacity identified by (process_type, location, window_start, window_end), creating the aggregate on first registration. Returns the recomputed effective rate (the minimum across every registered constraint) and which constraint is binding. The window is the aggregate's identity: this endpoint (like GET /process-capacities) uses EXACT-key semantics. When path capacity or a capacity plan is computed, a registered window applies to the requested planning window if it COVERS it (docs/adr/0003).
Request
Responses
- 201
- 400
- 409
- 422
- 500
Constraint registered; effective capacity recomputed.
Response Headers
Present, with the value "true", only when the answer is a replay of an earlier request with the same Idempotency-Key.
Malformed JSON body (malformed-json), window_start/window_end not RFC 3339 (malformed-window-start / malformed-window-end), a window whose end is not after its start (invalid-capacity-window), a NUL character in the body (malformed-request-body), or the Idempotency-Key header is missing (idempotency-key-required) or malformed (idempotency-key-invalid).
Constraint rate unit does not match the aggregate's established native unit (unit-mismatch), or the Idempotency-Key was already used with a different request (idempotency-key-reused).
Negative quantity (negative-quantity) or a non-positive period_seconds (non-positive-period).
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.