API call example:
JSON
{
"function":"mailkit.report.campaign",
"id":"client_id",
"md5":"client_md5",
"parameters":{
"range_from":"RRRR-MM-DD",
"range_to":"RRRR-MM-DD",
"ID_message": "ID_message"
}
}
XML
<?xml version="1.0"?>
<methodCall>
<methodName>mailkit.report.campaign</methodName>
<params>
<param>
<value>
<int>client_id</int>
</value>
</param>
<param>
<value>
<string>client_md5</string>
</value>
</param>
<param>
<value>
<int>ID_message</int>
</value>
</param>
<param>
<value>
<string>range_from</string>
</value>
</param>
<param>
<value>
<string>range_to</string>
</value>
</param>
</params>
</methodCall>
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
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": "send_count",
"SUBJECT": "subject",
"DATE": "RRRR-MM-DD HH:MM:SS",
"READ_COUNT": "read_count",
"ID_SEND": "ID_send",
"SPAM_REPORT": "spam_report",
"CLICK_COUNT": "click_count",
"CONVERSION_COUNT_U": "conversion_count_u",
"READ_COUNT_U": "read_count_u",
"FORWARD_COUNT": "forward_count_u",
"UNSUBSCRIBE": "unsubscribe",
"CLICK_RATE": "click_rate",
"PRINT_COUNT": "print_count",
"FROM": "from",
"CONVERSION_COUNT": "conversion_count",
"REV": "revenues",
"CLICK_RATE2": "click_rate2",
"DELIVERED_COUNT": "delivered_count",
"CLICK_COUNT_U": "click_count_u",
"DATE2": "RRRR-MM-DD"
}
]
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>SEND_COUNT</name>
<value>
<i4>1</i4>
</value>
</member>
<member>
<name>SUBJECT</name>
<value>
<string>subject</string>
</value>
</member>
<member>
<name>DATE</name>
<value>
<string>2015-01-19 14:51:04</string>
</value>
</member>
<member>
<name>READ_COUNT</name>
<value>
<i4>1</i4>
</value>
</member>
<member>
<name>ID_SEND</name>
<value>
<i4>460256</i4>
</value>
</member>
<member>
<name>SPAM_REPORT</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>CLICK_COUNT</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>CONVERSION_COUNT_U</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>READ_COUNT_U</name>
<value>
<i4>1</i4>
</value>
</member>
<member>
<name>FORWARD_COUNT</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>UNSUBSCRIBE</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>CLICK_RATE</name>
<value>
<double>0.0</double>
</value>
</member>
<member>
<name>PRINT_COUNT</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>FROM</name>
<value>
<string>mail@mmail.cz</string>
</value>
</member>
<member>
<name>CONVERSION_COUNT</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>REV</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>CLICK_RATE2</name>
<value>
<double>0.0</double>
</value>
</member>
<member>
<name>DELIVERED_COUNT</name>
<value>
<i4>1</i4>
</value>
</member>
<member>
<name>CLICK_COUNT_U</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>DATE2</name>
<value>
<string>2015-01-19</string>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
Values
ID_SEND = ID of message delivery
SUBJECT = campaign subject
FROM = sender address
DATE = date and time of delivery
DATE2 = delivery date
SEND_COUNT = number of messages sent
DELIVERED_COUNT = number of messages delivered
READ_COUNT = read count
READ_COUNT_U = open count (unique reads)
CLICK_COUNT = click count
CLICK_COUNT_U = visit count (unique clicks)
CLICK_RATE = CTR
CLICK_RATE2 = unique CTR
CONVERSION_COUNT = conversion count
CONVERSION_COUNT_U = unique conversion count
REV = revenues
UNSUBSCRIBE = unsubscribe count
SPAM_REPORT = spam report count
Unsuccessful call response:
JSON
{
"error_status": 1,
"error": "Invalid ID_message"
}
XML
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value>
<string>Missing ID_message</string>
</value>
</param>
</params>
</methodResponse>
Values
Missing ID_message – missing campaign ID
Invalid ID_message – invalid campaign ID
If the parameters for the data range (range_from/range_to) are entered incorrectly, the API returns an empty response:
JSON
{}
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<string></string>
</value>
</param>
</params>
</methodResponse>