ResourcesAPI documentation

mailkit.campaigns.schedule.list

Function mailkit.campaigns.schedule.list returns a list of scheduled deliveries of the campaign.

API call example:

XML

<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
  <methodName>mailkit.campaigns.schedule.list</methodName>
  <params>
    <param>
      <value>
        <int>client_id</int>
      </value>
    </param>
    <param>
      <value>
        <string>client_md5</string>
      </value>
    </param>
    <param>
      <value>
        <i4>ID_message</i4>
      </value>
    </param>
  </params>
</methodCall>

JSON

{  
   "function":"mailkit.campaigns.schedule.list",
   "id":"client_id",
   "md5":"client_md5",
   "parameters":{  
      "ID_message": "123456"
   }   
}

Values

client_id * = client ID can be found in your Mailkit account's menu Profile / Integration / API settings.

client_md5 * = MD5 code can be found in your Mailkit account's menu Profile / Integration / API settings.

ID_message = ID of campaign (optional). When used returns only campaign with a given ID.

* required value

Successful call responses

Reponses are different when there are pending deliveries and when there are none.

No pending deliveries:

XML

<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
 <params>
  <param>
   <value>
    <struct>
     <member>
      <name>ID_message</name>
      <value>
       <i4>123456</i4>
      </value>
     </member>
     <member>
      <name>data</name>
      <value>
       <string></string>
      </value>
     </member>
     <member>
      <name>error</name>
      <value>
       <i4>0</i4>
      </value>
     </member>
    </struct>
   </value>
  </param>
 </params>
</methodResponse>

JSON

{
    "ID_message": "123456",
    "data": "",
    "error_status": 0
}

Deliveries pending:

XML

<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
 <params>
  <param>
   <value>
    <struct>
     <member>
      <name>data</name>
      <value>
       <array>
        <data>
         <value>
          <struct>
           <member>
            <name>DATE</name>
            <value>
             <string>2018-03-26 11:48:44</string>
            </value>
           </member>
           <member>
            <name>SUBJECT</name>
            <value>
             <string>subject</string>
            </value>
           </member>
           <member>
            <name>SUBJECT_B</name>
            <value>
             <string></string>
            </value>
           </member>
           <member>
            <name>USE_AB</name>
            <value>
             <string>FALSE</string>
            </value>
           </member>
           <member>
            <name>TIME_ZONE</name>
            <value>
             <string>+02:00</string>
            </value>
           </member>
           <member>
            <name>ID_SEND_MESSAGE_QUEUE</name>
            <value>
             <i4>123</i4>
            </value>
           </member>
           <member>
            <name>DATE_SEND</name>
            <value>
             <string>2018-04-29 14:35:00</string>
            </value>
           </member>
          </struct>
         </value>
        </data>
       </array>
      </value>
     </member>
     <member>
      <name>ID_message</name>
      <value>
       <i4>123456</i4>
      </value>
     </member>
     <member>
      <name>error</name>
      <value>
       <i4>0</i4>
      </value>
     </member>
    </struct>
   </value>
  </param>
 </params>
</methodResponse>

JSON

{
    "data": [
        {
            "SUBJECT": "subject",
            "TIME_ZONE": "+01:00",
            "DATE_SEND": "2018-03-31 08:25:00",
            "USE_AB": "FALSE",
            "SUBJECT_B": "",
            "DATE": "2018-03-13 10:26:23",
            "ID_SEND_MESSAGE_QUEUE": 123
        }
    ],
    "error_status": 0,
    "ID_message": "123456"
}

Values:

DATE = date and time delivery has been scheduled
SUBJECT = message subject
SUBJECT_B = messages subject of B version (for AB tested campaign)
USE_AB = AB testing enabled (TRUE / FALSE)
TIME_ZONE = time zone
ID_SEND_MESSAGE_QUEUE = ID of the pending delivery
DATE_SEND = date and time of pending delivery
ID_message = ID of campaign
error = 0 ... request success status code (XML)
error_status = 0 ... request success status code (JSON)

On error / error_status = 1 ... an error occured:
Invalid ID_message = inavlide ID of campaign