Logo
Emporix Digital Commerce Platform API Documentation

Updating price by id

PUT {{api-url}}/price/{{tenant}}/prices/{{priceId}}

Modifies an existing price by its price ID for a given product.
The endpoint is available in the following versions: v1 and v2.
The second version of the endpoint introduces new fields in the request. Moreover, some fields known from version v1 become deprecated. In order to check details of changes for version v2 check data schema of the request body.

Required scopes

  • price.price_manage

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
X-Version
string The version of the schema that should be used in the request/response payload
Content-Type
string
Accept
string




RESPONSES

status OK





Curl
curl -X PUT 'api-url/price/api-url/prices/api-url' -H 'X-Version: v2' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"itemId":{"itemType":"PRODUCT","id":"productId"},"itemYrn":"productId","currency":"EUR","location":{"countryCode":"DE"},"salePrice":{"discountRate":20,"description":"20% OFF, Amazing!"},"restrictions":{"validity":{"from":"2021-08-31T00:07:42.518Z","to":"2024-08-31T00:07:42.518Z"},"siteCodes":["main","secondSite"]},"tierValues":[{"priceValue":"15.00","id":"productId"},{"priceValue":"13.34","id":"productId"}],"priceModelId":"productId","mixins":{"test1":{"atr1":"test","atr2":"test2"},"test2":{"atr1":"test","atr2":"test2"}},"metadata":{"version":1,"mixins":{"test1":"url1","test2":"url2"}}}'

ENDPOINTS