Для управления используются следующие запросы:
addsms - создание или редактирование уведомления по SMS. Дополнительные параметры:
- k - идентификатор сессии пользователя;
id - идентификатор уведомления по SMS, если идентификатор отсутствует - создается новое уведомление, иначе - редактируется существующее;
- name - имя уведомления по SMS, длина не более 63 символов;
- to_phone - номер получателя, номеров может быть несколько, тогда они разделяются через знак запятой, возможно не более 10 номеров длиной не более 31 символа каждый;
- message - шаблон текста сообщения, длина не более 511 символов.
<error type="no error" id="603001" /> |
При создании нового уведомления (id не указывается), все перечисленные параметры являются обязательными. При изменении допускается указывать только модифицируемые параметры. Пустые параметры не допускаются.
delsms - удаление уведомления по SMS. Обязательные параметры:
- k - идентификатор сессии пользователя;
id - идентификатор уведомления по SMS.
send_sms_message - отправка тестового сообщения, при этом не создается новый элемент. Обязательные параметры:
- k - идентификатор сессии пользователя, длина не более 63 символов;
to_phone - номер получателя, номеров может быть несколько, тогда они разделяются через знак запятой, возможно не более 10 номеров длиной не более 31 символа каждый;
message - шаблон текста сообщения, длина не более 511 символов.
getelement - чтение элемента. Обязательные параметры:
- k - идентификатор сессии пользователя;
id - идентификатор элемента.
Ответ содержит информацию об элементе:
...
<element id="603001" module ="2003" num="1" clas="notifier" type="sms" name="my_smsko" state="off" to_phone
="85551112233,87771234567" message="Logic %4, System time: %3" />
The following queries are used for management:
addsms - create or edit a notification by SMS. Extra options are:
- k
...
- - user session ID;
- id - identifier of the SMS notification
...
- ; if there is no identifier
...
- , a new notification is created, otherwise
...
- the existing notification is edited;
- name - the name of the SMS notification, the length is not more than 63 characters;
- to_phone - the number of the recipient,
...
- there cab be several numbers,
...
- in such a case they are separated by a comma, maybe not more than 10 numbers with a maximum of 31 characters each;
- message - message text template, the length is not more than 511 characters.
If a new element is successfully created, the response contains the element identifier, and looks like:
<error type="no error" id="603001" /> |
When creating a new notification (id is not specified), all the listed parameters are mandatory. When changing, only modifiable parameters can be specified. Empty parameters are not allowed.
delsms - delete the notification by SMS. Required parameters are:
- k
...
- - user session ID;
- id
...
- - SMS notification ID
...
- ;
send_sms_message - send a test message, without creating a new element. Required parameters are:
- k
...
- - user session ID, the length is not more than 63 characters;
- to_phone - the number of the recipient
...
- ; there can be several
...
- numbers and in such a case they are separated by a comma
...
- ; maybe not more than 10 numbers with a maximum of 31 characters each;
- message - message text template, the length is not more than 511 characters.
getelement - read the element. Required parameters are:
- k
...
- - user session ID;
- id
...
- -element ID;
The
...
response contains information about the element:
|