setStatus


URL

http://api-conserver.onlinesim.ru/stubs/handler_api.php?api_key=APIKEY&action=setStatus&status=$status&id=$id

Example

  • javascript
    var settings = {
        "async": true,
        "crossDomain": true,
        "url": "https://api-conserver.onlinesim.ru/stubs/handler_api.php?api_key=APIKEY&action=getStatus&status=1&id=123",
        "method": "GET",
        "headers": {"accept": "application/json"}
    }
    $.ajax(settings).done(function (response) {
        console.log(response);
    });
  • php
    $curl = curl_init();
    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://api-conserver.onlinesim.ru/stubs/handler_api.php?api_key=APIKEY&action=getStatus&status=1&id=123",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_SSL_VERIFYHOST => false,
        CURLOPT_SSL_VERIFYPEER => false,
        CURLOPT_HTTPHEADER => [
            "Content-Type: application/json",
        ]
    ));
    $response = curl_exec($curl);
    curl_close($curl);
    var_dump(json_decode($response, true));

Changing activation status.

Parameters

Parameter name Data type Description Required
id INT ID of phone number booked for activation, displayed when the number is ordered for activation (getNumber) yes
status INT status ID. 1 - inform when the phone number is ready (SMS was sent to this number), 3 - send activation code again, 6 - finish activation yes

Result

After successeful execution you will get the following TXT response:

*result*

result Description
ACCESS_READY if status passed is 1
ACCESS_RETRY_GET if status passed is 3
ACCESS_ACTIVATION if status passed is 6 and SMS was received on this number