Create a product discount
Creates a new product discount with configurable conditions, amounts, and targeting rules. Supports coupons, vouchers, automatic conditions, and quantity/subtotal thresholds.
Note: At least one of amount_off, percent_off, shipping_amount_off,
or shipping_percent_off must be greater than zero.
Body Parameters
product_discountDisplay name for the discount
Condition required to activate the discount
all_ordersitem_subtotalitem_quantitycouponvouchersWhat products this discount applies to
selected_productsselected_categoriesall_productsCurrency code for amount-based discounts (e.g. EUR, USD)
Fixed amount discount on product price in smallest currency unit
Percentage discount on product price (0-100)
Percentage discount on shipping cost (0-100)
Fixed amount discount on shipping cost in smallest currency unit
Whether the discount is currently active
Coupon code (required when condition is "coupon")
Maximum number of times this coupon can be redeemed (0 for unlimited)
Whether to block affiliate commissions when this discount is used
Method for creating vouchers (required when condition is "vouchers")
autogeneratedlistNumber of vouchers to auto-generate (required when voucher_method is "autogenerated")
Prefix for auto-generated voucher codes
Voucher codes (required when voucher_method is "list")
Minimum amount for item/order conditions (required when condition is "item_subtotal" or "item_quantity")
Additional order-level condition
order_subtotalorder_shippingorder_quantityDate when the discount expires (null for no expiry)
How long the discount applies to subscriptions
onceforeverrepeatingNumber of months for repeating subscription discounts (required when subscription_discount_duration is "repeating")
Duration in months for recurring discounts
Product UUIDs (required when applies_to is "selected_products")
Product categories (required when applies_to is "selected_categories")
Countries this discount applies to
Payment methods this discount applies to
Responses
Product discount created successfully
Validation or business-logic error. Possible error_code values:
1002– ResourceNotFound: one or more product UUIDs not found10239– FairUseLimitReached: maximum number of discounts reached10273– DiscountMissingParameters: required conditional parameters missing (products/categories)10274– DiscountTypeAlreadyExists: duplicate all_orders + all_products discount
Unauthorized – invalid or missing Bearer token