# Чекинг базы номеров

> Основной адрес <https://msg.webcom.mobi>

## Создание заявки на проверку номеров

### POST /api/checking/create

### **Заголовки**

| Authorization | Bearer \<you-token>  |
| ------------- | -------------------- |
| Content-type  | multipart/form-data; |

**Тело запроса**

<table><thead><tr><th width="195">Name</th><th>Type</th><th width="161">Description</th><th>Possible options</th></tr></thead><tbody><tr><td>type</td><td>string</td><td>обязательное</td><td><p></p><p>WA_cheking</p><p>Viber_cheking</p><p>Telegram_cheking</p></td></tr><tr><td>name</td><td>string</td><td>необязательное</td><td> </td></tr><tr><td>phones</td><td>string</td><td>обязательное в случае если не заполнено поле phones_file</td><td>Номера  в международном формате по 1-му номеру в каждой строке</td></tr><tr><td>phones_file</td><td>file</td><td><p>обязательное в случае если не заполнено поле</p><p>phones</p></td><td>Наполнение текстового файла: Номера  в международном формате по 1-му номеру в каждой строке</td></tr></tbody></table>

**Ответ 200**

| Name               | Type    | Description                           |
| ------------------ | ------- | ------------------------------------- |
| success            | boolean | Результат обработки                   |
| data.id            | integer | id созданной заявки                   |
| data.status        | string  | Status созданной заявки               |
| data.total\_phones | integer | Количество загруженных номеров заявки |

**Ответ 400 и другие ошибки**

```
{
   "name": "Bad Request",
   "message": "Wrong data phones",
   "code": 0,
   "status": 400 
}
```

**Пример**

```
import requests url = "https://msg.webcom.mobi/api/checking/create" payload = {
   'name': 'Проверка текста',
   'type': 'WA_cheking',
   'phones': ''
} files=[
   ('phones_file', ('users.txt', open('users.txt','rb'), 'text/plain'))
]
headers = {
   'Authorization': 'Bearer <you-token>',
}
response = requests.request("POST", url, headers=headers, data=payload, files=files) print(response.text)

```

## Проверка статуса заявки

### POST /api/checking/get-status

**Заголовки**

| Authorization | Bearer \<you-token>  |
| ------------- | -------------------- |
| Content-type  | multipart/form-data; |

**Тело запроса**

| Name | Type       | Description  | Possible options |
| ---- | ---------- | ------------ | ---------------- |
| ids  | integer\[] | обязательное | Массив id заявок |

\
**Ответ 200**

| Name                     | Type    | Description                                                                                                                               |
| ------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| success                  | boolean | Результат обработки                                                                                                                       |
| data.\*.id               | integer | id заявки                                                                                                                                 |
| data.\*.status           | string  | <p>Status заявки</p><p>new - Новая,   inwork - В работе,   complete - Выполнено,   rejected - Отклонено,   waittopay - Ожидает оплаты</p> |
| data.\*.total\_phones    | integer | Количество загруженных номеров заявки                                                                                                     |
| data.\*.filtered\_phones | integer | Количество отфильтрованных номеров заявки                                                                                                 |
| data.\*.hash             | string  | Хеш для запроса результата фильтрации                                                                                                     |

**Ответ 400 и другие ошибки**

```
{
   "name": "Bad Request",
   "message": "Wrong data phones",
   "code": 0,
   "status": 400 
}

```

&#x20;**Пример**

```
import requests url = "https://msg.webcom.mobi/api/checking/get-status" payload = {'ids': '[5980]'} headers = {
   'Authorization': 'Bearer <you-token>',
}
response = requests.request("POST", url, headers=headers, data=payload) print(response.text)

```

## Запрос на получение данных фильтрации

### GET /api/checking/get-file/\<hash>

**Заголовки**

| Authorization | Bearer \<you-token> |
| ------------- | ------------------- |

**Ответ 200**

Загрузка текстового файла в формате .txt

**Ответ 400 и другие ошибки**

```
{
   "name": "Bad Request",
   "message": "Wrong data",
   "code": 0,
   "status": 400 
}
```

&#x20; **Пример**

```
import requests url = 
"https://msg.webcom.mobi/api/checking/get-file/gIn3meHo-uLVE-11pG-Mksm-20ff33d54cc9" payload = {} headers = {
   'Authorization': 'Bearer <you-token>',
}
response = requests.request("GET", url, headers=headers, data=payload) with open("resp_text.txt", "w") as file: 
file.write(response.text)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.webcom.mobi/ru2/type-1/specifikaciya-json/cheking-bazy-nomerov.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
