Create a product
POST/products
Creates a product and its variants as the acting user. The answer is the product, without stock.
Request
- Send at least one variant (
skuis required). - For a product without variant options, leave out
variant_groupsandvariant_values. - For a product with options, name them in
variant_groupsand select them per variant invariant_values(by name; never POS ids): POS reuses or creates the variant groups and values.variant_valueswithoutvariant_groupsanswer400 VALIDATION_FAILED. - Images are copied from the public HTTPS URLs you send (
attachments,variants[].attachment) before the product is saved. An image that cannot be used answers400 VALIDATION_FAILEDwith its field. - An unknown field is ignored.
Behaviour
- A SKU that is already used answers
409. - Use
Idempotency-Keyto retry safely. variants[].priceis required: leaving it out or sendingnullanswers400 VALIDATION_FAILEDonvariants[i].price;0is allowed.- With Price Management enabled, the supplied prices including zero initialize only generated new product/SKU cells. Values above 999999999999 answer 422. Product-create permission permits this initialization.
- Every active assigned outlet must be in the current actor's grants. This keeps the company-wide inherited-base meaning; X-Outlet-ID selects product visibility/read context. Canonical price/history/receipt/feed, final compatibility maxima and product.created outbox share the same transaction. Origin MAG-client suppression is retained. With the Price Management master switch off, company-wide legacy product configuration writes return 409 PRICE_ROLLOUT_PAUSED when any company outlet is prepared or was activated. No product, price, history, feed or product-change event is written. Unprepared legacy companies retain the existing compatibility semantics.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 422
The product
Error envelope
Error envelope
Error envelope
Error envelope
Error envelope
Error envelope