Request
Request Headers
Header Name |
Type |
Value |
Required |
Description |
Authorization |
String |
Bearer ${access_token} |
Yes |
Send your generated access token in place of ${access_token} for authorization. |
Example: |
|
|
|
|
curl “https://sspi-ext-report.adpopcorn.com/v1/analytics/data?fromDate=20220101&toDate=20220101” -H “Authorization: Bearer test_access_token” -L |
Request Query Parameters
The following table lists parameters you can use to build requests.
Parameter Name |
Type |
Required |
Description |
fromDate |
String |
Yes |
Start date of data retrieval. Example: 20220101 |
toDate |
String |
Yes |
End date of data retrieval. Example: 20220101 |
reportTypeId |
Integer |
No |
Type of Report ID. |
1: Provide data about sub_id grouping. (postback) |
|
|
|
2: Provide data about sub_id and publisher_id grouping. (click data is not provided, postback) |
|
|
|
3: Provide data about coupang report |
|
|
|
****4: Provide data about sub_id and sub_param |
|
|
|
Default: 1 |
|
|
|
Response
Header Name |
Type |
Description |
Content-Type |
application/json |
JSON response |
Response Body Parameters
The following table lists parameters returns in API responses.
Body Parameter |
Type |
Description |
alert |
String |
Alert message from server. In most cases, it will be null, Example: “alert”: null |
records |
Array of object |
The main table-like data structure |
ID |
Type |
Description |
report_date |
String |
Date (YYYYMMDD format). |
sub_id |
String |
sub id |
publisher_id |
String |
ID of publisher (only reportTypeId is 2) |
click |
Numeric |
Number of clicks. (only reportTypeId is 1, 3) |
conversion |
Numeric |
Number of conversions. |
conversion_revenue |
Numeric |
Conversion revenue. |
cancel |
Numeric |
Number of cancel. |
cancel_revenue |
Numeric |
Cancel revenue. |
total_revenue |
Numeric |
Total revenue. |
Sample JSON
{
"alert": null,
"records": [
{
"report_date": "20220101",
"sub_id": "test_sub_id",
"publisher_id": "test_publisher_id",
"click": 22649,
"conversion": 470,
"conversion_revenue": 13065380,
"cancel": 55,
"cancel_revenue": -978080
"total_revenue": 12087300
}
]
}
HTTP Status Codes
The table below lists common HTTP status codes sent in REST API responses from the Adpopcorn API platform.