/api/ordersCreate a draft order
Creates a new draft order with one or more item lines. Provide customerId, source, and lines; prices are resolved and recorded when you confirm the order, not when you create it. The server generates the order number and returns the created order with its lines.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
The customer, order source, and at least one order line.
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; and a 500 for an unexpected server error. customerId, source, and lines are required, lines must contain at least one item, and each line must include itemId, qty, rawBaked, loosePacked, and sliced. source, rawBaked, loosePacked, and sliced must use their listed enum values.