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.

Articles

Was this article helpful to you? Yes 1 No