Get a List of Image Ad Items
curl --request GET \
--url https://api.hakumedia.ai/v2/ad-items/image \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/ad-items/image', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/ad-items/image"
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/ad-items/image",
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/ad-items/image",
"data": [
{
"name": "Example Ad Item",
"height": 400,
"width": 650,
"location": "",
"tracking_pixel": "https://url.com",
"tracking_pixels": [
{
"id": 27419,
"url": "https://url1.com"
},
{
"id": 27420,
"url": "https://url2.com"
}
],
"metadata": {
"mobile_only": "false",
"TNR": "15"
},
"trusted_redirect_domains": [
"example.com",
"*.example.com",
"tel:342682346"
],
"is_self_serve": false,
"creative": null,
"creative_url": "https://servedby.hakumedia.ai/default_banner.gif",
"html_alt_text": "The Haku Logo",
"html_target": "_blank",
"html_content_below": "<img />",
"created_date": "2019-04-26 14:55:31",
"last_modified": "2019-04-26 14:55:39",
"object": "image_ad_item",
"self": "/v2/ad-items/image/675265899",
"id": 675265899
}
]
}Ad Items · Image
Get a List of Image Ad Items
You can use the fields query parameter to restrict the fields to be retrieved.
GET
/
ad-items
/
image
Get a List of Image Ad Items
curl --request GET \
--url https://api.hakumedia.ai/v2/ad-items/image \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/ad-items/image', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/ad-items/image"
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/ad-items/image",
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/ad-items/image",
"data": [
{
"name": "Example Ad Item",
"height": 400,
"width": 650,
"location": "",
"tracking_pixel": "https://url.com",
"tracking_pixels": [
{
"id": 27419,
"url": "https://url1.com"
},
{
"id": 27420,
"url": "https://url2.com"
}
],
"metadata": {
"mobile_only": "false",
"TNR": "15"
},
"trusted_redirect_domains": [
"example.com",
"*.example.com",
"tel:342682346"
],
"is_self_serve": false,
"creative": null,
"creative_url": "https://servedby.hakumedia.ai/default_banner.gif",
"html_alt_text": "The Haku Logo",
"html_target": "_blank",
"html_content_below": "<img />",
"created_date": "2019-04-26 14:55:31",
"last_modified": "2019-04-26 14:55:39",
"object": "image_ad_item",
"self": "/v2/ad-items/image/675265899",
"id": 675265899
}
]
}Autorizaciones
Parámetros de consulta
Respuesta
default - application/json
successful operation