HomeAppVirality DocsAppVirality APIsGet User Reward Info

Get User Reward Info

Get the rewards benefited by a user for a particular campaign or growth hack type


This API call allows you to get detailed info regarding the rewards held under a user’s account. The details include things like reward type, reward date, reward status, etc.

Just like the Coupon List or Friend List, this API could be useful in building similar features that personalize the Referral Information page of a user. This notwithstanding, you may utilize this info for your own internal dashboards & reporting.

Base URL  https://api.appvirality.com

 POST         /v2_0/getuserrewardinfo

Content-Type application/json

 

Input i.e. Request

{
"apikey":"50524c1812904217a638a41d00cfbe94",
"privatekey":"5392d14323884ea3aeb3a4d200b4238d",
"userkey":"d40eeeee5ea74e7cadd972155f08fd97",
"EmailId": "",
"UserIdInstore": "",
"campaignid":214,
"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
(conditional)
User Key for the an App user – a unique identifier for every App User recorded
EmailId
(conditional)
Email of the User, updated to AppVirality
UserIdInstore
(conditional)
Store Id of the App user, updated to AppVirality – a unique identifier of the user in your App
campaignid
(optional)
Unique ID of a campaign, generated by AppVirality
growthhack 
 (optional)
Type of Growth Hack
values: Word_of_Mouth or Loyalty_Program

conditional – One of the conditional parameters is mandatory to identify the user. Priority for user identification is userkey, UserIdInstore and EmailId

Response

These response parameters are slightly more complex than the usual ones seen before.

Note that a few parameter values in the JSON will conditionally depend on what value is held inside the param usertype (possibly: Friend, Referrer, LoyaltyUser).

All rewards are tagged to the UserKey queried only. The parameter usertype denotes the courtesy to which user this reward was benefited from.
for example: When usertype = Referrer, then it implies that the User earned this reward because his friend acted on his Invite to app (or any such Reward linked activity)

Here is how it will reflect:

  • if usertype = Friend or LoyaltyUser, then fields (name, email, image) will simply correspond to the User tagged to the UserKey queried in Input
  • if usertype = Referrer, then fields (name, email, image) will correspond to the Friend of the User tagged to the UserKey queried

 

{
  "rewards": [
    {
      "usertype": "Friend",         // user type i.e. Friend/Referrer/LoyaltyUser
      "name": "peter2",             // Name of User -> corresonds to given UserKey
      "image": "",                  // Image of same user as above
      "email": "test209263@gmail.com",// email of same user as above
      "userIdInStore": "1e2wws",    // storeid of same user as above
      "reward": "250.00",
      "rewardUnit": "Rs",
      "rewardedon": "11-Jul-2015",
      "eventName": "Signup",
      "rewardstatus": "Suspicious",   // reward status i.e. Rewarded, Rejected, Suspicious, Pending
      "rewardtype": "InstoreCredits", // implies Wallet
      "coupon": "",
      "campaignID": "214",
      "campaignName": "campign",
      "growthhack": "Word_of_Mouth",
      "couponimage": "",             // Coupon Pool Image
      "coupondetails": "",           // Coupon Pool Description
      "couponname": ""               // Coupon Pool Name
    },
    {
      "usertype": "Referrer",        // user type i.e. Friend/Referrer/LoyaltyUser
      "name": "rahul",               // Name of User's Referrer -> corresponds to given UserKey's Referrer
      "image": "",                   // Image of same user as above
      "email": "test109365@gmail.com",// email of same user as above
      "userIdInStore": "2we2wws",    // storeid of same user as above
      "reward": "150.00",
      "rewardUnit": "Rs",
      "rewardedon": "11-Jul-2015",
      "eventName": "Install",
      "rewardstatus": "Suspicious",
      "rewardtype": "InstoreCredits",
      "coupon": "",
      "campaignID": "214",
      "campaignName": "campign",
      "growthhack": "Word_of_Mouth",
      "couponimage": "",
      "coupondetails": "",
      "couponname": ""
    },
    {
      "usertype": "LoyaltyUser",    // user type i.e. Friend/Referrer/LoyaltyUser
      "name": "peter2",             // Name of User -> corresonds to given UserKey
      "image": "",                  // Image of same user as above
      "email": "test209263@gmail.com",// email of same user as above
      "userIdInStore": "3s2ffs",    // storeid of same user as above
      "reward": "10.00",
      "rewardUnit": "Coins",
      "rewardedon": "8-Sep-2016",
      "eventName": "Install",
      "rewardstatus": "Rewarded",
      "rewardtype": "Coupon",
      "coupon": "second",
      "campaignID": "664",
      "campaignName": "suresh loyal",
      "growthhack": "Loyalty_Program",
      "couponimage": "",
      "coupondetails": "",
      "couponname": "second"
    }
  ],
  "success": true,
  "message": null
}

 

Was this article helpful to you? Yes No