API call example:
JSON
{
"id":"client_id",
"md5":"client_md5",
"function":"mailkit.campaigns.history",
"parameters":{
"list_count":5,
"ID_message":campaign_id
}
}
XML
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>mailkit.campaigns.history</methodName>
<params>
<param>
<value>
<int>client_id</int>
</value>
</param>
<param>
<value>
<string>client_md5</string>
</value>
</param>
<param>
<value>
<struct>
<member>
<name>list_count</name>
<value>
<i4>30</i4>
</value>
</member>
<member>
<name>ID_message</name>
<value>
<string></string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
Construct
{
'id' => $cid,
'md5' => $md5,
'function' => 'mailkit.campaigns.history',
'parameters' =>{
'list_count' => $limit,
'ID_message' => $ID_message
}
}
Values
client_id * = client ID can be found in your Mailkit account's menu Profile/Integration.
client_md5 * = MD5 code can be found in your Mailkit account's menu Profile/Integration.
ID_message = Campaign ID (as returned by mailkit.campaigns.create). If no ID is provided a list of all messages sent will be returned sorted by date descending and limited by number defined in list_count.
list_count = number of records (min. 1, max 50, default 10).
* required value
Succesfull call response:
JSON
[
{
"ID_MESSAGE":"123456",
"ID_SEND": "123456",
"DATE":"2016-03-14 09:23:56",
"PREVIEW":"https://u.mailkit.eu/XXXX"
}
]
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>ID_MESSAGE</name>
<value>
<i4>123456789</i4>
</value>
</member>
<member>
<name>ID_SEND</name>
<value>
<i4>123456789</i4>
</value>
</member>
<member>
<name>DATE</name>
<value>
<string>2016-03-16 13:40:54</string>
</value>
</member>
<member>
<name>PREVIEW</name>
<value>
<string>https://u.mailkit.eu/XXXX</string>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
Values:
ID_MESSAGE = Campaign ID
ID_SEND = Campaign delivery ID
DATE = date sent
PREVIEW = campaign preview URL
Unsuccesfull call response
JSON
{
"error_status":1,
"error":"Invalid list_count"
}
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>data</name>
<value>
<string>Invalid ID_message</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
Values:
Invalid ID_message = invalid campaign ID
Invalid list_count = invalid list count limit (min 1, max 50, default 10)