Skip to main content
Skip table of contents

Проверка доступности устройства через биллинг

Если устройство доступно для активации ответ будет пустым и без ошибки.

Передавать можно либо mac либо serial_number

JSON
{
    "type": "mediaagent",
    "mac": "fake_mac_5",
    "serial_number": "sn"
}

POST /api/v1/billing/devices/check

Параметры метода

string type REQUIRED, Тип устройства


string mac, Мак адрес устрйоства


string serial_number, Серийный номер устройства

204 No Content

Успешный ответ

422 Unprocessable Entity

Возвращает JSON объект с ошибкой. VMS Billing/Общая информация/Валидация внешней системы

JSON
{
    "message": "Тут не будет информативного сообщения",
    "errors": {
        "any_key": [
            "Тут будет описана причина ошибки"
        ]
    }
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/devices/check' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "type": "string",
    "mac": "string",
    "serial_number": "string"
}'
PHP
PHP
$data = array (
  'type' => 'string',
  'mac' => 'string',
  'serial_number' => 'string',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/devices/check', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.