Get Friends And Rewards
This API would enable you to list out the friends and rewards(pertaining to all statuses)
This API call shall serve you all the friends and rewards.
Use Case
This call would be useful in building a feature wherein you can show every individual user, their coupon or earnings history.
This adds great value to the Referral module & increases customer loyalty, adding mileage to their influencing efforts.
POST
api.appvirality.com/saas/v1_0/getfriendsandrewardsapplication/jsonInput i.e. Request
{"apikey":"7b808b1f934448db8463a4c60091c49b","privatekey":"097262223465191eda4ec006d601b","userkey":"176502556c624614b913a62400ab4d7e","email":"user@mail.com","useraccountid":"34","pageindex":1,"pagesize":50}Input Params
| Input Params | Description |
|---|---|
| apikey | API Key of the Product Get it from Dashboard › App Details |
| privatekey | Private key for API requests Get it from: Dashboard › App Details › Click App Settings › Advanced |
| userkey | User Key of the Product user, assigned by AppVirality - a unique identifier for every Product user recorded |
| email (optional) | Email of the user |
| useraccountid (optional) | ID of the user in your Account(helps to identify users on dashboard as you do in your product) |
| pageindex (optional) | Page index, by default 1 |
| pagesize (optional) | Page size, by default 50 |
Response
Most of the parameters are either pre-explained or self-explanatory. The ones which need an explanation have been done as code comments, in the below JSON
{ "friends": [ { "userkey": "01b9b8d0f7374ebbbc98a72a00f4b42d", "email": "2postmanuserfe0@ymail.com", "useraccountid": "fe0", "status": "SignUp", "name": "Test Postman fe0", "profileimage": "http://static.wixstatic.com/media/2653cd_02a8474e57b5420e8ae1f5b25ce3685c.jpg", "regdate": "2-Mar-2017", "earnedrewards": [ { "eventname": "Conversion", "reward": "5", "rewardunit": "% Discount", "rewardedon": "2-Mar-2017", "rewardstatus": "Rewarded", // Reward status tag "rewardtype": "InstoreCredits", // Wallet type of reward distribution "usertype": "Referrer", "coupon": "", // NULL since Reward is Wallet type "campaignid": "839", // unique Campaign ID - assigned by AppVirality "campaignname": "SaaS Referrals", "growthhack": "SaaS_Referrals", "couponimage": "", "coupondetails": "", "couponname": "", "friendemail": "2postmanuserfe0@ymail.com", "friendname": "Test Postman fe0", "friendprofileimage": "http://static.wixstatic.com/media/2653cd_02a8474e57b5420e8ae1f5b25ce3685c.jpg" }
] }, { "userkey": "5df4099262e04154b60ea72a00b36a30", "email": "2postmanuserfd8@ymail.com", "useraccountid": "fd8", "status": "Converted", "name": "Test Postman fd8", "profileimage": "http://static.wixstatic.com/media/2653cd_02a8474e57b5420e8ae1f5b25ce3685c.jpg", "regdate": "2-Mar-2017", "earnedrewards": [ { "eventname": "Conversion", "reward": "10", "rewardunit": "% Discount", "rewardedon": "2-Mar-2017", "rewardstatus": "Rewarded", "rewardtype": "InstoreCredits", "usertype": "Referrer", "coupon": "", "campaignid": "839", "campaignname": "SaaS Referrals", "growthhack": "SaaS_Referrals", "couponimage": "", "coupondetails": "", "couponname": "", "friendemail": "2postmanuserfd8@ymail.com", "friendname": "Test Postman fd8", "friendprofileimage": "http://static.wixstatic.com/media/2653cd_02a8474e57b5420e8ae1f5b25ce3685c.jpg" } ] } ], "totalfriends": 8, // records count "convertedfriends": 6, "success": true, "message": null}