关于RK的信息
读 9 分钟
campaign/info
参数:
- token - 授权凭证 (字符串)
- id - 广告系列 ID(整数 )
category_id - 类别 ID(整数 )
parent - 父级广告活动 ID(整数 )必须指定广告系列 ID(id)或类别 ID(category_id)或父广告系列 ID(parent)。如果未传递上述任何一个参数,将显示所有广告系列列表。 - currency - 货币(字符串,默认:账户货币)。取值:
- rub
- usd
- language - 广告活动描述的语言(字符串,默认:账户语言)。取值:
- ru - 俄语
- en - 英语
- es - 西班牙语
- pt - 葡萄牙语
- filter - 广告系列列表的筛选条件(字符串,默认:无)。取值:
- active - 已启动的广告活动
- activity_hour - 当前小时的活动情况(每小时的第00分钟更新)
- activity_day - 当前日的活跃度(根据账户时区,于00:00更新)
- activity_month - 本月的活动情况(根据账户时区,每月1日00:00更新)
- balance - 广告系列余额为正
广告活动数量上限:1000个。若要获取完整的广告活动列表,请使用以下参数:
- pagination_skip - 偏移量,跳过的广告活动数量(int)
方法调用示例:
<?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);
}
// Результат:
{
"id": "999999",
"type": "paid_se",
"type_name": "посещения из поисковика",
"date_begin": "14.06.2019 13:56",
"campaign": "mysite.com (https://google.ru: ключевая фраза)",
"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_all": "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);
}
// Результат:
{
"id": "999999",
"type": "paid_se",
"type_name": "посещения из поисковика",
"date_begin": "14.06.2019 13:56",
"campaign": "mysite.com (https://google.ru: ключевая фраза)",
"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_all": "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);
}
// Результат:
{
"campaigns": [
{
"id": "999999",
"type": "paid_se",
"type_name": "посещения из поисковика",
"date_begin": "14.06.2019 11:27",
"campaign": "mysite.com (https://google.ru: ключевая фраза 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_all": "0",
"actions_under_moderation": "0",
"comments": "тест",
"status": "stopped",
"category_id": "9999",
"category_name": "mysite.com"
},
{
"id": "999998",
"type": "paid_se",
"type_name": "посещения из поисковика",
"date_begin": "14.06.2019 13:56",
"campaign": "mysite.com (https://google.ru: ключевая фраза 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_all": "0",
"actions_under_moderation": "0",
"comments": "",
"status": "active",
"category_id": "9999",
"category_name": "mysite.com"
}
],
"error_code": 0
}
“Status”字段的可能取值:
- rejected - 被审核员屏蔽(此时响应中包含原因字段 'reject_reason')。
- moderating - 正在等待审核。
- stopped - 广告活动已停止。
- active - 广告活动处于活跃状态。
- inactive - 广告活动处于非活跃状态(该账户下暂无展示记录)。