Documentation

Content

    The general principles of sending

    XML documents are sent to a certain server address (a description of XML documents, their purpose, and server addresses are given below). In doing so, the POST method is used.

    The data headers to be sent must contain:

    Content-type: text/xml; charset=utf-8

    XML documents are encoded in UTF-8. The transmitted XML document must not contain line breaks. Line breaks within the data should be replaced with "\n".

    Example of XML document transfer to php

    $src = '<?xml version="1.0" encoding="utf-8"?>
    <request>
    <security>
    <login value="login" />
    <password value="password" />
    </security>
    </request>';
    // XML-document
    $href = 'https://server/script.php'; // server address
    $ch = curl_init();
    curl_setopt ($ch, CURLOPT_HTTPHEADER, array ('Content-type: text/xml','charset=utf-8','Expect:'));
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt ($ch, CURLOPT_POST, true);
    curl_setopt ($ch, CURLOPT_POSTFIELDS, $src);
    curl_setopt ($ch, CURLOPT_URL, $href);
    $result = curl_exec($ch);
    curl_close($ch);
    echo $result;

    SMS send-out

    Server address:
    https://host_name/xml/
    XML-document:
    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    <message type="sms">
      <sender>Sender 1</sender>
      <text>Message text 1</text>
        <translite>1</translite>
      <name_delivery>Mailing 1</name_delivery>
        <abonent phone="79001234567" number_sms="1" client_id_sms="101" time_send="2020-03-31 12:34" validity_period="2020-03-31 15:34" />
        <abonent phone="79001234568" number_sms="2" client_id_sms="102" time_send="2020-03-31 12:35" />
        <abonent phone="79001234569" number_sms="10" client_id_sms="110" time_send="" />
    </message>
    <message>
      <sender>Sender 2</sender>
      <text>Message text 2</text>
      <name_delivery>Mailing 2</name_delivery>
        <abonent phone="79001234567" number_sms="11" client_id_sms="111" />
        <abonent phone="79001234568" number_sms="12" client_id_sms="112" />
        <abonent phone="79001234569" number_sms="20" client_id_sms="120" />
    </message>
    </request>

    Where

    • type - type of SMS message to be sent:
      • sms – regular SMS.
    • sender – SMS sender. This value will be displayed on the user's phone in the SMS from whom field.
    • text – SMS text.
    • name_delivery – name of the mailing. Default is ‘Gateway’;
    • translite - transliteration of SMS text from Cyrillic to Latin (not mandatory parameter). For transliteration this parameter should be equal to 1.
    • phone – operator's number to whom the SMS is addressed. In international format, for example, 79001234567 (for Russia), 380441234567 (for Ukraine), etc.
    • login - your login in the system.
    • password - your password in the system.
    • number_sms - number of the message within the submitted XML document.
    • client_id_sms - number. Optional parameter, allows you to avoid repeated sending. If an SMS with this number has already been sent from this account, it will not be resent, but the number of the previously sent SMS will be returned.
    • time_send – date and time of sending in the format: YYYYY-MM-DD hh:mm where, YYYYY-year, MM-month, DD-day, hh-hours, mm-minutes. If not specified, SMS is sent immediately.
    • validity_period – the date and time after which attempts to deliver the SMS will cease, in the format: YYYYY-MM-DD hh:mm, where YYYY is the year, MM is the month, DD is the day, hh is the hours, and mm is the minutes. If not specified, the SMS has a maximum lifespan.

    The response may be one of the following XML documents:

    In the case of an error occurrence in the submitted XML document
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Your account is blocked
    3. Incorrect login or password
    4. POST data is missing
    In the case of receiving a valid XML document
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <information number_sms="1" id_sms="SMS ID in the system to check the status" parts="2">Status/error message</information>
    <information number_sms="2" id_sms="SMS ID in the system to check the status" parts="2">Status/error message</information>
    <information number_sms="3" id_sms="SMS ID in the system to check the status" parts="2">Status/error message</information>
    </response>

    Where:

    • number_sms - the number of the message specified when sending the XML document.
    • id_sms - SMS message number. It is used to check the SMS status. If an error occurs while sending an SMS, then id_sms is not transmitted.
    • parts - number of SMS parts.
    • information - the message status (‘send’), if the SMS has been sent. Or an error message if an error occurred while sending the SMS:
    1. We have run out of SMS. To resolve the problem, please contact your manager.
    2. We have run out of SMS.
    3. The account is blocked.
    4. Specify the phone number.
    5. Phone number is included in the stop list.
    6. This referral is closed off to you.
    7. This referral is closed off.
    8. Insufficient funds to send SMS. SMS will be sent as soon as you top up your account for this direction.
    9. SMS text has been rejected by the moderator.
    10. No sender.
    11. The sender must not exceed 15 characters for numeric numbers and 11 characters for alphanumeric numbers.
    12. Phone number must be less than 15 characters.
    13. No message text.
    14. No link.
    15. There is no such sender.
    16. The sender has not passed moderation.
    17. This message has already been sent.

    SMS message status request (first method)

    Server address:

    https://host_name/xml/state.php
    XML-document:
    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    <get_state>
      <id_sms>IDSMS in the system to check the status</id_sms>
      <id_sms>IDSMS in the system to check the status</id_sms>
      <id_sms>IDSMS in the system to check the status</id_sms>
      <id_sms>IDSMS in the system to check the status</id_sms>
    </get_state>
    </request>
    Where
    • login - your login in the system.
    • password - your password in the system.
    • id_sms - SMS message number, received in the responded XML document during the process of sending SMS message.

    The response may be one of the following XML documents:

    In case of error occurrence in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>error text</error>
    </response>

    error - the error text can take the following meanings:

    1. Incorrect XML document format
    2. Incorrect login
    3. POST data is not provided
    In the case of a valid XML document:

     

    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <state id_sms="IDSMS in the system to check the status" time="2020-01-01 12:57:46" num_parts="2" price="1.15">Статус</state>
    <state id_sms="IDSMS in the system to check the status" time="2020-01-01 12:57:46" num_parts="2" price="1.15">Статус</state>
    <state id_sms="IDSMS in the system to check the status" time="2020-01-01 12:57:46" num_parts="2" price="1.15">Статус</state>
    </response>

    Where

    • id_sms - SMS message number received in the response XML document while sending SMS message.
    • time - time of status change.
    • state - status of the message:
      1. «send» - message status not received. In this case is sent empty time (time=‘’).
      2. «not_deliver» - the message has not been delivered. Final status (does not change with time).
      3. «expired» - the subscriber was not online at the time the delivery attempt was made. Final Status (does not change over time).
      4. «deliver» - the message has been delivered. Final Status (does not change over time)
      5. «partly_deliver» - the message was sent, but the status was never received. Final status (does not change with time). In this case you should contact the technical support service to explain the reasons of the status absence.
    • num_parts - Number of parts in SMS.
    • price - Price for one SMS part.

     

    Receiving SMS status (second method)

    When using this method, you need to tell the manager the address of your server, which will receive SMS statuses. The XML document will be sent by POST method.

    For example, in php the XML-document will be available through the variable

    $GLOBALS['HTTP_RAW_POST_DATA']

     

    The system sends an XML document to the client-server with the following content:

     
    <?xml version="1.0" encoding="utf-8"?>
    <request>
      <state id_sms="SMS ID in the system to check the status" time="2020-01-01 12:57:46">Status</state>
      <state id_sms="SMS ID in the system to check the status" time="2020-01-01 12:57:46">Status</state>
    </request>

     

    Where:
    • id_sms - SMS message number received in the response XML document during the SMS message-sending process.
    • state - message status:
      1. «send» - the message status is not received. In this case is sent empty time (time=‘’).
      2. «not_deliver» - the message has not been delivered. Final status (does not change with time).
      3. «expired» - the user was not online at the time the delivery attempt was made. Final Status (does not change over time).
      4. «deliver» - the message has been delivered. Final Status (does not change over time).
      5. «partly_deliver» - the message was sent, but the status was never received. Final status (does not change with time). In this case, to clarify the reasons for the absence of the status, you should contact technical support.

    In response, the client-server should return an XML document with the following content:

    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <id_sms>3234</id_sms>
    <id_sms>3234</id_sms>
    </response>

    Where:

    • id_sms - SMS message number received in the response XML document while sending SMS message.
    • time - time of status change.

    If the client-server does not transmit id_sms, the status will be considered as not received by the client. Thus 5 attempts will be made to deliver the status.

     

    Request to check the balance

    Server address:

    https://host_name/xml/balance.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    </request>

     

    Where

    • login - your login in the system.
    • password - your password in the system.

    The response may be one of the following XML documents:

    1. If an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>error text</error>
    </response>

     

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data is missing
    4. In case of receiving a valid XML document:

    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <money currency="RUR">150</money>
    <sms area="MTC" price="1.1" type_sms="sms" type_text="Advertising" MCC="250" MNC="1">136</sms>
    <sms area="Megaphone" price="2" type_sms="sms" type_text="Service" MCC="250" MNC="2">75</sms>
    </response>

    Where:

    • money - remaining balance of funds.
    • area - the area in which the given number of SMS can be sent;
    • sms - number of available SMS messages for the given direction;
    • price - Price per one message;
    • type_sms - Message type (SMS / Viber / vk / WhatsApp);
    • type_text - Text type in the message (Advertising / Service / Transactional);
    • MCC - Mobile Country Code;
    • MNC - Mobile Network Code

    The amount of SMS cannot be summarised in different directions. When sending SMS in one direction, the number of available SMS messages in all other directions is reduced in accordance with their cost.

     

    Request to receive the list of senders

    Server address:

    https://host_name/xml/originator.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    </request>

    Where:

    • login - your login in the system.
    • password - your password in the system.

    The response may be one of the following XML documents:

    If an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    In the case of receiving a valid XML document:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <any_originator>FALSE</any_originatоr>
    <list_originator>
      <originator state="rejected">Sender</originator>
    </list_originator>
    </response>

    Where

    • any_originator - whether the client can send from any sender or only pre-approved senders. If TRUE, the client can use any sender. However, no list of senders is returned. FALSE - only senders with <<completed>> status can be used.
    • state - sender status:
      1. order – in process
      2. completed - ready for use
      3. rejected – rejected

     

    Request for incoming SMS

    Server address:

    https://host_name/xml/incoming.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
        <security>
          <login value="login" />
          <password value="password" />
        </security>
    <time start="2020-01-31 12:23:00" end="2020-02-31 12:23:00" />
    </request>

    Where

    • login value - your login in the system.
    • password value - your password in the system.
    • time start - time (not inclusive) from which incoming SMS are requested.
    • time end - time (not inclusive), till which incoming SMS are requested. Not a mandatory parameter. If not set, all SMS will be returned..

    The response can be one of the following XML documents:

    In case an error occurs in the XML document being sent:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    In the case of receiving a valid XML document:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <sms id_sms="1234" date_receive="2020-01-31 12:55:53" originator="79001234567" prefix="AKCIYA" phone="3443">SMStext</sms>
    <sms id_sms="1234" date_receive="2020-01-31 12:55:53" originator="79001234568" prefix="AKCIYA" phone="3443">SMStext</sms>
    </response>

    Where

    • id_sms - unique number consisting of digits only.
    • date_receive - date and time of received SMS.
    • originator - phone number of the operator who sent the SMS.
    • prefix - prefix. The initial part of the SMS text, by which it was determined that this SMS belongs to this client. (It is used if the same number is used by different clients).
    • phone - phone number to which the SMS was sent.
    • sms - SMS text.

     

    Request to get information by phone number

    Server address:

    https://host_name/xml/def.php

    XML-document:

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

    Where:

    • login value - your login in the system.
    • password value - your password in the system.
    • phone - Phone number.

    The response can be one of the following XML documents:

    If an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>error text</error>
    </response>

    error - the error text can have the following meanings:

    • Incorrect XML document format
    • Incorrect login or password
    • POST data missing
    In case a valid XML document is received:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <phone operator="Magaphone" region="Moscow" time_zone="3">79001234567</phone>
    <phone operator="Megaphone" region="Kaliningrad" time_zone="-1">79001234568</phone>
    </response>

    Where:

    • operator - Operator.
    • region - Region.
    • time_zone - Offset of time in hours relative to the time in Moscow.
    • phone - Phone number.

     

    Request for obtaining the list of bases

    Server address:

    https://host_name/xml/list_bases.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
        <security>
          <login value="login" />
          <password value="password" />
        </security>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.

    The response can be one of the following XML documents:

    If an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    In case a valid XML document is received:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <base id_base="1234" name_base="HeadOfficeBase" time_birth="12:48" local_time_birth="yes" day_before="1" originator_birth="fitnes" on_birth="yes">Congratulations!</base>
    <base id_base="1235" name_base="MoscowOfficeBase" time_birth="12:48" local_time_birth="yes" day_before="1" originator_birth="fitnes" on_birth="yes">Congratulations!</base>
    </response>

    Where:

    • id_base - the unique base number in the system.
    • name_base - the name of the base.
    • time_birth - time of congratulation.
    • local_time_birth - read congratulation time with reference to the local time of the user (yes) or with reference to the system time (no).
    • day_before - how many days before the birthday to congratulate.
    • originator_birth - sender of the greeting.
    • on_birth - whether congratulations are enabled yes - enabled, no - disabled.
    • base - text of greeting.

     

    Request to change parameters/add/delete bases

    Server address:

    https://host_name/xml/bases.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    <bases>
      <base id_base="1234" name_base="HeadOfficeBase" time_birth="12:48" local_time_birth="yes" day_before="1" originator_birth="fitnes" on_birth="yes">Congratulations!</base>
      <base number_base="1" name_base="MoscowOfficeBase" time_birth="12:48" local_time_birth="yes" day_before="1" originator_birth="fitnes" on_birth="yes">Congratulations!</base>
    </bases>
    <delete_bases>
        <base id_base="1235" />
        <base id_base="1236" />
    </delete_bases>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.
    • id_base - unique number of the base in the system. If it is not specified, the base will be added. In this case, it is necessary to specify the number_base parameter.
    • number_base - number of the base in XML request. It is specified only when creating a new base. It is used to match the IDs of the added bases (if there were several in the request)
    • name_base - the name of the base.
    • time_birth - time of the greeting.
    • local_time_birth - count the time of congratulation with reference to the user's local time (yes) or with reference to the system time (no).
    • originator_birth - the sender of the greeting.
    • on_birth - whether congratulations are enabled yes - enabled, no - disabled.
    • base - text of the greeting.

    The response can be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    In case of receiving a valid XML document:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <base id_base="1234">edit</base>
    <base number_base="1" id_base="1235">insert</ base>
    <base number_base="2" id_base="1236">edit</ base>
    <base id_base="1235">delete</ base>
    <base id_base="1235">not_found</ base>
    </response>

     

    Request for receiving the list of base users

    Server address:

    https://host_name/xml/list_phones.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    <base id_base="1234" page="1" last_update="2011-03-25 08:39:48"/>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.
    • baseid_base - base number in the system.
    • basepage - page number. The whole list of base numbers is divided into pages. You cannot request the whole base. You can only request a separate page. The numbering starts from one.
    • last_update - the minimum date and time of registration (or last change) of the subscriber's data that you need to request.

    The response may be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    4. Database with this number does not exist
    In the case of receiving a valid XML document:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <phones page="1" num_pages="100">
      <phone phone="79001234567" region="Moscow " operator="Megaphone" name="John" surname="Doe" patronymic="Johnson" date_birth="1988-08-28" male="m" addition_1="Firstadditionalfield" addition_2="второе" addition_3="третье" addition_4="четвертое" addition_5="пятое" last_update="2011-03-25 08:39:48" />
      <phone phone="79001234568" region="Moscow" operator="Megaphone" name="John" surname="Doe" patronymic="Johnson" date_birth="1988-08-28" male="m" addition_1="Firstadditionalfield" addition_2="второе" addition_3="третье" addition_4="четвертое" addition_5="пятое" last_update="2011-03-25 08:39:48" />
    </phones>
    </response>

    Where:

    • page - page number.
    • num_pages - total pages.
    • phone - phone number of the subscriber.
    • region - region.
    • operator - operator.
    • name - subscriber's first name.
    • surname - subscriber's surname.
    • patronymic - patronymic of the subscriber.
    • date_birth - date of birth.
    • gender -"m" - male, "f" - female.
    • addition_1 – first additional field.
    • addition_2 – second additional field.
    • addition_3 - third additional field.
    • addition_4 - forth additional field.
    • addition_5 - fith additional field.
    • last_update - date and time of registration (or last change) of subscriber's data.

     

    Request to add/edit/delete base users

    Server address

    https://host_name/xml/phones.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    <base id_base="1234">
      <phone phone="79001234567" region="Moscow " operator="Megaphone" name="John" surname="Doe" patronymic="Michael" date_birth="1988-08-28" gender="m" addition_1="Firstadditionalfield" addition_2="second" addition_3="third" addition_4="forth" addition_5="fifth" number_phone="1"/>
      <phone phone="79001234568" region="Moscow " operator="Megaphone" name="John" surname="Doe" patronymic="Michael" date_birth="1988-08-28" gender="m" addition_1="Firstadditionalfield" addition_2="second" addition_3="third" addition_4="forth" addition_5="fifth" number_phone="2" />
        <phone phone="79001234569" action="delete" number_phone="5"/>
        <phone phone="79001234570" action="delete" number_phone="6"/>
    </base>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.
    • base id_base - the base number in the system.
    • phone - phone number of the subscriber. If a subscriber with this number already exists, it will be edited.
    • region - region. Optional field. If not specified, it is determined automatically.
    • operator - operator. Optional field. If not specified, it is determined automatically.
    • name - the name of the subscriber. Optional field.
    • surname - the surname of the subscriber. Optional field.
    • patronymic - patronymic of the subscriber. Optional field.
    • date_birth - date of birth. Optional field.
    • gender - "male" or "female". Optional field.
    • addition_1 - first additional field. Optional field.
    • addition_2 - second additional field. Optional field.
    • addition_3 - third additional field. Optional field.
    • addition_4 - forth additional field. Optional field.
    • addition_5 - fifth additional field. Optional field.
    • number_phone - sequential number in XML request. It is used to compare the phone numbers in the request and the received response. Optional field.

    The response may be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    4. Database with this number does not exist
    In case a valid XML document is received:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <baseid_base="1234">
        <phone phone="79001234567" number_phone="1"/>insert</phone>
        <phone phone="79001234568" number_phone="2" />edit</phone>
        <phone phone="79001234569" number_phone="5"/>delete</phone>
        <phone phone="79001234570" number_phone="6" />not_found</phone>
    </response>

     

    Request to get the list of numbers from the STOP list

    Server address:

    https://host_name/xml/list_stop.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" /> <password value="password" />
    </security>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.
    • number_phone - serial number in XML request. It is used to compare phone numbers in the request and received response.

    The response may be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    In case a valid XML document is received:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <phone>79001234567</phone>
    <phone>79001234568</phone>
    </response>

    Where:

    • phone - phone number from the STOP list.

     

    Request to add/remove subscribers to/from the STOP list

    Server address:

    https://host_name/xml/stop.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    <add_stop>
        <phone phone="79001234567" />
        <phone phone="79001234568" />
    </add_stop>
    <delete_stop>
        <phone phone="79001234569" />
        <phone phone="79001234570" />
    </delete_stop>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.
    • add_stop phone - subscriber's phone number to be added to the STOP list.
    • delete_stop phone - subscriber's phone number to be deleted from the STOP list.

    The response may be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    In case a valid XML document is received:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <phone phone="79001234567">delete</phone>
    <phone phone="79001234568">add</phone>
    <phone phone="79001234569">not_found</phone>
    </response>

     

    Request to receive the list of scheduled SMS

    Server address:

    https://host_name/xml/list_scheduled.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    <scheduled page="1"/>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.
    • scheduled page - page number. The whole list of scheduled SMS is divided into pages. You cannot request the whole list. You can only request a separate page. The numbering starts with one.

    The response may be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - текст ошибки может принимать следующие значения:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    In case a valid XML document is received:

    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <phones page="1" num_pages="100">
      <scheduled id_sms="1234" time_put_turn="2020-11-14 12:42:40" originator="SENDER_1"  phone="79001234567" type_sms="sms" text_sms="TextSMS" count_sms="2" name_delivery="Mailingname" time_send="2011-11-14 21:00" validity_period="2011-11-17 21:00:00" />
      <scheduled id_sms="1235" time_put_turn="2020-11-14 12:42:40" originator="SENDER_1" phone="79001234568" type_sms="sms" text_sms="TextSMS" count_sms="2" name_delivery="Mailingname" time_send="2011-11-14 21:00" validity_period="2011-11-17 21:00:00" />
    </phones>
    </response>

    Where:

    • page - page number.
    • num_pages - total pages.
    • id_sms - SMS number. It is used to delete a scheduled SMS.
    • time_put_turn - the time when it is added to the scheduler.
    • operator – SMS sender. This is the value that will be displayed on the subscriber's phone in the SMS from whom field.
    • phone - number of the subscriber to whom the SMS is addressed.
    • type – SMS message type to be sent:
      • sms – regular SMS
      • flashsms – flash SMS
      • wappush – WAP-Push
      • vcard – business card (vCard)
    • text_sms - SMS message text.
    • count_sms –Number of SMS message parts.
    • name_delivery - Name of the mailing.
    • time_send - date and time of the sending in format: YYYYY-MM-DDHH:MM where, YYYYY-year, MM-month, DD-day, HH-hours, MM-minutes.
    • validity_period - date and time after which no attempts will be made to deliver SMS in the format: YYYYY-MM-DDHH:MM:SS where, YYYYY-year, MM-month, DD-day, HH-hours, MM-minutes, SS-seconds.

     

    Request to delete a scheduled SMS

    Server address:

    https://host_name/xml/scheduled.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    <delete_schedule>
        <schedule id_sms="1234" />
        <schedule id_sms="1235" />
    </delete_schedule>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.
    • delete_schedule id_sms - number of scheduled SMS to be deleted. It can be obtained by requesting the list of scheduled SMS.

    The response may be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    In case a valid XML document is received:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <scheduled id_sms="1234">delete</scheduled>
    <scheduled id_sms="1235">not_found</scheduled>
    </response>

     

    Request to get the time of change of a certain item

    Server address:

    https://host_name/xml/check_change.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    <check obgect="base" id="1"/>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.
    • object - base - databases, stop list.

    The response may be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    4. Database with this number does not exist
    In case a valid XML document is received:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <obgect time_update="2012-01-01 12:12:12" />
    </response>

    Where

    • time_update - the time when the object was last modified.

     

    Request for time verification

    Server address:

    https://host_name/xml/time.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.

    The response may be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    In case a valid XML document is received:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <time>15:34:05</time>
    </response>

    Where:

    • time - local time of the user.

    However, the time is calculated as the time on the server minus the time zone difference between the user and the server.

    Example

    The server is located in Moscow and its server time is Moscow-based, and at the moment of the request it was 15:34:27. But the user was listed in Novosibirsk and the time zone difference (between the server and the user) was equal to +3. The following XML document will be returned to you:

    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <time>2012-12-17 18:34:27</time>
    </response>

     

    Request for statistical data

    You can receive the statistics only for the last 3 months. SMS older than 3 months are moved to the archive. You can request to export statistics for SMS older than 3 months through your manager.

    Server address:

    https://host_name/xml/stats.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
    <login value="login" />
    <password value="password" />
    </security>
    <stats date_start="2016-08-21" date_stop="2016-08-21" state="deliver" originator="SENDER_1" phone="" operator="" from_hour="00" from_minute="00" to_hour="" to_minute="" />
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.
    • stats date_start - the date of SMS send-out, not earlier than the specified period of time (today's date by default).
    • stats date_stop – the date of SMS send-out, not later than the specified period of time (today's date by default).
    • stats state - status of the message:
      1. not_deliver - the message was not delivered. Final status (does not change with time).
      2. expired - the subscriber was offline at the time the delivery attempt was made. Final Status (does not change over time).
      3. deliver - the message has been delivered. Final Status (does not change over time).
      4. partly_deliver - the message was sent, but the status was never received. Final status (does not change with time). In this case, to clarify the reasons for status absence it is necessary to contact the technical support service.
    • stats originator - sender's name.
    • stats phone - phone number of SMS recipient.
    • stats operator - mobile operator of the SMS recipient (Beeline, Megafon, MTS).
    • stats from_hour - the hour of SMS send-out, not earlier than the specified period of time. It is taken into account along with the specified date (by default 00).
    • stats from_minute - the minute of SMS send-out, not earlier than the specified time period. It is taken into account along with the specified date and hour (00 by default).
    • stats to_hour - the hour of SMS send-out, not later than the specified time period. It is taken into account along with the specified date (by default 59).
    • stats to_minute - the minute of SMS send-out, not later than the specified time period. It is taken into account along with the specified date and hour (59 by default).

    The response may be one of the following XML documents:

    In case of an error in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    4. Database with this number does not exist
    5. Incorrect date format
    6. No such operator detected
    In case a valid XML document is received:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <stats num_stats="100">
      <stat id_sms="100123" id_state="2000123" operator="МТС" name_delivery="Office" phone="7900123****" originator="SENDER_1" time_change_state="2016-08-10 23:04:32" time="2016-08-10 23:04:18" status="deliver" status_translate="delivered"  text="SMS TEXT" price="1.05" part_no="1" num_parts="2"></stat>
      <stat id_sms="100124" id_state="2000124" operator="МТС" name_delivery="Office" phone="7900123****" originator="SENDER_1" time_change_state="2016-08-10 23:04:32" time="2016-08-10 23:04:18" status="deliver" text="TEXT MESSAGE FOLLOW-UP" price="1.05" part_no="2" num_parts="2"></stat>
    </stats>
    </response>

    Where:

    • num_stats - total SMS.
    • id_sms - SMS message number.
    • id_state - identifier of SMS part.
    • operator - operator.
    • phone - phone number of SMS recipient.
    • originator - sender's name.
    • time_change_state - last time of SMS state change.
    • time - time of SMS sending.
    • status - message status:
      1. not_deliver - the message has not been delivered. Final status (does not change with time).
      2. expired - the subscriber was not in the network at the moments when the delivery attempt was made. Final Status (does not change over time).
      3. deliver - the message has been delivered. Final Status (does not change over time).
      4. partly_deliver - the message was sent, but the status was never received. Final status (does not change with time). In this case you should contact the technical support service to explain the reasons for the absence of the status.
        status_translate - status of the message, in Russian.
    • status_translate - статус сообщения, на русском языке.
    • price - Price of SMS part.
    • part_no - serial number of SMS part.
    • num_parts - number of SMS parts.

     

    Request for receiving the list of SMS templates

    Server address:

    https://host_name/xml/list_patterns.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
        <security>
          <login value="login" />
          <password value="password" />
        </security>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.

    The response can be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error  - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    In case a valid XML document is received:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <pattern id_pattern="1234" name="HeaderTemplate1">Template1</pattern>
    <pattern id_pattern="1235" name="HeaderTemplate2">Template2</pattern>
    </response>

    Where:

    • id_pattern - pattern identifier in the system.
    • name - template header.
    • pattern - template text.

     

    Request to change parameters/add/delete SMS templates

    Server address:

    https://host_name/xml/patterns.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    <patterns>
    <pattern id_pattern="1234" name="HeaderTemplate1">Template1</base>
    <pattern id_pattern="1235" name="HeaderTemplate2">Template2</base>
    <pattern number_pattern="1" name="HeaderTemplate3">Template3</pattern>
    </patterns>
    <delete_patterns>
        <pattern id_pattern="1236" />
        <pattern id_pattern="1237" />
    </delete_patterns>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.
    • id_pattern - unique number of the pattern in the system. If it is not specified, the base will be added. At that, you should specify the number_pattern parameter.
    • number_pattern - number of the template in XML request. It is used to match the IDs of added templates (if there were several of them in the request).
    • name - pattern title.
    • pattern - pattern text.

    The response can be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    In case a valid XML document is received:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <pattern id_pattern="1234">edit</pattern>
    <pattern id_pattern="1235">not_edit</ pattern>
    <pattern number_base="1" id_pattern="1238">insert</ pattern>
    <pattern id_pattern="1236">delete</ pattern>
    <pattern id_pattern="1237">not_found</ pattern>
    </response>

    Where:

    • id_pattern - unique number of SMS template in the system;
    • action - the action performed with the template:
      1. «edit» - template parameters modification;
      2. «insert» - adding a template;
      3. «not_edit» - failed to update the template. Perhaps the data is identical to the updated template;
      4. «delete» - the template is deleted;
      5. «not_found» - the template with the specified identifier has not been detected;
    • number_pattern - template number in JSON request. It is used to match the IDs of added patterns (if there were several of them in the request).

     

    Request for the registry of sender names

    Server address:

    https://host_name/xml/list_registry_originator.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
        <login value="логин" />
        <password value="пароль" />
    </security>
    <registry_originator operator="Operator" originator="Sender name" inn="INN"></registry_originator>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.
    • registry_originator - Filter output registry of sender names:
      • operator - Operator. Available operators are: mts - MTS, mega - Megafon, tele2 - Tele2. Optional field.
      • originator - Sender's name. Optional field.
      • inn - Taxpayer Identification Number. Optional field.

    The response can be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    In case a valid XML document is received:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <registry_originator>
      <operator name="mts" title="MTS">
          <originator originator="Sender 1" date_from="2017-05-20" legal_entity="IP Johnson" inn="INN" comment="Commenttext" status="approval" status_text="Approved"></originator>
          <originator originator="Sender 2" date_from="2017-05-20" legal_entity="IP Johnson" inn="INN" comment="Commenttext" status="posted_for_approval" status_text="Submitted for approval"></originator>
        </operator>
      <operator name="mega" title="Megaphone">
          <originator originator="Sender 1" date_from="2017-05-20" legal_entity="IP Johnson" inn="INN" comment="Commenttext" status="approval" status_text="Approved"></originator>
          <originator originator="Sender 2" date_from="2017-05-20" legal_entity="IP Johnson" inn="INN" comment="Commenttext" status="posted_for_approval" status_text="Submitted for approval"></originator>
        </operator>
    </registry_originator>
    </response>

    Where:

    • operator name - Operator name. mts, mega, tele2.
    • operator - Operator header. MTS, Megafon, Tele2.
    • originator - Sender's name.
    • date_from - Start date.
    • legal_entity - Legal entity.
    • inn - Taxpayer Identification Number.
    • comment - Comment.
    • status - Status:
      1. «posted_for_approval» - Submitted for approval;
      2. «send_for_approval» - Sent for approval;
      3. «approval» - Approved;
      4. «not_approval» - Not approved;
      5. «send_for_delete» - Submitted for deletion;
      6. «delete» - Deleted;
    • status_text - Status, description.

     

    Request to add/delete sender names in the registry of sender names

    Server address:

    https://host_name/xml/registry_originator.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    <registry_originator>
      <originator originator="Sender 1" legal_entity="IP Johnson" operator="mts" inn="INN" comment="Commenttext"></originator>
      <originator originator="Sender 1" legal_entity="IP Johnson" operator="tele2" inn="INN" comment="Commenttext"></originator>
      <originator originator="Sender 2" legal_entity="IP Johnson" operator="mts" inn="INN"></originator>
    </registry_originator>
    <delete_registry_originator>
      <originator originator="Sender 3"></originator>
      <originator originator="Sender 4" operator="mega"></originator>
    </delete_registry_originator>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system.
    • registry_originator - Add sender name:
      • originator - Sender name.
      • operator - Operator. Such operators are available as: mts - MTS, mega - Megafon, tele2 - Tele2.
      • legal_entity - Legal entity.
      • inn - Taxpayer Identification Number.
      • comment - Comment. Optional field.
    • delete_registry_originator -  Deletion of sender's name:
      • originator - Sender's name.
      • operator - Operator. Such operators are available as: mts - MTS, mega - Megafon, tele2 - Tele2. Optional field. If it is absent, the sender's name will be deleted for all operators.

    The response can be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data is missing
    In case of receiving a valid XML document:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <registry_originator>
      <originator originator="Sender 1" operator="mts" inn="INN" status="add" error=""></originator>
      <originator originator="Sender 1" operator="tele2" inn="INN" status="error" error="Error description"></originator>
      <originator originator="Sender 2" operator="mts" inn="INN" status="add" error=""></originator>
    </registry_originator>
    <delete_registry_originator>
      <originator originator="Sender 3" operator="" status="delete" error=""></originator>
      <originator originator="Sender 4" operator="mega" status="not_found" error="Sender's name not found"></originator>
    </delete_registry_originator>
    </response>

    Where:

    • registry_originator - Sender names added:
      • originator - Sender name.
      • operator -  Operator. mts, mega, tele2.
      • inn - Taxpayer Identification Number.
      • status - Status. add - added sender name, error - error.
      • error - error description.
    • delete_registry_originator - Deleted senders' names:
      • originator - Sender name.
      • operator - Operator. mts, mega, tele2. If missing, the sender name is deleted for all operators.
      • status - Status. not_found - submitted for deletion, error - error.
      • error - Error description

     

    Request to view and edit the links for receiving SMS statuses via XML protocol

    Server address:

    https://host_name/xml/get_state.php

    XML-document:

    <?xml version="1.0" encoding="utf-8" ?>
    <request>
    <security>
      <login value="login" />
      <password value="password" />
    </security>
    <get_state type="set">http://site.com/state.php</get_state>
    </request>

    Where:

    • login value - your login in the system.
    • password value - your password in the system
    • get_state - Link, in case of editing.
      • type - Request type (set - edit, get - view).

    The response can be one of the following XML documents:

    In case an error occurs in the sent XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <response>
    <error>Error text</error>
    </response>

    error - the error text can have the following meanings:

    1. Incorrect XML document format
    2. Incorrect login or password
    3. POST data missing
    In case a valid XML document is received:
    <?xml version="1.0" encoding="utf-8" ?>
    <response>
    <get_state>http://site.com/state.php</get_state>
    </response>

    Where:

    • get_state - Current link to retrieve statuses.