Products
Create a product
Creates a hidden product. It appears in the store once its price is set and it is activated.
POST/stores/{storeId}/v1/products
A new product has status: inactive, price 0.00 and price_state: required. Sending price in the body also requires products.prices:write.
Headers
- Idempotency-Keystringrequired
Request body
- namestringrequired
- descriptionstring
- short_descstring
- imagestring | null
- imagesarray<string>
- image_altstring
- categorystring | null
- slugstring
- keywordsarray<string>
- supported_devicesarray<string>
- seo_titlestring
- seo_descriptionstring
- og_imagestring | null
- product_kindstringrequired
digitalservicephysical- pricestring
- old_pricestring | null
Response
- dataobjectrequired
- idinteger
- namestring
- descriptionstring
- short_descstring | null
- imagestring | null
- imagesarray<string>
- image_altstring | null
- categorystring | null
- Category name.
- slugstring | null
- keywordsarray<string>
- supported_devicesobject
- seo_titlestring | null
- seo_descriptionstring | null
- og_imagestring | null
- product_kindobject
digitalservicephysical- statusobject
activeinactive- pricestring
- Price in SAR.
- old_pricestring | null
- Price before discount.
- price_stateobject
- required until a price is set; a new product is created inactive with price 0.00.
requiredready - resource_versioninteger
- executionobject
- Who executed the request: the app, version, installation and store. Field names here are camelCase.
- appIdstring (uuid)
- versionIdstring (uuid)
- installationIdstring (uuid)
- storeIdstring (uuid)
- requestIdstring (uuid)
- generationinteger
- routeEpochinteger
- appAuthEpochinteger
- grantRevisioninteger
- metaobjectrequired
- request_idstring (uuid)
- The request ID; include it in any support request.
Errors
| HTTP | Code | Meaning |
|---|---|---|
| 400 | IDEMPOTENCY_KEY_REQUIRED | No Idempotency-Key header. |
| 422 | CATEGORY_NOT_FOUND | The category does not exist. |
| 422 | UNKNOWN_FIELD | Unknown field. |
Shared codes are listed in Errors.