curl --request GET \
--url https://api.hakumedia.ai/v2/reports/placement-forecast \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/reports/placement-forecast', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/reports/placement-forecast"
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/placement-forecast",
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;
}{
"object": "placement_forecast",
"url": "/v1/reports/placement-forecast",
"data": [
{
"confidence": "high",
"confidence_reasons": [
{
"reason": "The placement forecast estimate may not be accurate because of poorly defined platform targets."
}
],
"impressions_projected": 10000,
"competing_placements": [
{
"campaigns": [
{
"id": 602794,
"name": "Nike Campaign",
"startDate": "2022-11-15 15:00:00",
"endDate": "2022-12-02 23:59:00"
}
],
"banners": [
{
"id": 520518081,
"name": "Nike Ad Item",
"startDate": "2022-11-15 15:00:00",
"endDate": "2022-12-02 23:59:00"
}
]
}
],
"details": [
{
"date": "2022-10-14",
"impressions_projected": 10000
}
]
}
]
}Retrieve Placement Forecast Stats
Retrieve the estimated daily impressions of a proposed placement within the given future date range. Aside from the date, you must also provide the theoretical placement’s assignment details, such as serve method, delivery pacing, weight, and targets. The resulting forecast will consider the presence of any other placements within the provided date range.
curl --request GET \
--url https://api.hakumedia.ai/v2/reports/placement-forecast \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/reports/placement-forecast', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/reports/placement-forecast"
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/placement-forecast",
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;
}{
"object": "placement_forecast",
"url": "/v1/reports/placement-forecast",
"data": [
{
"confidence": "high",
"confidence_reasons": [
{
"reason": "The placement forecast estimate may not be accurate because of poorly defined platform targets."
}
],
"impressions_projected": 10000,
"competing_placements": [
{
"campaigns": [
{
"id": 602794,
"name": "Nike Campaign",
"startDate": "2022-11-15 15:00:00",
"endDate": "2022-12-02 23:59:00"
}
],
"banners": [
{
"id": 520518081,
"name": "Nike Ad Item",
"startDate": "2022-11-15 15:00:00",
"endDate": "2022-12-02 23:59:00"
}
]
}
],
"details": [
{
"date": "2022-10-14",
"impressions_projected": 10000
}
]
}
]
}Authorizations
API key en el header Authorization: Basic TU_API_KEY. La key va tal cual, sin codificar en base64. Las credenciales se entregan al comenzar la integración.
Query Parameters
Specify the zone ID for the proposed placement for which the forecast is to be calculated.
How a placement will be preferred over over others in a zone. The possible values in descending order are "sponsorship", "standard", "network", "bulk" and "house".
The pace of the proposed placement. It can either be "default" or "smooth". Default delivery delivers the impressions as quickly as possible. Smooth delivery will evenly serve ads based on the placement's lifetime dates and quotas. NOTE: placements with serve_method set to "auction" will always be delivered using the "default" method regardless of this field's value.
Whether the placement is served using a weight-based ("weight") or auction-based ("auction") system. Defaults to "weight". Auction-based placements are served based on their CPM and schedule. Weight-based placements are served based on their weight and schedule. These placements can still have a CPM associated with them, but the CPM does not affect serving and is only used for reporting. NOTE: the serve method cannot be changed. The 'serve_method' is required if the 'delivery_pacing' is set to "default"
An integer used to compute the probability of serving a particular placement. Haku uses the weight values of the placements assigned to a zone to determine their distribution ratio. The higher the number, the higher the weight.
For example, you have two campaigns, A and B. Campaign A has a weight of 1, while Campaign B has a weight of 20. If all their other settings are the same, Campaign A will have a 1 in 21 odds of being served, while Campaign B will have a 20 in 21 odds of being served. Defaults to 1.
Cost per 1,000 impressions. This field is required if serve_method is set to "auction".
The targeted number of impressions or clicks to deliver for a placement with a quota-based expiration method, where the ad or campaign will stop being served once the quota for "views" or "clicks" is met. Haku will calculate the remaining inventory based on this value. This field is required if delivery_pacing is set to "smooth".
An optional daily limit for a placement's impressions or clicks.
The geotarget identifier (ID). Required if you want to enable geographic targeting, which forces ads to be served only to users in a particular location. Defaults to "null", which means geographic targeting is not in effect.
The platform target identifier (ID). Required if you want to enable platform targeting, which forces ads to be delivered only to users with particular devices, browsers, or operating systems. Defaults to "null", which means platform targeting is not in effect.