POST /api/v1/orders — Places an order on behalf of an existing customer. It does not reimplement pricing: it drives the very same pipeline as the dashboard's manual checkout, so the customer's price list, promos, surcharges, the frozen IVA and the stock decrement all come out identical. That is why the body says WHAT to order and never what it costs. Identify each product by its numeric id or its code, and send 'option_id' whenever the product has variants. Returns 201 with the created order; 404 when the customer does not exist and 422 when the customer is blocked, a product is hidden or out of stock, or 'option_id' is missing on a product that has variants.
Carga un pedido a nombre de un cliente existente. No replica la lógica de precios: usa el mismo pipeline que el checkout manual del panel, así que la lista de precios del cliente, las promos, los recargos, el IVA congelado y el descuento de stock salen exactamente iguales. Por eso el body dice QUÉ pedir y nunca cuánto cuesta. Identificá cada producto por su id numérico o por su código, y mandá 'option_id' cuando el producto tenga variantes. Devuelve 201 con el pedido creado; 404 si el cliente no existe y 422 si está bloqueado, si un producto está oculto o sin stock, o si falta el 'option_id' de un producto con variantes.
The server resolves prices, promos, surcharges, tax and stock — a line's cost is never taken from the request.
json
{"customer_id":"8801","items":[{"product_id":"REM-001","option_id":"555","quantity":3},{"product_id":"9202","quantity":1}],"observaciones":"Entregar por la mañana","notify_customer":false}
// 201 — el pedido creado, con el mismo shape que GET /orders/{id}{"id":"6","created_at":"2026-05-15T12:00:00Z","customer_id":"8801","status":"Nuevo","voided":false,"subtotal":13500.0,"discount":675.0,"surcharge":0.0,"tax":0.0,"total":12825.0,"items":[{"product_id":"9201","name":"Remera Premium","option_id":"555","option_name":"Azul / M","sku":"REM-001-AZ-M","quantity":3}]}