Bulk Delete Catalog Ad Items
curl --request DELETE \
--url https://api.hakumedia.ai/v2/campaigns/standard/{campaign_id}/catalog-ad-item-bulk-delete \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"ad_items": [
123456,
123457
]
}
'const options = {
method: 'DELETE',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({ad_items: [123456, 123457]})
};
fetch('https://api.hakumedia.ai/v2/campaigns/standard/{campaign_id}/catalog-ad-item-bulk-delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/campaigns/standard/{campaign_id}/catalog-ad-item-bulk-delete"
payload = { "ad_items": [123456, 123457] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/campaigns/standard/{campaign_id}/catalog-ad-item-bulk-delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'ad_items' => [
123456,
123457
]
]),
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;
}{
"object": "standard_campaign_catalog_ad_item_bulk_delete",
"url": "/v2/campaigns/standard/10658/catalog-ad-item-bulk-delete",
"data": {
"deleted": [
518890709
],
"skipped": [
518837429
]
}
}Ad Items · Catalog Item · Bulk
Bulk Delete Catalog Ad Items
Bulk deletes catalog ad items from a campaign. Ad items which are deleted are listed in the deleted field. Ad items which were ignored (already deleted, or don’t exist) will be listed in the skipped field.
DELETE
/
campaigns
/
standard
/
{campaign_id}
/
catalog-ad-item-bulk-delete
Bulk Delete Catalog Ad Items
curl --request DELETE \
--url https://api.hakumedia.ai/v2/campaigns/standard/{campaign_id}/catalog-ad-item-bulk-delete \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"ad_items": [
123456,
123457
]
}
'const options = {
method: 'DELETE',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({ad_items: [123456, 123457]})
};
fetch('https://api.hakumedia.ai/v2/campaigns/standard/{campaign_id}/catalog-ad-item-bulk-delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/campaigns/standard/{campaign_id}/catalog-ad-item-bulk-delete"
payload = { "ad_items": [123456, 123457] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/campaigns/standard/{campaign_id}/catalog-ad-item-bulk-delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'ad_items' => [
123456,
123457
]
]),
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;
}{
"object": "standard_campaign_catalog_ad_item_bulk_delete",
"url": "/v2/campaigns/standard/10658/catalog-ad-item-bulk-delete",
"data": {
"deleted": [
518890709
],
"skipped": [
518837429
]
}
}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.
Path Parameters
Identifier of the Standard Campaign.
Body
application/json
A list of catalog ad item ids to be deleted
Example:
[123456, 123457]
Response
default - application/json
successful operation
A string denoting the current resource being requested or affected.
Example:
"standard_campaign_catalog_ad_item_bulk_delete"
The relative URL of the current resource being requested or affected.
Example:
"/v2/campaigns/standard/10658/catalog-ad-item-bulk-delete"
Show child attributes
Show child attributes