Coupon Earned

Sent when a customer gets a coupon code, either by completing a campaign (for example a newsletter signup) or by redeeming points. Use it to email the coupon code to the customer.

To receive it, add swell/redemption/created to events when you create a filter, then subscribe the filter to your target. Yotpo sends the event to your target URL as a POST with this JSON body.

Not sent when the customer doesn't receive a code explicitly, for example when they redeem at checkout.

Choose Awarded or Redeemed in the examples on the right. Awarded coupons include perk, campaign_id and source.

Payload
string

The event name, swell/redemption/created.

string

The display name of the event.

string

Your store's website URL.

string

Your store's name.

redemption
object

The redemption.

boolean

true when points are deducted only when the coupon is used at checkout.

boolean

true when the redemption was made at a point of sale.

redemption_option
object

The reward (redemption option).

integer

The reward (redemption option) ID.

string

The reward name.

string

The email address of the customer who got the coupon.

customer
object

The customer.

perk
object

The reward record. Only on awarded coupons.

integer | null

The ID of the campaign that gave the coupon, or null. Only on awarded coupons.

string

Where the coupon came from, for example VIP. Only on awarded coupons.

date-time

When Yotpo sent the event.

Headers
string
required

The event name. Matches topic in the body.

string
required

The kind of account the event belongs to.

string
required

Your store ID.

string
required

A unique ID for the event.

string
required

A unique ID for this delivery to this target. Use it to ignore duplicates.

Response
200

Return any 2xx status quickly to acknowledge the event. Without one, Yotpo retries at least 10 times with exponential backoff.

LoadingLoading…