public function getNotificationEmailAddress()
    {
        $email     = null;
        $emailsRaw = $this->getFlexiData($this->getApiURL(),
            ['detail' => 'custom:id,email,kontakty(primarni,email)', 'relations' => 'kontakty']);
        if (is_array($emailsRaw) && !empty($emailsRaw[0])) {
            $emails = $emailsRaw[0];
            if (array_key_exists('email', $emails) && strlen(trim($emails['email']))) {
                $email = $emails['email'];
            }
            if (array_key_exists('kontakty', $emails) && !empty($emails['kontakty'])) {
                foreach ($emails['kontakty'] as $kontakt) {
                    if (($kontakt['primarni'] == 'true') && strlen(trim($kontakt['email']))) {
                        $email = $kontakt['email'];
                        break;
                    }
                }
            }
        }
        return $email;
    }