Get the list of coupons that have been printed from POS and issued to customers.
Coupons are used in Erply to give promotional discounts. Coupons can be printed from POS and given to customers. If customer returns to the store, presents the coupon and cashier scans coupon code, a specific promotion will apply to the ongoing sale.
Issued coupons can be registered in Erply with saveIssuedCoupon. If customer returns to the store with a coupon, it can be validated with verifyIssuedCoupon and then redeemed with redeemIssuedCoupon. To apply coupon discount to a sale, pass coupon code to API call calculateShoppingCart. calculateShoppingCart will also notify you whether the coupon was applicable to that particular shopping cart or not.
This API call returns error 1006 if promotions module is not enabled on this account.
Parameter name | Description | Possible value | Required |
---|---|---|---|
uniqueIdentifier | Comma-separated list of unique identifiers. | string | |
status | Filter coupons by status: ACTIVE, REDEEMED, EXPIRED. | string | |
issuedTimestampFrom | Unix timestamp. | ||
issuedTimestampTo | Unix timestamp. | ||
redeemedTimestampFrom | Unix timestamp. | ||
redeemedTimestampTo | Unix timestamp. | ||
issuedCustomerID | integer | ||
issuedCustomerIDs | Comma-separated list of customer IDs. | string | |
issuedInvoiceIDs | Comma-separated list of invoice IDs. | string | |
redeemedCustomerID | integer | ||
redeemedCustomerIDs | Comma-separated list of customer IDs. | string | |
redeemedInvoiceIDs | Comma-separated list of invoice IDs. | string | |
couponIDs | Comma-separated list of coupon rule IDs (see getCoupons). | 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 |
---|---|---|
issuedCouponID | integer | ID of the issued coupon. |
couponID | integer | ID of the coupon rule (see getCoupons). Coupon rule is like the "blueprint" or "type" of a printed coupon. 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. |
couponCode | string | See previous. |
campaignName | string | Promotion name. |
uniqueIdentifier | string | Unique identifier of the coupon. |
issuedTimestamp | integer | Unix timestamp. Issue time. |
expiryDate | ISO date (yyyy-mm-dd) | Expiry date. |
issuedInvoiceID | integer | Invoice the coupon was issued with. |
issuedInvoiceNo | string | Invoice number. |
issuedCustomerID | integer | Customer the coupon was issued to. |
issuedCustomerCardNumber | integer | Code of customer's loyalty/membership card. |
issuedWarehouseID | integer | Store or location where the coupon was issued. |
issuedWarehouseCode | string | Store or location code. |
issuedPointOfSaleID | integer | Register where the coupon was issued. |
issuedEmployeeID | integer | Salesperson who issued the coupon. |
isPrintedAutomatically | Integer (1 or 0) | Denotes whether the coupon was printed automatically (as per coupon terms and conditions) or did the salesperson choose it manually. |
redeemedTimestamp | integer | Unix timestamp. Accept time. |
redeemedInvoiceID | integer | Invoice the coupon was redeemed with. |
redeemedInvoiceNo | string | Invoice number. |
redeemedCustomerID | integer | Customer who redeemed the coupon. |
redeemedCustomerCardNumber | integer | Code of customer's loyalty/membership card. |
redeemedWarehouseID | integer | Store or location where the coupon was accepted. |
redeemedWarehouseCode | string | Store or location code. |
redeemedPointOfSaleID | integer | Register where the coupon was accepted. |
redeemedEmployeeID | integer | Salesperson who accepted the coupon. |
status | string | Issued coupon status, possible statuses are 'ACTIVE', 'REDEEMED' AND 'EXPIRED'. |
added | integer | Unix timestamp. Creation time. |
lastModified | integer | Unix timestamp. Last modification time. |