Create a Catalog Zone
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": []
}Zones · Catalog
Create a Catalog Zone
Create a catalog zone in a publisher.
POST
/
zones
/
catalog
Create a Catalog Zone
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": []
}Autorizaciones
Cuerpo
application/json
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).
Rango requerido:
1 <= x <= 7776000Ejemplo:
7776000
Respuesta
default - application/json
successful operation