Get a list of Placements
curl --request GET \
--url https://api.hakumedia.ai/v2/placements \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/placements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/placements"
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/placements",
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/placements",
"data": [
{
"active": true,
"advertisement": {
"id": 222,
"type": "standard_campaign"
},
"channel": null,
"cost": {
"cpm": 2.84,
"cpc": 2.56,
"cpa": 3.916
},
"day_cap_limit": null,
"day_cap_type": "views",
"geo_target": 12345,
"keywords": "example, keyword, list",
"keywords_match_method": "preferred",
"payout": {
"type": "rate",
"cpm": 1.6,
"cpc": 1.75,
"cpa": 2.3
},
"payout_percent": null,
"per_user_view_limit": null,
"per_user_view_period": null,
"platform_target": 12345,
"priority": "standard",
"serve_method": "weight",
"schedule": 888,
"weight": 1,
"share_of_voice": 25,
"zone": {
"id": 999,
"type": "standard_zone"
},
"data_key_target_id": 10000,
"list_target": 12345,
"contextual_segments": [
1125,
1128
],
"audience_segments": [
1125,
1128
],
"custom_segment_definition": 10000,
"created_date": "2019-04-17 16:31:02",
"object": "placement",
"self": "/v2/placements/1234",
"id": 1234
}
]
}Placements
Get a list of Placements
You can use the fields query parameter to restrict the fields to be retrieved.
GET
/
placements
Get a list of Placements
curl --request GET \
--url https://api.hakumedia.ai/v2/placements \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/placements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/placements"
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/placements",
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/placements",
"data": [
{
"active": true,
"advertisement": {
"id": 222,
"type": "standard_campaign"
},
"channel": null,
"cost": {
"cpm": 2.84,
"cpc": 2.56,
"cpa": 3.916
},
"day_cap_limit": null,
"day_cap_type": "views",
"geo_target": 12345,
"keywords": "example, keyword, list",
"keywords_match_method": "preferred",
"payout": {
"type": "rate",
"cpm": 1.6,
"cpc": 1.75,
"cpa": 2.3
},
"payout_percent": null,
"per_user_view_limit": null,
"per_user_view_period": null,
"platform_target": 12345,
"priority": "standard",
"serve_method": "weight",
"schedule": 888,
"weight": 1,
"share_of_voice": 25,
"zone": {
"id": 999,
"type": "standard_zone"
},
"data_key_target_id": 10000,
"list_target": 12345,
"contextual_segments": [
1125,
1128
],
"audience_segments": [
1125,
1128
],
"custom_segment_definition": 10000,
"created_date": "2019-04-17 16:31:02",
"object": "placement",
"self": "/v2/placements/1234",
"id": 1234
}
]
}Autorizaciones
Parámetros de consulta
Respuesta
default - application/json
successful operation