# Request to receive the list of scheduled SMS

## Request to receive the list of scheduled SMS

<mark style="color:green;">`POST`</mark> `http://lk.mysmpp.ru/xml/list_scheduled.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                                                                                                                                                       |
| scheduled.page<mark style="color:red;">\*</mark> | Int    | Page number. The entire list of scheduled SMS is divided into pages. You cannot request the whole list. You can only request an individual page. The numbering starts with one |
| 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>
     <phones page="1" num_pages="100">
          <scheduled id_sms="1234" time_put_turn="2011-11-14 12:42:40" originator="kosty" phone="79612242243" type_sms="sms" text_sms="ТекстSMS" count_sms="2" name_delivery="Newsletter title" time_send="2011-11-14 21:00" validity_period="2011-11-17 21:00:00" />
          <scheduled id_sms="1235" time_put_turn="2011-11-14 12:42:40" originator="kosty" phone="79612242244" type_sms="sms" text_sms="ТекстSMS" count_sms="2" name_delivery="Newsletter title" time_send="2011-11-14 21:00" validity_period="2011-11-17 21:00:00" />
          …
     </phones>
</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="164.33333333333331">Parameter</th><th width="164">Data type</th><th>Description</th></tr></thead><tbody><tr><td>phones.page</td><td>Int</td><td>Page number</td></tr><tr><td>phones.num_pages</td><td>Int</td><td>Total pages</td></tr><tr><td>phones.scheduled.id_sms</td><td>Int</td><td>SMS number. Used to delete a scheduled SMS</td></tr><tr><td>phones.scheduled.time_put_turn</td><td>Int</td><td>Time to add to the scheduler</td></tr><tr><td>phones.scheduled.originator</td><td>String</td><td>SMS sender. This is the value that will be displayed on the subscriber's phone in the SMS from field</td></tr><tr><td>phones.scheduled.phone</td><td>Int</td><td>Number of the subscriber to whom the SMS is addressed</td></tr><tr><td>phones.scheduled.type</td><td>String</td><td><p>SMS message type: </p><ul><li>sms - regular SMS </li><li>flashsms - Flash SMS </li><li>wappush - WAP-Push </li><li>vcard - business card (vCard)</li></ul></td></tr><tr><td>phones.scheduled.text_sms</td><td>String</td><td>SMS text</td></tr><tr><td>phones.scheduled.count_sms</td><td>Int</td><td>Number of SMS message parts</td></tr><tr><td>phones.scheduled.name_delivery</td><td>String</td><td>Newsletter title</td></tr><tr><td>phones.scheduled.time_send</td><td>Date</td><td><p>The date and time of the shipment in the format:</p><p>YYYY-MM-DD HH:MM</p><p>where,<br>   YYYY-year,<br>   MM-month,<br>   DD-day,<br>   HH-hours, </p><p>   MM-minutes</p></td></tr><tr><td>phones.scheduled.validity_period</td><td>Date</td><td><p>The date and time after which no attempts will be made to deliver SMS in the format:</p><p>  YYYY-MM-DD HH:MM:SS</p><p>where,<br>   YYYY-year,<br>   MM-month,<br>   DD-day,<br>   HH-hours, </p><p>   MM-minutes</p><p>   SS-seconds</p></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>
     <scheduled page=”1”/>
</request>
```
