About the API
Once you have an offerwall setup, we offer an API that allows you to retrieve on demand top offers for an individual user, that can be displayed natively in your game/app.
This is a unique API that piggybacks off of your offerwall integration to offer a curated selection of top offers based the individual users history. This is an on-demand API and the data should not be stored and showed to the user at a later point.
In order to access the API, you must have already created and setup your offerwall in our portal here.
API Call
1. Link Structure
We recommend calling this client-side to allow for correct detection. If called server-side, you must pass device and ip values that match the client device.
http://publishers.revenueuniverse.com/hotoffers_api.php?wall=WALLIDHERE&uid=USERIDHERE&numoffers=INTEGER(1-500)&version=INTEGER(1|2)
2. Variables
- wall: This should be the wall ID of your integration. This is available in your account here.
- uid: This should unique user ID of the user you are fetching offers for.
- numoffers: This should be a numerical value between 1-500 with the amount of offers that you would like to be returned.
- version (optional): API response version. Default is 1. If set to 2, additional fields related to offer tiers will be included in the response.
- device (optional): This should be “desktop”, “ios”, or “android”, and should only be used if the call is server-side, since detection is done automatically on the client side.
- ip (optional): This should be the user's IPv4 address, and should only be used if the call is server-side, since detection is done automatically on the client side.
Results
Your call will return the following data points:
- cid: Campaign ID in RevU portal.
- name: Name of offer.
- description: Description of the offer.
- terms: Requirements to receive the reward.
- reporting: The maximum time window it will take users to receive their reward after completion.
- currency_award: Amount of currency awarded based on offerwall setup.
- offer_url: offer click URL for that specific user.
- image_url: URL of a square image for the offer.
Additional Fields in Version 2
When version=2 is included in the API call, the response will also contain:
- tiers (boolean): Indicates whether an offer has tiers.
- currency_award_with_tiers (integer): The total amount of currency awarded if all tiers are completed.
- tiers_url (string): A URL that the client can call to retrieve details about the offer's tiers.
Usage
The data returned can be displayed to users natively in your game/app.
description and terms contain important information in user-facing language and must be displayed so users understand the requirements to receive their reward.
The offer_url is customized for the specific user based on your offerwall integration and should not be edited.
If tiers is true, the client can call the tiers_url to fetch tier-specific details. The tiers_url will return the user's status for each event, a blank value indicates the user has not completed this event; Completed indicated a successful conversion; Revoked indicates fraudulent or invalid activity post-conversion.
The user's currency_award will be distributed via the postback set up for your offerwall once they have completed the event or offer.