Create or update a coupon rule.

Coupon rule is like the "blueprint" or "type" of a printed coupon (that is issued from POS and handed to a customer). The "blueprint" specifies in what circumstances the coupons will be printed from POS, and what promotion will apply when customer returns with the coupon — ie., what discount or extra value it effectively carries.

A coupon rule should be associated with a sales promotion (see getCampaigns).

In order for the customer to use those discounts, you need to issue the customer a coupon with an unique serial number (see getIssuedCoupons, saveIssuedCoupon). When customer returns with the coupon code, it has to be scanned at the POS. Scanning redeems the coupon, invokes the promotion associated with it, and gives customer a discount.

To retrieve coupon rules, see getCoupons.

Input parameters

Parameter name Description Possible value Required
couponID Coupon rule ID. When creating a new coupon, leave this field empty. Integer
issuedFromDate issuedFromDate and issuedUntilDate specify the time period during which serial-numbered coupons of this type will be issued from POS.

It does not affect the validity of those printed coupons; the validity period is defined by the sales promotion instead).
issuedUntilDate Date
name String
code String
warehouseID If set, these coupons are issued only from a specific store/location. Either warehouseID or storeGroup can be set, but not both at the same time. Integer
storeGroup If set, these coupons are issued only from a specific store group. String
campaignID If set, the coupon gives discounts according to the specified sales promotion. Integer
printedAutomaticallyInPOS Set to 1 to make POS automatically print a coupon of this type to each customer who fulfills the following conditions: Integer (0 or 1)
threshold Customer must either:
  1. make a purchase with a certain value (in which case thresholdType = "this_sale" and threshold specifies how big the purchase must be: for example, $250.00 or worth 10 reward points),
  2. Or customer's all purchases over the history must give a certain total (in which case thresholdType = "points_amt" and threshold specifies how much purchases the customer must have made: for example, worth a total of $500, or 125 reward points.
measure Possible values: "dollars", "points". String
thresholdType Possible values: "points_amt", "this_sale". String
promptCashier Set to 1 to make POS prompt cashier that coupon can be printed. Requires printedAutomaticallyInPOS = 1. Integer (0 or 1)
printingCostInRewardPoints Printing cost in reward points. Integer
description If defined, description will be printed on coupon instead of name. String


Field name Type Description
couponID Integer ID of the created/updated item.