The 'promoter_accepted' webhook is fired when a promoter is accepted to a campaign, either by you or automatically on sign up(if you have "Auto-accept promoters" option enabled for the campaign). It also fires when the promoter is switched/moved to another campaign.
The most important data sent with the webhook event payload:
Event
This object contains information about the event webhook. The most important fields are:
- type - eq. "promoter_accepted" - webhook event type. All webhooks contain the event.type field, you need to use this field in a condition to determine the actions needed to take for this kind of webhook.
- created_at - eq. "2017-10-13T15:46:01.606Z" - date and time when the event occurred.
Data
This object contains the data of the object who determined the event.
- state - eq. "accepted" - current state of the promoter in relation with the campaign. Most likely it will be "accepted" in this case.
- promoter - JSON containing information about the promoter
- promotion - JSON containing information about the promotion generated for the promoter together with the referral id
- campaign - JSON with information about the campaign where the promoter is accepted
Promoter JSON :
- id - eq. "234" - id of the promoter
- cust_id - eq "23452" - an ID to help you identify the promoter in you system in case he/she is a customer/user.
- earnings_balance - eq. "{'cash' : 20000}" or "{'free_month' : 2} or "{'credits' : 20}- JSON containing the total amount of rewards promoter earned
- current_balance - JSON containing remaining amounts after payments/fulfillments
- paid_balance - JSON containing paid/fulfilled amounts
- auth_token - eq "da954kn43856nacueroytnjrwg46k5" - authentication token
- email - promoter email
- temp_password - eq. "dsf23fd3" - temporary password generated - can be used for login only if the promoter sign up page doesn't include the password field and promoter hasn't set his own password
- profile - eq. "{'first_name':'John', 'website':'mywebsite.com'}" - JSON containing information about the promoter including name, website, social accounts, etc
Promotion JSON:
- campaign_id - eq. "234" - id of the campaign where the promotion runs
- promoter_id - eq "23452" - id of the promoter/affiliate who runs this promotion
- status - eq. "offer_running" or "offer_inactive" - current offer status.
- promo_code - eq. "JOHN20" - discount/credit coupon used(if applied)
- ref_id - eq. "johndoe" - the promotion referral id
- ref_link - eq. "http://yourwebsite.com/#_r_johndoe" - the promotion referral link
- current_offer - eq. "{ 'name': '1 free month', amount: 1, unit: 'free_months'}" - JSON with information about the current offer available to the lead. If the promotion status is "offer_running" than you can apply it to the lead.