Ukázka API volání:
JSON
{
"function":"mailkit.report.message.links.visitors",
"id":"client_id",
"md5":"client_md5",
"parameters":{
"ID_send":"ID_send",
"ID_url":"ID_url"
}
}
XML
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>mailkit.report.message.links.visitors</methodName>
<params>
<param>
<value>
<int>client_id</int>
</value>
</param>
<param>
<value>
<string>client_md5</string>
</value>
</param>
<param>
<value>
<i4>ID_send</i4>
</value>
</param>
<param>
<value>
<i4>ID_url</i4>
</value>
</param>
</params>
</methodCall>
Hodnoty
client_id * = API ID naleznete ve svém Mailkit účtu v menu Profil/Integrace.
client_md5 * = MD5 kód naleznete ve svém Mailkit účtu v menu Profil/Integrace.
ID_send * = ID rozesílky kampaně
ID_url * = ID odkazu
* povinný parametr
Po úspěšném volání se vrací:
JSON
[
{
"ID_EMAIL": "123456789",
"DATA": {
"COUNTRY": "Czech Republic",
"REGION_CODE": "",
"USER_AGENT": "Mozilla/5.0 (Linux; Android 4.4.4; Lenovo P70-A Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.81 Mobile Safari/537.36",
"CITY": "",
"ORG": "T-Mobile Czech Republic",
"BROWSER_MINOR": "0",
"CODE": "CZ",
"DEVICE": "Smartphone",
"CONTINENT": "europe",
"BROWSER_MAJOR": "51",
"REFERER": "",
"BROWSER": "Chrome Mobile",
"OS": "Android",
"IP": "123.123.123.0",
"IP_ORIG": "123.123.123.0",
"DATETIME": "2001-01-01 01:01:01",
"REGION": "",
"OS_VERSION": "4.4 KitKat",
"BROWSER_TYPE": "Mobile Browser"
},
"COUNT": "1",
"EMAIL": "email@example.com"
},
{
"ID_EMAIL": "123456780",
"DATA": {
"COUNTRY": "Czech Republic",
"REGION_CODE": "52",
"USER_AGENT": "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko",
"CITY": "Prague",
"ORG": "Sample organization",
"BROWSER_MINOR": "0",
"CODE": "CZ",
"DEVICE": "Personal computer",
"CONTINENT": "europe",
"BROWSER_MAJOR": "11",
"REFERER": "",
"BROWSER": "IE",
"OS": "Windows",
"IP": "123.123.123.0",
"IP_ORIG": "123.123.123.0",
"DATETIME": "2001-01-01 01:01:02",
"REGION": "Hlavni Mesto Praha",
"OS_VERSION": "7",
"BROWSER_TYPE": "Browser"
},
"COUNT": "1",
"EMAIL": "email2@example.com"
}
]
XML
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>ID_EMAIL</name>
<value>
<i4>123456789</i4>
</value>
</member>
<member>
<name>DATA</name>
<value>
<struct>
<member>
<name>COUNTRY</name>
<value>
<string>Czech Republic</string>
</value>
</member>
<member>
<name>REGION_CODE</name>
<value>
<string></string>
</value>
</member>
<member>
<name>USER_AGENT</name>
<value>
<string>Mozilla/5.0 (Linux; Android 4.4.4; Lenovo P70-A Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.81 Mobile Safari/537.36</string>
</value>
</member>
<member>
<name>CITY</name>
<value>
<string></string>
</value>
</member>
<member>
<name>ORG</name>
<value>
<string>T-Mobile Czech Republic</string>
</value>
</member>
<member>
<name>BROWSER_MINOR</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>CODE</name>
<value>
<string>CZ</string>
</value>
</member>
<member>
<name>DEVICE</name>
<value>
<string>Smartphone</string>
</value>
</member>
<member>
<name>CONTINENT</name>
<value>
<string>europe</string>
</value>
</member>
<member>
<name>BROWSER_MAJOR</name>
<value>
<i4>51</i4>
</value>
</member>
<member>
<name>REFERER</name>
<value>
<string></string>
</value>
</member>
<member>
<name>BROWSER</name>
<value>
<string>Chrome Mobile</string>
</value>
</member>
<member>
<name>OS</name>
<value>
<string>Android</string>
</value>
</member>
<member>
<name>IP</name>
<value>
<string>123.123.123.0</string>
</value>
</member>
<member>
<name>IP_ORIG</name>
<value>
<string>123.123.123.0</string>
</value>
</member>
<member>
<name>DATETIME</name>
<value>
<string>2001-01-01 01:01:01</string>
</value>
</member>
<member>
<name>REGION</name>
<value>
<string></string>
</value>
</member>
<member>
<name>OS_VERSION</name>
<value>
<string>4.4 KitKat</string>
</value>
</member>
<member>
<name>BROWSER_TYPE</name>
<value>
<string>Mobile Browser</string>
</value>
</member>
</struct>
</value>
</member>
<member>
<name>COUNT</name>
<value>
<i4>1</i4>
</value>
</member>
<member>
<name>EMAIL</name>
<value>
<string>email@example.com</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ID_EMAIL</name>
<value>
<i4>123456780</i4>
</value>
</member>
<member>
<name>DATA</name>
<value>
<struct>
<member>
<name>COUNTRY</name>
<value>
<string>Czech Republic</string>
</value>
</member>
<member>
<name>REGION_CODE</name>
<value>
<string></string>
</value>
</member>
<member>
<name>USER_AGENT</name>
<value>
<string>Mozilla/5.0 (Linux; Android 4.4.4; Lenovo P70-A Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.81 Mobile Safari/537.36</string>
</value>
</member>
<member>
<name>CITY</name>
<value>
<string></string>
</value>
</member>
<member>
<name>ORG</name>
<value>
<string>T-Mobile Czech Republic</string>
</value>
</member>
<member>
<name>BROWSER_MINOR</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>CODE</name>
<value>
<string>CZ</string>
</value>
</member>
<member>
<name>DEVICE</name>
<value>
<string>Smartphone</string>
</value>
</member>
<member>
<name>CONTINENT</name>
<value>
<string>europe</string>
</value>
</member>
<member>
<name>BROWSER_MAJOR</name>
<value>
<i4>51</i4>
</value>
</member>
<member>
<name>REFERER</name>
<value>
<string></string>
</value>
</member>
<member>
<name>BROWSER</name>
<value>
<string>Chrome Mobile</string>
</value>
</member>
<member>
<name>OS</name>
<value>
<string>Android</string>
</value>
</member>
<member>
<name>IP</name>
<value>
<string>123.123.123.0</string>
</value>
</member>
<member>
<name>IP_ORIG</name>
<value>
<string>123.123.123.0</string>
</value>
</member>
<member>
<name>DATETIME</name>
<value>
<string>2001-01-01 01:01:02</string>
</value>
</member>
<member>
<name>REGION</name>
<value>
<string></string>
</value>
</member>
<member>
<name>OS_VERSION</name>
<value>
<string>4.4 KitKat</string>
</value>
</member>
<member>
<name>BROWSER_TYPE</name>
<value>
<string>Mobile Browser</string>
</value>
</member>
</struct>
</value>
</member>
<member>
<name>COUNT</name>
<value>
<i4>1</i4>
</value>
</member>
<member>
<name>EMAIL</name>
<value>
<string>email2@example.com</string>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
Hodnoty
ID_EMAIL = ID e-mailové adresy
COUNT = počet kliknutí
EMAIL = e-mailová adresa
DATA – pole s daty o přístupu příjemce:
- CONTINENT – Kontinent příjemce
- COUNTRY – Název země přístupu identifikovaná přes GeoIP
- CODE – Kód země dle ISO 3166-2
- REGION – Název regionu identifikovaný z GeoIP
- REGION_CODE – ID regionu v rámci země podle GeoIP
- CITY – Město
- ORG – Organizace poskytující připojení
- BROWSER – Název prohlížeče z USER_AGENT
- BROWSER_MAJOR – Major verze prohlížeče z USER_AGENT
- BROWSER_MINOR – Minor verze prohlížeče z USER_AGENT
- BROWSER_TYPE – Druh klientského prohlížeče (Browser, Mobile Browser)
- REFERER – Adresa, skrz kterou návštěva proběhla (dostupné pouze pokud bylo kliknutí přesměrované)
- OS – Operační systém z USER_AGENT
- OS_VERSION – Verze operačního systému
- DEVICE – Druh zařízení identifikovaného z USER_AGENT
- IP – IP adresa návštěvníka (poslední oktet je vždy zaměněn za 0)
- IP_ORIG – IP adresa návštěvníka (může se lišit od IP, pokud se jedná o interní IP adresu na vnitřní síti nebo za proxy serverem, poslední oktet je vždy zaměněn za 0)
- DATETIME – Datum a čas přístupu
- USER_AGENT – Identifikační řetězec prohlížeče příjemce
Příklad neúspěšného volání:
JSON
{
"error_status":"1",
"error":"Invalid ID_send"
}
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<string>Invalid ID_send</string>
</value>
</param>
</params>
</methodResponse>
Hodnoty
Invalid ID_send = vloženo neplatné ID rozesílky
Invalid ID_url = vloženo neplatné ID odkazu
Missing ID_send = chybí ID rozesílky
Missing ID_url = chybí ID odkazu