curl --request GET \
--url https://api.hakumedia.ai/v2/reports \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/reports"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"type": "ad-item",
"id": 5332157455,
"summary": {
"responses": 123,
"impressions": 123,
"clicks": 123,
"conversions": 123,
"conversion_quantity": 123,
"cost": 123,
"payout": 123,
"revenue": 123,
"e_cpm": 123,
"e_cpc": 123,
"e_cpa": 123,
"financials": {
"cost": [
{
"cur": "USD",
"amount": 42.81
}
],
"payout": [
{
"cur": "USD",
"amount": 42.81
}
],
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpm": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpc": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpa": [
{
"cur": "USD",
"amount": 42.81
}
],
"conversion_value": [
{
"cur": "USD",
"amount": 42.81
}
]
},
"breakdown": [
{
"placement": 77512,
"ad_item": {
"type": "ad_item",
"id": 5523
},
"text_ad": null,
"popup": null,
"campaign": {
"type": "campaign",
"id": 772136
},
"zone": {
"type": "standard_zone",
"id": 2265166
},
"reponses": 123,
"impressions": 123,
"clicks": 123,
"conversions": 123,
"conversion_quantity": 123,
"cost": 123,
"payout": 123,
"revenue": 123,
"e_cpm": 123,
"e_cpc": 123,
"e_cpa": 123,
"financials": {
"cost": [
{
"cur": "USD",
"amount": 42.81
}
],
"payout": [
{
"cur": "USD",
"amount": 42.81
}
],
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpm": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpc": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpa": [
{
"cur": "USD",
"amount": 42.81
}
],
"conversion_value": [
{
"cur": "USD",
"amount": 42.81
}
]
}
}
]
},
"details": [
{
"placement": 77512,
"ad_item": {
"type": "ad_item",
"id": 5523
},
"text_ad": null,
"popup": null,
"campaign": {
"type": "campaign",
"id": 772136
},
"zone": {
"type": "standard_zone",
"id": 2265166
},
"reponses": 123,
"impressions": 123,
"clicks": 123,
"conversions": 123,
"conversion_quantity": 123,
"cost": 123,
"payout": 123,
"revenue": 123,
"e_cpm": 123,
"e_cpc": 123,
"e_cpa": 123,
"financials": {
"cost": [
{
"cur": "USD",
"amount": 42.81
}
],
"payout": [
{
"cur": "USD",
"amount": 42.81
}
],
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpm": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpc": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpa": [
{
"cur": "USD",
"amount": 42.81
}
],
"conversion_value": [
{
"cur": "USD",
"amount": 42.81
}
]
},
"start_date": "2023-11-07T05:31:56Z"
}
]
}
],
"meta": {
"type": "ad-item",
"period": "day",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"timezone": "America/Los_Angeles"
},
"object": "report",
"url": "/v2/reports"
}Retrieve Reports
Retrieve an overview of information collected from your ad serving, which can be filtered using the parameters below.
curl --request GET \
--url https://api.hakumedia.ai/v2/reports \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/reports"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"type": "ad-item",
"id": 5332157455,
"summary": {
"responses": 123,
"impressions": 123,
"clicks": 123,
"conversions": 123,
"conversion_quantity": 123,
"cost": 123,
"payout": 123,
"revenue": 123,
"e_cpm": 123,
"e_cpc": 123,
"e_cpa": 123,
"financials": {
"cost": [
{
"cur": "USD",
"amount": 42.81
}
],
"payout": [
{
"cur": "USD",
"amount": 42.81
}
],
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpm": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpc": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpa": [
{
"cur": "USD",
"amount": 42.81
}
],
"conversion_value": [
{
"cur": "USD",
"amount": 42.81
}
]
},
"breakdown": [
{
"placement": 77512,
"ad_item": {
"type": "ad_item",
"id": 5523
},
"text_ad": null,
"popup": null,
"campaign": {
"type": "campaign",
"id": 772136
},
"zone": {
"type": "standard_zone",
"id": 2265166
},
"reponses": 123,
"impressions": 123,
"clicks": 123,
"conversions": 123,
"conversion_quantity": 123,
"cost": 123,
"payout": 123,
"revenue": 123,
"e_cpm": 123,
"e_cpc": 123,
"e_cpa": 123,
"financials": {
"cost": [
{
"cur": "USD",
"amount": 42.81
}
],
"payout": [
{
"cur": "USD",
"amount": 42.81
}
],
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpm": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpc": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpa": [
{
"cur": "USD",
"amount": 42.81
}
],
"conversion_value": [
{
"cur": "USD",
"amount": 42.81
}
]
}
}
]
},
"details": [
{
"placement": 77512,
"ad_item": {
"type": "ad_item",
"id": 5523
},
"text_ad": null,
"popup": null,
"campaign": {
"type": "campaign",
"id": 772136
},
"zone": {
"type": "standard_zone",
"id": 2265166
},
"reponses": 123,
"impressions": 123,
"clicks": 123,
"conversions": 123,
"conversion_quantity": 123,
"cost": 123,
"payout": 123,
"revenue": 123,
"e_cpm": 123,
"e_cpc": 123,
"e_cpa": 123,
"financials": {
"cost": [
{
"cur": "USD",
"amount": 42.81
}
],
"payout": [
{
"cur": "USD",
"amount": 42.81
}
],
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpm": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpc": [
{
"cur": "USD",
"amount": 42.81
}
],
"e_cpa": [
{
"cur": "USD",
"amount": 42.81
}
],
"conversion_value": [
{
"cur": "USD",
"amount": 42.81
}
]
},
"start_date": "2023-11-07T05:31:56Z"
}
]
}
],
"meta": {
"type": "ad-item",
"period": "day",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"timezone": "America/Los_Angeles"
},
"object": "report",
"url": "/v2/reports"
}Autorizaciones
Parámetros de consulta
Frequently used time frames for reporting statistics are bundled as "presets". You can pick a value from the presets instead of creating your own custom date range using the from and to fields. A preset range value must be one of the following: today, last-24-hours, yesterday, this-week, last-week, this-month, last-month, year-to-date, last-year, last-7-days, last-14-days, last-30-days, last-3-months, last-6-months, or last-12-months.
Either a preset or a valid to and from must be specified.
Timezone for the preset field (e.g. America/Los_Angeles). A complete list of acceptable timezones by country is given here.
If no timezone is given, the account's default timezone is used.
A valid ISO 8601 formatted date denoting the inclusive start of the period. For example: 2020-01-01T00:00:00+00:00 (greater than or equal to). This field along with the to field lets you specify a custom date and time interval if no preset options suit your needs. The timezone offsets must match in the specified from and to fields.
You may not run a report for an interval larger than a year.
Either a preset or a valid to and from must be specified.
A valid ISO 8601 formatted date denoting the exclusive end of the period. For example: 2020-02-01T00:00:00+00:00. This field along with the from field lets you specify a custom date and time interval if no preset options suit your needs. The timezone offsets must match the specified to and from fields.
You cannot run a report for an interval larger than a year.
Either a preset or a valid to and from must be specified.
Respuesta
successful operation