PUT /products/:id/price-groups
Parameters
id
: The identifier as specified when the product was created
Request properties
The request format is the same as the response, a map indexed by price groups and each can contain the properties detailed in the Response section.
All price groups have to be present in the request body for a product, if a group is missing its pricing will be deleted.
Removing all custom pricing per price groups can be done by sending a request with an empty map.
Status codes
200
on success400
on invalid input
Response
Response format is a map indexed by price groups and each can contain the following properties:
price
: The integer price in cents, if availablepricing
: Optional scaled pricing setupstrategy
: The pricing strategy, one of"VOLUME"
,"INCREMENTAL"
, or"DIVISIBLE"
price_points
: The prices used in the pricing based on the quantity of items.from
: The number of items the price point is applied fromprice
: The price for one item
date_overrides
: An array of date periods where the price points are different from the default ones. Each item of the array can have the following properties:from_date
: The start of the validity for the date override. Can be open ended if noto_date
is given.to_date
: The last day of the date range. It is inclusive, the override is still valid on this date.price_points
: The price points to be used for this date range or from this start date.
Example request and response
When the response status is 200, the response will be the same as the request.
{
"group-1": {
"price": 750
},
"premier": {
"price": 725,
"pricing": {
"strategy": "VOLUME",
"price_points": [
{
"from": 1,
"price": 725
},
{
"from": 100,
"price": 699
}
]
}
}
}