src/XQueue/Maileon/API/Contacts/ContactsService.php
function addUnsubscriptionReasonsToUnsubscribedContact($id, $checksum = null, $reasons = null, $ignore_checksum = false)
    {
        $queryParameters = array();
        $queryParameters['id'] = $id;
        if (!empty($checksum)) {
            $queryParameters['checksum'] = $checksum;
        }
        if ($ignore_checksum===true) $queryParameters['ignore_checksum'] = "true";

        if (!empty($reasons)) {
            if (is_array($reasons)) {
                $queryParameters = $this->appendArrayFields($queryParameters, 'reason', $reasons);
            } else {
                $queryParameters['reason'] = urlencode($reasons);
            }
        }

        return $this->put("contacts/contact/unsubscribe/reasons", null, $queryParameters);
    }
function addUnsubscriptionReasonsToUnsubscribedContact($id, $checksum = null, $reasons = null, $ignore_checksum = false)
    {
        $queryParameters = array();
        $queryParameters['id'] = $id;
        if (!empty($checksum)) {
            $queryParameters['checksum'] = $checksum;
        }
        if ($ignore_checksum===true) $queryParameters['ignore_checksum'] = "true";

        if (!empty($reasons)) {
            if (is_array($reasons)) {
                $queryParameters = $this->appendArrayFields($queryParameters, 'reason', $reasons);
            } else {
                $queryParameters['reason'] = urlencode($reasons);
            }
        }

        return $this->put("contacts/contact/unsubscribe/reasons", null, $queryParameters);
    }
This method adds unsubscription reasons to an unsubscribed contact.
The contact must already be unsubscribed, otherwise 400 will be returned by the PAI

@param int $id The ID of the contact.
@param string $checksum The checksum generated by Maileon
@param array $reasons an array of reasons or a single reason (string). Unsubscription reasons have two layers
of information, see http://dev.maileon.com/api/rest-api-1-0/contacts/unsubscribe-contacts-by-email for more details about the format.
The parameter(s) will be url-encoded by the client, you do not need to provide urlencoded strings.
@param boolean $ignore_checksum If the call comes from an authorized system instead of the user you might ignore the checksum
@return \em com_maileon_api_MaileonAPIResult
the result object of the API call
@throws com_maileon_api_MaileonAPIException
if there was a connection problem or a server error occurred