Search

getIssuedCoupons

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.

Input parameters

Parameter nameDescriptionPossible valueRequired
uniqueIdentifierUnique identifier of the coupon.String
statusFilter coupons by status: ACTIVE, REDEEMED, EXPIRED.String
issuedTimestampFromUnix timestamp.
issuedTimestampToUnix timestamp.
redeemedTimestampFromUnix timestamp.
redeemedTimestampToUnix timestamp.
issuedCustomerIDInteger
issuedCustomerIDsComma-separated list of customer IDs.String
redeemedCustomerIDInteger
redeemedCustomerIDsComma-separated list of customer IDs.String
couponIDsComma-separated list of coupon rule IDs (see getCoupons).String
changedSinceRetrieve 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)
recordsOnPageNumber of records API should return. By default 20, at most 100.Integer
pageNoAPI returns at most recordsOnPage items at a time. To retrive the next recordsOnPage items, send a new request with pageNo incremented by one. By default, API returns "page 1".Integer

Response

Field nameTypeDescription
issuedCouponIDIntegerID of the issued coupon.
couponIDIntegerID 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.
couponCodeStringSee previous.
campaignNameStringPromotion name.
uniqueIdentifierStringUnique identifier of the coupon.
issuedTimestampUnix timestampIssue time.
expiryDateISO date (yyyy-mm-dd)Expiry date.
issuedInvoiceIDIntegerInvoice the coupon was issued with.
issuedInvoiceNoStringInvoice number.
issuedCustomerIDIntegerCustomer the coupon was issued to.
issuedCustomerCardNumberIntegerCode of customer's loyalty/membership card.
issuedWarehouseIDIntegerStore or location where the coupon was issued.
issuedWarehouseCodeStringStore or location code.
issuedPointOfSaleIDIntegerRegister where the coupon was issued.
issuedEmployeeIDIntegerSalesperson who issued the coupon.
isPrintedAutomaticallyInteger (1 or 0)Denotes whether the coupon was printed automatically (as per coupon terms and conditions) or did the salesperson choose it manually.
redeemedTimestampUnix timestampAccept time.
redeemedInvoiceIDIntegerInvoice the coupon was redeemed with.
redeemedInvoiceNoStringInvoice number.
redeemedCustomerIDIntegerCustomer who redeemed the coupon.
redeemedCustomerCardNumberIntegerCode of customer's loyalty/membership card.
redeemedWarehouseIDIntegerStore or location where the coupon was accepted.
redeemedWarehouseCodeStringStore or location code.
redeemedPointOfSaleIDIntegerRegister where the coupon was accepted.
redeemedEmployeeIDIntegerSalesperson who accepted the coupon.
statusStringIssued coupon status, possible statuses are 'ACTIVE', 'REDEEMED' AND 'EXPIRED'.
addedUnix timestampCreation time.
lastModifiedUnix timestampLast modification time.