Objective
This document provides directions on how to access YouAppi’s reporting API for advertisers.
API Request
Request URL Format
Access to the YouAppi reporting API is via HTTP GET, using the following base URL:
https://adv.youappi.com/advertiser/report/{trackertoken}?
{trackertoken} is a unique access token that will be provided to the advertiser by YouAppi and will look similar to this: ab1c2de3-456f-78e9-h60d-2350f5fc722a. The advertiser must replace the {trackertoken} placeholder with the token provided.
Request Frequency
Please note that time between requests should not be less than 10 minutes.
Excessive requests will be rejected.
Request Parameters
The table below contains the parameters that may be included in the API request.
Parameter Name | Description | Mandatory | Value Type | Example |
start |
The start date of the data in the report. Please note: · If the time of the request is between 00:00-12:00 UTC, then the earliest date available is the day before yesterday. · If the time of the request is between 12:00-00:00 UTC, then the earliest date available is yesterday. · Allowed format is: ‘YYYY-MM-DD’. |
Yes | String | 2016-10-01 |
end |
The end date of the data in the report. Please note: · If the time of the request is between 00:00-12:00 UTC, then the earliest date available is the day before yesterday. · If the time of the request is between 12:00-00:00 UTC, then the earliest date available is yesterday. · The date range cannot exceed more than 30 days. · Allowed format is: ‘YYYY-MM-DD’. |
Yes | String | 2016-10-01 |
groupBy |
The fields according to which the report should be broken down. Supports multiple values (case-sensitive!), separated by commas. The report will be sorted by the first “groupBy” attribute. (see example in section 2.4) |
No | String |
date campaign app platform country |
Sample Request
The following is an example request:
https://adv.youappi.com/advertiser/report/ab1c2de3-456f-78e9-h60d-2350f5fc722a?start=2016-10-01&end=2016-10-07&groupBy=campaign,country,app,platform
API Response
Response Format
The response of the API is in JSON format. YouAppi’s response looks like this:
{
"status":200,
"statusMessage":"OK ",
"data":[
{
"campaign":10060045,
"campaign_tracking_link":"http://trackinglink.com/?a=123&b=456",
"country":"ca",
"app":"com.ddi",
"platform":"android",
"impressions":10000,
"clicks":300,
"installs":25,
"spend":57.5
},
{
"campaign":10060035,
"campaign_tracking_link":"http://trackinglink.com/?a=123&b=789",
"country":"us",
"app":"com.jellybtn.cashkingmobile",
"platform":"android",
"impressions":20000,
"clicks":600,
"installs":55,
"spend":130
}
],
"warning":false,
"errorJsonString":"{\"status\": 200, \"statusMessage\":\"OK \"}"
}
Available Attributes
The table below contains information about the parameters that are available in the response.
Field Name | Description | Mandatory | Value Type | Example |
date | The date of the data. Allowed format is: ‘YYYY-MM-DD’. | No | String | 2016-12-03 |
campaign | A unique ID assigned to the campaign by YouAppi’s system. | No | Integer | 10060035 |
campaign_tracking_link | The click link of the campaign as implemented in YouAppi’s system. | No | String | http://trackinglink.com/?a=123&b=789 |
country | Two-letter country code | No | String | us |
app | Package name or native app ID | No | String | com.jellybtn.cashkingmobile |
platform | The relevant platform of the campaign. | No | String |
android iphone ipad |
impressions | The number of impressions | Yes | Integer | – |
clicks | The number of clicks | Yes | Integer | – |
installs | The number of installs | Yes | Interger | – |
spend | The advertiser’s spend in USD. | Yes | Integer | – |
Error messages
Please note that the HTTP response code will always be 200. However, if you encountered an error, the value of the “status” field in the response will be 400.
There are few error messages that YouAppi can respond with:
- Advertiser not authorized
- Reporting API is not enabled
- Too frequent calls. Wait 10 minutes
- Invalid groupBy attribute
- Invalid Request. Missing Start/End date.
- Invalid Request. End date must be greater than start date.
- Processing more than 30 days is not allowed
- Date format should be YYYY-MM-DD
The error will look like this:
{
"status":400,
"statusMessage":"ERROR Advertiser not authorized",
"warning":false,
"errorJsonString":"{\"status\": 400, \"statusMessage\":\"ERROR Advertiser not authorized\"}"
}
For additional information and support please contact support@youappi.com.