Skip to content
BolderBolder API
Esc
navigateopen⌘Jpreview

Create a volume discount

Creates a new volume discount for a shop. Volume discounts automatically apply tiered pricing when a customer orders above a unit threshold. shop_id is required in the body.

POST/volume_discounts
Authorization
AuthorizationBearer token (JWT) · headerrequired
Request body
requiredapplication/json
shop_idintegerrequired
ID of the shop to create the volume discount in
namestringrequired
discount_typestring
Discount type.
cumulative_modestring
Omit for non-cumulative
Allowed:within_productglobal
apply_on_tier_start_onlyboolean
tiersobject[]required
Show properties
Array of object
frominteger
Units in cart at which this tier starts applying
valueinteger
Discount value for this tier
Responses
201Volume discount created
_linksHalLinks
idinteger
namestring
discount_typestring
apply_modestring
repeating_tierboolean
tiersobject
Keyed by tier boundary — not an array.
cumulativeboolean
cumulative_modestring
available_forstring
created_atstring<date-time>
updated_atstring<date-time>
422Validation error
Request
curl -X POST "https://api.onbolder.com/v2/volume_discounts" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "shop_id": 1,
  "name": "Buy 5+ get 10% off",
  "discount_type": "percentage",
  "tiers": [
    {
      "from": 5,
      "value": 10
    },
    {
      "from": 10,
      "value": 15
    },
    {
      "from": 20,
      "value": 20
    }
  ]
}'
Response
{
  "id": 30,
  "name": "Buy 5+ get 10% off",
  "discount_type": "percentage",
  "tiers": {
    "5": 10,
    "10": 15,
    "20": 20
  },
  "_links": {
    "self": {
      "href": "https://api.onbolder.com/v2/volume_discounts/30"
    }
  }
}