Below are sample request payloads you will receive based on the webhook event types you have selected for your campaign.
PARTICIPANT_REACHED_A_GOAL
Description: When a participant unlocks a new reward
Important notes:
For double-sided rewards,two events will be sent for both referrer and referee. To discern between the two, use the data.reward.isReferrer property (the referrer will have isReferrer as true).
You can confirm this by examining data.reward.referrerId and data.reward.referredId and comparing it with data.participant.id.
If the reward is for the referrer, you can view the person they referred by accessing data.participant.referee.
If the reward is for the referred friend, you can view the person who referred them by accessing data.participant.referrer.
If you have manual reward approval enabled for your campaign, events will be sent twice: (1) when the reward is pending approval and (2) when the reward is approved. To discern between unapproved/approved rewards, use the data.reward.approved property (approved rewards will have approved as true).
data.reward.rewardId represents the ID of the CampaignReward and will always be the same. You can find this ID from Campaign Editor > 1. Rewards and clicking the reward.
data.reward.id represents the ID of the ParticipantReward that was unlocked for the participant. This will be different for every new reward that the participant earns. You can find this ID by going to your admin dashboard and viewing the participant's rewards.
Here is an example event of a PARTICIPANT_REACHED_A_GOAL event where the reward is for the referrer because data.reward.isReferrer is true. The person they referred is reflected in data.participant.referee.
If this reward was for the referred person, then data.reward.isReferrer would be false. And the person that referred them would be accessible from data.participant.referrer.
Description: When a new participant is added to the campaign (includes direct signups, referrals, and participants added/imported via admin dashboard).
Here is an example event of a NEW_PARTICIPANT_ADDED event where the newly added participant was referred. The person that referred them is reflected in data.referrer. If the participant was not referred, then data.referrer will not exist.