Schema
OrderCreate
Body of POST /orders. Unknown keys are rejected with the list of accepted ones, so a typo fails loudly instead of being ignored. There is NO payment_method_id / shipping_id: the API exposes those ids on no resource, so a client would have nowhere to read them from. The order inherits the payment method and shipping saved on the CUSTOMER — exactly like the dashboard's on-behalf checkout. Prices, promos, surcharges, the frozen IVA and the stock decrement are resolved server-side by the same pipeline the manager checkout uses. The request states WHAT to order; the server decides what it costs.
Ejemplo
Campo
| Campo | Tipo | Flags | Notas |
|---|---|---|---|
customer_id | string | requerido | Numeric customer id. 404 when it is not a customer of this negocio, 422 when the customer is blocked. |
items | OrderItemInput[] | requerido | At least one row. An empty array is rejected. |
shipping_address | Address | Optional. Defaults to the customer's saved address. Components matching an address the customer already has reuse it instead of adding a copy. | |
observaciones | string | Customer-facing note, shown on the order. | |
internal_notes | string | Internal note, never shown to the customer. | |
notify_customer | boolean | true sends the customer the usual order confirmation email. Defaults to false — a machine-placed order stays silent unless you ask for it. |
