Use the Coupon Usage APIs to accurately track the usage of coupons by customers. When customers select a coupon for their cart, use the Coupon Usage Increase API to increase the coupon usage count. If a customer removes a selected coupon from their cart, use the Coupon Usage Decrease API to revert the coupon usage count.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions with Real-Time Offer Management |
Coupon Usage Increase API
The API manages coupon redemptions by tracking the overall usage and per customer usage of each coupon.
When a customer selects a coupon that they want to apply to their cart for a promotion, run the Coupon Usage Increase API to redeem the selected coupon for the customer. The API increases the overall usage count of the coupon and the customer's usage count of the coupon.
The API response provides detailed information about the coupon including the updated usage count, the coupon's redemption limit, and the remaining number of redemptions available for the coupon and the customer.
Coupon Usage Decrease API
Use the Coupon Usage Decrease API to reduce the usage count of coupons when customers deselect a coupon from their cart. The Coupon Usage Decrease API can also be used to decrease the coupon usage count when a transaction fails or is canceled.
The API response provides detailed information about the coupon for which the usage count has been decreased. The information also includes the coupon's updated redemption limit and the remaining number of redemptions available for the coupon and the customer.
[
{
"couponCode": "SNEAKER50",
"isSuccess": true,
"redemptionLimit": 15000,
"redemptionLimitPerCustomer": 5,
"remainingRedemptionCount": 13447,
"remainingRedemptionCountForCustomer": 2
}
]The SNEAKER50 coupon was initially selected but the customer removed it from their
cart later. Use the Coupon Usage Decrease API to revert the count. The result shows that there
are still 13,448 redemptions left overall and 3 remaining for this particular
customer.
{
"couponCode": "SNEAKER50",
"isSuccess": false
"redemptionLimit": 15000,
"redemptionLimitPerCustomer": 5,
"remainingRedemptionCount": 13448,
"remainingRedemptionCountForCustomer": 3
}
]