Reverse Production Iteration
POST/api/manufacturing/manufacturing-orders/1/production-iterations/0fa1c2bb-8b1b-4c5a-9d63-1f4b5e6d7c80/reverse
Reverses a production iteration: restores input FIFO layers, deletes the output layer (if not yet drawn from), rolls back actuals on the component/output lines, decrements completed_quantity on the MO, and writes a production_reversed audit event. Refuses with 422 if already reversed, mismatched MO, or downstream-drawn.
Request body:
reason(string, optional, max 1000) — free-text reason for the reversal
Failure modes (422 JSON with discriminator code):
iteration_already_reverseddownstream_draw_blocks_reverse— carriesdetails.layer_id,details.fulfilled_quantity,details.original_quantityiteration_belongs_to_other_mo
Success: 200 with the refreshed ManufacturingOrderResource.
Request
Responses
- 200
- 422
OK
Response Headers
Content-Type
Unprocessable Entity
Response Headers
Content-Type