Discount Object
id string A unique identifier for the discount.
object string The value is always discount.
label string The label of the discount.
created_at timestamp The date the discount was created.
expiry_date timestamp The date the discount will expire.
currency string (currency code) The currency of the discount.
percent_off integer The percentage discount applied to the order and/or product subtotal.
amount_off integer The fixed amount discount applied to the order and/or product subtotal.
shipping_amount_off integer The fixed amount discount applied to the shipping subtotal.
shipping_percent_off integer The percentage discount applied to the shipping subtotal.
active boolean Shows whether the discount is currently active.
type string The possible values are customer_discount, product_discount and order_discount.
payments array of strings (payment codes) The payment whitelist for the discount.
block_affiliates boolean Shows whether the discount will apply for orders referred by affiliates.
destinations array of strings (Country codes) The country whitelist of the discount.
condition string The possible values are coupon, vouchers, all_orders, item_subtotal, order_subtotal, item_quantity and order_quantity.
applies_to string The possible values are all_products, selected_products and selected_categories.
rule_amount integer The amount that has to be met for the discount to activate. For example, 100 items in an order or a $100 order value. Provided if the condition is set to item_subtotal, order_subtotal, item_quantity or order_quantity.
subscription_discount_duration string Determines how the discount will be applied for subscriptions. The possible values are forever, once and repeating.
number_of_months integer The total number of months the discount will be applied for recurring subscriptions. Available if subscription_discount_duration is set to repeating.
domain string The id of the domain that this discount is valid for.
coupon string The actual coupon code. Available if condition is set to coupon.
coupon_max_redemptions integer The number of times that the coupon can be redeemed. Available if condition is set to coupon.
coupon_times_redeemed integer The number of times the coupon has been redeemed thus far.
products array of strings The product IDs associated with the discount. Available if applies_to is set to selected_products.
categories object An object containing the product categories that the discount applies to. Available if applies_to is set to selected_categories.
voucher_method string The possible values are autogenerated and list. Available if condition is set to vouchers.
voucher_prefix string The prefix to use when generating the vouchers. Available if condition is set to vouchers.
number_of_vouchers integer The total number of vouchers. Available if condition is set to vouchers.
vouchers array of strings The available voucher codes (not redeemed). Available if condition is set to vouchers.
customer string The ID of the Customer that this discount belongs to. Available for discounts with type customer_discount.