takeOffNumbers - numbers replacement

URL - /api/resellers/takeOffNumbers

This request may not be used. It is required to get a sum of earnings on the number. This information you can also see in your personal account.

Пример

  • javascript
axios.get(
    'http://_SERVER_URL_/api/resellers/takeOffNumbers?sum?=50', 
    {headers: {Authorization: 'Bearer APIKEY'}}
)
  • python
# Install the Python Requests library: `pip install requests`
import requests
import json

def send_request():
    try:
        response = requests.get(
            url="http://_SERVER_URL_/api/resellers/takeOffNumbers",
            params={"sum": "50"},
            headers={"Authorization": "Bearer d9ae8e2231889f9ad64d5a7b4303d866"},
        )
        print('Response HTTP Status Code: {status_code}'.format(status_code=response.status_code))
        print('Response HTTP Response Body: {content}'.format(content=response.content))
    except requests.exceptions.RequestException:
        print('HTTP Request failed')
  • php
<?php
// Include Guzzle. If using Composer: require 'vendor/autoload.php';

use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;

$response = (new Client())->send(new Request(
  'GET',
  'http://_SERVER_URL_/api/resellers/takeOffNumbers?sum=50',
  ['Authorization' => 'Bearer APIKEY']
));
echo 'Response HTTP : ' . $response->getStatusCode();
  • cURL
    curl "http://_SERVER_URL_/api/resellers/takeOffNumbers?sum=50" \
      -H 'Authorization: Bearer APIKEY'

Parameters

Parameter name Parameter Data type Description
sum optional TEXT Sum for replacement, default is 50

Result

After successful execution of the request you will get the JSON format response like this:

json {response:RESPONSE}

Result Description
response 1, if request was successful, or reports an error
list Online numbers list for replacement.
{number, id, sum, country}

Формат списка

Имя параметра Тип данных Описание
number STRING Phone number.
Format: International
Example: 234112233445
id STRING Operation Id
country STRING Country
sum STRING Sum of benefits after numbers replacement
Example: 37.5

ERRORS

Status Result Description
400 ERROR_PARAMS Number or ID is missing in request