PHP code example of emailplatform / api_parser

1. Go to this page and download the library: Download emailplatform/api_parser library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

emailplatform / api_parser example snippets




$parser = new ApiParser($settings);

$subscriberid = 68317547;
$listid = 0;
$emailaddress = "";
$mobileNumenr = "";
$mobilePrefix = "";
$fieldid = 14;
$fieldValue = array(
   'Lastname' => "Tom",
   'Firstname' => 'Jones',
   'Date' => '31-12-2020 T00:00',
   'Active' => 0
);
$path = 'Users[Lastname=SimpleChange4]';

$result = $parser->UpdateOTMDocument($subscriberid, $listid, $emailaddress, $mobileNumber, $mobilePrefix, $fieldid, $fieldValue, $path);

print_r($result);

> $Mobile no longer 

> public function ScheduleSendSMS($campaignid = false, $lists = false, $hours = false)
>

> public function ScheduleSendSMS($campaignid = false, $hours = false)
>

> public function UpdateOTMDocument ($subscriberid = 0, $fieldid = 0, $fieldValueOTM = array(), $path = "")
>

> public function UpdateOTMDocument ($subscriberid = 0, $listid = 0, $emailaddress = "", $mobileNumber = "", $mobilePrefix = "", $fieldid = 0, $fieldValueOTM = array(), $path = "")
>

> public function ScheduleSendNewsletter($campaignid = false, $hours = false, $saveSnapshots = true, $reloadFeed = true)
>

> public function ScheduleSendNewsletter($campaignid = false, $hours = false, $saveSnapshots = true, $reloadFeed = true, $notifyOwner = false)
>

> public function ScheduleSendNewsletterToLists($newsletterid = false, $timeToSend = false, $listids = array(), $saveSnapshots = true, $reloadFeed = true)
>

> public function ScheduleSendNewsletterToLists($newsletterid = false, $timeToSend = false, $listids = array(), $saveSnapshots = true, $reloadFeed = true, $notifyOwner = false)
>

> public function ScheduleSendNewsletterToSegments($newsletterid = false, $timeToSend = false, $segmentids = array(), $saveSnapshots = true, $reloadFeed = true)
>

> public function ScheduleSendNewsletterToSegments($newsletterid = false, $timeToSend = false, $segmentids = array(), $saveSnapshots = true, $reloadFeed = true, $notifyOwner = false)
>

> public function SendNewsletter($newsletterid = 0, $subscriberid = 0, $email = '', $senderEmail = '', $senderName = '', $replyEmail = '', $callbackUrl = false, $reloadFeed = false)
>

> public function SendNewsletter($newsletterid = 0, $subscriberid = 0, $email = '', $senderEmail = '', $senderName = '', $replyEmail = '', $callbackUrl = false, $reloadFeed = false, $notifyOwner = false)
>

> public function UpdateOTMDocument ($subscriberid = 0, $fieldid = 0, $fieldValueOTM = array(), $path = "")
>

> public function RemoveOTMDocument ($subscriberid = 0, $fieldid = 0, $path = "", $index = 0)
>

> public function ScheduleSendNewsletter($campaignid = false, $hours = false, $saveSnapshots = true)
>

> public function ScheduleSendNewsletter($campaignid = false, $hours = false, $saveSnapshots = true, $reloadFeed = true)
>

> public function ScheduleSendNewsletterToLists($newsletterid = false, $timeToSend = false, $listids = array())
>

> public function ScheduleSendNewsletterToLists($newsletterid = false, $timeToSend = false, $listids = array(), $saveSnapshots = true, $reloadFeed = true)
>

> public function ScheduleSendNewsletterToSegments($newsletterid = false, $timeToSend = false, $segmentids = array())
>

> public function ScheduleSendNewsletterToSegments($newsletterid = false, $timeToSend = false, $segmentids = array(), $saveSnapshots = true, $reloadFeed = true)
>

> public function CreateSegment($name = "", $rules = array(), $connector = 'and')
>

> public function AddCustomFieldsToList($listid = false, $customFields = array())
>

> public function SendNewsletter($newsletterid = 0, $subscriberid = 0, $email = '', $senderEmail = '', $senderName = '', $replyEmail = '')
>

>public function SendNewsletter($newsletterid = 0, $subscriberid = 0, $email = '', $senderEmail = '', $senderName = '', $replyEmail = '', $callbackUrl = false, $reloadFeed = false)
>

> public function ScheduleSendNewsletterToLists($newsletterid = false, $timeToSend = false, $listids = array())
>

> public function ScheduleSendNewsletterToSegments($newsletterid = false, $timeToSend = false, $segmentids = array()))
>

> public function ScheduleSendNewsletter($campaignid = false, $hours = false)
>

> public function ScheduleSendNewsletter($campaignid = false, $hours = false, $saveSnapshots = true)
>

> public function GetSentEmailCampaignEvents($from = false, $to = false $limit = 10, $offset = 0)
>

> public function GetSentEmailCampaignWithTriggerEvents($from = false, $to = false $limit = 10, $offset = 0)
>

> public function GetOpenCampaignEvents($from = false, $to = false $limit = 10, $offset = 0)
>

> public function GetOpenTriggersEvents($from = false, $to = false $limit = 10, $offset = 0)
>

> public function GetLinkClickCampaignEvents($from = false, $to = false $limit = 10, $offset = 0)
>

