Skip to content

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.

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