Если устройство доступно для активации ответ будет пустым и без ошибки.
Передавать можно либо mac либо serial_number
{ "type": "mediaagent", "mac": "fake_mac_5", "serial_number": "sn" }
POST /api/v1/billing/devices/check
string type REQUIRED, Тип устройства
string
string mac, Мак адрес устрйоства
string serial_number, Серийный номер устройства
204 No Content
No Content
Успешный ответ
422 Unprocessable Entity
Unprocessable Entity
Возвращает JSON объект с ошибкой. VMS Billing/Общая информация/Валидация внешней системы
{ "message": "Тут не будет информативного сообщения", "errors": { "any_key": [ "Тут будет описана причина ошибки" ] } }
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" }'
$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);
Please note, these errors can depend on your browser setup.
If this problem persists, please contact our support.