POST
/products
Create a product
POST /products
Adds a product to the catalog. The SKU must be unique across the shop; new products start with the given stock level (default 0) and are sellable immediately.
Request body
Required.
Content type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
sku |
string | yes | Merchant SKU — must be unique across the shop. |
name |
string | yes | Display name shown in the shop. |
description |
string | no | Short marketing copy for product pages. |
category |
string | yes | Category slug the product is listed under. |
price |
number (double) | yes | Unit price in EUR. |
stock |
integer | no | Initial stock level. |
imageUrl |
string (uri) | no | CDN URL of the primary product image. |
Responses
201 — Created
| Property | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) | yes | Public ID of the product. |
sku |
string | yes | Merchant SKU — unique across the shop. |
name |
string | yes | Display name shown in the shop. |
description |
string | no | Short marketing copy for product pages. |
category |
string | yes | Category slug, e.g. garden-tools. |
price |
number (double) | yes | Unit price in EUR, the shop's base currency. |
stock |
integer | yes | Units currently in stock. |
imageUrl |
string (uri) | no | CDN URL of the primary product image. |
createdAt |
string (date-time) | no | When the product was added to the catalog. |
422 — Validation failed
| Property | Type | Required | Description |
|---|---|---|---|
code |
string | yes | Stable, machine-readable error code — branch on this, not on the message. |
message |
string | yes | Human-readable explanation, intended for logs and debugging. |