معلومات عن جمهورية كازاخستان
يقرأ 10 دقائق
campaign/info
المعلمات:
- token - المصادقة (سلسلة)
- id - معرّف الحملة الإعلانية (عدد صحيح )
category_id - معرّف الفئة (عدد صحيح )
parent - معرّف الحملة الإعلانية الأم (عدد صحيح )يجب تحديد معرّف الحملة الإعلانية (id) أو معرّف الفئة (category_id) أو معرّف الحملة الإعلانية الأم (parent). إذا لم يتم تمرير أي من هذه المعلمات، فسيتم عرض قائمة الحملات الإعلانية بالكامل. - currency - العملة (سلسلة نصية، الافتراضي: عملة الحساب). القيم:
- rub
- usd
- language - لغة وصف الحملات الإعلانية (سلسلة، الافتراضي: لغة الحساب). القيم:
- ru - الروسية
- en - الإنجليزية
- es - الإسبانية
- pt - البرتغالية
- filter - مرشح قائمة الحملات الإعلانية (سلسلة، الافتراضي: لا يوجد). القيم:
- active - الحملات الإعلانية قيد التشغيل
- activity_hour - النشاط خلال الساعة الحالية (يتم التحديث في الدقيقة 00 من كل ساعة)
- activity_day - النشاط خلال اليوم الحالي (يتم التحديث في الساعة 00:00 وفقًا للتوقيت الزمني للحساب)
- activity_month - النشاط خلال اليوم الحالي (يتم التحديث في الساعة 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 - الحملة غير نشطة (لا توجد مشاهدات مسجلة في الحساب).