Information about Advertising Campaigns
campaign/info
Parameters:
- token — authorization (string)
- id — id of the ad campaign (int)
category_id — category identifier (int)
parent - parent advertising company ID (int)You must specify the advertising campaign's identifier (id) OR the category identifier (category_id) OR the parent advertising company ID (parent). If you do not set any of these parameters, the entire list of all the campaigns will be displayed. - currency - currency (string, by default: account currency). Values:
- rub
- usd
- language - advertising campaign description language (string, by default: account language). Values:
- ru - Russian
- en - English
- es - Spanish
- pt - Portuguese
- filter - advertising campaign list filter (string, default: none). Values:
- active - running advertising campaigns
- activity_hour - activity for the current hour (updated at midnight of each hour)
- activity_day - activity for the current day (updated at 12:00 AM according to the account's time zone)
- activity_month - activity for the current day (updated at 12:00 AM on the first day of each month according to the account's time zone)
- balance - with a positive advertising campaign balance
Limit on the number of advertising campaigns: 1000 pcs. To get a full list of advertising campaigns, use the parameter:
- pagination_skip - offset, number of missed ad campaigns (int)
Example of the method request:
<?php
$post = array(
'token' => $token,
'id' => 999999
);
if ($curl = curl_init()) {
curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/campaign/info');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
// Result:
{
"id": "999999",
"type": "paid_se",
"type_name": "actions from the search engine",
"date_begin": "14.06.2019 13:56",
"campaign": "mysite.com (https://google.ru : keyword)",
"one_action_cost": "0.786",
"one_action_currency": "₽",
"one_action_currency_iso": "RUB",
"balance_actions": "2996",
"actions_hour": "0",
"actions_hour_limit": "1",
"actions_today": "1",
"actions_today_limit": "0",
"actions_under_moderation": "0",
"comments": "",
"status": "active",
"category_id": "9999",
"category_name": "mysite.com",
"error_code": 0
}
====================================================================================
<?php
$post = array(
'token' => $token,
'id' => 999999
);
if ($curl = curl_init()) {
curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/campaign/info');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
// Result:
{
"id": "999999",
"type": "paid_se",
"type_name": "actions from the search engine",
"date_begin": "14.06.2019 13:56",
"campaign": "mysite.com (https://google.ru: keyword)",
"one_action_cost": "0.786",
"one_action_currency": "₽",
"balance_actions": "2996",
"actions_hour": "0",
"actions_hour_limit": "1",
"actions_today": "1",
"actions_today_limit": "0",
"actions_under_moderation": "0",
"comments": "",
"status": "active",
"category_id": "9999",
"category_name": "mysite.com",
"children": [
{
"id": 888888,
"url": "mysite.com",
"actions": "1000",
"period": "day",
"spreading": "normal",
"rejection": 0,
"outer_clicks": 0,
"actions_hour": 0,
"actions_hour_limit": 42,
"actions_today": 0,
"actions_today_limit": 1000,
"actions_month": 0,
"actions_all": 0,
"actions_under_moderation": 0,
"status": "moderating"
},
{
"id": 777777,
"url": "mysite.com",
"actions": "1000",
"period": "day",
"spreading": "normal",
"rejection": 0,
"outer_clicks": 0,
"actions_hour": 0,
"actions_hour_limit": 42,
"actions_today": 0,
"actions_today_limit": 1000,
"actions_month": 0,
"actions_all": 0,
"actions_under_moderation": 0,
"status": "moderating"
}
],
"error_code": 0
}
====================================================================================
<?php
$post = array(
'token' => $token,
'category_id' => 9999
);
if ($curl = curl_init()) {
curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/campaign/info');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
// Result:
{
"campaigns": [
{
"id": "999999",
"type": "paid_se",
"type_name": "actions from the search engine",
"date_begin": "14.06.2019 11:27",
"campaign": "mysite.com (https://google.ru : keyword 1)",
"one_action_cost": "0.786",
"one_action_currency": "₽",
"balance_actions": "0",
"actions_hour": "0",
"actions_hour_limit": "1",
"actions_today": "0",
"actions_today_limit": "0",
"actions_under_moderation": "0",
"comments": "test",
"status": "stopped",
"category_id": "9999",
"category_name": "mysite.com"
},
{
"id": "999998",
"type": "paid_se",
"type_name": "actions from the search engine",
"date_begin": "14.06.2019 13:56",
"campaign": "mysite.com (https://google.ru : keyword 2)",
"one_action_cost": "0.786",
"one_action_currency": "₽",
"balance_actions": "992",
"actions_hour": "0",
"actions_hour_limit": "1",
"actions_today": "0",
"actions_today_limit": "1",
"actions_under_moderation": "0",
"comments": "",
"status": "active",
"category_id": "9999",
"category_name": "mysite.com"
}
],
"error_code": 0
}
Possible values of the "Status" field:
- rejected — blocked by the moderator (then the response also contains a field with the reason 'reject_reason').
- moderating — awaiting moderation.
- stopped — the campaign has been stopped.
- active — the campaign is active.
- inactive — the campaign is inactive (it has no executions on the account).