Get coupon rules.
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 create a coupon rule, see saveCoupon.
Parameter name | Description | Possible value | Required |
---|---|---|---|
couponID | ID of coupon | integer | |
couponIDs | Multiple coupon IDs, separated by commas, such as: 1,2,3,4,5. | string | |
changedSince | Retrieve only items that have been added or modified since the specified timestamp. Use it to keep a local database in sync with Erply. | Integer (Unix timestamp) | |
recordsOnPage | Number of records API should return. By default 20, at most 100. | integer | |
pageNo | API returns at most recordsOnPage items at a time. To retrieve the next recordsOnPage items, send a new request with pageNo incremented by one. By default, API returns "page 1". | integer |
Field name | Type | Description |
---|---|---|
couponID | integer | |
campaignID | integer | If set, the coupon gives discounts according to the specified sales promotion. |
warehouseID | integer | If set, these coupons are issued only from a specific store/location. |
issuedFromDate | string | Format: yyyy-mm-dd. issuedFromDate and issuedUntilDate specify the time period when this coupon may be issued. It does not affect the validity of the coupon (the validity period is defined by the sales promotion instead). |
issuedUntilDate | string | Format: yyyy-mm-dd |
name | string | |
code | string | |
printedAutomaticallyInPOS | Integer (0 or 1) | If set to 0, then the cashier may issue the coupon at any time, and the following conditions are all irrelevant. If set to 1, POS will print this coupon automatically, if the following conditions are met: |
threshold | integer | Customer must either:
|
measure | string | Possible values: "dollars","points". |
thresholdType | string | Possible values: "points_amt","this_sale". |
promptCashier | Integer (0 or 1) | If set to 1, then POS must prompt cashier that coupon can be printed. |
printingCostInRewardPoints | integer | Printing cost in reward points. |
string | Possible values: "AUTOMATICALLY", "PROMPT", "NEVER". | |
description | string | If defined, description will be printed on coupon instead of name. |
added | integer | Unix timestamp. Creation time. |
lastModified | integer | Unix timestamp. Last modification time. |