Redeem a coupon that has been previously issued to a customer. All coupons accepted by the cashier have to be redeemed so that the coupons cannot be used again.

To just verify that a coupon is valid (before redeeming it), use verifyIssuedCoupon. To get the list of all issued coupons, use getIssuedCoupons.

redeemIssuedCoupon returns error 1040 if a coupon with such identifier has not been issued at all. If coupon has been redeemed already, API returns error 1041. If coupon has expired (and is thus not valid any more), API returns error 1045. If coupon is valid, API returns error 0.

Input parameters

Parameter name Description Possible value Required
uniqueIdentifier  A unique identifier for this printed coupon.  String (20)  yes  
invoiceID  Invoice the coupon was redeemed with.

If you want to save an invoice and redeem an associated coupon together in one bulk request, set this field to a special value: "CURRENT_INVOICE_ID". Normally, creating two records where one references the other cannot be done within one bulk request; you would have to retrieve one record's ID before you can create the other. This is a special workaround for savePayment, saveGiftCard, saveIssuedCoupon, redeemIssuedCoupon, and subtractCustomerRewardPoints.

Note that if saving the invoice results in an error, the payments, coupons etc. will be created and coupons redeemed nevertheless, but without a reference to any invoice. For better error checking you may still want to do saveSalesDocument as a separate request. 
customerID  Customer who redeemed the coupon  Integer    
warehouseID  Store or location where the coupon was accepted  Integer    
pointOfSaleID  Register where the coupon was accepted  Integer    
employeeID  Salesperson who accepted the coupon  Integer    
timestamp  Accept time  Unix timestamp  yes  


Field name Type Description
issuedCouponID  Integer  ID of the redeemed coupon (however, this ID does not serve any purpose, so it does not need to be recorded)  
couponID  Integer  ID of coupon code  
uniqueIdentifier  String (20)  Unique identifier of the coupon