> public function GetLinkClickTriggerEvents($from = false, $to = false $limit = 10, $offset = 0)
>

> public function GetSentAutoresponderEvents($from = false, $to = false $limit = 10, $offset = 0)
>

> public function GetOpenAutoresponderEvents($from = false, $to = false $limit = 10, $offset = 0)
>

> public function GetLinkClickAutoresponderEvents($from = false, $to = false $limit = 10, $offset = 0)
>

> public function GetSentSMSCampaignEvents($from = false, $to = false $limit = 10, $offset = 0)
>

> public function GetTrackingEvents($listid = false, $subscriberid = false, $limit = 100, $offset = 0)
>

> public function GetLeadScore($subscriberid = false)
>

> public function SetLeadScore($subscriberid = false, $leadScore = false, $type = "add")
>

> public function GetCustomFields($listids = false) 
>

> public function GetCustomFields($listids = false)
>

> public function GetSnapshots($subscriberid = false, $triggerid = false, $autoresponderid = false, $campaignid = false, $groupby = "date")
> 
>

> public function GetNewsletterSummary($newsletterid = false, $statid = false, $from = false, $to = false)
> 
>

> public function GetStatids($listid = false, $segmentid = false, $newsletterid = false, $from = false, $to = false, $limit = 100, $offset = 0)
> 
>

> public function ResubscribeContact($listid = false, $emailaddress = false, $mobileNumber = false, $mobilePrefix = false, $add_to_autoresponders = false)
>

> public function ResubscribeContact($listid = false, $emailaddress = false, $mobileNumber = false, $mobilePrefix = false, $add_to_autoresponders = false, $contactFields = array())
>

> public function GetTriggers($listid = false, $limit = 1000, $offset = 0)
> 
>

> public function GetSegments($listid = false, $count_subscribers = false, $limit = 100, $offset = 0)
> 
>

> public function AddToOTMDocument ($listid = false, $subscriberid = false, $emailaddress = false, $mobile = false, $mobilePrefix = false, $fieldid = false, $values = array(), $path = false)
> 
>

> public function GetSubscribersByCustomField ($listid = false, $data = array(), $activeonly = true, $countonly = false, $limit = 1000, $offset = 0)
> 
>

> public function GetTriggerSummary($triggerid = false, $from = false, $to = false)
> 
>

> public function GetAutoresponderSummary($autoresponderid = false, $from = false, $to = false)
> 
>

> public function GetSegmentSummary($segmentid = false, $from = false, $to = false)
> 
>

> public function GetRulesForSegment($segmentid = false)
> 
>

> public function EditNewsletter($newsletterid = false, $name = false, $subject = false)
> 
>

> public function SetTriggerStatus($triggerid = false, $status = false)
> 
>

> public function SetAutoresponderStatus($autoresponderid = false, $status = false)
> 
>

> public function SendSMS($campaignid = 0, $subject = '', $text = '', $subscriberid = 0, $listid = 0, $mobile = '', $mobilePrefix = '')
> 
>

> public function GetSubscribersFromSegment($segmentid = false, $countonly = false, $activeonly = true, $limit = 100, $offset = 0)
> 
>

> public function GetTriggersForSegment($segmentid)
> 
>

> public function ViewNewsletter($newsletterid)
> 
>

> public function GetNewsletters($countOnly= false, $getLastSentDetails = false, $content = true, $aftercreatedate = false, $newsletterNameLike = false)
>

> public function GetNewsletters($countOnly= false, $getLastSentDetails = false, $content = true, $aftercreatedate = false, $newsletterNameLike = false, $limit = false, $offset = false)
>

> public function UnsubscribeSubscriberEmail ($emailaddress = false, $listid = false, $subscriberid = false, $skipcheck = false, $statid = false)
>

> public function UnsubscribeSubscriberEmail ($listid = false, $emailaddress = false, $subscriberid = false, $skipcheck = false, $statid = false)
>

> public function UnsubscribeSubscriberMobile ($mobile = false, $mobilePrefix = false, $listid = false, $subscriberid = false, $skipcheck = false, $statid = false)
>

> public function UnsubscribeSubscriberMobile ($listid = false, $mobile = false, $mobilePrefix = false, $subscriberid = false, $skipcheck = false, $statid = false)
> 
>

> public function GetSubscriberDetails($emailaddress = false, $listid = false)
> 
>

> public function GetSubscriberDetails($listid = false, $subscriberid = false, $emailaddress = false, $mobile = false, $mobile_prefix = false)
> 
>

> public function GetRecipients($statid = false, $stats_type = false, $count_only = false)
> 
>

> public function GetRecipients($statid = false, $count_only = false)
> 
>

> public function ActivateSubscriber ($service = false, $lists = false, $emailaddress = false, $mobile = false, $mobile_prefix = false)
> 
>

> public function ActivateSubscriber ($service = false, $listid = false, $emailaddress = false, $mobile = false, $mobile_prefix = false, $subscriberid = false)
> 
>

> public function UpdateSubscriber($subscriberid = false, $emailaddress = false, $mobile = false, $listid = false, $customfields = array())
> 
>

> public function UpdateSubscriber($listid = false, $subscriberid = false, $emailaddress = false, $mobile = false, $mobilePrefix = false, $customfields = array())
> 
>

> public function ScheduleSendSMS($campaignid = false, $hours = false, $lists = false)
> 
>

> public function ScheduleSendSMS($campaignid = false, $lists = false, $hours = false)
> 
>