Skip to main content

Record completion of a released work unit

POST 

/work-units/:id/completions

deprecated

This endpoint has been deprecated and may be replaced or removed in future versions of the API.

Finishes a released work unit — the RecordCompletion use case. Transitions Released → Completed and publishes WorkUnitCompleted, which updates backlog telemetry projections. Enforces the WorkUnit aggregate's at-most-once-completion invariant: completing an already completed unit, or one that was never released, returns 409. This endpoint is also the target of the additive TaskCompleted Kafka consumer (Task 8) — fulfillment-execution's task completion drives the exact same use case as this HTTP call. Superseded by the TaskCompleted consumer (K14): fulfillment-execution publishes task completion on Kafka and this service consumes it to drive the same use case; removal planned with the next breaking window.

Request​

Responses​

The completed work unit, now in Completed state.

Response Headers
    Idempotency-Replayed

    Present, with value true, only when this answer is a replay of a stored earlier answer for the same Idempotency-Key.