Skip to main content
PATCH
Update a volume discount

Authorizations

Authorization
string
header
required

Use a project API key from Settings > API Access. Send it as Authorization: Bearer wpk_.... See authentication and scopes for setup and permissions.

Headers

Idempotency-Key
string

Reuse this key for retries of the same write. Scoped to this API key; retained for 30 days, after which the key may be reused. Different requests with the same key return 409.

Required string length: 1 - 128
Pattern: ^[!-~]+$

Path Parameters

discount_id
integer
required

Body

application/json
name
string | null
Required string length: 1 - 200
scope
enum<string> | null

What the discount covers. Defaults to products on create.

Available options:
products,
category,
global
discount_type
enum<string> | null
Available options:
flat_discount,
buy_x_get_y,
bulk_discount,
tier_price,
progressive,
quantity_break
apply_to
enum<string> | null
Available options:
all_customers,
specific_groups,
logged_in
calculation_method
enum<string> | null
Available options:
replace_price,
discount_price,
compound
product_ids
integer[] | null

Replaces the linked products. Only for scope products.

Maximum array length: 500
Required range: x <= 9223372036854776000
category_id
integer | null

Only for scope category.

Required range: 0 < x <= 9223372036854776000
customer_group_ids
integer[] | null
Maximum array length: 200
Required range: x <= 9223372036854776000
start_date
string<date-time> | null
end_date
string<date-time> | null
priority
integer | null
Required range: -2147483648 <= x <= 2147483647
is_active
boolean | null
combine_with_other_discounts
boolean | null
requires_coupon
boolean | null
coupon_code
string | null
Maximum string length: 50
include_subcategories
boolean | null
product_filters
Product Filters · object | null
tiers
DiscountTierIn · object[] | null

Replaces every tier of the discount.

Maximum array length: 100

Response

OK

id
integer
required
name
string
required
scope
string
required
discount_type
string
required
apply_to
string
required
calculation_method
string
required
product_ids
integer[]
required
category_id
integer | null
required
customer_group_ids
integer[]
required
start_date
string<date-time> | null
required
end_date
string<date-time> | null
required
priority
integer
required
is_active
boolean
required
is_currently_active
boolean
required
combine_with_other_discounts
boolean
required
requires_coupon
boolean
required
coupon_code
string | null
required
include_subcategories
boolean
required
product_filters
Product Filters · object
required
tiers
DiscountTierOut · object[]
required
created_at
string<date-time>
required
updated_at
string<date-time>
required