Buy discount code
POST/api/v1/loyalty/shop/:identifier/cart/buy_discount_code
Buy a discount code using the SKU of a discount code product.
This will spend the coin price of the discount code product and subtract the coin price from the available coins.
When using the createNewDiscountCode option set to false, only existing uploaded discount codes will be used.
Marking these codes as redeemed can be done by either:
- Sending a RedeemDiscountCode event via the
/api/v1/eventsendpoint. - When using Spotler Activate, sending a LoyaltyEngageRedeemDiscountCode or Purchase event (including the discount code field).
- Using the
/api/v1/discount/{discountCode}/redeemendpoint.
Only a single discount code at a time can be exported to 3rd parties. When a discount code has been bought and not redeemed yet, it will be marked as inactive when buying another discount code.
The inactive discount code can still be marked as redeemed but cannot be found in any exported custom field.
Request
Responses
- 200
- 400
- 401
- 404
- 429
Ok
Invalid request
Invalid credentials
Contact not found
Rate limit exceeded