curl --request POST \
--url https://api.hakumedia.ai/v2/zones/catalog \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Promotions",
"catalog_id": 74374
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Promotions', catalog_id: 74374})
};
fetch('https://api.hakumedia.ai/v2/zones/catalog', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/zones/catalog"
payload = {
"name": "Promotions",
"catalog_id": 74374
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/zones/catalog",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Promotions',
'catalog_id' => 74374
]),
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": "Product DB",
"catalog_id": 74374,
"publisher": 53563,
"bid_floor": 0,
"bid_floor_cpm": 1.1,
"bid_floor_cpc": 1.3,
"advertiser_cost_type": "CPC",
"auction_type": "SECOND_PRICE",
"click_cooldown_period": 60,
"conversion_lookback_period": 7776000,
"object": "catalog_zone",
"self": "/v2/zones/catalog/104339",
"id": 104339,
"metadata": []
}Create a Catalog Zone
Create a catalog zone in a publisher.
curl --request POST \
--url https://api.hakumedia.ai/v2/zones/catalog \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Promotions",
"catalog_id": 74374
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Promotions', catalog_id: 74374})
};
fetch('https://api.hakumedia.ai/v2/zones/catalog', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/zones/catalog"
payload = {
"name": "Promotions",
"catalog_id": 74374
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/zones/catalog",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Promotions',
'catalog_id' => 74374
]),
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": "Product DB",
"catalog_id": 74374,
"publisher": 53563,
"bid_floor": 0,
"bid_floor_cpm": 1.1,
"bid_floor_cpc": 1.3,
"advertiser_cost_type": "CPC",
"auction_type": "SECOND_PRICE",
"click_cooldown_period": 60,
"conversion_lookback_period": 7776000,
"object": "catalog_zone",
"self": "/v2/zones/catalog/104339",
"id": 104339,
"metadata": []
}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.
Body
The name of the catalog zone
255"Promotions"
The identifier (ID) of the catalog
74374
The identifier (ID) of the publisher to which the zone belongs
53563
The default bid floor for this zone
0
Sets the bid floor for CPM in the zone, bids below this will be eliminated. This value can be overridden at the time of the ad request. This should be set if the advertiser_cost_type is CPM. It is assumed to be in the publisher's currency.
1.1
Sets the bid floor for CPC in the zone, bids below this will be eliminated. This value can be overridden at the time of the ad request. This should be set if the advertiser_cost_type is CPC. It is assumed to be in the publisher's currency.
1.3
Configures the zone to charge the advertiser by either impression (CPM) or by clicks (CPC). The valid values are CPM or CPC, it will default to CPC.
CPM, CPC "CPC"
Sets the type of auctions in this zone, values are either FIRST_PRICE or SECOND_PRICE. It will default to SECOND_PRICE.
FIRST_PRICE, SECOND_PRICE "SECOND_PRICE"
Adjusts the cooldown period for users clicking on the same advertisement more than once within a designated period. Expects a value between 1 and 86400 inclusive (seconds). Default 3600 seconds.
1 <= x <= 8640060
Adjusts the conversion lookback period which controls the period of time which it would be possible to record a conversion for a given click. Expects a value between 1 and 7776000 inclusive (seconds). Default 7776000 seconds (90 days).
1 <= x <= 77760007776000
Response
successful operation
The name of the catalog zone
255"Product DB"
The identifier (ID) of the catalog
74374
The identifier (ID) of the publisher to which the zone belongs
53563
The default bid floor for this zone
0
Sets the bid floor for CPM in the zone
1.1
Sets the bid floor for CPC in the zone
1.3
Configures the zone to charge the advertiser by either impression (CPM) or by clicks (CPC)
CPM, CPC "CPC"
Sets the type of auctions in this zone
FIRST_PRICE, SECOND_PRICE "SECOND_PRICE"
The cooldown period for users clicking on the same advertisement
1 <= x <= 8640060
The conversion lookback period
1 <= x <= 77760007776000
A string denoting the current resource being requested or affected.
"catalog_zone"
The relative URL of the current resource being requested or affected.
"/v2/zones/catalog/104339"
The current resource identifier (ID).
104339
An object containing any number of metadata fields and values.
[]