Skip to content

Commit

Permalink
Webhook samples updated to include subscribed_at/unsubscribed_at
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrii Tereshchenko authored and Andrii Tereshchenko committed Aug 13, 2014
1 parent d83eaea commit 06e6082
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 8 deletions.
3 changes: 3 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
User-agent: *
Disallow:

8 changes: 6 additions & 2 deletions source/web_hooks/claim_signup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Triggered when Friend Email Gating form is submitted (on Friend Claim Page).
* **first_name** — affiliate member's first name
* **last_name** — affiliate member's last name
* **sub_choice** — subscription choice (optional, present only if the form included subscription checkbox)
* **subscribed_at** - date affiliate member has subscribed (optional)
* **unsubscribed_at** - date affiliate member has unsubscribed (optional)

.. raw:: html

Expand All @@ -48,7 +50,9 @@ Triggered when Friend Email Gating form is submitted (on Friend Claim Page).
"first_name": null,
"last_name": null,
"gender": null,
"sub_choice": true
"sub_choice": true,
"subscribed_at":"2014-08-13T11:14:08.835-07:00",
"unsubscribed_at":null
}
.. raw:: html
Expand All @@ -57,7 +61,7 @@ Triggered when Friend Email Gating form is submitted (on Friend Claim Page).

.. code-block:: bash
curl --data 'key=<key>&payload={"offer":{"email":"[email protected]","short_url_code":"1a2PV"},"campaign":{"id":350256053,"type":"StandaloneCampaign","cached_slug":"affiliate-campaign-test","tag_names":["default"]},"email":"[email protected]","first_name":null,"last_name":null,"gender":null,"sub_choice":true}' <url>
curl --data 'key=<key>&payload={"offer":{"email":"[email protected]","short_url_code":"1a2PV"},"campaign":{"id":350256053,"type":"StandaloneCampaign","cached_slug":"affiliate-campaign-test","tag_names":["default"]},"email":"[email protected]","first_name":null,"last_name":null,"gender":null,"sub_choice":true,"subscribed_at":"2014-08-13T11:14:08.835-07:00","unsubscribed_at":null}' <url>
.. container:: hidden

Expand Down
6 changes: 5 additions & 1 deletion source/web_hooks/offer_signup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ additional parameters will be present:
* **first_name** — affiliate member's first name
* **last_name** — affiliate member's last name
* **sub_choice** — subscription choice
* **subscribed_at** - date affiliate member has subscribed
* **unsubscribed_at** - date affiliate member has unsubscribed

.. raw:: html

Expand All @@ -52,7 +54,9 @@ additional parameters will be present:
"first_name": "John",
"last_name": "Doe",
"gender": "male",
"sub_choice": false
"sub_choice": false,
"subscribed_at":null,
"unsubscribed_at":null
}
.. raw:: html
Expand Down
14 changes: 11 additions & 3 deletions source/web_hooks/referral.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Triggered when there is a new referral in Talkable.
* **last_name**
* **gender**
* **sub_choice**
* **subscribed_at**
* **unsubscribed_at**

* **amount** — amount of money to reward (null when non-monetary incentive is used)
* **incentive** — type of incentive reward (rebate, discount_coupon, other)
Expand All @@ -52,6 +54,8 @@ Triggered when there is a new referral in Talkable.
* **last_name**
* **gender**
* **sub_choice**
* **subscribed_at**
* **unsubscribed_at**

* **amount** — amount of money to reward (null when non-monetary incentive is used)
* **incentive** — type of incentive reward (rebate, discount_coupon, other)
Expand Down Expand Up @@ -88,7 +92,9 @@ Triggered when there is a new referral in Talkable.
"first_name": "Bob",
"last_name": "Crane",
"gender": null,
"sub_choice": false
"sub_choice": false,
"subscribed_at":null,
"unsubscribed_at":null
},
"amount": "5.00",
"incentive": "rebate",
Expand All @@ -107,7 +113,9 @@ Triggered when there is a new referral in Talkable.
"first_name": "Alice",
"last_name": "Smith",
"gender": "female",
"sub_choice": true
"sub_choice": true,
"subscribed_at":"2014-08-13T11:14:08.835-07:00",
"unsubscribed_at":null
},
"amount": "0.00",
"incentive": "other",
Expand All @@ -129,7 +137,7 @@ Triggered when there is a new referral in Talkable.

