Commerce
Volume / bulk discount break API
Finds the qualifying quantity-break discount for an order, the resulting unit and line price, and how many more units unlock the next break. Answers 'What bulk discount applies at 75 units?', 'How many more units to the next price break?'.
Price$0.02per request
MethodPOST
Route/v1/commerce/volume-discount
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
commercepricingvolume-discountbulkquantity-breakwholesalediscountordering
API URL
Integration docshttps://x402.hexl.dev/v1/commerce/volume-discountExample request
{
"listPrice": 10,
"quantity": 75,
"breaks": [
{
"minQty": 50,
"discountPct": 5
},
{
"minQty": 100,
"discountPct": 10
}
]
}Example response
{
"listPrice": 10,
"quantity": 75,
"appliedBreak": {
"minQty": 50,
"discountPct": 5
},
"discountPct": 5,
"unitPrice": 9.5,
"lineTotal": 712.5,
"totalSaved": 37.5,
"nextBreak": {
"minQty": 100,
"discountPct": 10
},
"unitsToNextBreak": 25,
"interpretation": "75 units qualify for the 5% break -> $9.5/unit, line $712.5; 25 more units unlock 10%."
}Input schema
{
"type": "object",
"required": [
"listPrice",
"quantity",
"breaks"
],
"properties": {
"listPrice": {
"type": "number",
"examples": [
10
]
},
"quantity": {
"type": "integer",
"examples": [
75
]
},
"breaks": {
"type": "array",
"examples": [
[
{
"minQty": 50,
"discountPct": 5
},
{
"minQty": 100,
"discountPct": 10
}
]
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}