Pago de ejecuciones pendientes

campaign/pay_pending

Payment for pending executions for RK with deferred moderation

Parameters:

  • token - authorization (string)
  • id - advertising campaign identifier (int)
  • actions_to_balance - [not necessarily] return the remaining actions to the account balance (int, by default: 0). Meanings:
    • 0 - do not return
    • 1 - return the balance to the account balance

Example of method call:

<?php
    $post = array(
        'token' => $token,
        'id' => 999999
    );
    if ($curl = curl_init()) {
        curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/campaign/pay_pending');
        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/pay_pending');
        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,
        'actions_to_balance' => 1
    );
    if ($curl = curl_init()) {
        curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/campaign/pay_pending');
        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
}
Posibles códigos de error
General
1 - no hay parámetros de consulta
7 - acceso prohibido
16 - error desconocido
37 - temporalmente no disponible, inténtelo más tarde
38 - no hay entidades que coincidan con los parámetros de la solicitud
41 - se alcanzó el límite diario de solicitudes de API más detalles
IPweb

Califica el material:

Puntuación: 0 sobre 5. Total de puntuaciones: 0.
Última modificación

No entiendo nada! Ayudar :-(
-