Skip to main content

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 (sku is required).
  • For a product without variant options, leave out variant_groups and variant_values.
  • For a product with options, name them in variant_groups and select them per variant in variant_values (by name; never POS ids): POS reuses or creates the variant groups and values. variant_values without variant_groups answer 400 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 answers 400 VALIDATION_FAILED with its field.
  • An unknown field is ignored.

Behaviour​

  • A SKU that is already used answers 409.
  • Use Idempotency-Key to retry safely.
  • variants[].price is required: leaving it out or sending null answers 400 VALIDATION_FAILED on variants[i].price; 0 is 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​

The product