# Request for information by phone number

## Request for information by phone number

<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 | Your login in the system                                                                          |
| phones.phone<mark style="color:red;">\*</mark>   | Int    | Phone number                                                                                      |
| token.value<mark style="color:red;">\*</mark>    | String | You can use a secret key instead of login and password. To obtain it, please contact your manager |
| password.value<mark style="color:red;">\*</mark> | String | Your password in the system                                                                       |

{% tabs %}
{% tab title="200: OK If a valid XML document is received" %}

```xml
<?xml version="1.0" encoding="utf-8" ?>
<response>
     <phone operator="Vimpeltelecom" region="Novosibirsk region" time_zone="3">79612242243</phone>
     <phone operator="Vimpeltelecom" region="Kaliningrad" time_zone="-1">7961224222244</phone>
...
</response>
```

{% endtab %}

{% tab title="400: Bad Request If an error occurs in the sent XML document" %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<response>
     <error>Error message</error>
</response>
```

{% endtab %}
{% endtabs %}

### Deciphering parameters in query responses

<table><thead><tr><th width="175.33333333333331">Parameter</th><th width="168">Data type</th><th>Description</th></tr></thead><tbody><tr><td>phone</td><td>Int</td><td>Phone number</td></tr><tr><td>phone.operator</td><td>String</td><td>Operator</td></tr><tr><td>phone.region</td><td>String</td><td>Region</td></tr><tr><td>phone.time_zone</td><td>Int</td><td>Time offset in hours relative to the time in Moscow</td></tr><tr><td>error</td><td>String</td><td><p>The error text can take the following values:</p><ul><li>Incorrect XML document format </li><li>Incorrect login or password </li><li>POST data is missing</li></ul></td></tr></tbody></table>

### Example XML request

```xml
<?xml  version="1.0" encoding="utf-8" ?>
<request>
     <security>
         <login value="login" />
         <password value="password" />
     </security>
     <phones>
         <phone>79612242243</phone>
         <phone>79612242244</phone>
</phones>
</request>
```
