PriceAdjustmentRequest Document (Shop API 16.4)

(supports custom properties)

Document representing a price adjustment request.

Use the level and item_id properties to specify where you want the price adjustment to be added: You can use the item_text and reason_code properties to describe the price adjustment.

The promotion_id property is optional. If you do not specify an id, one is automatically assigned (in the format 'dw.manual[n]', where [n] is 1, 2, 3...). If you specify an id, make sure that it is not already used for a price adjustment in the basket or for a promotion in the promotion engine.

You need to specify the value of the price adjustment by defining a discount from which the price adjustment is calculated. The discount definition consists of a type and a value.

The type amount describes a (unit) price discount, and its corresponding value (positive) defines the amount each unit is to be reduced. For example, for a $10 discount:

{ "discount" : {"type" : "amount", "value" : 10.00 }, ... }

The type percentage describes a percentage discount, and its corresponding value (positive) defines the percentage reduction. For example, for a 5% discount:

{ "discount" : {"type" : "percentage", "value" : 5 }, ... } The type fixed_price describes a fixed price discount, and its corresponding value (positive) defines the resulting fixed price for the item. Only one fixed_price discount can be set for each item. For example, to fix a $15 price for the item:

{ "discount" : {"type" : "fixed_price", "value" : 15.00 }, ... }

The type fixed_price is not applicable at the order level.
Property Type Constraints Description
discount DiscountRequest   A discount that you can specify instead of a price. When defining a discount, you must specify a type and a value.
item_id String   The item to which the price adjustment should be added, depending on the specified level. If the level is 'order', you need not specify an item id. If 'shipping', specify the uuid of the shipping item. If 'product', specify the uuid of the product item.
item_text String   The text describing the item in more detail.
level Enum {product, shipping, order} mandatory=true, nullable=false The level at which the adjustment is applied. When a product or shipping level is specified, you must also specify the item id.
promotion_id String   The id of the related promotion. Custom price adjustments can be assigned any promotion id so long it is not used by a price adjustment belonging to the same item and is not used by promotion defined in the promotion engine. If not specified, a promotion id is generated.
reason_code String   The reason why this price adjustment was made.
OCAPI obsolete versions 13.x and 14.x will be end of life in 2020 and versions 15.x and 16.x in 2021. For dates and more information, see the OCAPI versioning and deprecation policy and this Knowledge Article.
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.