addGBLRule - данный метод добавляет номер в Global Black List.
Точка подключения: https://gapi.mtt.ru:6443/v1/api
Авторизация: Basic Auth
Метод: POST
Входные параметры
Name | Type | Description |
---|---|---|
gbl_rule | string | Phone number to be forbidden |
Выходные параметры
Name | Type | Description |
---|---|---|
success | integer: [0,1] | Result success flag |
Пример
JSON
{ "id": "1", "jsonrpc": "2.0", "method": "addGBLRule", "params": { "gbl_rule": "79266966166" } }
Успешный ответ
JSON
{ "jsonrpc":"2.0", "id":"1", "result": { "success":1 } }
Не успешный ответ
JSON
{ "jsonrpc":"2.0", "id":"1", "error": { "code":-32603, "message":"Internal error", "data": [ { "code":"A_CAPI_CREATE_RATE", "attribute":"Destination", "message":"Failed to create new rate for Destination «79266966166»", "tpl":"Failed to create new rate for {attribute} «{value}»", "tplParams": { "value":"79266966166", "attribute":"Destination" } } ] } }