Search

saveCoupon

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 nameDescriptionPossible valueRequired
couponIDCoupon rule ID. When creating a new coupon, leave this field empty.Integer
issuedFromDateissuedFromDate 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).
Date
issuedUntilDateDate
nameString
codeString
warehouseIDIf 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
storeGroupIf set, these coupons are issued only from a specific store group.String
campaignIDIf set, the coupon gives discounts according to the specified sales promotion.Integer
printedAutomaticallyInPOSSet to 1 to make POS automatically print a coupon of this type to each customer who fulfills the following conditions:Integer (0 or 1)
thresholdCustomer 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.
Integer
measurePossible values: "dollars", "points".String
thresholdTypePossible values: "points_amt", "this_sale".String
printingCostInRewardPointsPrinting cost in reward points.Integer
descriptionIf defined, description will be printed on coupon instead of name.String

Response

Field nameTypeDescription
couponIDIntegerID of the created/updated item.