1.Scope of application

This document is applicable to channels that connect to the AdPower platform and obtain advertisement lists and advertisement settlement callbacks through the API interface.

1.Docking method:

Channel --> Request API interface to return JSON

2.Request method:

Request Protocol:HTTPS

Request method: GET / POST

3.Data format:

For GET requests, parameters should be appended to the URL. For POST requests, parameters should be in the form-data format.

The response data is all in JSON data format. To avoid type parsing errors, all data values are in string type.

4.Notes:

Ensure that all the ads you receive are valid within the time of your request. We may take down ads at any time. To minimize invalid clicks on taken-down ads, we recommend that you make a request every 15 - 30 minutes. Taken-down ads will be inaccessible.

Making too many requests in a short period may result in an HTTPS response code 429 (Too Many Requests). The number of seconds to wait before retrying is provided in the "Retry - After" response header.

1.API URL

https://api.adpower.cn/v2/offline?app_id=c46b362886e42385d30c83d76abc3c51&page_size=20&os=android&country=IN&payout_type=CPI

2.Request parameter

Parameter Type Mandatory Description
app_id string Yes APP key (Available from Adpower platform)
page_size int No Define the number of ads per page
payout_type string No Filter ads payout_type: CPA / CPI / CPL
os string No Filter offer by target OS: Android / IOS
country string No Filter ads by target country
offer_ids string No Filter ads by prices

3.Response Parameter

Parameter Type Description
id string The id of the ads
name string The name of the ads
icon_url string The link to the icon of the ads
package string The package name of the ads
ask_description_for_user string Task description for ads
kpi string Kpi description for ads
payout double The payout (in USD) of the ads
countries array The target country of the ads
os array The target os of the ads: android / ios
payout_type string The payout type of the ads: CPA / CPI / CPL
category string Ads classification(example:Casual,Education)
ad_type string App Type(example:APK,Web)
trackingLink string The tracking link of the ads
events array Ad event, including event name, event description, event price (in USD)

4.Example

GET http://api.adpower.cn/v2/offline?app_id=adfb362896e42565d30c44d76ghc3c55&page=1&page_size=20&os=android&country=IN&payout_type=CPI

5.Tracking link parameter

Parameter Type Description
clickid string User click unique identifier(maximum 256)
gps_adid string User Google Advertising ID (GAID),Required fields
android_id string User's Android ID
model string The device model.
os_version string The device operating system version.
aff_sub string For your custom parameter (maximum 256)
aff_sub2 string For your custom parameter (maximum 256)
ua string Do not extra the CFNetwork user-agent,extract the other one(URL encoded)
ip string User's IP

Notes: Failing to provide required device parameters would result in invalid click.Lengthy parameters would be truncated on our side, so please respect the maximum length requirement.

6.Settlement Callback Protocol

Normally we send callback immediately when conversion happens. However, on rare scenarios like server failure, delayed conversion confirm, etc., delayed callbacks (up to 7 days) are expected. We send callback request via HTTP GET method, retry on request failure (HTTP response code 5XX). Multiple callbacks related to the same conversion is possible, so it's receiver's duty to make sure the callback endpoint is idempotent.

Settlement callback interface settings

Edit the application in the AdPower background and set the callback interface.

Callback Parameter

Parameter Mandatory Description
{aff_sub} Yes Your click_id. Ads network unique click identifier
{event_name} Yes Only when the advertiser calls back the event name will postback bring the event name
{payout} Yes The settled price (in USD) for this conversion.
{is_settle} Yes If it is a settlement event is_ settle=1, if it is a non settlement event is_ settle=0
{gaid} No Google Advertising ID
{aff_sub2} No Passed in tracking link
{aff_sub3} No Passed in tracking link