POST/api/packing/orders/{id}/lines

Add an un-ordered line to a packing order

Adds a line for an item the customer did not order but that the packer placed in the box. Supply itemId and a positive qty; the line is recorded as both ordered and packed, and only the new line is priced. The returned order includes the added line, which arrives complete and does not block the packing confirmation gate.

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

1 parameter · 8 body fields
idstringrequired
The unique identifier of the order to add the packing line to.

The item and quantity for a line the packer placed in the box.

itemIdstringrequired
The SKU.
qtynumberrequired
What went in the box. Recorded as BOTH the ordered and the packed quantity, so the line arrives `done`.
rawBakedstringoptional
Whether the item is raw or baked. Defaults to baked when omitted.
Allowed:rawbakedDefault:baked
loosePackedstringoptional
Whether the item is loose or packed. Defaults to packed when omitted.
Allowed:loosepackedDefault:packed
slicedstringoptional
Whether the item is sliced or not sliced. Defaults to not_sliced when omitted.
Allowed:slicednot_slicedDefault:not_sliced
caseQtyintegeroptional
The number of units per case.
locationIdintegeroptional
Which shelf it came off (PK-1). Optional.
lineNotestringoptional
A note for the packing line.

7 status codes
201Returns the order with the new packing line included.
idstringoptional
Order id.
orderNumberstringoptional
Human-facing, `ORD-YYMM-NNN`.
customerIdstringoptional
Customer id.
customerNamestringoptional
customerTypeSnapshotstringoptional
The customer's type AT ORDER TIME — it may change later, and the order keeps what it was sold under.
orderDatestringoptional
The day the order was taken.
requestedDeliveryDatestringoptional
The day it ships — what production and packing group by (D-14).
statusstringoptional
Allowed:draftconfirmedin_productionpackingshippingshippedclosed
sourcestringoptional
Allowed:phonewalk_inemail_importself_service
specialInstructionsstringoptional
Order-level note.
createdByIdstringoptional
createdByNamestringoptional
createdAtstringoptional
fromRecurringIdstringoptional
The standing order that generated this one (R6). Null for every hand-taken order. Note the `source` does NOT distinguish one: a generated order says `phone`, because the OrderSource enum was deliberately left untouched.
linesarray<object>optional
400Returned when the input is invalid; the response includes an `error` string describing the problem.
errorstringrequired
401Returned when the request is unauthenticated; sign in before calling this operation.
errorstringrequired
403Returned when the authenticated user lacks the required department membership or role.
errorstringrequired
404Returned when a requested resource is not found.
errorstringrequired
409Returned when the request conflicts with the current state.
errorstringrequired
500Returned when an unexpected server error occurs.
errorstringrequired

Error handling

A 400 is returned for invalid input; a 401 when the request is unauthenticated; a 403 when the authenticated user lacks the required department membership or role; a 404 when a requested resource is not found; a 409 for a conflict; and a 500 for an unexpected server error. The id path parameter must identify an order. itemId and qty are required, qty must be greater than zero, and rawBaked, loosePacked, and sliced must use their listed enum values when supplied.