Skip to main content

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/events endpoint.
  • When using Spotler Activate, sending a LoyaltyEngageRedeemDiscountCode or Purchase event (including the discount code field).
  • Using the /api/v1/discount/{discountCode}/redeem endpoint.



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

Ok