Removing Advertising Campaigns:

campaign/delete

Parameters:

  • token — authorization (string)
  • id — id of the ad campaign (int)
  • forced_pay - [not necessary] for advertising campaigns with deferred moderation, allows you to attempt to force payment for pending executions (int, default: 0). Values:
    • 0 - no forced payment
    • 1 - forced payment for pending executions

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/delete');
        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:

{
    "error": "Access denied",
    "error_code": 7
}

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

<?php
    $post = array(
        'token' => $token,
        'id' => 999998
    );
    if ($curl = curl_init()) {
        curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/campaign/delete');
        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:

{
    "status": "ok",
    "error_code": 0
}

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

<?php
    $post = array(
        'token' => $token,
        'id' => 999998,
        'forced_pay' => 1
    );
    if ($curl = curl_init()) {
        curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/campaign/delete');
        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:

{
    "status": "ok",
    "error_code": 0
}
IPweb

Rate the material:

Rating: 3.32 out of 5. Total ratings: 14.
Last modified

I don't understand anything! Help :-(
-