Skip to main content
POST
Purchase a reward on behalf of a customer, deducting the required points from their balance and generating a Shopify discount code.

Request body

Most rewards have a fixed points_cost, so the request only needs customer_identifier. For flexible rewards (redemption_mode: "flexible"), the customer chooses how many points to spend within the reward’s allowed range, and the discount is sized to match. Pass points for these:

Validations

  • Customer must exist and not be excluded from the loyalty program
  • Reward must be active and not deleted
  • If the reward is restricted to a VIP tier, the customer must be on that tier
  • Customer must have enough points to cover the reward’s points_cost
  • For flexible rewards, points is required and must be between the reward’s configured minimum and maximum

Response

Returns 201 Created. The discount_code is the generated Shopify discount code for the customer to use, and expires_at is when that code stops working (null when the reward has no expiry configured). For flexible rewards, reward_name reflects the resolved discount (for example $2.50 off your order) and points_spent is the number of points the customer chose.

Errors