Skip to content

Set a product’s quantity breaks and price list prices

PUT
/products/{id}/prices
curl --request PUT \
--url https://example.com/products/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/prices \
--header 'Content-Type: application/json' \
--cookie bottle.session_token=<bottle.session_token> \
--data '{ "consumerBreaks": [ { "fromQuantity": 1, "unitPrice": 1, "priceIncludesVat": true } ], "tradeBreaks": [ { "fromQuantity": 1, "unitPrice": 1, "priceIncludesVat": true } ], "priceLists": [ { "rateSetId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "price": { "unitPrice": 1, "priceIncludesVat": true }, "breaks": [ { "fromQuantity": 1, "unitPrice": 1, "priceIncludesVat": true } ] } ] }'

Replaces the quantity breaks on the Consumer and Trade rows, and on each price list sent, and sets or (price null) clears each list’s price. A price list left out is left as it is. The Consumer and Trade prices themselves change with PATCH /products/{id}. Breaks start at 2 or more, each from more than the last, at most ten a row. Who pays what: a customer’s own agreed price, then their price list’s price, then the Trade price for trade customers or the Consumer price for everyone else. Quantity breaks go with whichever price applies. Orders already taken keep their prices.

id
required

UUID v7

string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

UUID v7

Media typeapplication/json
object
consumerBreaks
required
Array<object>
<= 10 items

From this many of the product in one order, every one of them is this unit price (“10 or more: £30.00 each”).

object
fromQuantity
required
integer
>= 2 <= 100000
unitPrice
required
integer
<= 100000000
priceIncludesVat
required
boolean
tradeBreaks
required
Array<object>
<= 10 items

From this many of the product in one order, every one of them is this unit price (“10 or more: £30.00 each”).

object
fromQuantity
required
integer
>= 2 <= 100000
unitPrice
required
integer
<= 100000000
priceIncludesVat
required
boolean
priceLists
required
Array<object>
<= 200 items
object
rateSetId
required

UUID v7

string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
price
required
object
unitPrice
required
integer
<= 100000000
priceIncludesVat
required
boolean
breaks
required
Array<object>
<= 10 items

From this many of the product in one order, every one of them is this unit price (“10 or more: £30.00 each”).

object
fromQuantity
required
integer
>= 2 <= 100000
unitPrice
required
integer
<= 100000000
priceIncludesVat
required
boolean

The price table, as saved

Media typeapplication/json
object
productId
required

UUID v7

string format: uuid
consumer
required
object
unitPrice
required
integer
priceIncludesVat
required
boolean
breaks
required
Array<object>

From this many of the product in one order, every one of them is this unit price (“10 or more: £30.00 each”).

object
fromQuantity
required
integer
>= 2 <= 100000
unitPrice
required
integer
<= 100000000
priceIncludesVat
required
boolean
trade
required
object
unitPrice
required
integer | null
priceIncludesVat
required
boolean
breaks
required
Array<object>

From this many of the product in one order, every one of them is this unit price (“10 or more: £30.00 each”).

object
fromQuantity
required
integer
>= 2 <= 100000
unitPrice
required
integer
<= 100000000
priceIncludesVat
required
boolean
priceLists
required
Array<object>
object
rateSetId
required

UUID v7

string format: uuid
name
required
string
colour
required
string | null
unitPrice
required
integer | null
priceIncludesVat
required
boolean
breaks
required
Array<object>

From this many of the product in one order, every one of them is this unit price (“10 or more: £30.00 each”).

object
fromQuantity
required
integer
>= 2 <= 100000
unitPrice
required
integer
<= 100000000
priceIncludesVat
required
boolean
Example
{
"productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"priceLists": [
{
"rateSetId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
}
]
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not a member, or without the permission this needs

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

No such product, or a price list that is not this business’s

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

A price list sent is archived

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Validation failed, or a deposit, rent or delivery

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}