Developers

Products

Markdown

Update a product price

Sets the price and the price before discount. Requires If-Match.

PATCH/stores/{storeId}/v1/products/{id}/prices

A change of more than 90% up or down is rejected with PRICE_CHANGE_TOO_LARGE, to protect the merchant from an app error.

Path parameters

idstringrequired

Headers

If-Matchstringrequired

Request body

pricestringrequired
old_pricestring | null

Response

dataobjectrequired
idinteger
resource_versioninteger
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.required ready
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

HTTPCodeMeaning
428PRECONDITION_REQUIREDNo If-Match header.
412RESOURCE_CHANGEDThe resource changed after you read it; read it again.
422PRICE_CHANGE_TOO_LARGEChange larger than 90%.

Shared codes are listed in Errors.

    ↑↓ moveEnter openEsc close