HomeAppVirality DocsAppVirality APIsGet User Rewards

Get User Rewards

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 API call fetches only 50 records in the JSON. You may however, get more records by increasing the page number.  

Base URL  https://api.appvirality.com

 POST         /v2_0/getuserrewards

Content-Type application/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 Params Description
apikey API Key of the App
Get it from Dashboard >> App Details
privatekey Private key for API requests
Get it from: Dashboard >> App 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)
pagenum Page Index @ 50 results per page
fromdate
(optional)
Begin date (for results filtering)
todate
(optional)
End date (for results filtering)
status Status 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 Code Description
0 No data found for the search criteria
1 Success
2 Invalid User Key
3 Invalid GrowthHack
4 Invalid CampaignID
5 Invalid StoreID or EmailID
6 Invalid Reward Status
7 Invalid Reward User Type
31 Invalid Date Format
Was this article helpful to you? Yes 2 No