API call example:
JSON
{
"id":"client_id",
"md5":"client_md5",
"function":"mailkit.email.getstatus.history",
"parameters":{
"email":"email",
"ID_email":"ID_email"
}
}
XML
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>mailkit.email.getstatus.history</methodName>
<params>
<param>
<value>
<int>client_id</int>
</value>
</param>
<param>
<value>
<string>client_md5</string>
</value>
</param>
<param>
<value>
<struct>
<member>
<name>email</name>
<value>
<string>example@example.cz</string>
</value>
</member>
<member>
<name>ID_email</name>
<value>
<i4>123456789</i4>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
Construct
{
'id' => $client_id,
'md5' => $client_md5,
'function' => 'mailkit.email.getstatus.history',
'parameters' =>{
'ID_email' => $ID_email,
'email' => $email,
}
}
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.
email_id ** = ID of email address, (returned by mailkit.mailinglist.adduser) – API returns recipient history related to an email address in a specific recipient list (i.e. campaign deliveries in which that recipient list was used)
email ** = email address. If an email address is provided a list of all found records will be returned.
* required value
** email or ID_email must always be filled. If both values are filled in, ID_email takes precedence
Successful call response:
JSON
[
{
"MESSAGE_NAME":"Campaign name",
"ID_MESSAGE":"123456",
"SUBJECT":"Campaign subject",
"PREVIEW":"https://u.mailkit.eu/XXXXX",
"READ_COUNT":"2",
"ID_EMAIL":"123456789",
"ID_SEND":"123456789",
"DATE_SEND":"2015-06-10 13:29:05",
"EMAIL_FROM":"example@example.com",
"CLICK_COUNT":"1",
"ID_SEND_MESSAGE":"123456789",
"NAME_FROM":"Sender name",
"ID_USER_LIST":"123456",
"TYPE_MESSAGE":"email",
"RESPONSE_DATA":[
{
"URL":"http://www.example.com",
"COUNTRY":"country",
"REGION_CODE":"rc",
"CITY":"city",
"DATE":"2015-06-10 13:30:27",
"ID_URL":"123456",
"TYPE":"click",
"BROWSER":"Chrome",
"OS":"Windows",
"REGION":"region"
}
]
}
]
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>PREVIEW</name>
<value>
<string>https://u.mailkit.eu/XXXXXXX</string>
</value>
</member>
<member>
<name>DATE_SEND</name>
<value>
<string>2015-04-08 12:38:36</string>
</value>
</member>
<member>
<name>ID_MESSAGE</name>
<value>
<i4>123456789</i4>
</value>
</member>
<member>
<name>ID_SEND</name>
<value>
<i4>123456789</i4>
</value>
</member>
<member>
<name>ID_SEND_MESSAGE</name>
<value>
<i4>123456789</i4>
</value>
</member>
<member>
<name>ID_USER_LIST</name>
<value>
<string>123456789</string>
</value>
</member>
<member>
<name>MESSAGE_NAME</name>
<value>
<string>Campaign name</string>
</value>
</member>
<member>
<name>SUBJECT</name>
<value>
<string>Campaign subject</string>
</value>
</member>
<member>
<name>EMAIL_FROM</name>
<value>
<string>sender@example.com</string>
</value>
</member>
<member>
<name>NAME_FROM</name>
<value>
<string>Sender name</string>
</value>
</member>
<member>
<name>TYPE_MESSAGE</name>
<value>
<string>email</string>
</value>
</member>
<member>
<name>READ_COUNT</name>
<value>
<i4>4</i4>
</value>
</member>
<member>
<name>CLICK_COUNT</name>
<value>
<i4>2</i4>
</value>
</member>
<member>
<name>RESPONSE_DATA</name>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>TYPE</name>
<value>
<string>click</string>
</value>
</member>
<member>
<name>DATE</name>
<value>
<string>2015-12-21 13:29:46</string>
</value>
</member>
<member>
<name>URL</name>
<value>
<string>http://www...</string>
</value>
</member>
<member>
<name>ID_URL</name>
<value>
<i4>123456</i4>
</value>
</member>
<member>
<name>REGION</name>
<value>
<string></string>
</value>
</member>
<member>
<name>REGION_CODE</name>
<value>
<string></string>
</value>
</member>
<member>
<name>CITY</name>
<value>
<string></string>
</value>
</member>
<member>
<name>BROWSER</name>
<value>
<string>Chrome</string>
</value>
</member>
<member>
<name>OS</name>
<value>
<string>Windows</string>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
Values
PREVIEW = url to the message preview
DATE_SEND = message send date
ID_MESSAGE = Campaign ID
ID_SEND = ID of message delivery
ID_SEND_MESSAGE = ID of sent message
MESSAGE_NAME = Campaign name
SUBJECT = Campaign subject
EMAIL_FROM = Message sender address
NAME_FROM = Message sender name
TYPE_MESSAGE = Message type (email X sms)
READ_COUNT = Number of reads
CLICK_COUNT = Number of clicks
RESPONSE_DATA = Recipient responses and collected data:
- TYPE = type of reaction (read, click, conversion, unsubscribe, spam_report, print, forward, share, polls = poll voting, polls_click = click poll link in email)
- DATE = date of response
- URL = url address (only in for clicks)
- ID_URL = ID of url address (only for clicks)
- REGION = recipient's region
- REGION_CODE = recipient's region code
- CITY = recipient's city
- BROWSER = recipient's browser
- OS = recipient's operating system
If no campaign has been sent to the recipient yet, 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>
Unsuccessful call response:
JSON
{
"error_status":"1",
"error":"Invalid email"
}
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<string>Invalid ID_email</string>
</value>
</param>
</params>
</methodResponse>
Values
Invalid ID_email - ID_email requested was not found
Invalid email - email address requested was not found