Information about Advertising Campaigns

campaign/info

Parameters:

  • token — authorization (string)
  • id — id of the ad campaign (int)
  • category_id — category identifier (int)

You must specify the advertising campaign's identifier (id) OR the category identifier (category_id). If you do not set any of these parameters, the entire list of all the campaigns will be displayed.

Example of the method request:

 $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": "visits from the search engine",
    "date_begin": "14.06.2019 13:56",
    "site": "mysite.com (https://google.ru : keyword)",
    "one_visit_cost": "0.786",
    "one_visit_currency": "₽",
    "balance_visits": "2996",
    "visits_hour": "0",
    "visits_hour_limit": "1",
    "visits_today": "1",
    "visits_today_limit": "0",
    "comments": "",
    "status": "active",
    "category_id": "9999",
    "category_name": "mysite.com",
    "error_code": 0
}

====================================================================================

 $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:

{
    "sites": [
        {
            "id": "999999",
            "type": "paid_se",
            "type_name": "visits from the search engine",
            "date_begin": "14.06.2019 11:27",
            "site": "mysite.com (https://google.ru : keyword 1)",
            "one_visit_cost": "0.786",
            "one_visit_currency": "₽",
            "balance_visits": "0",
            "visits_hour": "0",
            "visits_hour_limit": "1",
            "visits_today": "0",
            "visits_today_limit": "0",
            "comments": "test",
            "status": "stopped",
            "category_id": "9999",
            "category_name": "mysite.com"
        },
        {
            "id": "999998",
            "type": "paid_se",
            "type_name": "visits from the search engine",
            "date_begin": "14.06.2019 13:56",
            "site": "mysite.com (https://google.ru : keyword 2)",
            "one_visit_cost": "0.786",
            "one_visit_currency": "₽",
            "balance_visits": "992",
            "visits_hour": "0",
            "visits_hour_limit": "1",
            "visits_today": "0",
            "visits_today_limit": "1",
            "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).
IPweb

Rate the material:

Rating: 3.5 out of 5. Total ratings: 8.