Get eligible zones for a campaign
curl --request GET \
--url https://api.hakumedia.ai/v2/campaigns/{id}/eligible-zones \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/campaigns/{id}/eligible-zones', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/campaigns/{id}/eligible-zones"
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/campaigns/{id}/eligible-zones",
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": "list",
"has_more": false,
"limit": 10,
"offset": 0,
"url": "/v2/campaigns/1234/eligible-zones",
"data": [
{
"name": "Zone Name",
"object": "standard_zone",
"self": "/v2/zones/standard/1234",
"id": 1234,
"dimensions": "fixed",
"width": 300,
"height": 250,
"publisher": 5223151,
"popup_frequency": 123,
"refresh_frequency": 123,
"refresh_limit": 123,
"responsive": "auto",
"unique_delivery": false,
"iab_categories": [
"iab2",
"iab7"
],
"allow_demand_sources": true,
"bid_floor": 0,
"min_payout": 0.75,
"serve_priority_order": "weight",
"pmp_deals": [
10075,
10115
],
"private_auction": true,
"optimization_strategy": "global_ecpm",
"burn_in_impressions": 100000,
"burn_in_hours": 24,
"ecpm_testing_allowance": 0.3,
"metadata": {
"btf": "true",
"mobile_only": "false"
},
"rtb_placement_id ": "123",
"api_frameworks ": [
"ormma"
],
"auction_tie_break": "RANDOM",
"allowed_root_native_templates": [
1234,
5678
],
"ad_size_filter": {
"type": "INCLUSIVE",
"sizes": [
{
"width": 300,
"height": 250
}
]
},
"use_share_of_voice": true,
"assigned": false
}
]
}{
"http_status": 404,
"type": "resource_not_found_error",
"message": "Resource not found."
}Campaign Assignments
Get eligible zones for a campaign
Returns zones that can be assigned to the given campaign. Each zone includes an assigned flag indicating whether the campaign is already assigned to that zone. Zones may be standard, email, or catalog.
GET
/
campaigns
/
{id}
/
eligible-zones
Get eligible zones for a campaign
curl --request GET \
--url https://api.hakumedia.ai/v2/campaigns/{id}/eligible-zones \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/campaigns/{id}/eligible-zones', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/campaigns/{id}/eligible-zones"
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/campaigns/{id}/eligible-zones",
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": "list",
"has_more": false,
"limit": 10,
"offset": 0,
"url": "/v2/campaigns/1234/eligible-zones",
"data": [
{
"name": "Zone Name",
"object": "standard_zone",
"self": "/v2/zones/standard/1234",
"id": 1234,
"dimensions": "fixed",
"width": 300,
"height": 250,
"publisher": 5223151,
"popup_frequency": 123,
"refresh_frequency": 123,
"refresh_limit": 123,
"responsive": "auto",
"unique_delivery": false,
"iab_categories": [
"iab2",
"iab7"
],
"allow_demand_sources": true,
"bid_floor": 0,
"min_payout": 0.75,
"serve_priority_order": "weight",
"pmp_deals": [
10075,
10115
],
"private_auction": true,
"optimization_strategy": "global_ecpm",
"burn_in_impressions": 100000,
"burn_in_hours": 24,
"ecpm_testing_allowance": 0.3,
"metadata": {
"btf": "true",
"mobile_only": "false"
},
"rtb_placement_id ": "123",
"api_frameworks ": [
"ormma"
],
"auction_tie_break": "RANDOM",
"allowed_root_native_templates": [
1234,
5678
],
"ad_size_filter": {
"type": "INCLUSIVE",
"sizes": [
{
"width": 300,
"height": 250
}
]
},
"use_share_of_voice": true,
"assigned": false
}
]
}{
"http_status": 404,
"type": "resource_not_found_error",
"message": "Resource not found."
}Autorizaciones
Parámetros de consulta
Respuesta
successful operation