This call is deprecated. We recommend to use Point of Sale API instead.
The corresponding new call is: POST /v1/giftcard/redeem/{id}.
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.
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. |
integer | |
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 | integer | 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 |