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 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). Format: yyyy-mm-dd.
string
issuedUntilDate Format: yyyy-mm-dd. string
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.
integer
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)
print Possible values: "AUTOMATICALLY", "PROMPT", "NEVER". API will return error 1013 if defined together with printedAutomaticallyInPOS or promptCashier. string
printingCostInRewardPoints Printing cost in reward points. integer
description If defined, description will be printed on coupon instead of name. string

Response

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