View External-demand report
View External-demand report
Query parameters
parametersResponse schemas
curl -X GET \
"https://api.ocamba.com/v2/adex/reports/external-demand" \
-H "Authorization: Bearer {TOKEN}"const url = 'https://api.ocamba.com/v2/adex/reports/external-demand';
const options = {
method: 'GET',
headers: {
Authorization: `Bearer {TOKEN}`
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v2/adex/reports/external-demand");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
200 OK
[
{
"exchange_name": "Adventure testing",
"http_status_code": "200",
"http_reason": "OK",
"browser_name": "Unknown",
"ads_count": 5
},
{
"exchange_name": "Minaaa testing",
"http_status_code": "400",
"http_reason": "Bad Request",
"browser_name": "Unknown",
"ads_count": 0
},
{
"exchange_name": "Mina Testira",
"http_status_code": "204",
"http_reason": "No Content",
"browser_name": "Unknown",
"ads_count": 0
}
]
Sortable fields are: stat_date, exchange_id, exchange_name, partner_id, partner_name, subid, os_id, os_name, browser_id, browser_name, country_code, country_name, device_id, device_name, campaign_id, campaign_name, served, http_status_code, http_reason, error_code, error_desc, keyword, hood_tag_id, hood_tag_name, container_id, container_name, page_domain, zone_id, zone_name, success, failed, impression, total_click, spam_click, click, conversion, income, expense, revenue, ctr, min_bid, max_bid, avg_bid, med_bid, med_bid_exact, ads_count and calls_count.
To get data by the time in your local time zone, you should set tz query parameter to the specific time zone. See the list of valid time zones here -> https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List.
For easier search, Reports API gives you the possibility of using one of the following labels: today, yesterday, last-7-days, last-30-days, last-24-hours, last-month, current-hour, last-hour, last-48-hours, last-2-days, month-to-date, this-month, month-to-yesterday, quarter-to-date.
When filtering delivery_date and delivery_time, use one of the following formats:
- Single format: YYYY-mm-dd;
Displaying stats for this specific day
- Range format: rf:YYYY-mm-dd,YYYY-mm-dd;
Requires usage of the range operators:- r - range - The value must be in a specified open range, where both endpoints are excluded.
- rf - range full - The value must be in a specified closed range, where both endpoints are included.
- rl - range left - The value must be in a specified half-open range, where only left or start point is included.
- rr - range right - The value must be in a specified half-open range, where only right or end point is included.
Displaying stats in this specific range.
- r - range - The value must be in a specified open range, where both endpoints are excluded.
- Hour range format: rl: YYYY-mm-dd hh:00:00,YYYY-mm-dd hh:00:00
If you exclude this parameter, the default setup displays “today” stats.