# Request to receive a list of senders

## Request to receive a list of senders

<mark style="color:green;">`POST`</mark> `http://lk.mysmpp.ru/xml/originator.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                                                                          |
| 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>
     <any_originator>FALSE</any_originator>
     <list_originator>
          <originator MCC="MCC" MNC="MNC" template="template" comment="comment" history="comment" operator="operator" state="rejected">Sender</originator>
     </list_originator>
</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="188.33333333333331">Parameter</th><th width="131">Data type</th><th>Описание</th></tr></thead><tbody><tr><td>any_originator</td><td>String</td><td><p>TRUE/FALSE - whether the client can send from any sender or only pre-approved senders.</p><ul><li>If TRUE, the client can use any sender. No list of senders is returned. </li><li>If FALSE, the client can only use senders with the status "completed"</li></ul></td></tr><tr><td>list_originator.originator.state</td><td>String</td><td><p>Sender status: </p><ul><li>"order" - being processed </li><li>"completed" - ready for use </li><li>"rejected" - rejected</li></ul></td></tr><tr><td>list_originator.originator.MCC</td><td>Int</td><td>Mobile country code</td></tr><tr><td>list_originator.originator.MNC</td><td>Int</td><td>Operator's mobile code</td></tr><tr><td>list_originator.originator.template</td><td>String</td><td>Template name</td></tr><tr><td>list_originator.originator.comment</td><td>String</td><td>Client Commentary</td></tr><tr><td>list_originator.originator.history</td><td>String</td><td>Manager's comment</td></tr><tr><td>list_originator.originator.operator</td><td>String</td><td>Operator used</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>
</request>
```
