# Запрос на получение информации по номеру телефона

## Запрос на получение информации по номеру телефона

<mark style="color:green;">`POST`</mark> `http://lk.mysmpp.ru/xml/def.php`

#### Headers

| Name                                           | Type   | Description                    |
| ---------------------------------------------- | ------ | ------------------------------ |
| Content-type<mark style="color:red;">\*</mark> | String | **`text/xml; charset=utf-8;`** |

#### Request Body

| Name                                             | Type   | Description                                                                                        |
| ------------------------------------------------ | ------ | -------------------------------------------------------------------------------------------------- |
| login.value<mark style="color:red;">\*</mark>    | String | Ваш логин в системе                                                                                |
| phones.phone<mark style="color:red;">\*</mark>   | Int    | Номер телефона                                                                                     |
| token.value<mark style="color:red;">\*</mark>    | String | Вместо логина и пароля можно использовать секретный ключ. Для его получения обратитесь к менеджеру |
| password.value<mark style="color:red;">\*</mark> | String | Ваш пароль в системе                                                                               |

{% tabs %}
{% tab title="200: OK В случае получения правильного XML-документа" %}

```xml
<?xml version="1.0" encoding="utf-8" ?>
<response>
     <phone operator="Вымпелтелеком" region="Новосибирскаяобласть" time_zone="3">79612242243</phone>
     <phone operator="Вымпелтелеком" region="Калининград" time_zone="-1">79612242244</phone>
…
</response>
```

{% endtab %}

{% tab title="400: Bad Request В случае возникновения ошибки в отправленном XML-документе" %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<response>
     <error>текст ошибки</error>
</response>
```

{% endtab %}
{% endtabs %}

### Расшифровка параметров в ответах на запрос

<table><thead><tr><th width="175.33333333333331">Параметр</th><th width="168">Тип данных</th><th>Описание</th></tr></thead><tbody><tr><td>phone</td><td>Int</td><td>Номер телефона</td></tr><tr><td>phone.operator</td><td>String</td><td>Оператор</td></tr><tr><td>phone.region</td><td>String</td><td>Регион</td></tr><tr><td>phone.time_zone</td><td>Int</td><td>Смещение времени в часах относительно времени в Москве</td></tr><tr><td>error</td><td>String</td><td><p>Текст ошибки может принимать следующие значения:</p><ul><li>Неправильный формат XML документа</li><li>Неправильный логин или пароль</li><li>POST данные отсутствуют</li></ul></td></tr></tbody></table>

### Пример XML запроса

```xml
<?xml  version="1.0" encoding="utf-8" ?>
<request>
     <security>
         <login value="логин" />
         <password value="пароль" />
     </security>
     <phones>
         <phone>79612242243</phone>
         <phone>79612242244</phone>
</phones>
</request>
```


---

# 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/specifikaciya-xml/zapros-na-poluchenie-informacii-po-nomeru-telefona.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.
