HomeAppVirality DocsAppVirality APIs

AppVirality APIs

AppVirality API V2.0

AppVirality provides an updated API collection to pull the reward details and redeem the rewards.

AppVirality shall take care of reward disbursal when the reward type is set as Coupons (provided coupons remains available in your AppVirality coupon pools).

In case of Wallet (i.e In-Store Credits), AppVirality shall handle the tagging/organizing of rewards. To get the reward details, available balance, etc. for each referrer/friend – you must use the Webhooks and APIs. The data shall arrive as a JSON via APIs. In this case, App Owner has to take care of reward distribution.

AppVirality API is accessed via the https://api.appvirality.com domain.

Warning!!!

Do not make API Calls from within the app. You will stand the chance of exposing your Private Key.

 

Response

  • JSON is the only currently-supported content type for inputs or outputs.
  • All responses will have a field called “success” which is a Boolean to denote high-level success/failure.
  • All dates provided in API calls are in UTC±00 Time zone. Date format will/must be represented as dd-MMM-yyyy HH:mm:ss (for example:20-Feb-2013 20:37:07).
  • Fields in the API response objects may be added at any time. This means that whatever is used to unmarshal the JSON responses into native data types needs to be able to handle unknown fields without failing.

Response Code There are three HTTP status classes you are expected to encounter from time-to-time.

2XX Responses
2XX responses indicate a successfully completed request.

4XX series – Request Error
4XX errors are related to incorrect requests. These requests should be reviewed and corrected before retrying.

5XX series – System Error
5XX errors indicate the AppVirality system cannot fulfil the request. This might be due to temporary issues with AppVirality’s system or undetermined internet vagaries. Given the nature of HTTP-over-internet communications, 500 errors are inevitable and we strongly recommend implementing an exponential back-off retry mechanism that retries order requests when a 500 series error is received.

Other response Codes
1XX series responses are not implemented at this time and are not expected
3XX series responses are not expected and should be reported to AppVirality immediately

Response Handling recommendations
1XX – Not Applicable.
2XX – Successful.
3XX – Log response, report to AppVirality.
4XX errors – Log response, fix the request and manually retry.
5XX errors – Log response, implement an automated retry mechanism that is capped at 5 requests.

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
8 Invalid Test DeviceID
9 Unable to add debug Device. Make sure Test Devices Listening is Turned On before you register Debug Device.
10 This device is already added
11 Invalid RewardDetailID
12 Error in changing few of rewards status
13 Provided Click ID is Invalid
14 Error – Failed to Set Referrer Code
15 Referrer Code is his own code
16 Referrer is not Eligible to Participate in Campaign
17 Existing User – Provided IMEI already exists
18 Is an Existing User
19 Referrer Code doesn't exists
20 User Already Attributted
21 Existing User – Provided UserKey already exists
22 Existing User – Provided Email already exists
23 Existing User – Provided Email already exists on another Device
26 Existing User – Provided Device already exists
27 Set as an Existing User
28 Error – Failed to Register User
29 Existing User – Provided Email & Device already exists
30 Invalid PoolID
31 Invalid Date Format
32 Existing User – Provided Device Advertising ID already exists
33 User Registered – Has Emails in common with other Users
34 User Registered – Device Id is already registered by other User
35 User Registered – Device Advertising Id is already registered by other User
36 User Registered – Device is listed as part of existing devices list
37 Referrer registered date is after Friend Registered Date
38 Attributon Setting is set to Only Link. Refferrer Code is not allowed
43 No rewards for the user
46 Invalid event
47 Event already sent
48 Transaction amount is lessthan minimum transaction value
49 There are no coupons in the coupon pool
50 No referrer found
51 Referrer reached max limit
52 Referrer reached reward frequency
53 Referrer reached max reward cap
54 No reward for friend
55 Not attributed
56 Friend reached reward frequency
57 Reward already redeemed
58 User reached reward frequency
59 User reached max reward cap
60 User is not Eligible to Participate in Campaign
61 Referrer Code already exists
62 Outreach is not configured
63 User doesn't meet Outreach Throttle criteria.
64 Couldn't schedule Outreach Notification
65 Duplicate Event
66 No push device token for user
67 User doesn't have a Referrer
68 User is Blocked / Suspicious
69 Campaign is not Active
70 Something went wrong, please try again Later
71 No reward for referrer and friend
72 No email for user

Articles

Was this article helpful to you? Yes 1 No