Send orders
Send in orders sold by your ERP, a B2B portal or a smaller marketplace.
With orders:write, POST /orders creates an order in Nucleo. It goes through the same steps as the sales channel's orders: Nucleo's routing rules choose the location, the warehouse receives it, and order.created is sent to every key that receives webhooks — yours included.
curl https://api-commerce.nucleoplatform.com/api/commerce/v1/orders \
-H "Authorization: Bearer $NUCLEO_COMMERCE_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 7d0c5e1a-2b3c-4d5e-8f9a-0b1c2d3e4f5a" \
-d '{
"channel_order_ref": "SO-2026-00871",
"number": "B2B-871",
"customer": { "name": "Anna Rossi", "email": "buyer@example.com" },
"shipping_address": { "first_name": "Anna", "last_name": "Rossi", "address1": "Via Emilia 120",
"city": "Modena", "postal_code": "41121", "country_code": "IT" },
"shipping": { "method_code": "standard", "price": "5.00", "tax_rate": 22 },
"lines": [ { "sku": "TEE-BLK-M", "quantity": 2, "unit_price": "29.90", "tax_rate": 22 } ]
}'- No duplicates.
channel_order_refis your own id of the order. Sending it again with the same key creates nothing: you get200with the order created the first time, unchanged (a new order answers201). If a call times out, send it again: you never get two orders. AnIdempotency-Keyalso replays the first answer exactly; it stores errors too, so after fixing a rejected request send it with a new key. - Number. Nucleo shows the order as
API-plus yournumber:B2B-871becomesAPI-B2B-871(GET /orders/API-B2B-871), so it never clashes with the sales channel's numbers. Use letters, digits,.,-and_, at most 40 characters. Withoutnumber,channel_order_refis used and must follow the same rule. A number another order already has answers409 number_taken. - Items must be known to Nucleo, with a barcode, by
skuorbarcode; if you send both, they must be the same item. One unknown or mismatched item rejects the whole order with400 unknown_item, with a message per line indetails. - Amounts are in EUR, tax included, with discounts already applied to
unit_price. Every line needs itstax_rate, and the shipping itsshipping.tax_ratewhen you sendshipping.price. Nucleo computes subtotal, tax (lines and shipping) and total;shipping.priceis added to the total. - Payment. The order is treated as paid: send orders that are ready to ship.
- Routing. If no routing rule covers the order, or no location of its rule has all the items in stock, it stays
on_holdand the merchant is alerted to add or fix the rule and route it again. - Notes.
notesreaches the merchant and the warehouse; the API does not return it. - Webhook.
order.createdalways carriesstatus: received; the status the order reaches next comes withorder.status_changed.
Orders created here cannot be changed or cancelled through the API yet: ask the merchant. Their status, shipments and tracking are read like any other order, and channel is nucleo_api.