Suppression de l'écran LCD

Lire 3 minutes

[ru]

campaign/delete

Параметры:

  • token - авторизация (string)
  • id - идентификатор РК (int)
  • child_campaigns - [не обязательно] удаление дочерних рекламных кампаний (int, по умолчанию: 0)
  • forced_pay - [не обязательно] для РК с отложенной модерацией позволяет произвести попытку принудительной оплаты ожидающих выполнений (int, по умолчанию: 0). Значения:
    • 0 - без принудительной оплаты
    • 1 - принудительная оплата ожидающих выполнений

Пример вызова метода:

<?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);
    }

// Результат:

{
    "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);
    }

// Результат:

{
    "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);
    }

// Результат:

{
    "status": "ok",
    "error_code": 0
}
Removing Advertising Campaigns 18 - actions awaiting confirmation
19 - not enough credits in the account
40 - actions awaiting confirmation, forced payment error
IPweb

Rate the material:

Rating: 0 out of 5. Total ratings: 0.
Dernière modification

Je ne comprends rien ! Aidez-moi :-(