curl --request PUT \
--url https://api.hakumedia.ai/v2/zones/standard/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Zone Name"
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Zone Name'})
};
fetch('https://api.hakumedia.ai/v2/zones/standard/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/zones/standard/{id}"
payload = { "name": "Zone Name" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/zones/standard/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Zone Name'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"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
}{
"http_status": 404,
"type": "resource_not_found_error",
"message": "Resource not found."
}Update a Standard Zone
curl --request PUT \
--url https://api.hakumedia.ai/v2/zones/standard/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Zone Name"
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Zone Name'})
};
fetch('https://api.hakumedia.ai/v2/zones/standard/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/zones/standard/{id}"
payload = { "name": "Zone Name" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/zones/standard/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Zone Name'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"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
}{
"http_status": 404,
"type": "resource_not_found_error",
"message": "Resource not found."
}Autorizaciones
Cuerpo
The height of the standard zone (see common ad item dimensions). The height and width of the zone must match the size of the ad items that will be displayed within it. These values must be given if dimensions are "fixed". It must be 0 or not given if dimensions are "dynamic".
250
The number of impressions after which a popup is displayed. It lets you control how often the popups should be served. For example, setting the value to 1 means a popup will be displayed each time the page is loaded, while setting it to 5 means a popup will be displayed after every five impressions. Defaults to 0, which means never show a popup.
The interval (in seconds) after which a new ad is shown in the zone without requiring a page reload. This allows serving multiple impressions in one viewing session, making the most of your ad space on content heavy pages where the user will be spending a lot of time reading, such as an article or a forum thread. Defaults to 0, which means the zone will not be served new ads without a page reload.
NOTE:
- If Unique Delivery is on, the interval must be equal to the number of ad items in the zone or assigned campaign
- Third party scripts relying on
document.writemay not serve properly when using JavaScript zone tags.
Whether the size of the ad is fixed ("fixed"), resizeable ("auto"), or subject to the CSS of the page ("inherit"). The "fixed" option makes the ad item match the zone size when it is served. The "auto" option resizes the zone to fit the size of the served ad item. The "inherit" option lets CSS on the page decide the size of the zone.
TIPS:
- Use "auto" if there is a chance that no ad may be served, which may be the case if you are using targeting and quotas. This will allow Haku to collapse the empty zones.
- Do not use "auto" when using asynchronous tags with a raw HTML ad item. Otherwise the ad will not display properly because iframes conflict with responsive pages.
- Do not use "ASync JavaScript" or "IFrame" tags with "auto" and "inherit".
"auto"
Whether unique ads are served on each zone. It requires the use of JavaScript tags. Unique Delivery ensures that each zone will show an ad item from different campaigns, making it ideal for pages where the same zone tag is used multiple times. When set to 'true', the number of campaigns assigned to the zone must be greater than or equal to the number of instances of the zone on the page.
false
A list of IAB Categories that describe the content and purpose of the app or site to which the zone belongs.
NOTE: This feature requires the Programmatic add-on. If you don't have the add-on, you must set this field's value to null or an empty array.
["iab2", "iab7"]
Required for OpenRTB requests. Sets the tagid field in the request. The tagid is the identifier of a specific ad placement or the ad tag that was used to initiate the auction.
NOTE: The ability to participate in OpenRTB auctions via Haku requires subscribers to have the Programmatic Advertising add-on. If you don't have this add-on, you must set this field's value to null.
"123"
Required for OpenRTB requests. Sets the api field in the banner object. The banner specifies the list of supported API frameworks for this impression.
NOTE: The ability to participate in OpenRTB auctions via Haku requires subscribers to have the Programmatic Advertising add-on. If you don't have this add-on, you must set this field's value to null or an empty array.
["ormma"]
Respuesta
successful operation
The height of the standard zone (see common ad item dimensions). The height and width of the zone must match the size of the ad items that will be displayed within it. These values must be given if dimensions are "fixed". It must be 0 or not given if dimensions are "dynamic".
250
The number of impressions after which a popup is displayed. It lets you control how often the popups should be served. For example, setting the value to 1 means a popup will be displayed each time the page is loaded, while setting it to 5 means a popup will be displayed after every five impressions. Defaults to 0, which means never show a popup.
The interval (in seconds) after which a new ad is shown in the zone without requiring a page reload. This allows serving multiple impressions in one viewing session, making the most of your ad space on content heavy pages where the user will be spending a lot of time reading, such as an article or a forum thread. Defaults to 0, which means the zone will not be served new ads without a page reload.
NOTE:
- If Unique Delivery is on, the interval must be equal to the number of ad items in the zone or assigned campaign
- Third party scripts relying on
document.writemay not serve properly when using JavaScript zone tags.
Whether the size of the ad is fixed ("fixed"), resizeable ("auto"), or subject to the CSS of the page ("inherit"). The "fixed" option makes the ad item match the zone size when it is served. The "auto" option resizes the zone to fit the size of the served ad item. The "inherit" option lets CSS on the page decide the size of the zone.
TIPS:
- Use "auto" if there is a chance that no ad may be served, which may be the case if you are using targeting and quotas. This will allow Haku to collapse the empty zones.
- Do not use "auto" when using asynchronous tags with a raw HTML ad item. Otherwise the ad will not display properly because iframes conflict with responsive pages.
- Do not use "ASync JavaScript" or "IFrame" tags with "auto" and "inherit".
"auto"
Whether unique ads are served on each zone. It requires the use of JavaScript tags. Unique Delivery ensures that each zone will show an ad item from different campaigns, making it ideal for pages where the same zone tag is used multiple times. When set to 'true', the number of campaigns assigned to the zone must be greater than or equal to the number of instances of the zone on the page.
false
A list of IAB Categories that describe the content and purpose of the app or site to which the zone belongs.
NOTE: This feature requires the Programmatic add-on. If you don't have the add-on, you must set this field's value to null or an empty array.
["iab2", "iab7"]
Required for OpenRTB requests. Sets the tagid field in the request. The tagid is the identifier of a specific ad placement or the ad tag that was used to initiate the auction.
NOTE: The ability to participate in OpenRTB auctions via Haku requires subscribers to have the Programmatic Advertising add-on. If you don't have this add-on, you must set this field's value to null.
"123"
Required for OpenRTB requests. Sets the api field in the banner object. The banner specifies the list of supported API frameworks for this impression.
NOTE: The ability to participate in OpenRTB auctions via Haku requires subscribers to have the Programmatic Advertising add-on. If you don't have this add-on, you must set this field's value to null or an empty array.
["ormma"]