Device Reporting API
Change Log
version | date | notes |
---|---|---|
v4.0 | 2022-9-15 | supports TP revenue query |
v3.0 | - | supports customized user ID query |
v2.0 | - | supports device report |
Note
- The API will return 4 URLs for downloading csv files, the URL is valid for 15 mins, please send another request if it is over 15 mins.
- Please note that, the complete data should contain the 4 files.
- The user data will be sent to different computing ceters according to user's location, please don't worry if you found one of the center don't have any data.
- Since Ad Networks have different report time zones, it will be more accurate to request the last two days' data, or update the historical data(last two days normally) after getting response.
- Obtaining historical data one year ago is not supported. If you need it, please contact your account manager
Note: Data freshness:
- UTC+8 data: 5:00 (Beijing Time)
- UTC+0 data: 15:00 (Beijing Time)
- UTC-8 data: day2 at 2:00 (Beijing Time)
1. Authentication check
1.1 Method
HTTP
1.2 Header Params
Authorization: Bearer {your token}
params | notes | sample |
---|---|---|
Authorization | token | Bearer {your token} |
curl --location --request POST 'https://openapi.tradplusad.com/v3/deviceReport' \
--header 'Authorization: Bearer 0C2FP316-0D66-5CDE-AD57-F48JS33DB9DC' \
--header 'Content-Type: application/json' \
--data-raw '{
"date" : "2022-09-15",
"timezone" : "UTC+0",
"currency" : "USD",
"appId" : "6640E7E3BDAC951B8F28D4C8C50E50B5"
}'
method of getting token: "my account"-"Report API Key"- generate APK key
2. Device Reporting API v4.0
2.1 URL_V3(recommended)
https://openapi.tradplusad.com/v3/deviceReport
2.2 Request method
HTTP POST HTTP Content-Type: application/json
2.3 Request params
params | type | required | notes | sample |
---|---|---|---|---|
date | String | Y | date, format:YYYY-mm-dd,Only supports one day | 2020-03-01 |
timezone | String | N | report time zone ,Only support:"UTC+8"、"UTC+0"、"UTC-8"。default:"UTC+0" | UTC+0 |
currency | String | N | currency。default : USD,Only support:USD CNY | USD |
appId | String | Y | APPID,Single choice |
2.4 Return data
The data file is CSV, explode by ',' .
fields | type | notes |
---|---|---|
dateTimeStamp | int | Time Stamp |
appId | String | APP ID(tradplus) |
placementId | String | Placement ID (tradplus) |
placementName | String | Placement name (tradplus) |
adFormat | Int | Ad slot type |
adFormatName | String | Ad slot name |
area | String | Country code |
network | Int | Network ID |
networkName | String | Network Name |
networkPlacementId | String | Network Placement Id |
networkPlacementName | String | Network Placement Name (tradplus) |
networkPlacementInfo | String | Network Placement Information |
androidId | String | Device id,androidid |
gaid | String | Google advertising ID |
idfa | String | Identity for Advertisers |
userId | String | Custom User ID |
channel | String | Channel |
sub_channel | String | Sub-channel |
impression | Int | Impression number(tradplus) |
click | Int | Click number(tradplus) |
revenue | Float | Revenue |
ecpm | Float | Ecpm |
oaid | String | Android device ID |
idfv | String | Identifier for Vendor |
os_version | String | Version of OS |
att_status | Int | Status of Apple's ATT (0: notDetermined; 1: restricted; 2: denied; 3: authorized) |
tp_revenue | Float | TP Revenue |
2.5 Sample
Reqeust Sample:
{
"date" : "2021-07-1",
"timezone" : "UTC+0",
"currency" : "USD",
"appId" : "6640E7E3BDAC951B8F28D4C8C50E50B5"
}
Response Sample:
{
"url_cn": "https://tradplus-tracking-data-cn.oss-cn-shanghai.aliyuncs.com/user_api_v3%2F20210625%2F6640E7E3BDAC951B8F28D4C8C50E50B5.csv?Expires=1631502408&OSSAccessKeyId=LTAI4G15mptjxrMChg6SV1pF&Signature=R4x8c34%2Ft3pmv%2FennYc%2Fxuv%2FWrU%3D",
"url_en": "https://tradplus-tracking-data-de.oss-eu-central-1.aliyuncs.com/user_api_v3%2F20210625%2F6640E7E3BDAC951B8F28D4C8C50E50B5.csv?Expires=1631502408&OSSAccessKeyId=LTAI4G15mptjxrMChg6SV1pF&Signature=yulxcBdh%2F3%2BzjJP9HVVG5SeQ%2FDY%3D",
"url_in": "https://tradplus-tracking-data-in.oss-ap-south-1.aliyuncs.com/user_api_v3%2F20210625%2F6640E7E3BDAC951B8F28D4C8C50E50B5.csv?Expires=1631502408&OSSAccessKeyId=LTAI4G15mptjxrMChg6SV1pF&Signature=FhlFPsyWmV88NHxAvMJK5SAbKXk%3D",
"url_sg": "https://tradplus-tracking-data-sg.oss-ap-south-1.aliyuncs.com/user_api_v3%2F20210625%2F6640E7E3BDAC951B8F28D4C8C50E50B5.csv?Expires=1631502408&OSSAccessKeyId=LTAI4G15mptjxrMChg6SV1pF&Signature=FhlFPsyWmV88NHxAvMJK5SAbKXk%3D"
}
3. Device Reporting API v3.0
3.1 URL_V3(recommended)
https://openapi.tradplusad.com/v3/deviceReport
3.2 Request method
HTTP POST HTTP Content-Type: application/json
3.3 Request params
params | type | required | notes | sample |
---|---|---|---|---|
date | String | Y | date, format:YYYY-mm-dd,Only supports one day | 2020-03-01 |
timezone | String | N | report time zone ,Only support:"UTC+8"、"UTC+0"、"UTC-8"。default:"UTC+0" | UTC+0 |
currency | String | N | currency。default : USD,Only support:USD CNY | USD |
appId | String | Y | APPID,Single choice |
3.4 Return data
The data file is CSV, explode by ',' .
fields | type | notes |
---|---|---|
dateTimeStamp | int | Time Stamp |
appId | String | APP ID(tradplus) |
placementId | String | Placement ID (tradplus) |
placementName | String | Placement name (tradplus) |
adFormat | Int | Ad slot type |
adFormatName | String | Ad slot name |
area | String | Country code |
network | Int | Network ID |
networkName | String | Network Name |
networkPlacementId | String | Network Placement Id |
networkPlacementName | String | Network Placement Name (tradplus) |
networkPlacementInfo | String | Network Placement Information |
androidId | String | Device id,androidid |
gaid | String | Google advertising ID |
idfa | String | Identity for Advertisers |
userId | String | Custom User ID |
channel | String | Channel |
sub_channel | String | Sub-channel |
impression | Int | Impression number(tradplus) |
click | Int | Click number(tradplus) |
revenue | Float | Revenue |
ecpm | Float | Ecpm |
oaid | String | Android device ID |
idfv | String | Identifier for Vendor |
os_version | String | Version of OS |
att_status | Int | Status of Apple's ATT (0: notDetermined; 1: restricted; 2: denied; 3: authorized) |
3.5 Sample
Reqeust Sample:
{
"date" : "2021-07-1",
"timezone" : "UTC+0",
"currency" : "USD",
"appId" : "6640E7E3BDAC951B8F28D4C8C50E50B5"
}
Response Sample:
{
"url_cn": "https://tradplus-tracking-data-cn.oss-cn-shanghai.aliyuncs.com/user_api_v3%2F20210625%2F6640E7E3BDAC951B8F28D4C8C50E50B5.csv?Expires=1631502408&OSSAccessKeyId=LTAI4G15mptjxrMChg6SV1pF&Signature=R4x8c34%2Ft3pmv%2FennYc%2Fxuv%2FWrU%3D",
"url_en": "https://tradplus-tracking-data-de.oss-eu-central-1.aliyuncs.com/user_api_v3%2F20210625%2F6640E7E3BDAC951B8F28D4C8C50E50B5.csv?Expires=1631502408&OSSAccessKeyId=LTAI4G15mptjxrMChg6SV1pF&Signature=yulxcBdh%2F3%2BzjJP9HVVG5SeQ%2FDY%3D",
"url_in": "https://tradplus-tracking-data-in.oss-ap-south-1.aliyuncs.com/user_api_v3%2F20210625%2F6640E7E3BDAC951B8F28D4C8C50E50B5.csv?Expires=1631502408&OSSAccessKeyId=LTAI4G15mptjxrMChg6SV1pF&Signature=FhlFPsyWmV88NHxAvMJK5SAbKXk%3D",
"url_sg": "https://tradplus-tracking-data-sg.oss-ap-south-1.aliyuncs.com/user_api_v3%2F20210625%2F6640E7E3BDAC951B8F28D4C8C50E50B5.csv?Expires=1631502408&OSSAccessKeyId=LTAI4G15mptjxrMChg6SV1pF&Signature=FhlFPsyWmV88NHxAvMJK5SAbKXk%3D"
}