Closes a production run and creates the inventory preparation event.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
The resulting state is DONE when every task is already DONE, otherwise PARTIALLY_DONE. This endpoint does not change task states — use Update Production Run Task Status first to mark tasks DONE.
Closing the run creates an inventory preparation event covering all stockable tasks, bringing the produced items into stock.
tasks
tasksPer-task inventory metadata. The tasks array is required but may be empty — send [] to finish with no overrides. Every task referenced here must already be in DONE state and must be a stockable (recipe-based) task — submitting an IN_PROGRESS or TODO task, or a custom task, returns 400. For each entry, quantity overrides the planned quantity used on the inventory event, while lot_number and expiry_date are recorded on it.
400The production run has not been started yet or has already been finished, the payload references tasks that do not belong to this run, includes a custom task, includes a task not yet in DONE state, or contains a duplicate lot_number.
403The user does not have permission to finish production runs.
404Production run not found.
409The production run is currently being modified by another request. Try again shortly.
