PATCH/api/packing/items/{itemId}/pick

Pack one item across the day's orders in one write [Packaging]

The night's core write. A packer stands at one shelf with one item, fills every order that needs it, and submits the whole grid at once.

One transaction, all-or-nothing. Every line is validated before anything is written, and a single bad line rejects the batch untouched — a half-applied pick would leave the floor with quantities on some orders and no way to tell which.

Each accepted line gets the quantity, the derived status (done when the quantity is met, else short), the location it came from, and who packed it when. Its back-order is then reconciled by the same logic the per-line pack endpoint uses, so a shortfall can never drift between the two paths. The first pick moves the order confirmed or in_production → packing; an order already further along is left alone.

Refused (400): a line for another item, a line on another delivery day, a line on a draft order, an unknown location, or the same line twice. 404: an unknown line.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 3 body fields
itemIdstringrequired
The item being picked. Every submitted line must belong to it.

The picked quantities.

datestringrequired
The delivery day being packed. Every line is checked against it — a tab left open overnight must not write yesterday's quantities onto today's board.
locationIdintegeroptional
Where the items were taken from (PK-1). OPTIONAL: the screen makes it a sticky picker, but shelves may not be labelled yet. Omit it and each line keeps the location it already had, rather than being wiped.
linesarray<object>required
One entry per order needing this item. The whole batch applies in ONE transaction — a single bad line rejects all of it.

6 status codes
200Applied. Carries the refreshed board row for this item.
datestringoptional
itemIdstringoptional
itemobjectoptional
The refreshed K2 row — splice it into the board instead of refetching the day.
linesPackedintegeroptional
ordersAdvancedarray<object>optional
Orders this pick moved to `packing`. Empty when every order was already there or further along.
400Invalid input — the `error` string says what was wrong.
errorstringrequired
401Not authenticated. Sign in first (see the Auth tag).
errorstringrequired
403Authenticated, but not allowed — this endpoint requires a department membership or a role you do not have.
errorstringrequired
404Not found.
errorstringrequired
500Unexpected server error.
errorstringrequired

Error handling

A 400 is returned: Invalid input — the error string says what was wrong. A 401 is returned: Not authenticated. Sign in first (see the Auth tag). A 403 is returned: Authenticated, but not allowed — this endpoint requires a department membership or a role you do not have. A 404 is returned: Not found. A 500 is returned: Unexpected server error.