API call example:
JSON
{
"function":"mailkit.report",
"id":"client_id",
"md5":"client_md5",
"parameters":{
"range_from":"2015-01-01",
"range_to":"2015-02-01"
}
}
XML
<?xml version="1.0"?>
<methodCall>
<methodName>mailkit.report</methodName>
<params>
<param>
<value>
<int>client_id</int>
</value>
</param>
<param>
<value>
<string>client_md5</string>
</value>
</param>
<param>
<value>
<string>range_from</string>
</value>
</param>
<param>
<value>
<string>range_to</string>
</value>
</param>
</params>
</methodCall>
Construct
{
'id' => $cid,
'md5' => $md5,
'function' => 'mailkit.report',
'parameters' => {
'range_from' => $range_from,
'range_to' => $range_to,
}
}
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.
range_from = range definition for requested data. Starting date in YYYY-MM-DD format.
range_to = range definition for requested data. Ending date in YYYY-MM-DD format.
* required value
Succesfull call response:
JSON
[
{
"SEND_COUNT":"1",
"ID_MESSAGE":"123456",
"NAME":"Campaign name",
"CLICK_RATE":"100.0",
"READ_COUNT":"4",
"CLICK_COUNT":"3",
"READ_COUNT_U":"1",
"DELIVERED_COUNT":1,
"CLICK_COUNT_U":"1"
}
]
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>SEND_COUNT</name>
<value>
<i4>4</i4>
</value>
</member>
<member>
<name>ID_MESSAGE</name>
<value>
<i4>12345678</i4>
</value>
</member>
<member>
<name>NAME</name>
<value>
<string>First campaign</string>
</value>
</member>
<member>
<name>CLICK_RATE</name>
<value>
<double>25.0</double>
</value>
</member>
<member>
<name>READ_COUNT</name>
<value>
<i4>16</i4>
</value>
</member>
<member>
<name>CLICK_COUNT</name>
<value>
<i4>14</i4>
</value>
</member>
<member>
<name>READ_COUNT_U</name>
<value>
<i4>1</i4>
</value>
</member>
<member>
<name>DELIVERED_COUNT</name>
<value>
<i4>4</i4>
</value>
</member>
<member>
<name>CLICK_COUNT_U</name>
<value>
<i4>1</i4>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
Values
SEND_COUNT = number of messages sent
ID_MESSAGE = campaign ID
NAME = campaign name
CLICK_RATE = CTR value
READ_COUNT = read count
CLICK_COUNT = click count
READ_COUNT_U = open count (unique reads)
DELIVERED_COUNT = delivery count
CLICK_COUNT_U = visit count (unique clicks)
Unsuccessful call response:
JSON
{}
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<string></string>
</value>
</param>
</params>
</methodResponse>
If the call fails, the API returns an empty response.