Skip to content

This API would enable you to list out the rewards(pertaining to all statuses) across a date range


This API call shall serve you all the rewards, that are tagged to a particular user/ campaign/ growth hack.
You can filter by Status and by Date Range also.

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.

POSTapi.appvirality.com/v2_0/getuserrewardsapplication/json

Input i.e. Request

{
"apikey":"50524c1812904217a638a41d00cfbe94",
"privatekey":"5392d14323884ea3aeb3a4d200b4238d",
"userkey":"d40eeeee5ea74e7cadd972155f08fd97",
"EmailId": "",
"UserIdInstore": "",
"usertype":"",
"pagenum":"1",
"fromdate":null,
"todate":"2-Feb-2016 2:13",
"status":"All",
"campaignId":"2376",
"growthHack":"Word_of_Mouth"
}

Input Params

Input ParamsDescription
apikeyAPI Key of the App
Get it from DashboardApp Details
privatekeyPrivate key for API requests
Get it from: DashboardApp Details › Click App Settings › Scroll down to Advanced Settings
userkey
(optional)
User Key for the an App user (for results filtering)
EmailId
(optional)
Email of the User, updated to AppVirality
UserIdInstore
(optional)
Store Id of the App user, updated to AppVirality - a unique identifier of the user in your App
usertype
(optional)
Users will be fetched based on Usertype Referrer or Friend or LoyaltyUser
growthHack
(optional)
Type of Growth Hack (for results filtering)
values: Word_of_Mouth or Loyalty_Program
campaignId
(optional)
Unique ID of a campaign (for results filtering)
pagenumPage Index @ 50 results per page
fromdate
(optional)
Begin date (for results filtering)
todate
(optional)
End date (for results filtering)
statusStatus of Rewards, which you want to filter into
All || Approved || Rejected || Suspicious || UnderReview

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

{
"rewards": [
{
"participantid": "109213",
"emailid": "test209270@gmail.com",
"userkey": "d40eeeee5ea74e7cadd972155f08fd97",
"name": "user3",
"storeuserid": "hd6x6dg3g", // ID of the user in your App
"campaignid": "214", // unique Campaign ID - assigned by AppVirality
"campaignname": "campign",
"eventname": "Signup", // type of Event - as defined under the Reward Rules on your dashboard
"rewardid": "934",
"rewarddtlid": "2031",
"reward_type": "InstoreCredits", // Wallet type of reward distribution
"rewarded_date": "11-Jul-2015 13:11:36",
"amount": "250",
"reward_unit": "Rs",
"couponcode": null, // NULL since Reward is Wallet type
"expires": null,
"status": "Suspicious", // Reward status tag
"rewardUserType": "Friend" // Role against which Reward was delivered
},
{
"participantid": "109213",
"emailid": "test209270@gmail.com",
"userkey": "d40eeeee5ea74e7cadd972155f08fd97",
"name": "user3",
"storeuserid": "hd6x6dg3g",
"campaignid": "214",
"campaignname": "campign",
"eventname": "Install",
"rewardid": "933",
"rewarddtlid": "2028",
"reward_type": "InstoreCredits",
"rewarded_date": "11-Jul-2015 13:8:50",
"amount": "150",
"reward_unit": "Rs",
"couponcode": null,
"expires": null,
"status": "Suspicious",
"rewardUserType": "Friend"
}
],
"totalrecords": "2", // record count
"pagenum": "1" // page number i.e. page index
"success": true, // Response status
"statuscode": 1, // code based on status of the API call
"message": "Success" // Information regarding API call (if relevant)
}

Status codes which you will see while using Get User Rewards API

Status codes and description for API responses

Status CodeDescription
0No data found for the search criteria
1Success
2Invalid User Key
3Invalid GrowthHack
4Invalid CampaignID
5Invalid StoreID or EmailID
6Invalid Reward Status
7Invalid Reward User Type
31Invalid Date Format