/api/orders/{id}Replace an order and its lines
Updates an order by replacing its full set of order details and lines. Provide customerId, source, and at least one line with all required line fields; this operation replaces the order rather than changing only the fields you send. The returned order contains the updated details and lines.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
The unique identifier of the order to replace.
Replacement order details and lines.
The unique identifier of the customer placing the order.
How the order was received: phone, walk_in, email_import, or self_service.
The day it ships. Production and packing group by this, not the order date (D-14).
An order-level note.
The replacement order lines. Include at least one line; each line requires itemId, qty, rawBaked, loosePacked, and sliced.
Order id.
Human-facing, ORD-YYMM-NNN.
Customer id.
The customer's type AT ORDER TIME — it may change later, and the order keeps what it was sold under.
The day the order was taken.
The day it ships — what production and packing group by (D-14).
Order-level note.
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.
error string describing the problem.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 the order is not found; a 409 for a conflict; and a 500 for an unexpected server error. The id path parameter must identify an order. customerId, source, and lines are required, lines must contain at least one item, and each line must include itemId, qty, rawBaked, loosePacked, and sliced; the enum fields must use their listed values.