Function mailkit.email.unsubscribe.getstatus is used to get information about unsubscribe status of recipient.
<?xml version="1.0"?>
<methodCall>
<methodName>mailkit.email.unsubscribe.getstatus</methodName>
<params>
<param>
<value>
<int>client_id</int>
</value>
</param>
<param>
<value>
<string>client_md5</string>
</value>
</param>
<param>
<value>
<int>email_id</int>
</value>
</param>
</params>
</methodCall>
{
"function":"mailkit.email.unsubscribe.getstatus",
"id":"client_id",
"md5":"client_md5",
"parameters":{
"email":"email",
"ID_email":"ID_email"
}
}
client_id * = client ID can be found in your Mailkit account's menu Profile / Integration / API settings.
client_md5 * = MD5 code can be found in your Mailkit account's menu Profile / Integration / API settings.
email_id * = may contain ID of e-mail address, (returned by mailkit.mailinglist.adduser), or e-mail address. If an email address is provided a list of all found records will be returned. The JSON variant of the call requires the email or ID_email to be passed as separate parameters.
* required value
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<string>FALSE</string>
</value>
</param>
</params>
</methodResponse>
{
"email": "example@example.eu",
"error_status": "0",
"topics": null,
"ID_email": "123456789",
"unsubscribe": "FALSE",
"timeout": {
"date": "0000-00-00"
}
}
FALSE = e-mail address is not unsubscribed
email = e-mail address
error_status = error code
topics = topics that were unsubscribed
ID_email = email address ID
unsubscribe = unsubscription status of the recipient (FALSE / TRUE)
timeout: date = unsubscribe expiration date (when user unsubscribes temporarily). Value of 0000-00-00 means the expiration is not set and unsubscribe is permanent (default).
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<string>TRUE</string>
</value>
</param>
</params>
</methodResponse>
{
"email": "example@example.cz",
"error_status": "0",
"topics": null,
"ID_email": "123456789",
"unsubscribe": "TRUE",
"timeout": {
"date": "2018-10-10"
}
}
TRUE = e-mail address is unsubscribed
email = e-mail address
error_status = error code
topics = topics that were unsubscribed
ID_email = email address ID
unsubscribe = unsubscription status of the recipient (FALSE / TRUE)
timeout: date = unsubscribe expiration date (when user unsubscribes temporarily). Value of 0000-00-00 means the expiration is not set and unsubscribe is permanent (default).
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>UNSUBSCRIBE</name>
<value>
<string>TRUE</string>
</value>
</member>
<member>
<name>ID_AGENCY_CUSTOMER</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>NAME</name>
<value>
<string>Novinky</string>
</value>
</member>
<member>
<name>DESCRIPTION</name>
<value>
<string>Informace o novinkách a aktualizacích.</string>
</value>
</member>
<member>
<name>ID_UNSUBSCRIBE_GROUP</name>
<value>
<i4>14</i4>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
{
"email": "example@example.com",
"topics": [
{
"NAME": "News",
"TOPIC_UNSUBSCRIBE": "TRUE",
"ID_TOPIC": "10",
"STATUS": "enabled",
"DESCRIPTION": "Description 1"
},
{
"NAME": "Sweepstakes",
"TOPIC_UNSUBSCRIBE": "FALSE",
"ID_TOPIC": "11",
"STATUS": "enabled",
"DESCRIPTION": "Description 2"
}
],
"error_status": "0",
"ID_email": "123456789",
"unsubscribe": "FALSE",
"timeout": {
"date": "0000-00-00"
}
}
UNSUBSCRIBE = possible values:
TOPICS - campaign topics
ID_AGENCY_CUSTOMER = ID of agency customer.
ERROR_STATUS - error code
ID_email - ID of the email address
TIMEOUT - temporary unsubscribe information