.. code-block:: bash
curl --data 'key=<key>&payload={"campaign":{"id":608351285,"type":"StandaloneCampaign","cached_slug":"affiliate-campaign-test","tag_names":["default"]},"offer":{"email":"[email protected]","short_url_code":"1a2PV"},"referrer":{"id":529876428,"email":"[email protected]","person":{"email":"[email protected]","first_name":"Bob","last_name":"Crane","gender":null,"sub_choice":false},"amount":"5.00","incentive":"rebate","incentive_description":"$5.00 back","origin":{"id":413714044,"type":"AffiliateMember","email":"[email protected]"}},"referred":{"id":494279559,"email":"[email protected]","person":{"email":"[email protected]","first_name":"Alice","last_name":"Smith","gender":"female","sub_choice":true},"amount":"0.00","incentive":"other","incentive_description":"First Month Free","origin":{"id":730304164,"type":"Purchase","order_number":805174808,"order_date":"2014-04-01T03:51:50.373-07:00","customer_id":"241025369","coupon_code":"WHT297"}}}' <url>
curl --data 'key=<key>&payload={"campaign":{"id":608351285,"type":"StandaloneCampaign","cached_slug":"affiliate-campaign-test","tag_names":["default"]},"offer":{"email":"[email protected]","short_url_code":"1a2PV"},"referrer":{"id":529876428,"email":"[email protected]","person":{"email":"[email protected]","first_name":"Bob","last_name":"Crane","gender":null,"sub_choice":false,"subscribed_at":null,"unsubscribed_at":null},"amount":"5.00","incentive":"rebate","incentive_description":"$5.00 back","origin":{"id":413714044,"type":"AffiliateMember","email":"[email protected]"}},"referred":{"id":494279559,"email":"[email protected]","person":{"email":"[email protected]","first_name":"Alice","last_name":"Smith","gender":"female","sub_choice":true,"subscribed_at":"2014-08-13T11:14:08.835-07:00","unsubscribed_at":null},"amount":"0.00","incentive":"other","incentive_description":"First Month Free","origin":{"id":730304164,"type":"Purchase","order_number":805174808,"order_date":"2014-04-01T03:51:50.373-07:00","customer_id":"241025369","coupon_code":"WHT297"}}}' <url>
.. container:: hidden

Expand Down
8 changes: 6 additions & 2 deletions source/web_hooks/reward.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ it is getting paid after Referral is approved.
* **last_name**
* **gender**
* **sub_choice**
* **subscribed_at**
* **unsubscribed_at**

* **reward** — subhash of parameters describing the reward itself

Expand Down Expand Up @@ -67,7 +69,9 @@ Reward reason can be of 6 following general types.
"first_name": "Bob",
"gender": null,
"last_name": "Smith",
"sub_choice": true
"sub_choice": true,
"subscribed_at":"2014-08-13T11:14:08.835-07:00",
"unsubscribed_at":null
},
"campaign": {
"id": 146331555,
Expand All @@ -92,7 +96,7 @@ Reward reason can be of 6 following general types.

.. code-block:: bash
curl --data 'key=<key>&payload={"person":{"email":"[email protected]","first_name":"Bob","gender":null,"last_name":"Smith","sub_choice":true},"campaign":{"id":146331555,"type":"StandaloneCampaign","cached_slug":"affiliate-campaign-test","tag_names":["default"]},"reward":{"reason":"referrer","incentive_type":"rebate","incentive_description":"$10.00 back","amount":10,"coupon_code":null}}' <url>
curl --data 'key=<key>&payload={"person":{"email":"[email protected]","first_name":"Bob","gender":null,"last_name":"Smith","sub_choice":true,"subscribed_at":"2014-08-13T11:14:08.835-07:00","unsubscribed_at":null},"campaign":{"id":146331555,"type":"StandaloneCampaign","cached_slug":"affiliate-campaign-test","tag_names":["default"]},"reward":{"reason":"referrer","incentive_type":"rebate","incentive_description":"$10.00 back","amount":10,"coupon_code":null}}' <url>
.. container:: hidden

Expand Down

0 comments on commit 06e6082

Please sign in to comment.