API

Getting Started

The Campaignmaster API is SOAP-based and returns data in XML format through the HTTP protocol.

The API is composed of two main web services:

  1. UserAuthorisation – generates an authentication token based on your CMAdvantage login credentials
  2. CampaignManagement – contains all the calls required to access data related to Recipients, Campaigns, Templates etc.

The API is written in C#, but we also offer a PHP wrapper, which allows users to access the API through code written in PHP rather than C#.

For any information regarding the API, please contact CMAdvantage Support on: support@campaignmaster.co.uk.

Authentication

This section describes calls necessary to authorise your client with the CMAdvantage platform and carry out any further API calls to the platform:


Authorise the client

Authorise the client with CMAdvantage platform by requesting an API token used for all requests to the API.

Call details

Call ID
AuthorizeClient
Call
                                                            
                                                                  // C#
                                                                  TokenResult = AuthorizeClient(string emailID, string password);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $Token = $APIFunctionsObj->AuthorizeClient($APIUsername, $APIPassword);
                                                            
                                                      
Returns
A TokenResult object with TokenID
Request parameters
                                                            
                                                                  string emailID
                                                                  string password
                                                            
                                                      
Return parameters
                                                            
                                                                  string TokenID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        string tokenID = "";
                                                                        userauth.UserAuthorizationClient clnt = newUserAuthorizationClient();
                                                                        TokenResult tokenResult = clnt.AuthorizeClient("email@example.com", "password");
                                                                        if (tokenResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = tokenResult.StatusMessage;
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = campaignResult.Status.ToString();
                                                                              string statusMessage = campaignResult.StatusMessage.ToString();
                                                                              string tokenID = tokenResult.TokenID;
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $APIFunctionsObj = new APIFunctions();

                                                                    $APIUsername = 'username';
                                                                    $APIPassword = 'password';

                                                                    $Token = $APIFunctionsObj->AuthorizeClient($APIUsername, $APIPassword);
                                                                  
                                                            

Recipients

This section outlines all API calls which allow you to manage the recipients within your CMAdvantage account:


Get recipients

Get a list of recipients which match criteria specified in the call.

Call details

Call ID
GetRecipients
Call
                                                            
                                                                  // C#
                                                                  GetRecipientsResult[] getRecipientsResult = List < GetRecipientsResult > GetRecipients(string tokenID, int pageNumber, Criteria[] criteria, int pageSize);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $recipientsResult = $APIFunctionsObj->GetRecipients($Token, $PageNumber, $CriteriaList, $PageSize);
                                                            
                                                      
Returns
GetRecipientsResult array with detail
Request parameters
                                                            
                                                                  string tokenID
                                                                  int pageNumber
                                                                  array criteria
                                                                  int pageSize
                                                            
                                                      
Return parameters
                                                            
                                                                  string EmailAddress
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        token = tokenResult.TokenID;

                                                                        int pageNumber = 1;
                                                                        int pageSize = 5;

                                                                        List criteriaList = new List();

                                                                        //Create criteria object
                                                                        Criteria criteria;
                                                                                                
                                                                        //Add new criteria
                                                                        criteria = new Criteria();
                                                                        criteria.FieldName = "Birth Date";
                                                                        criteria.Operator = Operator.equals;
                                                                        criteria.FieldValue = "1993-07-01";
                                                                        criteria.LogicalOperator = LogicalOperator.Or;
                                                                        criteriaList.Add(criteria);

                                                                        criteria = new Criteria();
                                                                        criteria.FieldName = "First Name";
                                                                        criteria.Operator = Operator.equals;
                                                                        criteria.FieldValue = "John";
                                                                        criteria.LogicalOperator = LogicalOperator.Or;
                                                                        criteriaList.Add(criteria);

                                                                        criteria = new Criteria();
                                                                        criteria.FieldName = "Last Name";
                                                                        criteria.Operator = Operator.equals;
                                                                        criteria.FieldValue = "Smith";
                                                                        criteria.LogicalOperator = LogicalOperator.Or;
                                                                        criteriaList.Add(criteria);

                                                                        criteria = new Criteria();
                                                                        criteria.FieldName = "Member Type";
                                                                        criteria.Operator = Operator.equals;
                                                                        criteria.FieldValue = "Gold";
                                                                        criteriaList.Add(criteria);

                                                                        GetRecipientsResult[] recipientsResult = campaignClient.GetRecipients(token, pageNumber, criteriaList.ToArray(), pageSize);

                                                                        if (recipientsResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = recipientsResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else if (recipientsResult[0].Status == "0")
                                                                        {
                                                                              string statusMessage = recipientsResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              string status = recipientsResult[0].Status.ToString();
                                                                              string statusMessage = recipientsResult[0].StatusMessage.ToString();

                                                                              for (int i = 0; i < recipientsResult.Length; i++)
                                                                              {
                                                                                    // Do something
                                                                                    string emailAddress = recipientsResult[i].EmailAddress.ToString();
                                                                                    string recipientID = recipientsResult[i].RecipientID.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $PageNumber = 1;
                                                                        $PageSize = 5;

                                                                        $CriteriaList = array();

                                                                        $Criteria = array(
                                                                            'FieldName'=>'Birth Date',
                                                                            'Operator'=>'equals',
                                                                            'FieldValue'=>'1993-07-01',
                                                                            'LogicalOperator'=>'Or'
                                                                        );
                                                                        array_push($CriteriaList, $Criteria);

                                                                        $Criteria = array(
                                                                            'FieldName'=>'First Name',
                                                                            'Operator'=>'equals',
                                                                            'FieldValue'=>'Sergiu',
                                                                            'LogicalOperator'=>'Or'
                                                                        );
                                                                        array_push($CriteriaList, $Criteria);

                                                                        $Criteria = array(
                                                                            'FieldName'=>'Last Name',
                                                                            'Operator'=>'equals',
                                                                            'FieldValue'=>'Smith',
                                                                            'LogicalOperator'=>'Or'
                                                                        );
                                                                        array_push($CriteriaList, $Criteria);

                                                                        $Criteria = array(
                                                                            'FieldName'=>'Member Type',
                                                                            'Operator'=>'equals',
                                                                            'FieldValue'=>'Gold',
                                                                            'LogicalOperator'=>'Or'
                                                                        );
                                                                        array_push($CriteriaList, $Criteria);

                                                                        $recipientsResult = $APIFunctionsObj->GetRecipients($Token, $PageNumber, $CriteriaList, $PageSize);

                                                                        if (is_object($recipientsResult)) {
                                                                            $recipientsResult = array($recipientsResult);
                                                                        }

                                                                        if ($recipientsResult[0]->Status == "-1") {
                                                                            $statusMessage = $recipientsResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($recipientsResult as $recipients) {
                                                                                $emailAddress = $recipients->EmailAddress;
                                                                                $recipientID = $recipients->RecipientID;
                                                                            }
                                                                        }
                                                                  
                                                            

Get recipients by list id

Fetch a list of all recipients that belong to the specified listID.

Call details

Call ID
RecipientsFetchByListID
Call
                                                            
                                                                  // C#
                                                                  RecipientResult[] recipientResult = List < RecipientResult > RecipientsFetchByListID(string tokenID, string listID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $recipientsResult = $APIFunctionsObj->RecipientsFetchByListID($Token, $ListID);
                                                            
                                                      
Returns
RecipientResult array contacts with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string listID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate
                                                                  string EmailAddress
                                                                  string EmailContentType
                                                                  string IsActive
                                                                  string IsVerified
                                                                  string ListID
                                                                  string ModifiedDate
                                                                  string RecipientID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        RecipientResult[] recipientResult = cmpClient.RecipientsFetchByListID(string tokenID, string listID);

                                                                        if (recipientResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = recipientResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < recipientResult.Length; i++)
                                                                              {
                                                                                    // Do something
                                                                                    string recipientID = recipientResult[i].RecipientID.ToString();
                                                                                    string emailAddress = recipientResult[i].EmailAddress.ToString();
                                                                                    string emailContentType = recipientResult[i].EmailContentType.ToString();
                                                                                    string isActive = recipientResult[i].IsActive.ToString();
                                                                                    string isVerified = recipientResult[i].IsVerified.ToString();
                                                                                    string createdDate = recipientResult[i].CreatedDate.ToString();
                                                                                    string modifiedDate = recipientResult[i].ModifiedDate.ToString();
                                                                                    string id = recipientResult[i].ListID.ToString();
                                                                               }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $ListID = "33381";

                                                                        $recipientsResult = $APIFunctionsObj->RecipientsFetchByListID($Token, $ListID);

                                                                        if (is_object($recipientsResult)) {
                                                                            $recipientsResult = array($recipientsResult);
                                                                        }

                                                                        if ($recipientsResult[0]->Status == "-1") {
                                                                            $statusMessage = $recipientsResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($recipientsResult as $recipients) {
                                                                                $recipientID = $recipients->RecipientID;
                                                                                $emailAddress = $recipients->EmailAddress;
                                                                                $emailContentType = $recipients->EmailContentType;
                                                                                $isActive = $recipients->IsActive;
                                                                                $isVerified = $recipients->IsVerified;
                                                                                $createdDate = $recipients->CreatedDate;
                                                                                $modifiedDate = $recipients->ModifiedDate;
                                                                                $id = $recipients->ListID;
                                                                            }
                                                                        }
                                                                  
                                                            

Get list recipient is member of (via recipient id)

Get the membership status of the recipient within a given list.

Call details

Call ID
RecipientAttachedListFetchByRecipientID
Call
                                                            
                                                                  // C#
                                                                  RecipientAttachedListResult[] recipientAttachedListResult = List < RecipientAttachedListResult > RecipientAttachedListFetchByRecipientID(string tokenID, string recipientID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $recipientAttachedListResult = $APIFunctionsObj->RecipientAttachedListFetchByRecipientID($Token, $RecipientID);
                                                            
                                                      
Returns
RecipientAttachedListResult array contacts with details.
Request parameters
                                                            
                                                                  string tokenID
                                                                  string recipientID
                                                            
                                                      
Return parameters
                                                            
                                                                  string ListID
                                                                  string ListName
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        RecipientAttachedListResult[] recipientAttachedListResult = cmpClient.RecipientAttachedListFetchByRecipientID(string tokenID, string recipientID);

                                                                        if (recipientAttachedListResult[0].Status == "-1")
                                                                        {
                                                                               string statusMessage = recipientAttachedListResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                             for (int i = 0; i < recipientAttachedListResult.Length; i++)
                                                                             {
                                                                                // Do something
                                                                                string status = recipientAttachedListResult[0].Status.ToString();
                                                                                string statusMessage = recipientAttachedListResult[0].StatusMessage.ToString();
                                                                                string listName = recipientAttachedListResult[0].ListName.ToString();
                                                                                string listID = recipientAttachedListResult[0].ListID.ToString();
                                                                             }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                  $RecipientID = "24";

                                                                  $recipientAttachedListResult = $APIFunctionsObj->RecipientAttachedListFetchByRecipientID($Token, $RecipientID);

                                                                  if (is_object($recipientAttachedListResult)) {
                                                                      $recipientAttachedListResult = array($recipientAttachedListResult);
                                                                  }

                                                                  if ($recipientAttachedListResult[0]->Status == "-1") {
                                                                      $statusMessage = $recipientAttachedListResult[0]->StatusMessage;
                                                                  } else {
                                                                      foreach($recipientAttachedListResult as $lists) {
                                                                          $status = $lists->Status;
                                                                          $statusMessage = $lists->StatusMessage;
                                                                          $listName = $lists->ListName;
                                                                          $listID = $lists->ListID;
                                                                      }
                                                                  }
                                                                  
                                                            

Get recipient's campaign history

Fetches the entire campaign history for a given contact based on the contactID.

Call details

Call ID
RecipientCampaignSentHistoryFetch
Call
                                                            
                                                                  // C#
                                                                  CampaignHistoryResult[] CampaignHistoryResult = List < CampaignHistoryResult > RecipientCampaignSentHistoryFetch(string tokenID, string contactID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignHistoryResult = $APIFunctionsObj->RecipientCampaignSentHistoryFetch($Token, $ContactID);
                                                            
                                                      
Returns
CampaignHistoryResult array with details of campaign history
Request parameters
                                                            
                                                                  string tokenID
                                                                  string contactID
                                                            
                                                      
Return parameters
                                                            
                                                                  string Bounces 
                                                                  string CampaignBounceType
                                                                  string CampaignClicks
                                                                  string CampaignDescription
                                                                  string CampaignForwards
                                                                  string CampaignID
                                                                  string CampaignName
                                                                  string CampaignOpens
                                                                  string CampaignReceivedDate
                                                                  string CampaignUnsubscribes
                                                                  string ContactID
                                                                  string EmailAddress
                                                                  string FirstTimeClick
                                                                  string FirstTimeOpen
                                                                  string LastTimeClick
                                                                  string LastTimeOpen
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        token = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        string contactID = "123";

                                                                        CampaignHistoryResult[] campaignHistoryResult = cmpClient.RecipientCampaignSentHistoryFetch(token, contactID);

                                                                        if (campaignHistoryResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignHistoryResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < campaignHistoryResult.Length; i++)
                                                                              {
                                                                                    string campaignID = campaignHistoryResult[i].CampaignID.ToString();
                                                                                    string campaignName = campaignHistoryResult[i].CampaignName.ToString();
                                                                                    string campaignOpens = campaignHistoryResult[i].CampaignOpens.ToString();
                                                                                    string campaignReceivedDate = campaignHistoryResult[i].CampaignRecievedDate.ToString();
                                                                                    string campaignUnsubscribes = campaignHistoryResult[i].CampaignUnsubscribes.ToString();
                                                                                    string emailAddress = campaignHistoryResult[i].EmailAddress.ToString();
                                                                                    string bounces = campaignHistoryResult[i].Bounces.ToString();
                                                                                    string campaignBounceType = campaignHistoryResult[i].CampaignBounceType.ToString();
                                                                                    string campaignClicks = campaignHistoryResult[i].CampaignClicks.ToString();
                                                                                    string campaignDescription = campaignHistoryResult[i].CampaignDescription.ToString();
                                                                                    string campaignForwards = campaignHistoryResult[i].CampaignForwards.ToString();
                                                                                    string firstTimeClick = campaignHistoryResult[i].FirstTimeClick.ToString();
                                                                                    string firstTimeOpen = campaignHistoryResult[i].FirstTimeOpen.ToString();
                                                                                    string lastTimeClick = campaignHistoryResult[i].LastTimeClick.ToString();
                                                                                    string lastTimeOpen = campaignHistoryResult[i].LastTimeOpen.ToString();
                                                                                    string status = campaignHistoryResult[i].Status.ToString();
                                                                                    string statusMessage = campaignHistoryResult[i].StatusMessage.ToString();
                                                                              }
                                                                        }

                                                                  
                                                            
                                                                  
                                                                        $ContactID = "25";

                                                                        $campaignHistoryResult = $APIFunctionsObj->RecipientCampaignSentHistoryFetch($Token, $ContactID);

                                                                        if (is_object($campaignHistoryResult)) {
                                                                            $campaignHistoryResult = array($campaignHistoryResult);
                                                                        }

                                                                        if ($campaignHistoryResult[0]->Status == "-1") {
                                                                            $statusMessage = $campaignHistoryResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($campaignHistoryResult as $campaigns) {
                                                                                $campaignID = $campaigns->CampaignID;
                                                                                $campaignName = $campaigns->CampaignName;
                                                                                $campaignOpens = $campaigns->CampaignOpens;
                                                                                $campaignReceivedDate = $campaigns->CampaignRecievedDate;
                                                                                $campaignUnsubscribes = $campaigns->CampaignUnsubscribes;
                                                                                $emailAddress = $campaigns->EmailAddress;
                                                                                $bounces = $campaigns->Bounces;
                                                                                $campaignBounceType = $campaigns->CampaignBounceType;
                                                                                $campaignClicks = $campaigns->CampaignClicks;
                                                                                $campaignDescription = $campaigns->CampaignDescription;
                                                                                $campaignForwards = $campaigns->CampaignForwards;
                                                                                $firstTimeClick = $campaigns->FirstTimeClick;
                                                                                $firstTimeOpen = $campaigns->FirstTimeOpen;
                                                                                $lastTimeClick = $campaigns->LastTimeClick;
                                                                                $lastTimeOpen = $campaigns->LastTimeOpen;
                                                                                $status = $campaigns->Status;
                                                                                $statusMessage = $campaigns->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Add recipient

Add a recipient to the CMAdvantage database.

Call details

Call ID
RecipientAdd
Call
                                                            
                                                                  // C#
                                                                  RecipientResult[] recipientResult = RecipientAdd(string tokenID, string emailAddress, ListIDObject[] listIDArray);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $result = $APIFunctionsObj->RecipientAdd($Token, $EmailAddress, $Lists);
                                                            
                                                      
Returns
RecipientResult object array with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string emailaddress
                                                                  array recipientList
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate 
                                                                  string EmailAddress
                                                                  string EmailContentType
                                                                  string IsActive
                                                                  string IsVerified
                                                                  string ListID
                                                                  string ModifiedDate
                                                                  string RecipientID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        ListIDObject id = new ListIDObject();
                                                                        List recipientList = new List();

                                                                        id.ListID = "123";
                                                                        recipientList.Add(id);

                                                                        id = new ListIDObject();

                                                                        id.ListID = "456";
                                                                        recipientList.Add(id);

                                                                        RecipientResult[] result = cmpClient.RecipientAdd(tokenID, "user@example.com", recipientList.ToArray());

                                                                        for ( int i = 0; i < recipientResult.Length; i++)
                                                                        {
                                                                              if (recipientResult[0].Status == "-1")
                                                                              {
                                                                                    string statusMessage = recipientResult[0].StatusMessage.ToString();
                                                                              }
                                                                              else
                                                                              {
                                                                                    // Do something
                                                                                    string createdDate = recipientResult[i].CreatedDate.ToString();
                                                                                    string emailAddress = recipientResult[i].EmailAddress.ToString();
                                                                                    string emailContentType = recipientResult[i].EmailContentType.ToString();
                                                                                    string isActive = recipientResult[i].IsActive.ToString();
                                                                                    string isVerified = recipientResult[i].IsVerified.ToString();
                                                                                    string listID = recipientResult[i].ListID.ToString();
                                                                                    string modifiedDate = recipientResult[i].ModifiedDate.ToString();
                                                                                    string recipientID = recipientResult[i].RecipientID.ToString();
                                                                                    string status = recipientResult[i].Status.ToString();
                                                                                    string statusMessage = recipientResult[i].StatusMessage;
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $EmailAddress = "user@example.com";

                                                                        $Lists = array();
                                                                        $List = (object) array(
                                                                            'ListID'=>'33383'
                                                                        );
                                                                        array_push($Lists, $List);

                                                                        $List = (object) array(
                                                                            'ListID'=>'43640'
                                                                        );
                                                                        array_push($Lists, $List);

                                                                        $result = $APIFunctionsObj->RecipientAdd($Token, $EmailAddress, $Lists);

                                                                        if (is_object($result)) {
                                                                            $result =  array($result);
                                                                        }

                                                                        if ($result[0]->Status == "-1") {
                                                                            $statusMessage = $result[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($result as $recipients) {
                                                                                $createdDate = $recipients->CreatedDate;
                                                                                $emailAddress = $recipients->EmailAddress;
                                                                                $emailContentType = $recipients->EmailContentType;
                                                                                $isActive = $recipients->IsActive;
                                                                                $isVerified = $recipients->IsVerified;
                                                                                $listID = $recipients->ListID;
                                                                                $modifiedDate = $recipients->ModifiedDate;
                                                                                $recipientID = $recipients->RecipientID;
                                                                                $status = $recipients->Status;
                                                                                $statusMessage = $recipients->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Add or update recipient

Add or update recipient based on email address.

If the recipientID parameter is blank then the call adds the record as a new recipient and generates a new ID. If the recipientID paremeter is passed then the call will update the record based on recipientID.

Call details

Call ID
AddorUpdateRecipient
Call
                                                            
                                                                  // C#
                                                                  AddorUpdateRecipient(tokenID, emailAddress, recipientID, List, CustomFields);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $recipientResult = $APIFunctionsObj->AddorUpdateRecipient($Token, $EmailAddress, $RecipientID, $Lists, $CustomFields);
                                                            
                                                      
Returns
An array with details of recipient add or update result
Request parameters
                                                            
                                                                  string tokenID
                                                                  string emailAddress
                                                                  string recipientID
                                                                  array ListID
                                                                  array CustomFields
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate 
                                                                  string EmailAddress
                                                                  string EmailContentType
                                                                  string IsActive
                                                                  string IsVerified
                                                                  string ListID
                                                                  string ModifiedDate
                                                                  string RecipientID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        ListIDObject id = new ListIDObject();
                                                                        List recipientList = new List();

                                                                        id.ListID = "123456";
                                                                        recipientList.Add(id);

                                                                        List customFieldList = new List();
                                                                        CustomFieldEdit recipientIDObject = new CustomFieldEdit();

                                                                        recipientIDObject.FieldName = "First Name";
                                                                        recipientIDObject.FieldValue = "John";
                                                                        customFieldList.Add(recipientIDObject);

                                                                        recipientIDObject = new CustomFieldEdit();

                                                                        recipientIDObject.FieldName = "Last Name";
                                                                        recipientIDObject.FieldValue = "Smith";
                                                                        customFieldList.Add(recipientIDObject);

                                                                        string recipientEmailAddress = "john.smith@example.com";
                                                                        string recipientID = "";       //Intentionally ommited to generate new ID

                                                                        RecipientResult[] recipientResult = campaignClient.AddorUpdateRecipient(token, recipientEmailAddress, null, recipientList.ToArray(), null);

                                                                        if (recipientResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = recipientResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < recipientResult.Length; i++)
                                                                              {
                                                                                    // Do something
                                                                                    string createdDate = recipientResult[0].CreatedDate.ToString();
                                                                                    string emailAddress = recipientResult[0].EmailAddress.ToString();
                                                                                    string emailContentType = recipientResult[0].EmailContentType.ToString();
                                                                                    string isActive = recipientResult[0].IsActive.ToString();
                                                                                    string listID = recipientResult[0].ListID.ToString();
                                                                                    string modifiedDate = recipientResult[0].ModifiedDate.ToString();
                                                                                    string returnedRecipientID = recipientResult[0].RecipientID.ToString();
                                                                                    string status = recipientResult[0].Status.ToString();
                                                                                    string statusMessage = recipientResult[0].StatusMessage.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $EmailAddress = "user@example.com";

                                                                        $RecipientID = "62";

                                                                        $Lists = array();
                                                                        $List = (object) array(
                                                                            'ListID'=>'33383'
                                                                        );
                                                                        array_push($Lists, $List);

                                                                        $List = (object) array(
                                                                            'ListID'=>'43640'
                                                                        );
                                                                        array_push($Lists, $List);

                                                                        $CustomFields = array();
                                                                        $CustomField = array(
                                                                            'FieldName'=>'First Name',
                                                                            'FieldValue'=>'John',
                                                                        );
                                                                        array_push($CustomFields, $CustomField);

                                                                        $CustomField = array(
                                                                            'FieldName'=>'Last Name',
                                                                            'FieldValue'=>'Smith',
                                                                        );
                                                                        array_push($CustomFields, $CustomField);

                                                                        $recipientResult = $APIFunctionsObj->AddorUpdateRecipient($Token, $EmailAddress, $RecipientID, $Lists, $CustomFields);

                                                                        if (is_object($recipientResult)) {
                                                                            $recipientResult = array($recipientResult);
                                                                        }

                                                                        if ($recipientResult[0]->Status == "-1") {
                                                                            $statusMessage = $recipientResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($recipientResult as $recipients) {
                                                                                $createdDate = $recipients->CreatedDate;
                                                                                $emailAddress = $recipients->EmailAddress;
                                                                                $emailContentType = $recipients->EmailContentType;
                                                                                $isActive = $recipients->IsActive;
                                                                                $isVerified = $recipients->IsVerified;
                                                                                $listID = $recipients->ListID;
                                                                                $modifiedDate = $recipients->ModifiedDate;
                                                                                $recipientID = $recipients->RecipientID;
                                                                                $status = $recipients->Status;
                                                                                $statusMessage = $recipients->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Add recipients to lists

Add recipients to lists based on recipientID and listID.

Call details

Call ID
AddRecipientsToLists
Call
                                                            
                                                                  // C#
                                                                  AddRecipientsToLists(tokenId, List< ListIds >, List< RecipientIds >);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $result = $APIFunctionsObj->AddRecipientsToLists($Token, $Lists, $Recipients);
                                                            
                                                      
Returns
String with the status of the call
Request parameters
                                                            
                                                                  string tokenID
                                                                  string ListID
                                                                  string RecipientID
                                                            
                                                      
Return parameters
                                                            
                                                                  string result
                                                            
                                                      

Example Code

                                                                  
                                                                        List listIDObject = new List();

                                                                        ListIDObject list = new ListIDObject();
                                                                        list.ListID = "43640";
                                                                        listIDObject.Add(list);

                                                                        List listRecipientIDObject = new List();
                                                                        RecipientIDObject recipientIDObject = new RecipientIDObject();

                                                                        recipientIDObject.RecipientID = "1";
                                                                        listRecipientIDObject.Add(recipientIDObject);

                                                                        recipientIDObject = new RecipientIDObject();

                                                                        recipientIDObject.RecipientID = "2";
                                                                        listRecipientIDObject.Add(recipientIDObject);

                                                                        recipientIDObject = new RecipientIDObject();

                                                                        recipientIDObject.RecipientID = "3";
                                                                        listRecipientIDObject.Add(recipientIDObject);

                                                                        string result = campaignClient.AddRecipientsToLists(token, listIDObject.ToArray(), listRecipientIDObject.ToArray());
                                                                  
                                                            
                                                                  
                                                                        $Lists = array();
                                                                        $List = (object) array(
                                                                            'ListID'=>'33383'
                                                                        );
                                                                        array_push($Lists, $List);

                                                                        $List = (object) array(
                                                                            'ListID'=>'43640'
                                                                        );
                                                                        array_push($Lists, $List);

                                                                        $Recipients = array();
                                                                        $Recipient = (object) array(
                                                                            'RecipientID'=>'25'
                                                                        );
                                                                        array_push($Recipients, $Recipient);

                                                                        array_push($Recipients, $Recipient);

                                                                        $result = $APIFunctionsObj->AddRecipientsToLists($Token, $Lists, $Recipients);
                                                                  
                                                            

Edit recipient's email address by email address

Update the email address for a recipient based on EmailAddress.

Call details

Call ID
RecipientEmailAddressEditByEmailAddress
Call
                                                            
                                                                  // C#
                                                                  RecipientResult RecipientEmailAddressEditByEmailAddress(string tokenID, string existingEmailaddress, string newEmailaddress);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $recipientResult = $APIFunctionsObj->RecipientEmailAddressEditByEmailAddress($Token, $ExistingEmailAddress, $NewEmailAddress);
                                                            
                                                      
Returns
RecipientResult object with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string existingEmailaddress
                                                                  string newEmailaddress
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate 
                                                                  string EmailAddress
                                                                  string EmailContentType
                                                                  string IsActive
                                                                  string IsVerified
                                                                  string ListID
                                                                  string ModifiedDate
                                                                  string RecipientID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        RecipientResult recipientResult = cmpClient.RecipientEmailAddressEditByEmailAddress(tokenID, "oldAddress@example.com", "newAddress@example.com");

                                                                        if (recipientResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = recipientResult.StatusMessage;
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string createdDate = recipientResult.CreatedDate.ToString();
                                                                              string emailAddress = recipientResult.EmailAddress.ToString();
                                                                              string emailContentType = recipientResult.EmailContentType.ToString();
                                                                              string isActive = recipientResult.IsActive.ToString();
                                                                              string isVerified = recipientResult.IsVerified.ToString();
                                                                              string listID = recipientResult.ListID.ToString();
                                                                              string modifiedDate = recipientResult.ModifiedDate.ToString();
                                                                              string recipientID = recipientResult.RecipientID.ToString();
                                                                              string status = recipientResult.Status.ToString();
                                                                              string statusMessage = recipientResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $ExistingEmailAddress = "oldAddress@example.com";
                                                                        $NewEmailAddress = "newAddress@example.com";

                                                                        $recipientResult = $APIFunctionsObj->RecipientEmailAddressEditByEmailAddress($Token, $ExistingEmailAddress, $NewEmailAddress);

                                                                        if ($recipientResult->Status == "-1") {
                                                                            $statusMessage = $recipientResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $createdDate = $recipientResult->CreatedDate;
                                                                            $emailAddress = $recipientResult->EmailAddress;
                                                                            $emailContentType = $recipientResult->EmailContentType;
                                                                            $isActive = $recipientResult->IsActive;
                                                                            $isVerified = $recipientResult->IsVerified;
                                                                            $listID = $recipientResult->ListID;
                                                                            $modifiedDate = $recipientResult->ModifiedDate;
                                                                            $recipientID = $recipientResult->RecipientID;
                                                                            $status = $recipientResult->Status;
                                                                            $statusMessage = $recipientResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Edit recipient's email address by recipient id

Update the email address for a recipient based on recipientID.

Call details

Call ID
RecipientEmailAddressEditByRecipientID
Call
                                                            
                                                                  // C#
                                                                  RecipientResult RecipientEmailAddressEditByRecipientID(string tokenID, string recipientID, string newEmailaddress);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $recipientResult = $APIFunctionsObj->RecipientEmailAddressEditByRecipientID($Token, $RecipientID, $NewEmailAddress);
                                                            
                                                      
Returns
RecipientResult object with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string recipientID
                                                                  string newEmailAddress
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate 
                                                                  string EmailAddress
                                                                  string EmailContentType
                                                                  string IsActive
                                                                  string IsVerified
                                                                  string ListID
                                                                  string ModifiedDate
                                                                  string RecipientID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        RecipientResult recipientResult = cmpClient.RecipientEmailAddressEditByRecipientID(tokenID, "1234", "newAddress@example.com");

                                                                        if (recipientResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = recipientResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string createdDate = recipientResult.CreatedDate.ToString();
                                                                              string emailAddress = recipientResult.EmailAddress.ToString();
                                                                              string emailContentType = recipientResult.EmailContentType.ToString();
                                                                              string isActive = recipientResult.IsActive.ToString();
                                                                              string isVerified = recipientResult.IsVerified.ToString();
                                                                              string listID = recipientResult.ListID.ToString();
                                                                              string modifiedDate = recipientResult.ModifiedDate.ToString();
                                                                              string responseRecipientID = recipientResult.RecipientID.ToString();
                                                                              string status = recipientResult.Status.ToString();
                                                                              string statusMessage = recipientResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $RecipientID = "54";
                                                                        $NewEmailAddress = "newAddress@example.com";

                                                                        $recipientResult = $APIFunctionsObj->RecipientEmailAddressEditByRecipientID($Token, $RecipientID, $NewEmailAddress);

                                                                        if ($recipientResult->Status == "-1") {
                                                                            $statusMessage = $recipientResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $createdDate = $recipientResult->CreatedDate;
                                                                            $emailAddress = $recipientResult->EmailAddress;
                                                                            $emailContentType = $recipientResult->EmailContentType;
                                                                            $isActive = $recipientResult->IsActive;
                                                                            $isVerified = $recipientResult->IsVerified;
                                                                            $listID = $recipientResult->ListID;
                                                                            $modifiedDate = $recipientResult->ModifiedDate;
                                                                            $recipientID = $recipientResult->RecipientID;
                                                                            $status = $recipientResult->Status;
                                                                            $statusMessage = $recipientResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Edit recipient by email address

Update the details for a recipient based on EmailAddress.

Call details

Call ID
RecipientUpdateByEmailAddress
Call
                                                            
                                                                  // C#
                                                                  RecipientResult RecipientUpdateByEmailAddress(string tokenID, string emailAddress, CustomFieldEdit[] customFieldEdit);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $recipientResult = $APIFunctionsObj->RecipientUpdateByEmailAddress($Token, $EmailAddress, $CustomFields);
                                                            
                                                      
Returns
RecipientResult object with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string emailAddress
                                                                  array customFieldEdit
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate 
                                                                  string EmailAddress
                                                                  string EmailcontentType
                                                                  string IsActive
                                                                  string IsVerified
                                                                  string ListID
                                                                  string ModifiedDate
                                                                  string RecipientID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        List listCustomFieldEdit = new List();
                                                                        CustomFieldEdit customFieldEdit = new CustomFieldEdit();

                                                                        customFieldEdit.FieldName = "First Name";
                                                                        customFieldEdit.FieldValue = "John";
                                                                        listCustomFieldEdit.Add(customFieldEdit);

                                                                        customFieldEdit = new CustomFieldEdit();
                                                                        customFieldEdit.FieldName = "BirthDate";
                                                                        customFieldEdit.FieldValue = "1996-04-26";
                                                                        ListcustomFieldEdit.Add(customFieldEdit);

                                                                        customFieldEdit = new CustomFieldEdit();
                                                                        customFieldEdit.FieldValue = "Birth Date";
                                                                        customFieldEdit.FieldValue = "1996-04-26";
                                                                        listCustomFieldEdit.Add(customFieldEdit);

                                                                        RecipientResult recipientResult = campaignClient.RecipientUpdateByEmailAddress(token, "user@exmaple.com", listCustomFieldEdit.ToArray());


                                                                        if (recipientResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = recipientResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string createdDate = recipientResult.CreatedDate.ToString();
                                                                              string responseEmailAddress = recipientResult.EmailAddress.ToString();
                                                                              string emailContentType = recipientResult.EmailContentType.ToString();
                                                                              string isActive = recipientResult.IsActive.ToString();
                                                                              string isVerified = recipientResult.IsVerified.ToString();
                                                                              string listID = recipientResult.ListID.ToString();
                                                                              string modifiedDate = recipientResult.ModifiedDate.ToString();
                                                                              string responseRecipientID = recipientResult.RecipientID.ToString();
                                                                              string status = recipientResult.Status.ToString();
                                                                              string statusMessage = recipientResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $EmailAddress = "user@exmaple.com";

                                                                        $CustomFields = array();
                                                                        $CustomField = array(
                                                                            'FieldName'=>'First Name',
                                                                            'FieldValue'=>'John',
                                                                        );
                                                                        array_push($CustomFields, $CustomField);

                                                                        $CustomField = array(
                                                                            'FieldName'=>'Birth Date',
                                                                            'FieldValue'=>'1996-04-26',
                                                                        );
                                                                        array_push($CustomFields, $CustomField);

                                                                        $recipientResult = $APIFunctionsObj->RecipientUpdateByEmailAddress($Token, $EmailAddress, $CustomFields);

                                                                        if ($recipientResult->Status == "-1") {
                                                                            $statusMessage = $recipientResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $createdDate = $recipientResult->CreatedDate;
                                                                            $emailAddress = $recipientResult->EmailAddress;
                                                                            $emailContentType = $recipientResult->EmailContentType;
                                                                            $isActive = $recipientResult->IsActive;
                                                                            $isVerified = $recipientResult->IsVerified;
                                                                            $listID = $recipientResult->ListID;
                                                                            $modifiedDate = $recipientResult->ModifiedDate;
                                                                            $recipientID = $recipientResult->RecipientID;
                                                                            $status = $recipientResult->Status;
                                                                            $statusMessage = $recipientResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Edit recipient by recipient id

Update the details for a recipient based on recipientID.

Call details

Call ID
RecipientUpdateByRecipientID
Call
                                                            
                                                                  // C#
                                                                  RecipientResult RecipientUpdateByRecipientID(string tokenID, string recipientID, CustomFieldEdit[] customFieldEdit);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $recipientResult = $APIFunctionsObj->RecipientUpdateByRecipientID($Token, $RecipientID, $CustomFields);
                                                            
                                                      
Returns
RecipientResult object with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string recipientID
                                                                  array customFieldEdit
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate 
                                                                  string EmailAddress
                                                                  string EmailContentType
                                                                  string IsActive
                                                                  string IsVerified
                                                                  string ListID
                                                                  string ModifiedDate
                                                                  string RecipientID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        List listCustomFieldEdit = new List();
                                                                         
                                                                        CustomFieldEdit customFieldEdit = new CustomFieldEdit();

                                                                        customFieldEdit.FieldName = "First Name";
                                                                        customFieldEdit.FieldValue = "John";
                                                                        listCustomFieldEdit.Add(customFieldEdit);

                                                                        customFieldEdit = new CustomFieldEdit();

                                                                        customFieldEdit.FieldName = "Birth Date";
                                                                        customFieldEdit.FieldValue = "1996-04-26";
                                                                        listCustomFieldEdit.Add(customFieldEdit); 

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        RecipientResult recipientResult = cmpClient.RecipientUpdateByRecipientID(tokenID, "42", listCustomFieldEdit.ToArray());

                                                                        if (recipientResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = recipientResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string createdDate = recipientResult.CreatedDate.ToString();
                                                                              string responseEmailAddress = recipientResult.EmailAddress.ToString();
                                                                              string emailContentType = recipientResult.EmailContentType.ToString();
                                                                              string isActive = recipientResult.IsActive.ToString();
                                                                              string isVerified = recipientResult.IsVerified.ToString();
                                                                              string listID = recipientResult.ListID.ToString();
                                                                              string modifiedDate = recipientResult.ModifiedDate.ToString();
                                                                              string responseRecipientID = recipientResult.RecipientID.ToString();
                                                                              string status = recipientResult.Status.ToString();
                                                                              string statusMessage = recipientResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $RecipientID = "54";

                                                                        $CustomFields = array();
                                                                        $CustomField = array(
                                                                            'FieldName'=>'First Name',
                                                                            'FieldValue'=>'John',
                                                                        );
                                                                        array_push($CustomFields, $CustomField);

                                                                        $CustomField = array(
                                                                            'FieldName'=>'Birth Date',
                                                                            'FieldValue'=>'1996-04-26',
                                                                        );
                                                                        array_push($CustomFields, $CustomField);

                                                                        $recipientResult = $APIFunctionsObj->RecipientUpdateByRecipientID($Token, $RecipientID, $CustomFields);

                                                                        if ($recipientResult->Status == "-1") {
                                                                            $statusMessage = $recipientResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $createdDate = $recipientResult->CreatedDate;
                                                                            $emailAddress = $recipientResult->EmailAddress;
                                                                            $emailContentType = $recipientResult->EmailContentType;
                                                                            $isActive = $recipientResult->IsActive;
                                                                            $isVerified = $recipientResult->IsVerified;
                                                                            $listID = $recipientResult->ListID;
                                                                            $modifiedDate = $recipientResult->ModifiedDate;
                                                                            $recipientID = $recipientResult->RecipientID;
                                                                            $status = $recipientResult->Status;
                                                                            $statusMessage = $recipientResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Delete recipient by email address

Delete a recipient from the CMAdvantage database based on EmailAddress.

Call details

Call ID
RecipientDeleteByEmailaddress
Call
                                                            
                                                                  // C#
                                                                  RecipientResult RecipientDeleteByEmailaddress(string tokenID, string emailaddress);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $contactResult = $APIFunctionsObj->RecipientDeleteByEmailaddress($Token, $EmailAddress);
                                                            
                                                      
Returns
RecipientResult object with status message
Request parameters
                                                            
                                                                  string tokenID
                                                                  string emailaddress
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate 
                                                                  string EmailAddress
                                                                  string EmailContentType
                                                                  string IsActive
                                                                  string IsVerified
                                                                  string ListID
                                                                  string ModifiedDate
                                                                  string RecipientID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        RecipientResult contactResult = cmpClient.RecipientDeleteByEmailaddress(tokenID, "user@example.com");

                                                                        if (contactResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = contactResult.StatusMessage.ToString();                
                                                                        }
                                                                        else
                                                                        {
                                                                               // Do something
                                                                               string status = contactResult.Status.ToString();
                                                                               string statusMessage = contactResult.StatusMessage.ToString();
                                                                               string createdDate = contactResult.CreatedDate.ToString();
                                                                               string returnedEmailAddress = contactResult.EmailAddress.ToString();
                                                                               string emailContentType = contactResult.EmailContentType.ToString();
                                                                               string isActive = contactResult.IsActive.ToString();
                                                                               string isVerified = contactResult.IsVerified.ToString();
                                                                               string listID = contactResult.ListID.ToString();
                                                                               string modifiedDate = contactResult.ModifiedDate.ToString();
                                                                               string recipeintID = contactResult.RecipientID.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $EmailAddress = "user@example.com";

                                                                        $contactResult = $APIFunctionsObj->RecipientDeleteByEmailaddress($Token, $EmailAddress);

                                                                        if ($contactResult->Status == "-1") {
                                                                            $statusMessage = $contactResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $createdDate = $contactResult->CreatedDate;
                                                                            $emailAddress = $contactResult->EmailAddress;
                                                                            $emailContentType = $contactResult->EmailContentType;
                                                                            $isActive = $contactResult->IsActive;
                                                                            $isVerified = $contactResult->IsVerified;
                                                                            $listID = $contactResult->ListID;
                                                                            $modifiedDate = $contactResult->ModifiedDate;
                                                                            $recipientID = $contactResult->RecipientID;
                                                                            $status = $contactResult->Status;
                                                                            $statusMessage = $contactResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Delete recipient by recipient id

Delete a recipient from the CMAdvantage database based on recipientID.

Call details

Call ID
RecipientDeleteFromDatabase
Call
                                                            
                                                                  // C#
                                                                  RecipientResult RecipientDeleteFromDatabase(string tokenID, string recipientID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $contactResult = $APIFunctionsObj->RecipientDeleteFromDatabase($Token, $RecipientID);
                                                            
                                                      
Returns
RecipientResult object with success or failed message
Request parameters
                                                            
                                                                  string tokenID
                                                                  string recipientID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate 
                                                                  string EmailAddress
                                                                  string EmailContentType
                                                                  string IsActive
                                                                  string IsVerified
                                                                  string ListID
                                                                  string ModifiedDate
                                                                  string RecipientID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        RecipientResult contactResult = cmpClient.RecipientDeleteFromDatabase(token, "12345");

                                                                        if (contactResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = contactResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = contactResult.Status.ToString();
                                                                              string statusMessage = contactResult.StatusMessage.ToString();
                                                                              string createdDate = contactResult.CreatedDate.ToString();
                                                                              string returnedEmailAddress = contactResult.EmailAddress.ToString();
                                                                              string emailContentType = contactResult.EmailContentType.ToString();
                                                                              string isActive = contactResult.IsActive.ToString();
                                                                              string isVerified = contactResult.IsVerified.ToString();
                                                                              string listID = contactResult.ListID.ToString();
                                                                              string modifiedDate = contactResult.ModifiedDate.ToString();
                                                                              string recipeintID = contactResult.RecipientID.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $RecipientID = "60";

                                                                        $contactResult = $APIFunctionsObj->RecipientDeleteFromDatabase($Token, $RecipientID);

                                                                        if ($contactResult->Status == "-1") {
                                                                            $statusMessage = $contactResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $createdDate = $contactResult->CreatedDate;
                                                                            $emailAddress = $contactResult->EmailAddress;
                                                                            $emailContentType = $contactResult->EmailContentType;
                                                                            $isActive = $contactResult->IsActive;
                                                                            $isVerified = $contactResult->IsVerified;
                                                                            $listID = $contactResult->ListID;
                                                                            $modifiedDate = $contactResult->ModifiedDate;
                                                                            $recipientID = $contactResult->RecipientID;
                                                                            $status = $contactResult->Status;
                                                                            $statusMessage = $contactResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Delete recipient from list

Delete a recipient from a list based on recipientID and listID.

Call details

Call ID
RecipientDeleteFromList
Call
                                                            
                                                                  // C#
                                                                  RecipientResult RecipientDeleteFromList(string tokenID, string recipientID, string listID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $recipientResult = $APIFunctionsObj->RecipientDeleteFromList($Token, $RecipientID, $ListID);
                                                            
                                                      
Returns
RecipientResult object with operation result
Request parameters
                                                            
                                                                  string tokenID
                                                                  string recipientID
                                                                  string listID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate 
                                                                  string EmailAddress
                                                                  string EmailContentType
                                                                  string IsActive
                                                                  string IsVerified
                                                                  string ListID
                                                                  string ModifiedDate
                                                                  string RecipientID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        RecipientResult recipientResult= cmpClient.RecipientDeleteFromList(token, "11", "33383");

                                                                        if (recipientResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = recipientResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = recipientResult.Status.ToString();
                                                                              string statusMessage = recipientResult.StatusMessage.ToString();
                                                                              string createdDate = recipientResult.CreatedDate.ToString();
                                                                              string returnedEmailAddress = recipientResult.EmailAddress.ToString();
                                                                              string emailContentType = recipientResult.EmailContentType.ToString();
                                                                              string isActive = recipientResult.IsActive.ToString();
                                                                              string isVerified = recipientResult.IsVerified.ToString();
                                                                              string returnedListID = recipientResult.ListID.ToString();
                                                                              string modifiedDate = recipientResult.ModifiedDate.ToString();
                                                                              string recipeintID = recipientResult.RecipientID.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $RecipientID = "60";
                                                                        $ListID = "43640";

                                                                        $recipientResult = $APIFunctionsObj->RecipientDeleteFromList($Token, $RecipientID, $ListID);

                                                                        if ($recipientResult->Status == "-1") {
                                                                            $statusMessage = $recipientResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $createdDate = $recipientResult->CreatedDate;
                                                                            $emailAddress = $recipientResult->EmailAddress;
                                                                            $emailContentType = $recipientResult->EmailContentType;
                                                                            $isActive = $recipientResult->IsActive;
                                                                            $isVerified = $recipientResult->IsVerified;
                                                                            $listID = $recipientResult->ListID;
                                                                            $modifiedDate = $recipientResult->ModifiedDate;
                                                                            $recipientID = $recipientResult->RecipientID;
                                                                            $status = $recipientResult->Status;
                                                                            $statusMessage = $recipientResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Delete recipients from lists

Delete multiple recipients from multiple lists.

Call details

Call ID
DeleteRecipientsLists
Call
                                                            
                                                                  // C#
                                                                  DeleteRecipientsLists(tokenId, List< ListIds >, List< RecipientIds >);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $result = $APIFunctionsObj->DeleteRecipientsLists($Token, $Lists, $Recipients);
                                                            
                                                      
Returns
Result with job status
Request parameters
                                                            
                                                                  string tokenID
                                                                  string ListID
                                                                  string RecipientID
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        List listIDArray = new List();
                                                                        ListIDObject listObject = new ListIDObject();
                                                                        listObject.ListID = "12345";
                                                                        listIDArray.Add(listObject);

                                                                        listObject = new ListIDObject();
                                                                        listObject.ListID = "67890";
                                                                        listIDArray.Add(listObject);

                                                                        List listRecipientIDObject = new List();
                                                                        RecipientIDObject recipientIDObject = new RecipientIDObject();
                                                                        recipientIDObject.RecipientID = "1";
                                                                        listRecipientIDObject.Add(recipientIDObject);

                                                                        recipientIDObject = new RecipientIDObject();
                                                                        recipientIDObject.RecipientID = "2";
                                                                        listRecipientIDObject.Add(recipientIDObject);

                                                                        string result = campRef.DeleteRecipientsLists(tokenID, listIDArray.ToArray(), listRecipientIDObject.ToArray());
                                                                  
                                                            
                                                                  
                                                                    $Lists = array();
                                                                        $List = (object) array(
                                                                            'ListID'=>'33383'
                                                                        );
                                                                        array_push($Lists, $List);

                                                                        $List = (object) array(
                                                                            'ListID'=>'43640'
                                                                        );
                                                                        array_push($Lists, $List);

                                                                        $Recipients = array();
                                                                        $Recipient = (object) array(
                                                                            'RecipientID'=>'25'
                                                                        );
                                                                        array_push($Recipients, $Recipient);

                                                                        $Recipients = array();
                                                                        $Recipient = (object) array(
                                                                            'RecipientID'=>'25'
                                                                        );
                                                                        array_push($Recipients, $Recipient);

                                                                        $result = $APIFunctionsObj->DeleteRecipientsLists($Token, $Lists, $Recipients);
                                                                  
                                                            

Lists

This section outlines all the API calls that can be used to manage your lists in the CMAdvantage platform:


Get lists

Get all lists within the CMAdvantage plaform.

Call details

Call ID
ListFetch
Call
                                                            
                                                                  // C#
                                                                  ListResult[] listResult = List < ListResult > ListFetch(string tokenID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $listResult = $APIFunctionsObj->ListFetch($Token);
                                                            
                                                      
Returns
ListResult object array with ListName, ListDesciption, ListMasterID, TotalCount, CreateDate, and ModifiedDate
Request parameters
                                                            string tokenID
                                                      
Return parameters
                                                            
                                                                  string CreatedDate
                                                                  string ListDescription
                                                                  string ListMasterID
                                                                  string ListName
                                                                  string ModifiedDate
                                                                  int TotalCount
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        ListResult[] listResult= cmpClient.ListFetch(TokenID);
                                                                                      
                                                                        if (listResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = listResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < listResult.Length; i++)
                                                                              {
                                                                                    // Do something
                                                                                    string createdDate = listResult[i].CreatedDate.ToString();
                                                                                    string listDescription = listResult[i].ListDescription.ToString();
                                                                                    string listMasterID = listResult[i].ListMasterID.ToString();
                                                                                    string listName = listResult[i].ListName.ToString();
                                                                                    string modifiedDate = listResult[i].ModifiedDate.ToString();
                                                                                    string status = listResult[i].Status.ToString();
                                                                                    string statusMessage = listResult[i].StatusMessage.ToString();
                                                                                    int totalCount = listResult[i].TotalCount;
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $listResult = $APIFunctionsObj->ListFetch($Token);

                                                                        if ($listResult[0]->Status == "-1") {
                                                                            $statusMessage = $listResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($listResult as $lists) {
                                                                                $createdDate = $lists->CreatedDate;
                                                                                $listDescription = $lists->ListDescription;
                                                                                $listMasterID = $lists->ListMasterID;
                                                                                $listName = $lists->ListName;
                                                                                $modifiedDate = $lists->ModifiedDate;
                                                                                $status = $lists->Status;
                                                                                $statusMessage = $lists->StatusMessage;
                                                                                $totalCount = $lists->TotalCount;
                                                                            }
                                                                        }
                                                                  
                                                            

Create list

Create a list with a given name and description.

Call details

Call ID
ListCreate
Call
                                                            
                                                                  // C#
                                                                  ListResult ListCreate(string tokenID, string listName, string listDescription);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $listResult = $APIFunctionsObj->ListCreate($Token, "My List", "My List Description");
                                                            
                                                      
Returns
ListResult object with ListName, ListDesciption, CreateDate and ModifiedDate
Request parameters
                                                            
                                                                  string tokenID
                                                                  string listName
                                                                  string listDescription
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate
                                                                  string ListDescription
                                                                  string ListMasterID
                                                                  string ListName
                                                                  string ModifiedDate
                                                                  string TotalCount
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        ListResult listResult = cmpClient.ListCreate(tokenID, "My List", "My List Description");

                                                                        if (createListResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = listResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              string status = listResult.Status.ToString();
                                                                              string statusMessage = listResult.StatusMessage.ToString();
                                                                              string createdDate = listResult.CreatedDate.ToString();
                                                                              string description = listResult.ListDescription.ToString();
                                                                              string masterID = listResult.ListMasterID.ToString();
                                                                              string name = listResult.ListName.ToString();
                                                                              string modifiedDate = listResult.ToString();
                                                                              string totalCount = listResult.TotalCount.ToString(); 
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $listResult = $APIFunctionsObj->ListCreate($Token, "My List", "My List Description");

                                                                        if ($listResult->Status == "-1") {
                                                                            $statusMessage = $listResult->StatusMessage;
                                                                        } else {
                                                                            $status = $listResult->Status;
                                                                            $statusMessage = $listResult->StatusMessage;
                                                                            $createdDate = $listResult->CreatedDate;
                                                                            $description = $listResult->ListDescription;
                                                                            $masterID = $listResult->ListMasterID;
                                                                            $name = $listResult->ListName;
                                                                            $modifiedDate = $listResult->ModifiedDate;
                                                                            $totalCount = $listResult->TotalCount;
                                                                        }
                                                                  
                                                            

Edit list

Edit a list based on listID.

Call details

Call ID
ListEdit
Call
                                                            
                                                                  // C#
                                                                  MessageResult ListEdit(string tokenID, string listName, string listDescription, string listID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $messageResult = $APIFunctionsObj->ListEdit($Token, "New List Name", "New List Description", "123456");
                                                            
                                                      
Returns
MessageResult object with message
Request parameters
                                                            
                                                                  string tokenID
                                                                  string listName
                                                                  string listDescription
                                                                  string listID
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult messageResult = cmpClient.ListEdit(tokenID, "New List Name", "New List Description", "123456");

                                                                        if (messageResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = messageResult.StatusMessage;
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString(); 
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $messageResult = $APIFunctionsObj->ListEdit($Token, "New List Name", "New List Description", "123456");

                                                                        if ($messageResult->Status == "-1") {
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        } else {
                                                                            //Do something
                                                                            $status = $messageResult->Status;
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Delete list

Delete a list based on listID.

Call details

Call ID
ListDelete
Call
                                                            
                                                                  // C#
                                                                  MessageResult ListDelete(string tokenID, string listID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $messageResult = $APIFunctionsObj->ListDelete($Token, "43644");
                                                            
                                                      
Returns
MessageResult object with status of the action
Request parameters
                                                            
                                                                  string tokenID
                                                                  string listID
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult messageResult = cmpClient.ListDelete(tokenID, "1");

                                                                        if (messageResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $messageResult = $APIFunctionsObj->ListDelete($Token, "43644");

                                                                        if ($messageResult->Status == "-1") {
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        } else {
                                                                            //Do something
                                                                            $status = $delete_list_result->Status;
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Delete list with recipients

Delete a list as well as all recipients that belong to this list.

Call details

Call ID
ListDeleteWithRecipients
Call
                                                            
                                                                  // C#
                                                                  MessageResult ListDeleteWithRecipients(string tokenID, string listID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $messageResult = $APIFunctionsObj->ListDeleteWithRecipients($Token, "1");
                                                            
                                                      
Returns
MessageResult object with status of the action
Request parameters
                                                            
                                                                  string tokenID
                                                                  string listID
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult messageResult = cmpClient.ListDeleteWithRecipients(tokenID, "1");

                                                                        if (messageResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $messageResult = $APIFunctionsObj->ListDeleteWithRecipients($Token, "1");

                                                                        if ($messageResult->Status == "-1") {
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        } else {
                                                                            //Do something
                                                                            $status = $delete_list_result->Status;
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Remove recipients from list

Remove recipients from a list without deleting them from the database.

Call details

Call ID
RecipientEmptyList
Call
                                                            
                                                                  // C#
                                                                  MessageResult messageResult = cmpClient.RecipientEmptyList(tokenID, listID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $messageResult = $APIFunctionsObj->RecipientEmptyList($Token, "43644");
                                                            
                                                      
Returns
MessageResult object with status of operation
Request parameters
                                                            
                                                                  string tokenID
                                                                  string listID
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult messageResult = cmpClient.RecipientEmptyList(tokenID, listID);

                                                                        if (messageResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = messageResult.StatusMessage;         
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage;.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $messageResult = $APIFunctionsObj->RecipientEmptyList($Token, "43644");

                                                                        if ($messageResult->Status == "-1") {
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        } else {
                                                                            //Do something
                                                                            $status = $delete_list_result->Status;
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Database

The following calls allow you to manage the recipient data within your CMAdvantage database:


Get custom fields

Get a list of all custom fields used within the CMAdvantage database.

Call details

Call ID
CustomFieldListFetch
Call
                                                            
                                                                  // C#
                                                                  CustomFieldResult[] customFieldResult = cmpClient.CustomFieldListFetch(tokenID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $customFieldResult = $APIFunctionsObj->CustomFieldListFetch($Token);
                                                            
                                                      
Returns
customFieldResult object containing details of all custom fields
Request parameters
                                                            
                                                                  string tokenID
                                                            
                                                      
Return parameters
                                                            
                                                                  string DefaultValue
                                                                  string FieldDescription
                                                                  string FieldID
                                                                  string FieldName
                                                                  string FieldType
                                                                  string IsRequired
                                                                  string MaxLength
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CustomFieldResult[] customFieldResult = cmpClient.CustomFieldListFetch(tokenID);

                                                                        if (customFieldResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = customFieldResult[0].StatusMessage;
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < customFieldResult.Length; i++)
                                                                              {
                                                                                  string defaultValue = customFieldResult[i].DefaultValue.ToString();
                                                                                  string fieldDescription = customFieldResult[i].FieldDescription.ToString();
                                                                                  string fieldID = customFieldResult[i].FieldID.ToString();
                                                                                  string fieldName = customFieldResult[i].FieldName.ToString();
                                                                                  string fieldType = customFieldResult[i].FieldType.ToString();
                                                                                  string isRequired = customFieldResult[i].IsRequired.ToString();
                                                                                  string maxLength = customFieldResult[i].MaxLength.ToString();
                                                                                  string status = customFieldResult[i].Status.ToString();
                                                                                  string statusMessage = customFieldResult[i].StatusMessage.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $customFieldResult = $APIFunctionsObj->CustomFieldListFetch($Token);

                                                                        if (is_object($customFieldResult)) {
                                                                            $customFieldResult = array($customFieldResult);
                                                                        }

                                                                        if ($customFieldResult[0]->Status == "-1") {
                                                                            $statusMessage = $customFieldResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($customFieldResult as $fields) {
                                                                                $defaultValue = $fields->DefaultValue;
                                                                                $fieldDescription = $fields->FieldDescription;
                                                                                $fieldID = $fields->FieldID;
                                                                                $fieldName = $fields->FieldName;
                                                                                $fieldType = $fields->FieldType;
                                                                                $isRequired = $fields->IsRequired;
                                                                                $maxLength = $fields->MaxLength;
                                                                                $status = $fields->Status;
                                                                                $statusMessage = $fields->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get custom field values by email address

Get all the values within custom CMAdvantage fields for a given recipient based on EmailAddress.

Call details

Call ID
CustomFieldValueFetchByEmailAddress
Call
                                                            
                                                                  // C#
                                                                  RecipientCustomFieldResult[] recipientCustomFieldResult = List < RecipientCustomFieldResult > CustomFieldValueFetchByEmailAddress(string tokenID, string emailAddress);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $recipientCustomFieldResult = $APIFunctionsObj->CustomFieldValueFetchByEmailAddress($Token, $EmailAddress);
                                                            
                                                      
Returns
RecipientCustomFieldResult object array with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string emailAddress
                                                            
                                                      
Return parameters
                                                            
                                                                  string FieldName
                                                                  string FieldValue
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        RecipientCustomFieldResult[] recipientCustomFieldResult = cmpClient.CustomFieldValueFetchByEmailAddress(tokenID, "user@example.com");

                                                                        if (recipientCustomFieldResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = recipientCustomFieldResult[0].StatusMessage;
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int count = 0; count < recipientCustomFieldResult.Length; count++)
                                                                              {
                                                                                 string fieldName = recipientCustomFieldResult[i].FieldName.ToString();
                                                                                 string fieldValue = recipientCustomFieldResult[i].FieldValue.ToString();
                                                                                 string status = recipientCustomFieldResult[i].Status.ToString();
                                                                                 string statusMessage = recipientCustomFieldResult[i].StatusMessage.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $EmailAddress = "user@example.com";

                                                                        $recipientCustomFieldResult = $APIFunctionsObj->CustomFieldValueFetchByEmailAddress($Token, $EmailAddress);

                                                                        if (is_object($recipientCustomFieldResult)) {
                                                                            $recipientCustomFieldResult = array($recipientCustomFieldResult);
                                                                        }

                                                                        if ($recipientCustomFieldResult[0]->Status == "-1") {
                                                                            $statusMessage = $recipientCustomFieldResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($recipientCustomFieldResult as $fields) {
                                                                                $fieldName = $fields->FieldName;
                                                                                $fieldValue = $fields->FieldValue;
                                                                                $status = $fields->Status;
                                                                                $statusMessage = $fields->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get custom field values by recipient id

Get all the values within custom CMAdvantage fields for a given recipient based on recipientID.

Call details

Call ID
CustomFieldValueFetchByRecipientID
Call
                                                            
                                                                  // C#
                                                                  CustomFieldResult[] customFieldResult = cmpClient.CustomFieldValueFetchByRecipientID(tokenID, recipientID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $recipientCustomFieldResult = $APIFunctionsObj->CustomFieldValueFetchByRecipientID($Token, $RecipientID);
                                                            
                                                      
Returns
RecipientCustomFieldResult object array with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string recipientID
                                                            
                                                      
Return parameters
                                                            
                                                                  string FieldName
                                                                  string FieldValue
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        RecipientCustomFieldResult[] recipientCustomFieldResult = cmpClient.CustomFieldValueFetchByRecipientID(tokenID, "123");

                                                                        if (recipientCustomFieldResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = recipientCustomFieldResult[0].StatusMessage;
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int count = 0; count < recipientCustomFieldResult.Length; count++)
                                                                              {
                                                                                 string fieldName = recipientCustomFieldResult[i].FieldName.ToString();
                                                                                 string fieldValue = recipientCustomFieldResult[i].FieldValue.ToString();
                                                                                 string status = recipientCustomFieldResult[i].Status.ToString();
                                                                                 string statusMessage = recipientCustomFieldResult[i].StatusMessage.ToString();   }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $RecipientID = "60";

                                                                    $recipientCustomFieldResult = $APIFunctionsObj->CustomFieldValueFetchByRecipientID($Token, $RecipientID);

                                                                        if (is_object($recipientCustomFieldResult)) {
                                                                            $recipientCustomFieldResult = array($recipientCustomFieldResult);
                                                                        }

                                                                        if ($recipientCustomFieldResult[0]->Status == "-1") {
                                                                            $statusMessage = $recipientCustomFieldResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($recipientCustomFieldResult as $fields) {
                                                                                $fieldName = $fields->FieldName;
                                                                                $fieldValue = $fields->FieldValue;
                                                                                $status = $fields->Status;
                                                                                $statusMessage = $fields->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get global suppressed recipients

Get a list of globally suppressed recipients.

Call details

Call ID
SuppressContactGlobalListFetch
Call
                                                            
                                                                  // C#
                                                                  SuppressResullt[] SuppressResullt = List < SuppressResullt > SuppressContactGlobalListFetch(string tokenID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $suppressResult = $APIFunctionsObj->SuppressContactGlobalListFetch($Token);
                                                            
                                                      
Returns
Array with detail
Request parameters
                                                            
                                                                  string tokenID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedBy
                                                                  string CreatedDate
                                                                  string EmailAddress
                                                                  string LastActionType
                                                                  string SuppressContactID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        SuppressResullt[] suppressResullt = cmpClient.SuppressContactGlobalListFetch(obj.TokenID);

                                                                        if (suppressResullt[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = suppressResullt[0].StatusMessage;
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int count = 0; count < suppressResullt.Length; count++)
                                                                              {
                                                                                    string createdBy = suppressResult[i].CreatedBy.ToString();
                                                                                    string createdDate = suppressResult[i].CreatedDate.ToString();
                                                                                    string emailAddress = suppressResult[i].EmailAddress.ToString();
                                                                                    string lastActionType = suppressResult[i].LastActionType.ToString();
                                                                                    string status = suppressResult[i].Status.ToString();
                                                                                    string statusMessage = suppressResult[i].StatusMessage.ToString();      
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $suppressResult = $APIFunctionsObj->SuppressContactGlobalListFetch($Token);

                                                                        if (is_object($suppressResult)) {
                                                                            $suppressResult = array($suppressResult);
                                                                        }

                                                                        if ($suppressResult[0]->Status == "-1") {
                                                                            $statusMessage = $suppressResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($suppressResult as $recipients) {
                                                                                $createdBy = $recipients->CreatedBy;
                                                                                $createdDate = $recipients->CreatedDate;
                                                                                $emailAddress = $recipients->EmailAddress;
                                                                                $lastActionType = $recipients->LastActionType;
                                                                                $status = $recipients->Status;
                                                                                $statusMessage = $recipients->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Create custom field

Add a custom field of type CheckBox / TextBox / Date / Password / CommentBox to the CMAdvantage database.

Call details

Call ID
CustomFieldAdd
Call
                                                            
                                                                  // C#
                                                                  CustomFieldResult CustomFieldAdd(string tokenID, string fieldName, string fieldDescription, string fieldType, string maxLength, string defaultValue, string IsRequired);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $customFieldResult = $APIFunctionsObj->CustomFieldAdd($Token, "txtFirstName", "First Name", "TextBox", "255", "John", "1");
                                                            
                                                      
Returns
CustomFieldResult object with details
Request parameters
                                                            
                                                                  string tokenID 
                                                                  string fieldName
                                                                  string fieldDescription
                                                                  string fieldType
                                                                  string maxLength
                                                                  string defaultValue
                                                                  string IsRequired
                                                            
                                                      
Return parameters
                                                            
                                                                  string DefaultValue 
                                                                  string FieldDescription
                                                                  string FieldID
                                                                  string FieldName
                                                                  string FieldType
                                                                  string IsRequired
                                                                  string MaxLength
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CustomFieldResult customFieldResult = cmpClient.CustomFieldAdd(tokenID, "txtFirstName", "First Name", "TextBox", "255", "John", "1");

                                                                        if (customFieldResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = suppressResullt[0].StatusMessage;
                                                                        }
                                                                        else
                                                                        {
                                                                              string fieldID = customFieldResult.FieldID.ToString();
                                                                              string status = customFieldResult.Status.ToString();
                                                                              string statusMessage = customFieldResult.Status.ToString();
                                                                              string defaultValue = customFieldResult.DefaultValue.ToString();
                                                                              string fieldDescription = customFieldResult.FieldDescription.ToString();
                                                                              string fieldName = customFieldResult.FieldName.ToString();
                                                                              string fieldType = customFieldResult.FieldType.ToString();
                                                                              string isRequired = customFieldResult.IsRequired.ToString();
                                                                              string maxLength = customFieldResult.MaxLength.ToString(); 
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $customFieldResult = $APIFunctionsObj->CustomFieldAdd($Token, "txtFirstName", "First Name", "TextBox", "255", "John", "1");

                                                                        if (is_object($customFieldResult)) {
                                                                            $customFieldResult = array($customFieldResult);
                                                                        }

                                                                        if ($customFieldResult[0]->Status == "-1") {
                                                                            $statusMessage = $customFieldResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($customFieldResult as $fields) {
                                                                                $fieldID = $fields->FieldID;
                                                                                $defaultValue = $fields->DefaultValue;
                                                                                $fieldDescription = $fields->FieldDescription;
                                                                                $fieldName = $fields->FieldName;
                                                                                $fieldType = $fields->FieldType;
                                                                                $isRequired = $fields->IsRequired;
                                                                                $maxLength = $fields->MaxLength;
                                                                                $status = $fields->Status;
                                                                                $statusMessage = $fields->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Delete custom field

Delete a custom field from the CMAdvantage database.

Call details

Call ID
CustomFieldDelete
Call
                                                            
                                                                  // C#
                                                                  MessageResult CustomFieldDelete(string tokenID, string customFieldID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $customFieldResult = $APIFunctionsObj->CustomFieldDelete($Token, $CustomFieldID);
                                                            
                                                      
Returns
MessageResult object with status message
Request parameters
                                                            
                                                                  string tokenID
                                                                  string customFieldID
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult campaignResult = cmpClient.CustomFieldDelete(token, customFieldID);

                                                                        if (customFieldResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignResult.StatusMessage;.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = campaignResult.Status.ToString();
                                                                              string statusMessage = campaignResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $CustomFieldID = "23965";

                                                                        $customFieldResult = $APIFunctionsObj->CustomFieldDelete($Token, $CustomFieldID);

                                                                        if ($customFieldResult->Status == "-1") {
                                                                            $statusMessage = $customFieldResult->StatusMessage;
                                                                        } else {
                                                                            $status = $customFieldResult->Status;
                                                                            $statusMessage = $customFieldResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Global suppress recipient

Suppress a recipient globally.

Call details

Call ID
SuppressContactGlobally
Call
                                                            
                                                                  // C#
                                                                  MessageResult = SuppressContactGlobally(string tokenID, string emailAddress);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $jobResult = $APIFunctionsObj->JobDelete($Token, $JobID);
                                                            
                                                      
Returns
MessageResult object with message
Request parameters
                                                            
                                                                  string tokenID
                                                                  string emailAddress
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult suppressResullt = cmpClient.SuppressContactGlobally(tokenID, "user@example.com");

                                                                        if (suppressResullt.Status == "-1")
                                                                        {
                                                                              string statusMessage = suppressResullt.StatusMessage;
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = suppressResult.Status.ToString();
                                                                              string statusMessage = suppressResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $JobID = "37459";

                                                                        $jobResult = $APIFunctionsObj->JobDelete($Token, $JobID);

                                                                        if ($jobResult->Status == "-1") {
                                                                            $statusMessage = $jobResult->StatusMessage;
                                                                        } else {
                                                                            $status = $jobResult->Status;
                                                                            $statusMessage = $jobResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Jobs

The following section describes all API calls which govern your CMAdvantage Jobs:


Get job details

Get the details of a job by jobID.

Call details

Call ID
JobDetailsFetchByID
Call
                                                            
                                                                  // C#
                                                                  JobResult = JobDetailsFetchByID(string tokenID, string jobID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $jobResult = $APIFunctionsObj->JobDetailsFetchByID($Token, $JobID);
                                                            
                                                      
Returns
JobResult object with job details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string jobID
                                                            
                                                      
Return parameters
                                                            
                                                                  string ActualFileName 
                                                                  string EndDateTime
                                                                  string JobDescMessage
                                                                  string JobMasterID
                                                                  string JobStatusID
                                                                  string QueueDateTime
                                                                  string StartDateTime
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        JobResult jobResult = cmpClient.JobDetailsFetchByID(tokenID, "12345");

                                                                        if (jobResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = jobResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string actualFieldName = jobResult.ActualFileName.ToString();
                                                                              string endDateTime = jobResult.EndDateTime.ToString();
                                                                              string jobDescMessage = jobResult.JobDescMessage.ToString();
                                                                              string jobMasterID = jobResult.JobMasterID.ToString();
                                                                              string jobStatusID = jobResult.JobStatusID.ToString();
                                                                              string queueDateTime = jobResult.QueueDateTime.ToString();
                                                                              string startDateTime = jobResult.QueueDateTime.ToString();
                                                                              string status = jobResult.Status.ToString();
                                                                              string statusMessage = jobResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $JobID = "37283";

                                                                        $jobResult = $APIFunctionsObj->JobDetailsFetchByID($Token, $JobID);

                                                                        if ($jobResult->Status == "-1") {
                                                                            $statusMessage = $jobResult->StatusMessage;
                                                                        } else {
                                                                            $ActualFileName = $jobResult->ActualFileName;
                                                                            $EndDateTime = $jobResult->EndDateTime;
                                                                            $JobDescMessage = $jobResult->JobDescMessage;
                                                                            $JobMasterID = $jobResult->JobMasterID;
                                                                            $JobStatusID = $jobResult->JobStatusID;
                                                                            $QueueDateTime = $jobResult->QueueDateTime;
                                                                            $StartDateTime = $jobResult->StartDateTime;
                                                                            $Status = $jobResult->Status;
                                                                            $StatusMessage = $jobResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Get job description

Get the description of a job by jobID.

Call details

Call ID
JobDescMessageFetch
Call
                                                            
                                                                  // C#
                                                                  JobDescMessageFetch(tokenID, jobID)
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $jobResult = $APIFunctionsObj->JobDescMessageFetch($Token, $JobID);
                                                            
                                                      
Returns
Job description with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string jobID
                                                            
                                                      
Return parameters
                                                            
                                                                  string ActualFileName 
                                                                  string EndDateTime
                                                                  string JobDescMessage
                                                                  string JobMasterID
                                                                  string JobStatusID
                                                                  string QueueDateTime
                                                                  string StartDateTime
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        JobResult jobResult = cmpClient.JobDescMessageFetch(tokenID, "12345");

                                                                        if (jobResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = jobResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                               // Do something
                                                                               string actualFieldName = jobResult.ActualFileName.ToString();
                                                                               string endDateTime = jobResult.EndDateTime.ToString();
                                                                               string jobDescMessage = jobResult.JobDescMessage.ToString();
                                                                               string jobMasterID = jobResult.JobMasterID.ToString();
                                                                               string jobStatusID = jobResult.JobStatusID.ToString();
                                                                               string queueDateTime = jobResult.QueueDateTime.ToString();
                                                                               string startDateTime = jobResult.QueueDateTime.ToString();
                                                                               string status = jobResult.Status.ToString();
                                                                               string statusMessage = jobResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $JobID = "37283";

                                                                        $jobResult = $APIFunctionsObj->JobDescMessageFetch($Token, $JobID);

                                                                        if ($jobResult->Status == "-1") {
                                                                            $statusMessage = $jobResult->StatusMessage;
                                                                        } else {
                                                                            $ActualFileName = $jobResult->ActualFileName;
                                                                            $EndDateTime = $jobResult->EndDateTime;
                                                                            $JobDescMessage = $jobResult->JobDescMessage;
                                                                            $JobMasterID = $jobResult->JobMasterID;
                                                                            $JobStatusID = $jobResult->JobStatusID;
                                                                            $QueueDateTime = $jobResult->QueueDateTime;
                                                                            $StartDateTime = $jobResult->StartDateTime;
                                                                            $Status = $jobResult->Status;
                                                                            $StatusMessage = $jobResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Get import recipients jobs

Get a list of all jobs that relate to recipient imports into the CMAdvantage platform.

Call details

Call ID
JobListForContactsImportFetch
Call
                                                            
                                                                  // C#
                                                                  JobResult[] JobResult = List < JobResult > JobListForContactsImportFetch(string tokenID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $jobResult = $APIFunctionsObj->JobListForContactsImportFetch($Token);
                                                            
                                                      
Returns
JobResult object array with job details
Request parameters
                                                            
                                                                  string tokenID
                                                            
                                                      
Return parameters
                                                            
                                                                  string ActualFileName
                                                                  string EndDateTime
                                                                  string JobDescMessage
                                                                  string JobMasterID
                                                                  string JobStatusID
                                                                  string QueueDateTime
                                                                  string StartDateTime
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        JobResult[] jobResult = cmpClient.JobListForContactsImportFetch(tokenID);

                                                                        if (jobResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = jobResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < jobResult.Length; i++)
                                                                              {
                                                                                    string actualFileName = jobResult[i].ActualFileName.ToString();
                                                                                    string endDateTime = jobResult[i].EndDateTime.ToString();
                                                                                    string jobDescriptionMessage = jobResult[i].JobDescMessage.ToString();
                                                                                    string jobMasterID = jobResult[i].JobMasterID.ToString();
                                                                                    string jobStatusID = jobResult[i].JobStatusID.ToString();
                                                                                    string queueDateTime = jobResult[i].QueueDateTime.ToString();
                                                                                    string startDateTime = jobResult[i].StartDateTime.ToString();
                                                                                    string status = jobResult[i].Status.ToString();
                                                                                    string statusMessage = jobResult[i].StatusMessage.ToString();       
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $jobResult = $APIFunctionsObj->JobListForContactsImportFetch($Token);

                                                                        if (is_object($jobResult)) {
                                                                            $jobResult = array($jobResult);
                                                                        }

                                                                        if ($jobResult[0]->Status == "-1") {
                                                                            $statusMessage = $jobResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($jobResult as $jobs) {
                                                                                $actualFileName = $jobs->ActualFileName;
                                                                                $endDateTime = $jobs->EndDateTime;
                                                                                $jobDescriptionMessage = $jobs->JobDescMessage;
                                                                                $jobMasterID = $jobs->JobMasterID;
                                                                                $jobStatusID = $jobs->JobStatusID;
                                                                                $queueDateTime = $jobs->QueueDateTime;
                                                                                $startDateTime = $jobs->StartDateTime;
                                                                                $status = $jobs->Status;
                                                                                $statusMessage = $jobs->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get scheduled campaigns jobs

Get a list of all jobs that relate to scheduled campaigns within the CMAdvantage platform.

Call details

Call ID
JobListForCampaignScheduleFetch
Call
                                                            
                                                                  // C#
                                                                  JobResult[] JobResult = List < JobResult > JobListForCampaignScheduleFetch(string tokenID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $jobResult = $APIFunctionsObj->JobListForCampaignScheduleFetch($Token);
                                                            
                                                      
Returns
JobResult object array with job details
Request parameters
                                                            
                                                                  string tokenID
                                                            
                                                      
Return parameters
                                                            
                                                                  string ActualFileName
                                                                  string EndDateTime
                                                                  string JobDescMessage
                                                                  string JobMasterID
                                                                  string JobStatusID
                                                                  string QueueDateTime
                                                                  string StartDateTime
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        JobResult[] jobResult = cmpClient.JobListForCampaignScheduleFetch(tokenID);

                                                                        if (jobResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = jobResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < jobResult.Length; i++)
                                                                              {
                                                                                    string actualFileName = jobResult[i].ActualFileName.ToString();
                                                                                    string endDateTime = jobResult[i].EndDateTime.ToString();
                                                                                    string jobDescriptionMessage = jobResult[i].JobDescMessage.ToString();
                                                                                    string jobMasterID = jobResult[i].JobMasterID.ToString();
                                                                                    string jobStatusID = jobResult[i].JobStatusID.ToString();
                                                                                    string queueDateTime = jobResult[i].QueueDateTime.ToString();
                                                                                    string startDateTime = jobResult[i].StartDateTime.ToString();
                                                                                    string status = jobResult[i].Status.ToString();
                                                                                    string statusMessage = jobResult[i].StatusMessage.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $jobResult = $APIFunctionsObj->JobListForCampaignScheduleFetch($Token);

                                                                        if (is_object($jobResult)) {
                                                                            $jobResult = array($jobResult);
                                                                        }

                                                                        if ($jobResult[0]->Status == "-1") {
                                                                            $statusMessage = $jobResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($jobResult as $jobs) {
                                                                                $actualFileName = $jobs->ActualFileName;
                                                                                $endDateTime = $jobs->EndDateTime;
                                                                                $jobDescriptionMessage = $jobs->JobDescMessage;
                                                                                $jobMasterID = $jobs->JobMasterID;
                                                                                $jobStatusID = $jobs->JobStatusID;
                                                                                $queueDateTime = $jobs->QueueDateTime;
                                                                                $startDateTime = $jobs->StartDateTime;
                                                                                $status = $jobs->Status;
                                                                                $statusMessage = $jobs->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get import recipients job details

Get the details of the import recipients job based on JobID.

Call details

Call ID
JobRecipientsImportedContactList
Call
                                                            
                                                                  // C#
                                                                  JobRecipientsImportedContactList(tokenID, jobID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $jobResult = $APIFunctionsObj->JobRecipientsImportedContactList($Token, $JobID);
                                                            
                                                      
Returns
JobResult object array with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string jobID
                                                            
                                                      
Return parameters
                                                            
                                                                  string ContactID
                                                                  string EmailAddress
                                                                  string ImportStatus
                                                                  string ModifiedDate
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        JobImportContactResult [] jobResult = cmpClient. JobRecipientsImportedContactList(tokenID, jobID);

                                                                        for (int i = 0; i < jobResult.Length; i++)
                                                                        {
                                                                              string contactID = jobResult[i].ContactID.ToString();
                                                                              string emailAddress = jobResult[i].EmailAddress.ToString();
                                                                              string importStatus = jobResult[i].ImportStatus.ToString();
                                                                              string modifiedDate = jobResult[i].ModifiedDate.ToString();
                                                                              string statusMessage = jobResult[i].StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $JobID = "37283";

                                                                        $jobResult = $APIFunctionsObj->JobRecipientsImportedContactList($Token, $JobID);

                                                                        if ($jobResult->StatusMessage == "OK") {
                                                                            $statusMessage = $jobResult->StatusMessage;
                                                                        } else {
                                                                            $contactID = $jobResult->ContactID;
                                                                            $emailAddress = $jobResult->EmailAddress;
                                                                            $importStatus = $jobResult->ImportStatus;
                                                                            $modifiedDate = $jobResult->ModifiedDate;
                                                                            $statusMessage = $jobResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Import recipients into database

Import recipient data into the database.

Call details

Call ID
JobRecipientsImport
Call
                                                            
                                                                  // C#
                                                                  JobImportResult JobRecipientsImport(string tokenID, JobImportProperty jobImportProperty, string json);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $jobImportResult = $APIFunctionsObj->JobRecipientsImport($Token, $JobImportProperty, $JSON);
                                                            
                                                      
Returns
JobImportResult object with details
Request parameters
                                                            
                                                                  string tokenID 
                                                                  Object jobImportProperty
                                                                  json Data
                                                            
                                                      
Return parameters
                                                            
                                                                  string JobID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        JobImportProperty jobImportProperty = new JobImportProperty();
                                                                        jobImportProperty.ListID = "33383";
                                                                        jobImportProperty.FileName = "APIimport.txt";

                                                                        StringBuilder Data = new StringBuilder();
                                                                        Data.AppendLine("EmailAddress, IsActive, FirstName");
                                                                        Data.AppendLine("user1@example.com, Yes, John");
                                                                        Data.AppendLine("user2@example.com, No, James");
                                                                        Data.AppendLine("user3@example.com, Yes, Sarah");
                                                                        Data.AppendLine("user4@example.comt, Yes, Jessica");

                                                                        JobImportResult jobImportResult = cmpClient.JobRecipientsImport(token, jobImportProperty, Data.ToString());

                                                                        if (jobImportResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = jobImportResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                               // Do something
                                                                               string jobID = jobImportResult.JobID.ToString();
                                                                               string status = jobImportResult.Status.ToString();
                                                                               string statusMessage = jobImportResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $ListID = "43640";
                                                                        $FileName = "APIimport.txt";
                                                                        $DefaultSetting = TRUE;

                                                                        $JobImportProperty = (object) array(
                                                                            'ListID' => $ListID,
                                                                            'FileName' => $FileName,
                                                                            'IsUseDefaultSetting' => $DefaultSetting
                                                                        );

                                                                        $JSON = "EmailAddress, IsActive, FirstName"."\r\n";
                                                                        $JSON = $JSON."user1@example.com, Yes, John"."\r\n";
                                                                        $JSON = $JSON."user2@example.com, Yes, James"."\r\n";
                                                                        $JSON = $JSON."user3@example.com, Yes, Sarah"."\r\n";
                                                                        $JSON = $JSON."user4@example.com, Yes, Jessica";

                                                                        $jobImportResult = $APIFunctionsObj->JobRecipientsImport($Token, $JobImportProperty, $JSON);

                                                                        if ($jobImportResult->Status == "-1") {
                                                                            $statusMessage = $jobImportResult->StatusMessage;
                                                                        } else {
                                                                            $jobID = $jobImportResult->JobID;
                                                                            $status = $jobImportResult->Status;
                                                                            $statusMessage = $jobImportResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Import recipients into database using delimiter

Import recipient data into the database using a delimiter such as "," or "|".

Call details

Call ID
JobRecipientsImportWithDelimiter
Call
                                                            
                                                                  // C#
                                                                  JobRecipientsImportWithDelimiter(string tokenID, JobImportProperty jobImportProperty, string json);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $jobImportResult = $APIFunctionsObj->JobRecipientsImportWithDelimiter($Token, $JobImportProperty, $JSON, $Delimiter);
                                                            
                                                      
Returns
JobImportResult object with details
Request parameters
                                                            
                                                                  string tokenID 
                                                                  string jobID
                                                                  Object jobImportProperty
                                                                  json Data
                                                            
                                                      
Return parameters
                                                            
                                                                  string JobID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        JobImportProperty jobImportProperty = new JobImportProperty();
                                                                        jobImportProperty.ListID = "33383";
                                                                        jobImportProperty.FileName = "APIimport.txt";

                                                                        StringBuilder Data = new StringBuilder();

                                                                        Data.Append("EmailAddress,IsActive,FirstName,user1@example.com,Yes,John,user2@example.com,No,Gareth,user3@example.com,Yes,Sarah,user4@example.com,Yes,Jessica");

                                                                        string delimiter = ",";

                                                                        JobImportResult jobImportResult = cmpClient.JobRecipientsImportWithDelimiter(token, jobImportProperty, Data.ToString(), delimiter);

                                                                        if (jobImportResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = jobImportResult.StatusMessage.ToString();        
                                                                        }
                                                                        else
                                                                        {
                                                                               // Do something
                                                                               string jobID = jobImportResult.JobID.ToString();
                                                                               string status = jobImportResult.Status.ToString();
                                                                               string statusMessage = jobImportResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $ListID = "43640";
                                                                        $FileName = "APIimport.txt";
                                                                        $DefaultSetting = TRUE;

                                                                        $JobImportProperty = (object) array(
                                                                            'ListID' => $ListID,
                                                                            'FileName' => $FileName,
                                                                            'IsUseDefaultSetting' => $DefaultSetting
                                                                        );

                                                                        $JSON = "EmailAddress,IsActive,FirstName,user1@example.com,Yes,John,user2@example.com,No,Gareth,user3@example.com,Yes,Sarah,user4@example.com,Yes,Jessica";

                                                                        $Delimiter = ",";

                                                                        $jobImportResult = $APIFunctionsObj->JobRecipientsImportWithDelimiter($Token, $JobImportProperty, $JSON, $Delimiter);

                                                                        if ($jobImportResult->Status == "-1") {
                                                                            $statusMessage = $jobImportResult->StatusMessage;
                                                                        } else {
                                                                            $jobID = $jobImportResult->JobID;
                                                                            $status = $jobImportResult->Status;
                                                                            $statusMessage = $jobImportResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Delete job

Delete a job based on jobID.

Call details

Call ID
JobDelete
Call
                                                            
                                                                  // C#
                                                                  MessageResult = JobDelete(string tokenID, string jobID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $jobResult = $APIFunctionsObj->JobDelete($Token, $JobID);
                                                            
                                                      
Returns
MessageResult object with status
Request parameters
                                                            
                                                                  stringtokenID
                                                                  string jobID
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult jobResult = cmpClient.JobDelete(tokenID, "12345");

                                                                        if (jobResult.Status == "-1")
                                                                        {
                                                                               string statusMessage = jobResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                               string status = jobResult.Status.ToString();
                                                                               string statusMessage = jobResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $JobID = "37459";

                                                                        $jobResult = $APIFunctionsObj->JobDelete($Token, $JobID);

                                                                        if ($jobResult->Status == "-1") {
                                                                            $statusMessage = $jobResult->StatusMessage;
                                                                        } else {
                                                                            $status = $jobResult->Status;
                                                                            $statusMessage = $jobResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Templates

The following section contains all the calls which manage templates within your CMAdvantage platform:


Get templates

Get a list of templates stored in your account.

Call details

Call ID
TemplateListFetch
Call
                                                            
                                                                  // C#
                                                                  TemplateResult[] templateResult = List < TemplateResult > TemplateListFetch(string tokenID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $templateResult = $APIFunctionsObj->TemplateListFetch($Token);
                                                            
                                                      
Returns
TemplateResult object array with status
Request parameters
                                                            
                                                                  string tokenID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedBy
                                                                  string CreatedDate
                                                                  string ModifiedBy
                                                                  string ModifiedDate
                                                                  string TemplateCategoryID
                                                                  string TemplateDescription
                                                                  string TemplateID
                                                                  string TemplateName
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        TemplateResult[] templateResult = cmpClient.TemplateListFetch(tokenID);

                                                                        if (templateResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = templateResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < templateResult.Length; i++)
                                                                              {
                                                                                    string createdBy = templateResult[i].CreatedBy.ToString();
                                                                                    string createdDate = templateResult[i].CreatedDate.ToString();
                                                                                    string modifiedBy = templateResult[i].ModifiedBy.ToString();
                                                                                    string modifiedDate = templateResult[i].ModifiedDate.ToString();
                                                                                    string templateCategoryID = templateResult[i].TemplateCategoryID.ToString();
                                                                                    string templateDescription = templateResult[i].TemplateDescription.ToString();
                                                                                    string templateID = templateResult[i].TemplateID.ToString();
                                                                                    string templateName = templateResult[i].TemplateName.ToString();
                                                                                    string status = templateResult[i].Status.ToString();
                                                                                    string statusMessage = templateResult[i].StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $templateResult = $APIFunctionsObj->TemplateListFetch($Token);

                                                                        if ($templateResult[0]->Status == "-1") {
                                                                            $statusMessage = $templateResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($templateResult as $templates) {
                                                                                $createdBy = $templates->CreatedBy;
                                                                                $createdDate = $templates->CreatedDate;
                                                                                $modifiedBy = $templates->ModifiedBy;
                                                                                $modifiedDate = $templates->ModifiedDate;
                                                                                $templateCategoryID = $templates->TemplateCategoryID;
                                                                                $templateDescription = $templates->TemplateDescription;
                                                                                $templateID = $templates->TemplateID;
                                                                                $templateName = $templates->TemplateName;
                                                                                $status = $templates->Status;
                                                                                $statusMessage = $templates->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get template HTML content

Get the HTML content of a template based on templateID.

Call details

Call ID
TemplateFetchHTMLContent
Call
                                                            
                                                                  // C#
                                                                  TemplateContentResult = TemplateFetchHTMLContent(string tokenID, string templateID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $templateContent = $APIFunctionsObj->TemplateFetchHTMLContent($Token, $TemplateID);
                                                            
                                                      
Returns
TemplateContentResult object with details
Request parameters
                                                            
                                                                  string tokenID 
                                                                  string templateID
                                                            
                                                      
Return parameters
                                                            
                                                                  string HtmlContent
                                                                  string TemplateID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        TemplateContentResult templateContent = cmpClient.TemplateFetchHTMLContent(tokenID, "12");

                                                                        if (templateContentResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = templateContent.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              string htmlContent = templateContent.HtmlContent.ToString();
                                                                              string templateId = templateContent.TemplateID.ToString();
                                                                              string status = templateContent.Status.ToString();
                                                                              string statusMessage = templateContent.StatusMessage.ToString(); 
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $TemplateID = "31014";

                                                                        $templateContent = $APIFunctionsObj->TemplateFetchHTMLContent($Token, $TemplateID);

                                                                        if ($templateContent->Status == "-1") {
                                                                            $statusMessage = $templateContent->StatusMessage;
                                                                        } else {
                                                                            $htmlContent = $templateContent->HtmlContent;
                                                                            $templateId = $templateContent->TemplateID;
                                                                            $status = $templateContent->Status;
                                                                            $statusMessage = $templateContent->StatusMessage;
                                                                        }
                                                                  
                                                            

Get template Text content

Get the Text content of a template based on templateID.

Call details

Call ID
TemplateFetchTextContent
Call
                                                            
                                                                  // C#
                                                                  TemplateContentResult = TemplateFetchTextContent(string tokenID, string templateID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $templateContent = $APIFunctionsObj->TemplateFetchTextContent($Token, $TemplateID);
                                                            
                                                      
Returns
TemplateContentResult object with detail
Request parameters
                                                            
                                                                  string tokenID
                                                                  string templateID
                                                            
                                                      
Return parameters
                                                            
                                                                  string TextContent
                                                                  string TemplateID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        TemplateContentResult templateContent = cmpClient.TemplateFetchTextContent(tokenID, "12");

                                                                        if (templateContent.Status == "-1")
                                                                        {
                                                                              string statusMessage = templateContent.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                               string textContent = templateContent.TextContent.ToString();
                                                                               string templateId = templateContent.TemplateID.ToString();
                                                                               string status = templateContent.Status.ToString();
                                                                               string statusMessage = templateContent.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $TemplateID = "31014";

                                                                        $templateContent = $APIFunctionsObj->TemplateFetchTextContent($Token, $TemplateID);

                                                                        if ($templateContent->Status == "-1") {
                                                                            $statusMessage = $templateContent->StatusMessage;
                                                                        } else {
                                                                            $htmlContent = $templateContent->TextContent;
                                                                            $templateId = $templateContent->TemplateID;
                                                                            $status = $templateContent->Status;
                                                                            $statusMessage = $templateContent->StatusMessage;
                                                                        }
                                                                  
                                                            

Get template categories

Get all the template categories currently stored in your CMAdvantage account.

Call details

Call ID
TemplateCategoryListFetch
Call
                                                            
                                                                  // C#
                                                                  TemplateCategoryResult[] templateCategoryResult = List < TemplateCategoryResult > TemplateCategoryListFetch(string tokenID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $templateCategoryResult = $APIFunctionsObj->TemplateCategoryListFetch($Token);
                                                            
                                                      
Returns
TemplateCategoryResult array with details
Request parameters
                                                            
                                                                  string tokenID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate
                                                                  string ModifiedDate
                                                                  string TemplateCategoryDesc
                                                                  string TemplateCategoryID
                                                                  string TemplateCategoryName
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        TemplateCategoryResult[] templateCategoryResult = cmpClient.TemplateCategoryListFetch(tokenID);

                                                                        if (templateCategoryResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = templateCategoryResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < templateCategoryResult.Length; i++)
                                                                              {
                                                                                    string createdDate = templateCategoryResult[i].CreatedDate.ToString();
                                                                                    string modifiedDate = templateCategoryResult[i].ModifiedDate.ToString();
                                                                                    string templateCategoryDescription = templateCategoryResult[i].TemplateCategoryDesc.ToString();
                                                                                    string templateCategoryID = templateCategoryResult[i].TemplateCategoryID.ToString();
                                                                                    string templateCategoryName = templateCategoryResult[i].TemplateCategoryName.ToString();
                                                                                    string status = templateCategoryResult[i].Status.ToString();
                                                                                    string statusMessage = templateCategoryResult[i].StatusMessage.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $templateCategoryResult = $APIFunctionsObj->TemplateCategoryListFetch($Token);

                                                                        if ($templateCategoryResult->Status == "-1") {
                                                                            $statusMessage = $templateCategoryResult->StatusMessage;
                                                                        } else {
                                                                            $createdDate = $templateCategoryResult->CreatedDate;
                                                                            $modifiedDate = $templateCategoryResult->ModifiedDate;
                                                                            $templateCategoryID = $templateCategoryResult->TemplateCategoryID;
                                                                            $templateCategoryName = $templateCategoryResult->TemplateCategoryName;
                                                                            $templateCategoryDescription = $templateCategoryResult->TemplateCategoryDesc;
                                                                            $status = $templateCategoryResult->Status;
                                                                            $statusMessage = $templateCategoryResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Create template

Create a new template in your account.

Call details

Call ID
TemplateCreate
Call
                                                            
                                                                  // C#
                                                                  TemplateResult = TemplateCreate(string tokenID, TemplateObject _tmpObj);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $templateResult = $APIFunctionsObj->TemplateCreate($Token, $Template);
                                                            
                                                      
Returns
TemplateResult object with TemplateID, TemplateName, TemplateDesciption, CreateDate and modifiedDate
Request parameters
                                                            
                                                                  string tokenID
                                                                  string templateCategoryID
                                                                  string templateCategoryName
                                                                  string templateCategoryDesc
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate
                                                                  string ModifiedDate
                                                                  string TemplateDesc
                                                                  string TemplateID
                                                                  string TemplateName
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        TemplateResult templateResult = cmpClient.TemplateCreate(tokenID, templateObject);

                                                                        TemplateObject templateObject = new TemplateObject();

                                                                        templateObject.TemplateCategoryID = "123456";
                                                                        templateObject.TemplateName = "Template Name";
                                                                        templateObject.TemplateDescription = "Template Description";
                                                                                                
                                                                        TemplateResult templateResult = cmpClient.TemplateCreate(token, templateObject);

                                                                        if (templateResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = templateResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              string createdDate = templateResult.CreatedDate.ToString();
                                                                              string modifiedDate = templateResult.ModifiedDate.ToString();
                                                                              string templateCategoryID = templateResult.TemplateCategoryID.ToString();
                                                                              string templateDescription = templateResult.TemplateDescription.ToString();
                                                                              string templateName = templateResult.TemplateName.ToString();
                                                                              string status = templateResult.Status.ToString();
                                                                              string statusMessage = templateResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $Template = (object) array(
                                                                        'TemplateName' => "Template Name",
                                                                        'TemplateDescription' => "Template Description",
                                                                        'TemplateCategoryID' => "1261"
                                                                    );

                                                                    $templateResult = $APIFunctionsObj->TemplateCreate($Token, $Template);

                                                                    if ($templateResult->Status == "-1") {
                                                                        $statusMessage = $templateResult->StatusMessage;
                                                                    } else {
                                                                        $createdDate = $templateResult->CreatedDate;
                                                                        $modifiedDate = $templateResult->ModifiedDate;
                                                                        $templateCategoryID = $templateResult->TemplateCategoryID;
                                                                        $templateCategoryName = $templateResult->TemplateCategoryName;
                                                                        $templateCategoryDescription = $templateResult->TemplateCategoryDesc;
                                                                        $status = $templateResult->Status;
                                                                        $statusMessage = $templateResult->StatusMessage;
                                                                    }
                                                                  
                                                            

Create template category

Create a template category inyour account.

Call details

Call ID
TemplateCategoryCreate
Call
                                                            
                                                                  // C#
                                                                  TemplateCategoryResult = TemplateCategoryCreate(string tokenID, string templateCategoryName, string templateCategoryDesc);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $templateCategoryResult = $APIFunctionsObj->TemplateCategoryCreate($Token, "Template Category Name", "Template Category Description");
                                                            
                                                      
Returns
TemplateCategoryResult object with status message
Request parameters
                                                            
                                                                  string tokenID
                                                                  string templateCategoryName
                                                                  string templateCategoryDesc
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedDate
                                                                  string ModifiedDate
                                                                  string TemplateCategoryDesc
                                                                  string TemplateCategoryID
                                                                  string TemplateCategoryName
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        TemplateCategoryResult templateCategoryResult = cmpClient.TemplateCategoryCreate(tokenID, "Template Category Name", "Template Category Description");


                                                                        if (templateCategoryResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = templateCategoryResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              string createdDate = templateCategoryResult.CreatedDate.ToString();
                                                                              string modifiedDate = templateCategoryResult.ModifiedDate.ToString();
                                                                              string returnedTemplateCategoryDescription = templateCategoryResult.TemplateCategoryDesc.ToString();
                                                                              string templateCategoryID = templateCategoryResult.TemplateCategoryID.ToString();
                                                                              string returnedTemplateCategoryName = templateCategoryResult.TemplateCategoryName.ToString();
                                                                              string status = templateCategoryResult.Status.ToString();
                                                                              string statusMessage = templateCategoryResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $templateCategoryResult = $APIFunctionsObj->TemplateCategoryCreate($Token, "Template Category Name", "Template Category Description");

                                                                        if ($templateCategoryResult->Status == "-1") {
                                                                            $statusMessage = $templateCategoryResult->StatusMessage;
                                                                        } else {
                                                                            $createdDate = $templateCategoryResult->CreatedDate;
                                                                            $modifiedDate = $templateCategoryResult->ModifiedDate;
                                                                            $templateCategoryID = $templateCategoryResult->TemplateCategoryID;
                                                                            $templateCategoryName = $templateCategoryResult->TemplateCategoryName;
                                                                            $templateCategoryDescription = $templateCategoryResult->TemplateCategoryDesc;
                                                                            $status = $templateCategoryResult->Status;
                                                                            $statusMessage = $templateCategoryResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Add template HTML content

Add HTML content to a template based on templateID.

Call details

Call ID
TemplateAddHTMLContent
Call
                                                            
                                                                  // C#
                                                                  MessageResult = TemplateAddHTMLContent(string tokenID, string templateID, string html);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $messageResult = $APIFunctionsObj->TemplateAddHTMLContent($Token, $TemplateID, $HTML);
                                                            
                                                      
Returns
MessageResult object with status
Request parameters
                                                            
                                                                  string tokenID
                                                                  string templateID
                                                                  string html
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        string html = System.IO.File.ReadAllText("sampleHTML.html");       //Load HTML from file

                                                                        MessageResult messageResult = cmpClient.TemplateAddHTMLContent(tokenID, "12345", html);

                                                                        if (messageResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                               // Do something 
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $TemplateID = "31032";
                                                                        $HTML = "
"; $messageResult = $APIFunctionsObj->TemplateAddHTMLContent($Token, $TemplateID, $HTML); if ($messageResult->Status == "-1") { $statusMessage = $messageResult->StatusMessage; } else { $status = $messageResult->Status; $statusMessage = $messageResult->StatusMessage; }

Add template Text content

Add Text content to a template based on templateID.

Call details

Call ID
TemplateAddTextContent
Call
                                                            
                                                                  // C#
                                                                  MessageResult = TemplateAddTextContent(string tokenID, string templateID, string textContent);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $messageResult = $APIFunctionsObj->TemplateAddTextContent($Token, $TemplateID, $Text);
                                                            
                                                      
Returns
MessageResult object with status
Request parameters
                                                            
                                                                  string okenID
                                                                  string templateID
                                                                  string textContent
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        string textContent = "This is a sample text content"; // You could also load text from a text file

                                                                        MessageResult messageResult = cmpClient.TemplateAddTextContent(tokenID, "12345", textContent);

                                                                        if (messageResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                               // Do something 
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $TemplateID = "31032";
                                                                        $Text = "API Test";

                                                                        $messageResult = $APIFunctionsObj->TemplateAddTextContent($Token, $TemplateID, $Text);

                                                                        if ($messageResult->Status == "-1") {
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        } else {
                                                                            $status = $messageResult->Status;
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Edit template

Edit the name and description of a template based on templateID.

Call details

Call ID
TemplateEdit
Call
                                                            
                                                                  // C#
                                                                  TemplateResult = TemplateEdit(string tokenID, TemplateObject _tmpObj, string templateID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $templateResult = $APIFunctionsObj->TemplateEdit($Token, $Template, $TemplateID);
                                                            
                                                      
Returns
TemplateResult object with status
Request parameters
                                                            
                                                                  string TemplateCategoryID
                                                                  string TemplateDescription
                                                                  string TemplateName
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreatedBy
                                                                  string CreatedDate
                                                                  string ModifiedBy
                                                                  string ModifiedDate
                                                                  string TemplateCategoryID
                                                                  string TemplateDescription
                                                                  string TemplateID
                                                                  string TemplateName
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        TemplateObject templateObject = new TemplateObject();

                                                                        templateObject.TemplateName = "New Template Name";
                                                                        templateObject.TemplateDescription = "New Template Description";
                                                                        templateObject.TemplateCategoryID = "1234";

                                                                        TemplateResult templateResult = cmpClient.TemplateEdit(tokenID, templateObject, "1");

                                                                        if (templateResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = templateResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        { 
                                                                              // Do something
                                                                              string createdBy = templateResult.CreatedBy.ToString();
                                                                              string createdDate = templateResult.CreatedDate.ToString();
                                                                              string modifiedBy = templateResult.ModifiedBy.ToString();
                                                                              string modifiedDate = templateResult.ModifiedDate.ToString();
                                                                              string templateCategoryID = templateResult.TemplateCategoryID.ToString();
                                                                              string templateDescription = templateResult.TemplateDescription.ToString();
                                                                              string templateName = templateResult.TemplateName.ToString();
                                                                              string status = templateResult.Status.ToString();
                                                                              string statusMessage = templateResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $Template = (object) array(
                                                                        'TemplateName' => "New Template Name",
                                                                        'TemplateDescription' => "New Template Description",
                                                                        'TemplateCategoryID' => "1261"
                                                                    );

                                                                    $TemplateID = "31032";

                                                                    $templateResult = $APIFunctionsObj->TemplateEdit($Token, $Template, $TemplateID);

                                                                    if ($templateResult->Status == "-1") {
                                                                        $statusMessage = $templateResult->StatusMessage;
                                                                    } else {
                                                                        $createdBy = $templateResult->CreatedBy;
                                                                        $createdDate = $templateResult->CreatedDate;
                                                                        $modifiedBy = $templateResult->ModifiedBy;
                                                                        $modifiedDate = $templateResult->ModifiedDate;
                                                                        $templateCategoryID = $templateResult->TemplateCategoryID;
                                                                        $templateDescription = $templateResult->TemplateDescription;
                                                                        $templateName = $templateResult->TemplateName;
                                                                        $status = $templateResult->Status;
                                                                        $statusMessage = $templateResult->StatusMessage;
                                                                    }
                                                                  
                                                            

Delete template

Delete a template based on templateID.

Call details

Call ID
TemplateDelete
Call
                                                            
                                                                  // C#
                                                                  MessageResult = TemplateDelete(string tokenID, string templateID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $messageResult = $APIFunctionsObj->TemplateDelete($Token, $TemplateID);
                                                            
                                                      
Returns
MessageResult object with status
Request parameters
                                                            
                                                                  string tokenID
                                                                  string templateID
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult messageResult = cmpClient.TemplateDelete(tokenID, "12");

                                                                        if (messageResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $TemplateID = "31032";

                                                                        $messageResult = $APIFunctionsObj->TemplateDelete($Token, $TemplateID);

                                                                        if ($messageResult->Status == "-1") {
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        } else {
                                                                            $status = $messageResult->Status;
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Delete template category

Delete a template category based on the templateCategoryID.

Call details

Call ID
TemplateCategoryDelete
Call
                                                            
                                                                  // C#
                                                                  MessageResult = TemplateCategoryDelete(string tokenID, string templateCategoryID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $templateResult = $APIFunctionsObj->TemplateCategoryDelete($Token, $TemplateCategoryID);
                                                            
                                                      
Returns
MessageResult object with success or failed message
Request parameters
                                                            
                                                                  string tokenID
                                                                  string templateCategoryID
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult templateResult = cmpClient.TemplateCategoryDelete(tokenID, "12");

                                                                        if (templateResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $TemplateCategoryID = "1261";

                                                                        $templateResult = $APIFunctionsObj->TemplateCategoryDelete($Token, $TemplateCategoryID);

                                                                        if ($templateResult->Status == "-1") {
                                                                            $statusMessage = $templateResult->StatusMessage;
                                                                        } else {
                                                                            $status = $templateResult->Status;
                                                                            $statusMessage = $templateResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Generate template editor link

Generate a hyperlink to open the template editor based on templateID.

Call details

Call ID
TemplateEditorLinkCreate
Call
                                                            
                                                                  // C#
                                                                  TemplateEditorLinkCreate(TokenID, CampaignID, HostedDomainName, IsEnableSSL);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $templateEditorLink = $APIFunctionsObj->TemplateEditorLinkCreate($Token, $TemplateID, $HostedDomainName, true);
                                                            
                                                      
Returns
TemplateEditorLinkCreateResult object with status
Request parameters
                                                            
                                                                  string tokenID
                                                                  string TemplateID
                                                                  string HostedDomainName
                                                                  boolean IsEnableSSL
                                                            
                                                      
Return parameters
                                                            
                                                                  string TemplateEditorLinkCreateResult
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        string templateEditorLink = cmpClient.TemplateEditorLinkCreate(tokenID, TemplateID, HostedDomainName, true);

                                                                        // Do something
                                                                  
                                                            
                                                                  
                                                                        $TemplateID = "31030";

                                                                        $HostedDomainName = "development.cmadvantage.co.uk";

                                                                        $templateEditorLink = $APIFunctionsObj->TemplateEditorLinkCreate($Token, $TemplateID, $HostedDomainName, true);
                                                                  
                                                            

Campaigns

The following section includes API calls which govern campaigns stored in your CMAdvantage account:


Get campaign

Get a campaign with activity (Total Open,Total Clicks, Total Complaints etc).

Call details

Call ID
CampaignFetchByID
Call
                                                            
                                                                  // PHP
                                                                  $campaignResult = $APIFunctionsObj->CampaignFetchByID($Token, $CampaignID);
                                                            
                                                      
                                                            
                                                                  // C#
                                                                  CampaignDetailsResult = CampaignFetchByID(string tokenID, string campaignID);
                                                            
                                                      
Returns
CampaignDetailsResult object with campaign details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CampaignDescription 
                                                                  string CampaignID
                                                                  string CampaignName
                                                                  string FromAddress
                                                                  string FromName
                                                                  string ModifiedDate
                                                                  string MultiListMasterID
                                                                  string RedirectEmail
                                                                  string Subject
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignDetailsResult campaignResult = cmpClient.CampaignFetchByID(tokenID, "12345");

                                                                        if (campaignResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string campaignDescription = campaignResult.CampaignDescription.ToString();
                                                                              string returnedCampaignID = campaignResult.CampaignID.ToString();
                                                                              string campaignName = campaignResult.CampaignName.ToString();
                                                                              string fromAddress = campaignResult.FromAddress.ToString();
                                                                              string fromName = campaignResult.FromName.ToString();
                                                                              string modifiedDate = campaignResult.ModifiedDate.ToString();
                                                                              string multiListMasterID = campaignResult.MultiListMasterID.ToString();
                                                                              string redirectEmail = campaignResult.RedirectEmail.ToString();
                                                                              string subject = campaignResult.Subject.ToString();
                                                                              string status = campaignResult.Status.ToString();
                                                                              string statusMessage = campaignResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $CampaignID = "144368";

                                                                        $campaignResult = $APIFunctionsObj->CampaignFetchByID($Token, $CampaignID);

                                                                        if ($campaignResult->Status == "-1") {
                                                                            $statusMessage = $campaignResult->StatusMessage;
                                                                        } else {
                                                                            $campaignDescription  = $campaignResult->CampaignDescription;
                                                                            $returnedCampaignID  = $campaignResult->CampaignID;
                                                                            $campaignName = $campaignResult->CampaignName;
                                                                            $fromAddress = $campaignResult->FromAddress;
                                                                            $fromName = $campaignResult->FromName;
                                                                            $modifiedDate = $campaignResult->ModifiedDate;
                                                                            $multiListMasterID = $campaignResult->MultiListMasterID;
                                                                            $redirectEmail = $campaignResult->RedirectEmail;
                                                                            $subject = $campaignResult->Subject;
                                                                            $status = $campaignResult->Status;
                                                                            $statusMessage = $campaignResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Get campaign activity by date

Get campaign activity details for a given campaign within defined date range.

Call details

Call ID
CampaignActivityFetchByDate
Call
                                                            
                                                                  // PHP
                                                                  $campaignActivityResult = $APIFunctionsObj->CampaignActivityFetchByDate($Token, $FromDate, $ToDate);
                                                            
                                                      
                                                            
                                                                  // C#
                                                                  CampaignActivityResult[] campaignActivityResult = List < CampaignResult > CampaignActivityFetchByDate(token, fromDate, toDate);
                                                            
                                                      
Returns
CampaignActivityResult array with results
Request parameters
                                                            
                                                                  string      tokenID
                                                                  string      fromDate
                                                                  string      toDate
                                                            
                                                      
Return parameters
                                                            
                                                                  string BouncesTotal
                                                                  string CTUniqueTotal
                                                                  string CampaignDescription
                                                                  string CampaignID
                                                                  string CampaignName
                                                                  string ClickthroughTotal
                                                                  string ComplaintsTotal
                                                                  string ConfirmedViewsTotal
                                                                  string ForwardsTotal
                                                                  string ForwardsUnique
                                                                  string NoRecordActivityTotal
                                                                  string OpensTotal
                                                                  string OpensUniqueTotal
                                                                  string ParentID
                                                                  string SentDate
                                                                  string UnsubscribesTotal
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        string fromDate = "2017-01-01";
                                                                        string toDate = "2018-01-01";

                                                                        CampaignActivityResult[] campaignActivityResult = cmpClient. CampaignActivityFetchByDate(token, fromDate, toDate);

                                                                        if (campaignActivityResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignActivityResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < campaignActivityResult.Length; i++)
                                                                              {
                                                                                    string bouncesTotal = campaignActivityResult[i].BouncesTotal.ToString();
                                                                                    string cTUniqueTotal = campaignActivityResult[i].CTUniqueTotal.ToString();
                                                                                    string campaignDescription = campaignActivityResult[i].CampaignDescription.ToString();
                                                                                    string campaignID = campaignActivityResult[i].CampaignID.ToString();
                                                                                    string campaignName = campaignActivityResult[i].CampaignName.ToString();
                                                                                    string clickthroughTotal = campaignActivityResult[i].ClickthroughTotal.ToString();
                                                                                    string complaintsTotal = campaignActivityResult[i].ComplaintsTotal.ToString();
                                                                                    string confirmedViewsTotal = campaignActivityResult[i].ConfirmedViewsTotal.ToString();
                                                                                    string forwardsTotal = campaignActivityResult[i].ForwardsTotal.ToString();
                                                                                    string forwardsUnique = campaignActivityResult[i].ForwardsUnique.ToString();
                                                                                    string noRecordActivityTotal = campaignActivityResult[i].NoRecordActivityTotal.ToString();
                                                                                    string opensTotal = campaignActivityResult[i].OpensTotal.ToString();
                                                                                    string opensUniqueTotal = campaignActivityResult[i].OpensUniqueTotal.ToString();
                                                                                    string parentID = campaignActivityResult[i].ParentID.ToString();
                                                                                    string sentDate = campaignActivityResult[i].SentDate.ToString();
                                                                                    string unsubscribesTotal = campaignActivityResult[i].UnsubscribesTotal.ToString();
                                                                                    string status = campaignActivityResult[i].Status.ToString();
                                                                                    string statusMessage = campaignActivityResult[i].StatusMessage.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $FromDate = "2017-01-01";
                                                                        $ToDate = "2018-01-01";

                                                                        $campaignActivityResult = $APIFunctionsObj->CampaignActivityFetchByDate($Token, $FromDate, $ToDate);

                                                                        if (is_object($campaignActivityResult)) {
                                                                            $campaignActivityResult = array($campaignActivityResult);
                                                                        }

                                                                        if ($campaignActivityResult[0]->Status == "-1") {
                                                                            $statusMessage = $campaignActivityResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($campaignActivityResult as $campaigns) {
                                                                                $bouncesTotal = $campaigns->BouncesTotal;
                                                                                $cTUniqueTotal = $campaigns->CTUniqueTotal;
                                                                                $campaignDescription = $campaigns->CampaignDescription;
                                                                                $campaignID = $campaigns->CampaignID;
                                                                                $campaignName = $campaigns->CampaignName;
                                                                                $clickthroughTotal = $campaigns->ClickthroughTotal;
                                                                                $complaintsTotal = $campaigns->ComplaintsTotal;
                                                                                $confirmedViewsTotal = $campaigns->ConfirmedViewsTotal;
                                                                                $forwardsTotal = $campaigns->ForwardsTotal;
                                                                                $forwardsUnique = $campaigns->ForwardsUnique;
                                                                                $noRecordActivityTotal = $campaigns->NoRecordActivityTotal;
                                                                                $opensTotal = $campaigns->OpensTotal;
                                                                                $opensUniqueTotal = $campaigns->OpensUniqueTotal;
                                                                                $parentID = $campaigns->ParentID;
                                                                                $sentDate = $campaigns->SentDate;
                                                                                $unsubscribesTotal = $campaigns->UnsubscribesTotal;
                                                                                $status = $campaigns->Status;
                                                                                $statusMessage = $campaigns->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get domains

Get a list of domains used by the user.

Call details

Call ID
DomainListFetch
Call
                                                            
                                                                  // PHP
                                                                  $redirectEmailResult = $APIFunctionsObj->RedirectEmailAddressList($Token);
                                                            
                                                      
                                                            
                                                                  // C#
                                                                  DomainResult[] domainResult = List < DomainResult > DomainListFetch(string tokenID);
                                                            
                                                      
Returns
DomainResult object array with domain details
Request parameters
                                                            
                                                                  string tokenID
                                                            
                                                      
Return parameters
                                                            
                                                                  string DomainName 
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        DomainResult[] domainResult = cmpClient.DomainListFetch(tokenID);

                                                                        if (domainResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = domainResult[0].StatusMessage;.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < domainResult.Length; i++)
                                                                              {
                                                                                    // Do something
                                                                                    string domainName = domainResult[i].DomainName.ToString();
                                                                                    string status = domainResult[i].Status.ToString();
                                                                                    string statusMessage = domainResult[i].StatusMessage.ToString();  
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $redirectEmailResult = $APIFunctionsObj->RedirectEmailAddressList($Token);

                                                                        if (is_object($redirectEmailResult)) {
                                                                            $redirectEmailResult = array($redirectEmailResult);
                                                                        }

                                                                        if ($redirectEmailResult[0]->Status == "-1") {
                                                                            $statusMessage = $redirectEmailResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($redirectEmailResult as $redirects) {
                                                                                $createDate = $redirects->CreatedDate;
                                                                                $domainName = $redirects->DomainName;
                                                                                $fromAddress = $redirects->FromAddress;
                                                                                $redirectEmailAddress = $redirects->RedirectEmailAddress;
                                                                                $redirectEmailID = $redirects->RedirectEmailID;
                                                                                $status = $redirects->Status;
                                                                                $statusMessage = $redirects->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get redirect email

Get the redirect email address for a given campaign.

Call details

Call ID
RedirectEmailAddressList
Call
                                                            
                                                                  // PHP
                                                                  $redirectEmailResult = $APIFunctionsObj->RedirectEmailAddressList($Token);
                                                            
                                                      
                                                            
                                                                  // C#
                                                                  RedirectEmailResult[] redirectEmailResult = List < RedirectEmailResult > RedirectEmailAddressList(string tokenID);
                                                            
                                                      
Returns
RedirectEmailResult array with details
Request parameters
                                                            
                                                                  string tokenID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreateDate 
                                                                  string DomainName
                                                                  string FromAddress
                                                                  string RedirectEmailAddress
                                                                  string RedirectEmailID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        RedirectEmailResult[] redirectEmailResult = cmpClient.RedirectEmailAddressList(tokenID);

                                                                        if (redirectEmailResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = redirectEmailResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < redirectEmailResult.Length; i++)
                                                                              {
                                                                                    // Do something
                                                                                    string createDate = redirectEmailResult[i].CreatedDate.ToString();
                                                                                    string domainName = redirectEmailResult[i].DomainName.ToString();
                                                                                    string fromAddress = redirectEmailResult[i].FromAddress.ToString();
                                                                                    string redirectEmailAddress = redirectEmailResult[i].RedirectEmailAddress.ToString();
                                                                                    string redirectEmailID = redirectEmailResult[i].RedirectEmailID.ToString();
                                                                                    string status = redirectEmailResult[i].Status.ToString();
                                                                                    string statusMessage = redirectEmailResult[i].StatusMessage.ToString(); }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $redirectEmailResult = $APIFunctionsObj->RedirectEmailAddressList($Token);

                                                                        if (is_object($redirectEmailResult)) {
                                                                            $redirectEmailResult = array($redirectEmailResult);
                                                                        }

                                                                        if ($redirectEmailResult[0]->Status == "-1") {
                                                                            $statusMessage = $redirectEmailResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($redirectEmailResult as $redirects) {
                                                                                $createDate = $redirects->CreatedDate;
                                                                                $domainName = $redirects->DomainName;
                                                                                $fromAddress = $redirects->FromAddress;
                                                                                $redirectEmailAddress = $redirects->RedirectEmailAddress;
                                                                                $redirectEmailID = $redirects->RedirectEmailID;
                                                                                $status = $redirects->Status;
                                                                                $statusMessage = $redirects->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get campaign HTML content

Get the HTML content of a campaign based on campaignID.

Call details

Call ID
CampaignFetchHTMLContent
Call
                                                            
                                                                  // PHP
                                                                  $CampaignContent = $APIFunctionsObj->CampaignFetchHTMLContent($Token, $CampaignID);
                                                            
                                                      
                                                            
                                                                  // C#
                                                                  CampaignContentResult = CampaignFetchHTMLContent(string tokenID, string campaignID);
                                                            
                                                      
Returns
CampaignContentResult object with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CampaignID 
                                                                  string HtmlContent
                                                                  string TextContent
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignContentResult campaignContentResult = cmpClient.CampaignFetchHTMLContent(tokenID, "12345");

                                                                        if (campaignContentResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignContentResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string htmlContent = campaignContentResult.HtmlContent.ToString();
                                                                              string returnedCampaignId = campaignContentResult.CampaignID.ToString();
                                                                              string status = campaignContentResult.Status.ToString();
                                                                              string statusMessage = campaignContentResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $CampaignID = "144368";

                                                                        $CampaignContent = $APIFunctionsObj->CampaignFetchHTMLContent($Token, $CampaignID);

                                                                        if ($CampaignContent->Status == "-1") {
                                                                            $statusMessage = $CampaignContent->StatusMessage;
                                                                        } else {
                                                                            $htmlContent = $CampaignContent->HtmlContent;
                                                                            $templateId = $CampaignContent->CampaignID;
                                                                            $status = $CampaignContent->Status;
                                                                            $statusMessage = $CampaignContent->StatusMessage;
                                                                        }
                                                                  
                                                            

Get campaign Text content

Get the Text content for a given campaign based on campaignID.

Call details

Call ID
CampaignFetchTextContent
Call
                                                            
                                                                  // PHP
                                                                  $CampaignContent = $APIFunctionsObj->CampaignFetchTextContent($Token, $CampaignID);
                                                            
                                                      
                                                            
                                                                  // C#
                                                                  CampaignContentResult = CampaignFetchTextContent(string tokenID, string campaignID);
                                                            
                                                      
Returns
CampaignContentResult object with detail
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CampaignID 
                                                                  string HtmlContent
                                                                  string TextContent
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignContentResult campaignContentResult = cmpClient.CampaignFetchTextContent(tokenID, "12");

                                                                        if (campaignContentResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignContentResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string textContent = campaignContentResult.HtmlContent.ToString();
                                                                              string returnedCampaignId = campaignContentResult.CampaignID.ToString();
                                                                              string status = campaignContentResult.Status.ToString();
                                                                              string statusMessage = campaignContentResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $CampaignID = "144368";

                                                                        $CampaignContent = $APIFunctionsObj->CampaignFetchTextContent($Token, $CampaignID);

                                                                        if ($CampaignContent->Status == "-1") {
                                                                            $statusMessage = $CampaignContent->StatusMessage;
                                                                        } else {
                                                                            $htmlContent = $CampaignContent->TextContent;
                                                                            $templateId = $CampaignContent->CampaignID;
                                                                            $status = $CampaignContent->Status;
                                                                            $statusMessage = $CampaignContent->StatusMessage;
                                                                        }
                                                                  
                                                            

Get WIP campaigns

Get a list of all campaigns that are currently marked as 'work in progress'.

Call details

Call ID
CampaignWIPListFetch
Call
                                                            
                                                                  // C#
                                                                  CampaignResult[] campaignResult = List < CampaignResult > CampaignWIPListFetch(string tokenID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignResult = $APIFunctionsObj->CampaignWIPListFetch($Token);
                                                            
                                                      
Returns
CampaignResult object array with campaign details
Request parameters
                                                            
                                                                  string tokenID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CampaignDescription 
                                                                  string CampaignID
                                                                  string CampaignName
                                                                  string CreatedDate
                                                                  string ModifiedDate
                                                                  string TemplateID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignResult[] campaignResult = cmpClient.CampaignWIPListFetch(tokenID);

                                                                        if (campaignResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < campaignResult.Length; i++)
                                                                              {
                                                                                    // Do something
                                                                                    string campaignDescription = campaignResult[i].CampaignDescription.ToString();
                                                                                    string campaignID = campaignResult[i].CampaignID.ToString();
                                                                                    string campaignName = campaignResult[i].CampaignName.ToString();
                                                                                    string createdDate = campaignResult[i].CreatedDate.ToString();
                                                                                    string modifiedDate = campaignResult[i].ModifiedDate.ToString();
                                                                                    string templateId = campaignResult[i].TemplateID.ToString();
                                                                                    string status = campaignResult[i].Status.ToString();
                                                                                    string statusMessage = campaignResult[i].StatusMessage.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $campaignResult = $APIFunctionsObj->CampaignWIPListFetch($Token);

                                                                        if (is_object($campaignResult)) {
                                                                            $campaignResult = array($campaignResult);
                                                                        }

                                                                        if ($campaignResult[0]->Status == "-1") {
                                                                            $statusMessage = $campaignResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($campaignResult as $campaigns) {
                                                                                $campaignDescription = $campaigns->CampaignDescription;
                                                                                $campaignID = $campaigns->CampaignID;
                                                                                $campaignName = $campaigns->CampaignName;
                                                                                $createdDate = $campaigns->CreatedDate;
                                                                                $modifiedDate = $campaigns->ModifiedDate;
                                                                                $templateId = $campaigns->TemplateID;
                                                                                $status = $campaigns->Status;
                                                                                $statusMessage = $campaigns->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get sent campaigns

Get a list of all sent campaigns from a given account based on tokenID.

Call details

Call ID
CampaignSentListFetch
Call
                                                            
                                                                  // C#
                                                                  CampaignResult[] campaignResult = List < CampaignResult > CampaignSentListFetch(string tokenID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignResult = $APIFunctionsObj->CampaignSentListFetch($Token);
                                                            
                                                      
Returns
CampaignResult array with campaign details
Request parameters
                                                            
                                                                  string tokenID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CampaignDescription 
                                                                  string CampaignID
                                                                  string CampaignName
                                                                  string CreatedDate
                                                                  string ModifiedDate
                                                                  string TemplateID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignResult[] campaignResult = cmpClient.CampaignSentListFetch(obj.TokenID);

                                                                        if (campaignResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < campaignResult.Length; i++)
                                                                              {
                                                                                    //Do something
                                                                                    string campaignDescription = campaignResult[i].CampaignDescription.ToString();
                                                                                    string campaignID = campaignResult[i].CampaignID.ToString();
                                                                                    string campaignName = campaignResult[i].CampaignName.ToString();
                                                                                    string createdDate = campaignResult[i].CreatedDate.ToString();
                                                                                    string modifiedDate = campaignResult[i].ModifiedDate.ToString();
                                                                                    string templateID = campaignResult[i].TemplateID.ToString();
                                                                                    string status = campaignResult[i].Status.ToString();
                                                                                    string statusMessage = campaignResult[i].StatusMessage.ToString();      
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $campaignResult = $APIFunctionsObj->CampaignSentListFetch($Token);

                                                                        if (is_object($campaignResult)) {
                                                                            $campaignResult = array($campaignResult);
                                                                        }

                                                                        if ($campaignResult[0]->Status == "-1") {
                                                                            $statusMessage = $campaignResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($campaignResult as $campaigns) {
                                                                                $campaignDescription = $campaigns->CampaignDescription;
                                                                                $campaignID = $campaigns->CampaignID;
                                                                                $campaignName = $campaigns->CampaignName;
                                                                                $createdDate = $campaigns->CreatedDate;
                                                                                $modifiedDate = $campaigns->ModifiedDate;
                                                                                $templateId = $campaigns->TemplateID;
                                                                                $status = $campaigns->Status;
                                                                                $statusMessage = $campaigns->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get sent campaigns by date

Get a list of campaigns sent between the specified date range.

Call details

Call ID
CampaignsSentByDate
Call
                                                            
                                                                  // C#
                                                                  CampaignsSentByDate(TokenID, FromDate, ToDate)
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignResult = $APIFunctionsObj->CampaignsSentByDate($Token, $FromDate, $ToDate);
                                                            
                                                      
Returns
CampaignsSentByDateResult array with campaign details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string fromDate
                                                                  string toDate
                                                            
                                                      
Return parameters
                                                            
                                                                  string CampaignDescription 
                                                                  string CampaignID
                                                                  string CampaignName
                                                                  string SentDate
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        CampaignsSentByDateResult[] result = cmpClient.CampaignsSentByDate(token, fromDate, toDate);

                                                                        for (int i = 0; i < result.Length; i++)
                                                                        {
                                                                              string campaignID = result[i].CampaignID.ToString();
                                                                              string campaignName = result[i].CampaignName.ToString();
                                                                              string campaignDescription = result[i].CampaignDescription.ToString();
                                                                              string campaignSentDate = result[i].SentDate.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $FromDate = "2017-01-01";
                                                                        $ToDate = "2018-01-01";

                                                                        $campaignResult = $APIFunctionsObj->CampaignsSentByDate($Token, $FromDate, $ToDate);

                                                                        if (is_object($campaignResult)) {
                                                                            $campaignResult = array($campaignResult);
                                                                        }

                                                                        if ($campaignResult[0]->Status == "-1") {
                                                                            $statusMessage = $campaignResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($campaignResult as $campaigns) {
                                                                                $campaignDescription = $campaigns->CampaignDescription;
                                                                                $campaignID = $campaigns->CampaignID;
                                                                                $campaignName = $campaigns->CampaignName;
                                                                                $SentDate = $campaigns->SentDate;
                                                                                $status = $campaigns->Status;
                                                                                $statusMessage = $campaigns->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get scheduled campaign

Get a list of all scheduled campaigns from a given account based on tokenID.

Call details

Call ID
CampaignSceduledListFetch
Call
                                                            
                                                                  // C#
                                                                  CampaignScheduleResult[] campaignScheduleResult = List < CampaignScheduleResult > CampaignSceduledListFetch(string tokenID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignResult = $APIFunctionsObj->CampaignSceduledListFetch($Token);
                                                            
                                                      
Returns
CampaignScheduleResult object array with campaign details
Request parameters
                                                            
                                                                  string tokenID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CampaignDescription 
                                                                  string CampaignID
                                                                  string CampaignName
                                                                  string CreatedDate
                                                                  string ModifiedDate
                                                                  string ScheduleDateTime
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignScheduleResult[] campaignScheduleResult = cmpClient.CampaignSceduledListFetch(obj.TokenID);

                                                                        if (campaignScheduleResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < campaignScheduleResult.Length; i++)
                                                                              { 
                                                                                    // Do something
                                                                                    string campaignDescription = campaignResult[i].CampaignDescription.ToString();
                                                                                    string campaignID = campaignResult[i].CampaignID.ToString();
                                                                                    string campaignName = campaignResult[i].CampaignName.ToString();
                                                                                    string createdDate = campaignResult[i].CreatedDate.ToString();
                                                                                    string modifiedDate = campaignResult[i].ModifiedDate.ToString();
                                                                                    string templateID = campaignResult[i].TemplateID.ToString();
                                                                                    string status = campaignResult[i].Status.ToString();
                                                                                    string statusMessage = campaignResult[i].StatusMessage.ToString();      
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $campaignResult = $APIFunctionsObj->CampaignSceduledListFetch($Token);

                                                                        if (is_object($campaignResult)) {
                                                                            $campaignResult = array($campaignResult);
                                                                        }

                                                                        if ($campaignResult[0]->Status == "-1") {
                                                                            $statusMessage = $campaignResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($campaignResult as $campaigns) {
                                                                                $campaignDescription = $campaigns->CampaignDescription;
                                                                                $campaignID = $campaigns->CampaignID;
                                                                                $campaignName = $campaigns->CampaignName;
                                                                                $createdDate = $campaigns->CreatedDate;
                                                                                $modifiedDate = $campaigns->ModifiedDate;
                                                                                $ScheduleDateTime = $campaigns->ScheduleDateTime;
                                                                                $status = $campaigns->Status;
                                                                                $statusMessage = $campaigns->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Create campaign

Create a new campaign from an existing template.

Call details

Call ID
CampaignCreate
Call
                                                            
                                                                  // C#
                                                                  CampaignResult = CampaignCreate(string tokenID, string campaignName, string campaignDescription, string templateID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  
                                                            
                                                      
Returns
CampaignResult object with campaign details
Request parameters
                                                            
                                                                  string tokenID 
                                                                  string campaignName
                                                                  string campaignDescription
                                                                  string templateID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CampaignDescription 
                                                                  string CampaignID
                                                                  string CampaignName
                                                                  string CreatedDate
                                                                  string ModifiedDate
                                                                  string TemplateID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignResult campaignResult = cmpClient.CampaignCreate(tokenID, "Campaign Name", "Campaign Description", "12");

                                                                        if (campaignResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        { 
                                                                              // Do something
                                                                              string returnedCampaignDescription = campaignResult.CampaignDescription.ToString();
                                                                              string campaignId = campaignResult.CampaignID.ToString();
                                                                              string returnedCampaignName = campaignResult.CampaignName.ToString();
                                                                              string createdDate = campaignResult.CreatedDate.ToString();
                                                                              string modifiedDate = campaignResult.ModifiedDate.ToString();
                                                                              string templateId = campaignResult.TemplateID.ToString();
                                                                              string status = campaignResult.Status.ToString();
                                                                              string statusMessage = campaignResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $campaignResult = $APIFunctionsObj->CampaignCreate($Token, "Campaign Name", "Campaign Description", "12");

                                                                        if ($campaignResult->Status == "-1") {
                                                                            $statusMessage = $campaignResult->StatusMessage;
                                                                        } else {
                                                                                $campaignDescription = $campaignResult->CampaignDescription;
                                                                                $campaignID = $campaignResult->CampaignID;
                                                                                $campaignName = $campaignResult->CampaignName;
                                                                                $createdDate = $campaignResult->CreatedDate;
                                                                                $modifiedDate = $campaignResult->ModifiedDate;
                                                                                $templateID = $campaignResult->TemplateID;
                                                                                $status = $campaignResult->Status;
                                                                                $statusMessage = $campaignResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Edit campaign

Edit the campaign details including from name, subject line, from address, and redirect email address.

Call details

Call ID
CampaignEdit
Call
                                                            
                                                                  // C#
                                                                  CampaignResult = CampaignEdit(string tokenID, string campaignID, string fromName, string subjectLine, string fromAddress, string redirectEmailAddress);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignResult = $APIFunctionsObj->CampaignEdit($Token, "11", "From Name", "Subject Line", "from@example.com", "redirect@example.com");
                                                            
                                                      
Returns
CampaignResult object with campaign details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                                  string fromName
                                                                  string subjectLine
                                                                  string fromAddress
                                                                  string redirectEmailAddress
                                                            
                                                      
Return parameters
                                                            
                                                                  string CampaignDescription 
                                                                  string CampaignID
                                                                  string CampaignName
                                                                  string CreatedDate
                                                                  string ModifiedDate
                                                                  string TemplateID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignResult campaignResult = cmpClient.CampaignEdit(tokenID, "11", "From Name", "Subject Line", "from@example.com", "redirect@example.com");

                                                                        if (campaignResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string campaignDescription = campaignResult.CampaignDescription.ToString();
                                                                              string campaignID = campaignResult.CampaignID.ToString();
                                                                              string campaignName = campaignResult.CampaignName.ToString();
                                                                              string createdDate = campaignResult.CreatedDate.ToString();
                                                                              string modifiedDate = campaignResult.ModifiedDate.ToString();
                                                                              string tempalteID = campaignResult.TemplateID.ToString();
                                                                              string status = campaignResult.Status.ToString();
                                                                              string statusMessage = campaignResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $campaignResult = $APIFunctionsObj->CampaignEdit($Token, "11", "From Name", "Subject Line", "from@example.com", "redirect@example.com");

                                                                        if ($campaignResult->Status == "-1") {
                                                                            $statusMessage = $campaignResult->StatusMessage;
                                                                        } else {
                                                                            $campaignDescription = $campaignResult->CampaignDescription;
                                                                            $campaignID = $campaignResult->CampaignID;
                                                                            $campaignName = $campaignResult->CampaignName;
                                                                            $createdDate = $campaignResult->CreatedDate;
                                                                            $modifiedDate = $campaignResult->ModifiedDate;
                                                                            $templateID = $campaignResult->TemplateID;
                                                                            $status = $campaignResult->Status;
                                                                            $statusMessage = $campaignResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Delete WIP campaign

Delete a campaign that is currently marked as 'work in progress' based on campaignID.

Call details

Call ID
CampaignWIPDelete
Call
                                                            
                                                                  MessageResult = CampaignWIPDelete(string tokenID, string campaignID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignResult = $APIFunctionsObj->CampaignWIPDelete($Token, "1234");
                                                            
                                                      
Returns
MessageResult object with status
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult campaignResult = cmpClient.CampaignWIPDelete(tokenID, "1234");

                                                                        if (campaignResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $campaignResult = $APIFunctionsObj->CampaignWIPDelete($Token, "1234");

                                                                        if ($campaignResult->Status == "-1") {
                                                                            $statusMessage = $campaignResult->StatusMessage;
                                                                        } else {
                                                                                $status = $campaignResult->Status;
                                                                                $statusMessage = $campaignResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Add redirect email

Add a redirect email address to the CMAdvantage account.

Call details

Call ID
RedirectEmailAddressAdd
Call
                                                            
                                                                  // C#
                                                                  RedirectEmailResult = RedirectEmailAddressAdd(string tokenID, string redirectEmailAddress, string fromAddress, string domainName);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $redirectEmailResult = $APIFunctionsObj->RedirectEmailAddressAdd($Token, "redirect@example.com", "from@example.com", "example.com");
                                                            
                                                      
Returns
RedirectEmailResult object with message
Request parameters
                                                            
                                                                  string tokenID 
                                                                  string redirectEmailAddress
                                                                  string fromAddress
                                                                  string domainName
                                                            
                                                      
Return parameters
                                                            
                                                                  string DomainName
                                                                  string FromAddress
                                                                  string RedirectEmailAddress
                                                                  string RedirectEmailID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        RedirectEmailResult redirectEmailResult = cmpClient.RedirectEmailAddressAdd(tokenID, "redirect@example.com", "from@example.com", "example.com");

                                                                        if (redirectEmailResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = redirectEmailResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string returnedDomainName = redirectEmailResult.DomainName.ToString();
                                                                              string returnedFromAddress = redirectEmailResult.FromAddress.ToString();
                                                                              string returnedRedirectEmailResult = redirectEmailResult.RedirectEmailAddress.ToString();
                                                                              string redirectEmailID = redirectEmailResult.RedirectEmailID.ToString();
                                                                              string status = redirectEmailResult.Status.ToString();
                                                                              string statusMessage = redirectEmailResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $redirectEmailResult = $APIFunctionsObj->RedirectEmailAddressAdd($Token, "redirect@example.com", "from@example.com", "example.com");

                                                                        if ($redirectEmailResult->Status == "-1") {
                                                                            $statusMessage = $redirectEmailResult->StatusMessage;
                                                                        } else {
                                                                            $returnedDomainName = $redirectEmailResult->DomainName;
                                                                            $returnedFromAddress = $redirectEmailResult->FromAddress;
                                                                            $returnedRedirectEmailResult = $redirectEmailResult->RedirectEmailAddress;
                                                                            $redirectEmailID = $redirectEmailResult->RedirectEmailID;
                                                                            $status = $redirectEmailResult->Status;
                                                                            $statusMessage = $redirectEmailResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Edit redirect email

Edit an existing redirect email address and details.

Call details

Call ID
RedirectEmailAddressEdit
Call
                                                            
                                                                  // C#
                                                                  RedirectEmailResult = RedirectEmailAddressEdit(string tokenID, string redirectEmailAddress, string fromAddress, string domainName, string redirectEmailAddressID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $redirectEmailResult = $APIFunctionsObj->RedirectEmailAddressEdit($Token, "redirect@example.com", "from@example.com", "www.example.com", "8");
                                                            
                                                      
Returns
RedirectEmailResult object with message
Request parameters
                                                            
                                                                  string tokenID 
                                                                  string redirectEmailAddress
                                                                  string fromAddress
                                                                  string domainName
                                                            
                                                      
Return parameters
                                                            
                                                                  string CreateDate 
                                                                  string DomainName
                                                                  string FromAddress
                                                                  string RedirectEmailAddress
                                                                  string RedirectEmailID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        RedirectEmailResult redirectEmailResult = cmpClient.RedirectEmailAddressEdit(tokenID, "redirect@example.com", "from@example.com", "www.example.com", "8");

                                                                        if (redirectEmailResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = redirectEmailResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string returnedDomainName = redirectEmailResult.DomainName.ToString();
                                                                              string returnedFromAddress = redirectEmailResult.FromAddress.ToString();
                                                                              string returnedRedirectEmailResult = redirectEmailResult.RedirectEmailAddress.ToString();
                                                                              string redirectEmailID = redirectEmailResult.RedirectEmailID.ToString();
                                                                              string status = redirectEmailResult.Status.ToString();
                                                                              string statusMessage = redirectEmailResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $redirectEmailResult = $APIFunctionsObj->RedirectEmailAddressEdit($Token, "redirect@example.com", "from@example.com", "www.example.com", "8");

                                                                        if ($redirectEmailResult->Status == "-1") {
                                                                            $statusMessage = $redirectEmailResult->StatusMessage;
                                                                        } else {
                                                                            $returnedDomainName = $redirectEmailResult->DomainName;
                                                                            $returnedFromAddress = $redirectEmailResult->FromAddress;
                                                                            $returnedRedirectEmailResult = $redirectEmailResult->RedirectEmailAddress;
                                                                            $redirectEmailID = $redirectEmailResult->RedirectEmailID;
                                                                            $status = $redirectEmailResult->Status;
                                                                            $statusMessage = $redirectEmailResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Delete redirect email

Delete an existing redirect email address.

Call details

Call ID
RedirectEmailAddressDelete
Call
                                                            
                                                                  // C#
                                                                  MessageResult = RedirectEmailAddressDelete(string tokenID, string redirectEmailAddressID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $messageResult = $APIFunctionsObj->RedirectEmailAddressDelete($Token, "8");
                                                            
                                                      
Returns
MessageResult object with message
Request parameters
                                                            
                                                                  string tokenID
                                                                  string redirectEmailAddressID
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult messageResult = cmpClient.RedirectEmailAddressDelete(tokenID, "8");

                                                                        if (redirectEmailResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }

                                                                  
                                                            
                                                                  
                                                                        $messageResult = $APIFunctionsObj->RedirectEmailAddressDelete($Token, "8");

                                                                        if ($messageResult->Status == "-1") {
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        } else {
                                                                            $status = $messageResult->Status;
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Add campaign HTML content

Add HTML content to a given campaign.

Call details

Call ID
CampaignAddHTMLContent
Call
                                                            
                                                                  // C#
                                                                  MessageResult = CampaignAddHTMLContent(string tokenID, string campaignID, string html);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $messageResult = $APIFunctionsObj->CampaignAddHTMLContent($Token, $CampaignID, $HTML);
                                                            
                                                      
Returns
MessageResult object with status
Request parameters
                                                            
                                                                  string TokenID 
                                                                  string campaignID
                                                                  string html
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        MessageResult messageResult = cmpClient.CampaignAddHTMLContent(TokenID, "12", html);

                                                                        if (messageResult.Status == "-1")
                                                                        {
                                                                              string messageResult = messageResult.StatusMessage;
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $CampaignID = "144425";
                                                                        $HTML = "
"; $messageResult = $APIFunctionsObj->CampaignAddHTMLContent($Token, $CampaignID, $HTML); if ($messageResult->Status == "-1") { $statusMessage = $messageResult->StatusMessage; } else { $status = $messageResult->Status; $statusMessage = $messageResult->StatusMessage; }

Add campaign Text content

Add Text content to a given campaign.

Call details

Call ID
CampaignAddTextContent
Call
                                                            
                                                                  // C#
                                                                  MessageResult = CampaignAddTextContent(string tokenID, string campaignID, string textContent);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $messageResult = $APIFunctionsObj->CampaignAddTextContent($Token, $CampaignID, $Text);
                                                            
                                                      
Returns
MessageResult object with status
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                                  string textContent
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        MessageResult messageResult = cmpClient.CampaignAddTextContent(tokenID, "12", textContent);

                                                                        if (messageResult.Status == "-1")
                                                                        {
                                                                              string messageResult = messageResult.StatusMessage;
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $CampaignID = "31032";
                                                                        $Text = "API Test";

                                                                        $messageResult = $APIFunctionsObj->CampaignAddTextContent($Token, $CampaignID, $Text);

                                                                        if ($messageResult->Status == "-1") {
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        } else {
                                                                            $status = $messageResult->Status;
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Attach list to campaign

Attach a given list to the specified campaign.

Call details

Call ID
CampaignAttachList
Call
                                                            
                                                                  // C#
                                                                  MessageResult = CampaignAttachList(string tokenID, string campaignID, string listID, array criteriaList);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $messageResult = $APIFunctionsObj->CampaignAttachList($Token, $CampaignID, $ListID, $Criteria);
                                                            
                                                      
Returns
MessageResult object with status
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                                  string listID
                                                                  array CriteriaList
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        //Create criteria list
                                                                        List criteriaList = new List();

                                                                        //Create criteria object
                                                                        Criteria criteria;

                                                                        //Add new criteria
                                                                        criteria = new Criteria();
                                                                        criteria.FieldName = "Birth Date";
                                                                        criteria.Operator = Operator.equals;
                                                                        criteria.FieldValue = "1993-07-01";
                                                                        criteria.LogicalOperator = LogicalOperator.Or;
                                                                        criteriaList.Add(criteria);
                                                                        criteria = new Criteria();

                                                                        criteria.FieldName = "First Name";
                                                                        criteria.Operator = Operator.equals;
                                                                        criteria.FieldValue = "John";
                                                                        criteria.LogicalOperator = LogicalOperator.And;
                                                                        criteriaList.Add(criteria);

                                                                        criteria = new Criteria();
                                                                        criteria.FieldName = "Last Name";
                                                                        criteria.Operator = Operator.equals;
                                                                        criteria.FieldValue = "Smith";
                                                                        criteriaList.Add(criteria);
                                                                         
                                                                        MessageResult messageResult = cmpClient.CampaignAttachList(tokenID, "12345", "67890", criteriaList.ToArray());

                                                                        if (messageResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $CampaignID = "12345";
                                                                        $ListID = "67890";

                                                                        $CriteriaList = array();

                                                                        $Criteria = array(
                                                                            'FieldName'=>'Birth Date',
                                                                            'Operator'=>'equals',
                                                                            'FieldValue'=>'1993-07-01',
                                                                            'LogicalOperator'=>'Or'
                                                                        );
                                                                        array_push($CriteriaList, $Criteria);

                                                                        $Criteria = array(
                                                                            'FieldName'=>'First Name',
                                                                            'Operator'=>'equals',
                                                                            'FieldValue'=>'Sergiu',
                                                                            'LogicalOperator'=>'Or'
                                                                        );
                                                                        array_push($CriteriaList, $Criteria);

                                                                        $Criteria = array(
                                                                            'FieldName'=>'Last Name',
                                                                            'Operator'=>'equals',
                                                                            'FieldValue'=>'Smith',
                                                                            'LogicalOperator'=>'Or'
                                                                        );
                                                                        array_push($CriteriaList, $Criteria);

                                                                        $Criteria = array(
                                                                            'FieldName'=>'Member Type',
                                                                            'Operator'=>'equals',
                                                                            'FieldValue'=>'Gold',
                                                                            'LogicalOperator'=>'Or'
                                                                        );
                                                                        array_push($CriteriaList, $Criteria);

                                                                        $messageResult = $APIFunctionsObj->CampaignAttachList($Token, $CampaignID, $ListID, $Criteria);

                                                                        if ($messageResult->Status == "-1") {
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        } else {
                                                                            $status = $messageResult->Status;
                                                                            $statusMessage = $messageResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Send campaign test email

Send out a test email campaign to specified test address.

Call details

Call ID
CampaignSendTestEmail
Call
                                                            
                                                                  MessageResult = CampaignSendTestEmail(string tokenID, string campaignID, string testEmailAddress, string toEmails);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignSendTestEmailResult = $APIFunctionsObj->CampaignSendTestEmail($Token, $CampaignID, $TestEmailAddress, $ToEmails);
                                                            
                                                      
Returns
MessageResult object with message
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                                  string testEmailAddress
                                                                  string toEmails
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult campaignSendTestEmailResult = cmpClient.CampaignSendTestEmail(tokenID, "12345", "email@example.com", "email@example.com");


                                                                        if (messageResult.Status == "-1")
                                                                        {
                                                                               string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                               // Do something
                                                                               string status = messageResult.Status.ToString();
                                                                               string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $CampaignID = "12345";
                                                                        $TestEmailAddress = "email@example.com";
                                                                        $ToEmails = "email@example.com";

                                                                        $campaignSendTestEmailResult = $APIFunctionsObj->CampaignSendTestEmail($Token, $CampaignID, $TestEmailAddress, $ToEmails);

                                                                        if ($campaignSendTestEmailResult->Status == "-1") {
                                                                            $statusMessage = $campaignSendTestEmailResult->StatusMessage;
                                                                        } else {
                                                                            $status = $campaignSendTestEmailResult->Status;
                                                                            $statusMessage = $campaignSendTestEmailResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Launch campaign immediately

Launch a campaign immediately to the attached list.

Call details

Call ID
CampaignLaunchImmediately
Call
                                                            
                                                                  // C#
                                                                  MessageResult = CampaignLaunchImmediately(string tokenID, string campaignID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignResult = $APIFunctionsObj->CampaignLaunchImmediately($Token, $CampaignID);
                                                            
                                                      
Returns
MessageResult object with message
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult campaignResult = cmpClient.CampaignLaunchImmediately(obj.TokenID, "10038");

                                                                        if (campaignResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $CampaignID = "10038";

                                                                        $campaignResult = $APIFunctionsObj->CampaignLaunchImmediately($Token, $CampaignID);

                                                                        if ($campaignResult->Status == "-1") {
                                                                            $statusMessage = $campaignResult->StatusMessage;
                                                                        } else {
                                                                            $status = $campaignResult->Status;
                                                                            $statusMessage = $campaignResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Schedule campaign

Schedule a campaign to be sent at a specified date.

Call details

Call ID
CampaignSchedule
Call
                                                            
                                                                  // C#
                                                                  MessageResult = CampaignSchedule(string tokenID, string campaignID, string scheduleDateTime);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignResult = $APIFunctionsObj->CampaignSchedule($Token, $CampaignID, $ScheduleDateTime);
                                                            
                                                      
Returns
MessageResult object with message
Request parameters
                                                            
                                                                  string tokenID 
                                                                  string campaignID
                                                                  string scheduleDateTime
                                                            
                                                      
Return parameters
                                                            
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        MessageResult campaignResult = cmpClient.CampaignSchedule(obj.TokenID, "12345", "2017-04-26 14:30");

                                                                        if (campaignResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = messageResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string status = messageResult.Status.ToString();
                                                                              string statusMessage = messageResult.StatusMessage.ToString();

                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $CampaignID = "12345";
                                                                        $ScheduleDateTime = "2017-04-26 14:30";

                                                                        $campaignResult = $APIFunctionsObj->CampaignSchedule($Token, $CampaignID, $ScheduleDateTime);

                                                                        if ($campaignResult->Status == "-1") {
                                                                            $statusMessage = $campaignResult->StatusMessage;
                                                                        } else {
                                                                            $status = $campaignResult->Status;
                                                                            $statusMessage = $campaignResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Generate campaign editor link

Generate a hyperlink to open the campaign editor based on campaignID.

Call details

Call ID
CampaignEditorLinkCreate
Call
                                                            
                                                                  // C#
                                                                  CampaignEditorLinkCreate(TokenID, CampaignID, HostedDomainName, IsEnableSSL);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignEditorLink = $APIFunctionsObj->CampaignEditorLinkCreate($Token, $CampaignID, $HostedDomainName, true);
                                                            
                                                      
Returns
editorLink containing hyperlink to the editor
Request parameters
                                                            
                                                                  string tokenID 
                                                                  string CampaignID
                                                                  string HostedDomainName
                                                                  boolean IsEnableSSL
                                                            
                                                      
Return parameters
                                                            
                                                                  string CampaignEditLinkCreateResult
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        string editorLink = cmpClient.CampaignEditorLinkCreate(TokenID, CampaignID, HostedDomainName, true);
                                                                  
                                                            
                                                                  
                                                                        $CampaignID = "144425";

                                                                        $campaignEditorLink = $APIFunctionsObj->CampaignEditorLinkCreate($Token, $CampaignID, $HostedDomainName, true);
                                                                  
                                                            

Campaign Results

This section outlines all API calls which govern campaign results for sent campaigns:


Get results

Get campaign results including opens, clicks, unique clicks, no recorded activity etc.

Call details

Call ID
CampaignResults
Call
                                                            
                                                                  // C#
                                                                  CampaignSummaryResult[]  = CampaignResults(TokenID, CampaignID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignSummaryResult = $APIFunctionsObj->CampaignResults($Token, $CampaignID);
                                                            
                                                      
Returns
Array with campaign report details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CampaignDescription 
                                                                  string CampaignID
                                                                  string CampaignName
                                                                  string CampaignStatus
                                                                  string CampaignType
                                                                  string ClickPercentage
                                                                  string ClickTotal
                                                                  string ClickUnique
                                                                  string Complaints
                                                                  string ConfirmedViewTotal
                                                                  string CreatedBy
                                                                  string CreatedDate
                                                                  string Delivered
                                                                  string EditorType
                                                                  string ForwardsTotal
                                                                  string ForwrdsUnique
                                                                  string HardBounce
                                                                  string LaunchedBy
                                                                  string NoRecordActivity
                                                                  string OpenPercentage
                                                                  string OpenTotal
                                                                  string OpenUnique
                                                                  string SentDate
                                                                  string SoftBounce
                                                                  string TotalBounce
                                                                  string TotalMailSent
                                                                  string Unsubscribes
                                                                  String Status
                                                                  String StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        CampaignSummaryResult[] campaignSummaryResult = cmpClient.CampaignResults(token, "123456");

                                                                        if (campaignSummaryResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignSummaryResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                               for (int i = 0; i < campaignSummaryResult.Length; i++)
                                                                               {
                                                                                    // Do something
                                                                                    string campaignDescription = campaignSummaryResult[i].CampaignDescription.ToString();
                                                                                    string returnedCampaignID = campaignSummaryResult[i].CampaignID.ToString();
                                                                                    string campaignName = campaignSummaryResult[i].CampaignName.ToString();
                                                                                    string campaignStatus = campaignSummaryResult[i].CampaignStatus.ToString();
                                                                                    string campaignType = campaignSummaryResult[i].CampaignType.ToString();
                                                                                    string clickPercentage = campaignSummaryResult[i].ClickPercentage.ToString();
                                                                                    string clickTotal = campaignSummaryResult[i].ClickTotal.ToString();
                                                                                    string clickUnique = campaignSummaryResult[i].ClickUnique.ToString();
                                                                                    string complaints = campaignSummaryResult[i].Complaints.ToString();
                                                                                    string confirmedViewsTotal = campaignSummaryResult[i].ConfirmedViewTotal.ToString();
                                                                                    string createdBy = campaignSummaryResult[i].CreatedBy.ToString();
                                                                                    string createDate = campaignSummaryResult[i].CreatedDate.ToString();
                                                                                    string delivered = campaignSummaryResult[i].Delivered.ToString();
                                                                                    string editorType = campaignSummaryResult[i].EditorType.ToString();
                                                                                    string forwardsTotal = campaignSummaryResult[i].ForwardsTotal.ToString();
                                                                                    string forwardsUnique = campaignSummaryResult[i].ForwrdsUnique.ToString();
                                                                                    string hardBounce = campaignSummaryResult[i].HardBounce.ToString();
                                                                                    string launchedBy = campaignSummaryResult[i].LaunchedBy.ToString();
                                                                                    string noRecordedActivity = campaignSummaryResult[i].NoRecordActivity.ToString();
                                                                                    string openPercentage = campaignSummaryResult[i].OpenPercentage.ToString();
                                                                                    string openTotal = campaignSummaryResult[i].OpenTotal.ToString();
                                                                                    string openUnique = campaignSummaryResult[i].OpenUnique.ToString();
                                                                                    string sentDate = campaignSummaryResult[i].SentDate.ToString();
                                                                                    string softBounce = campaignSummaryResult[i].SoftBounce.ToString();
                                                                                    string totalBounce = campaignSummaryResult[i].TotalBounce.ToString();
                                                                                    string totalMailSent = campaignSummaryResult[i].TotalMailSent.ToString();
                                                                                    string unsubscribes = campaignSummaryResult[i].Unsubscribes.ToString();
                                                                                    string status = campaignSummaryResult[i].Status.ToString();
                                                                                    string statusMessage = campaignSummaryResult[i].StatusMessage.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $CampaignID = "123456";

                                                                        $campaignSummaryResult = $APIFunctionsObj->CampaignResults($Token, $CampaignID);

                                                                        if ($campaignSummaryResult->Status == "-1") {
                                                                            $statusMessage = $campaignSummaryResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $campaignDescription = $campaignSummaryResult->CampaignDescription;
                                                                            $returnedCampaignID = $campaignSummaryResult->CampaignID;
                                                                            $campaignName = $campaignSummaryResult->CampaignName;
                                                                            $campaignStatus = $campaignSummaryResult->CampaignStatus;
                                                                            $campaignType = $campaignSummaryResult->CampaignType;
                                                                            $clickPercentage = $campaignSummaryResult->ClickPercentage;
                                                                            $clickTotal = $campaignSummaryResult->ClickTotal;
                                                                            $clickUnique = $campaignSummaryResult->ClickUnique;
                                                                            $complaints = $campaignSummaryResult->Complaints;
                                                                            $confirmedViewsTotal = $campaignSummaryResult->ConfirmedViewTotal;
                                                                            $createdBy = $campaignSummaryResult->CreatedBy;
                                                                            $createDate = $campaignSummaryResult->CreatedDate;
                                                                            $delivered = $campaignSummaryResult->Delivered;
                                                                            $editorType = $campaignSummaryResult->EditorType;
                                                                            $forwardsTotal = $campaignSummaryResult->ForwardsTotal;
                                                                            $forwardsUnique = $campaignSummaryResult->ForwrdsUnique;
                                                                            $hardBounce = $campaignSummaryResult->HardBounce;
                                                                            $launchedBy = $campaignSummaryResult->LaunchedBy;
                                                                            $noRecordedActivity = $campaignSummaryResult->NoRecordActivity;
                                                                            $openPercentage = $campaignSummaryResult->OpenPercentage;
                                                                            $openTotal = $campaignSummaryResult->OpenTotal;
                                                                            $openUnique = $campaignSummaryResult->OpenUnique;
                                                                            $sentDate = $campaignSummaryResult->SentDate;
                                                                            $softBounce = $campaignSummaryResult->SoftBounce;
                                                                            $totalBounce = $campaignSummaryResult->TotalBounce;
                                                                            $totalMailSent = $campaignSummaryResult->TotalMailSent;
                                                                            $unsubscribes = $campaignSummaryResult->Unsubscribes;
                                                                            $status = $campaignSummaryResult->Status;
                                                                            $statusMessage = $campaignSummaryResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Get results by email address

Get results for a campaign based on EmailAddress.

Call details

Call ID
CampaignResultsbyEmailAddress
Call
                                                            
                                                                  // C#
                                                                  CampaignSendResult = CampaignResultsbyEmailAddress(string tokenID, string campaignID, string emailAddress);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignSendResult = $APIFunctionsObj->CampaignResultsbyEmailAddress($Token, $CampaignID, $EmailAddress);
                                                            
                                                      
Returns
Campaign results with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                                  string emailAddress
                                                            
                                                      
Return parameters
                                                            
                                                                  string BounceType 
                                                                  string Bounced
                                                                  string CampaignDescription
                                                                  string CampaignID
                                                                  string CampaignName
                                                                  string CampaignReceivedDate
                                                                  string Clicks
                                                                  string ContactID
                                                                  string EmailAddress
                                                                  string FirstTimeClicked
                                                                  string FirstTimeOpened
                                                                  string Forwards
                                                                  string LastTimeClicked
                                                                  string LastTimeOpened
                                                                  string Opens
                                                                  string Unsubscribed
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignSendResult campaignSendResult = cmpClient.CampaignResultsbyEmailAddress(tokenID, campaignID, emailAddress);

                                                                        if (campaignHistoryResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignSendResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string bounceType = campaignSendResult.BounceType.ToString();
                                                                              string bounce = campaignSendResult.Bounced.ToString();
                                                                              string campaignDescription = campaignSendResult.CampaignDescription.ToString();
                                                                              string receivedCampaignID = campaignSendResult.CampaignID.ToString();
                                                                              string campaignName = campaignSendResult.CampaignName.ToString();
                                                                              string campaignReceivedDate = campaignSendResult.CampaignRecievedDate.ToString();
                                                                              string clicks = campaignSendResult.Clicks.ToString();
                                                                              string receivedContactID = campaignSendResult.ContactID.ToString();
                                                                              string emailAddress = campaignSendResult.EmailAddress.ToString();
                                                                              string firstTimeClicked = campaignSendResult.FirstTimeClicked.ToString();
                                                                              string firstTimeOpened = campaignSendResult.FirstTimeOpened.ToString();
                                                                              string forwards = campaignSendResult.Forwards.ToString();
                                                                              string lastTimeClicked = campaignSendResult.LastTimeClicked.ToString();
                                                                              string lastTimeOpened = campaignSendResult.LastTimeOpened.ToString();
                                                                              string opens = campaignSendResult.Opens.ToString();
                                                                              string unsubscribed = campaignSendResult.Unsubscribed.ToString();
                                                                              string status = campaignSendResult.Status.ToString();
                                                                              string statusMessage = campaignSendResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $CampaignID = "123456";
                                                                        $EmailAddress = "user@example.com";

                                                                        $campaignSendResult = $APIFunctionsObj->CampaignResultsbyEmailAddress($Token, $CampaignID, $EmailAddress);

                                                                        if ($campaignSendResult->Status == "-1") {
                                                                            $statusMessage = $campaignSendResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $bounceType = $campaignSendResult->BounceType;
                                                                            $bounce = $campaignSendResult->Bounced;
                                                                            $campaignDescription = $campaignSendResult->CampaignDescription;
                                                                            $receivedCampaignID = $campaignSendResult->CampaignID;
                                                                            $campaignName = $campaignSendResult->CampaignName;
                                                                            $campaignReceivedDate = $campaignSendResult->CampaignRecievedDate;
                                                                            $clicks = $campaignSendResult->Clicks;
                                                                            $receivedContactID = $campaignSendResult->ContactID;
                                                                            $emailAddress = $campaignSendResult->EmailAddress;
                                                                            $firstTimeClicked = $campaignSendResult->FirstTimeClicked;
                                                                            $firstTimeOpened = $campaignSendResult->FirstTimeOpened;
                                                                            $forwards = $campaignSendResult->Forwards;
                                                                            $lastTimeClicked = $campaignSendResult->LastTimeClicked;
                                                                            $lastTimeOpened = $campaignSendResult->LastTimeOpened;
                                                                            $opens = $campaignSendResult->Opens;
                                                                            $unsubscribed = $campaignSendResult->Unsubscribed;
                                                                            $status = $campaignSendResult->Status;
                                                                            $statusMessage = $campaignSendResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Get results by contact id

Get results for a recipient based on contactID.

Call details

Call ID
CampaignResultsbyContactID
Call
                                                            
                                                                  // C#
                                                                  CampaignSendResult = CampaignResultsbyContactID(string tokenID, string campaignID, string contactID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignSendResult = $APIFunctionsObj->CampaignResultsbyContactID($Token, $CampaignID, $ContactID);
                                                            
                                                      
Returns
Campaign results with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                                  string contactID
                                                            
                                                      
Return parameters
                                                            
                                                                  string BounceType 
                                                                  string Bounced
                                                                  string CampaignDescription
                                                                  string CampaignID
                                                                  string CampaignName
                                                                  string CampaignRecievedDate
                                                                  string Clicks
                                                                  string ContactID
                                                                  string EmailAddress
                                                                  string FirstTimeClicked
                                                                  string FirstTimeOpened
                                                                  string Forwards
                                                                  string LastTimeClicked
                                                                  string LastTimeOpened
                                                                  string Opens
                                                                  string Unsubscribed
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                                        CampaignSendResult campaignSendResult = cmpClient.CampaignResultsbyContactID(tokenID, campaignID, contactID);

                                                                        if (campaignHistoryResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignSendResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string bounceType = campaignSendResult.BounceType.ToString();
                                                                              string bounce = campaignSendResult.Bounced.ToString();
                                                                              string campaignDescription = campaignSendResult.CampaignDescription.ToString();
                                                                              string receivedCampaignID = campaignSendResult.CampaignID.ToString();
                                                                              string campaignName = campaignSendResult.CampaignName.ToString();
                                                                              string campaignReceivedDate = campaignSendResult.CampaignRecievedDate.ToString();
                                                                              string clicks = campaignSendResult.Clicks.ToString();
                                                                              string receivedContactID = campaignSendResult.ContactID.ToString();
                                                                              string emailAddress = campaignSendResult.EmailAddress.ToString();
                                                                              string firstTimeClicked = campaignSendResult.FirstTimeClicked.ToString();
                                                                              string firstTimeOpened = campaignSendResult.FirstTimeOpened.ToString();
                                                                              string forwards = campaignSendResult.Forwards.ToString();
                                                                              string lastTimeClicked = campaignSendResult.LastTimeClicked.ToString();
                                                                              string lastTimeOpened = campaignSendResult.LastTimeOpened.ToString();
                                                                              string opens = campaignSendResult.Opens.ToString();
                                                                              string unsubscribed = campaignSendResult.Unsubscribed.ToString();
                                                                              string status = campaignSendResult.Status.ToString();
                                                                              string statusMessage = campaignSendResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $CampaignID = "123456";
                                                                        $ContactID = "123";

                                                                        $campaignSendResult = $APIFunctionsObj->CampaignResultsbyContactID($Token, $CampaignID, $ContactID);

                                                                        if ($campaignSendResult->Status == "-1") {
                                                                            $statusMessage = $campaignSendResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $bounceType = $campaignSendResult->BounceType;
                                                                            $bounce = $campaignSendResult->Bounced;
                                                                            $campaignDescription = $campaignSendResult->CampaignDescription;
                                                                            $receivedCampaignID = $campaignSendResult->CampaignID;
                                                                            $campaignName = $campaignSendResult->CampaignName;
                                                                            $campaignReceivedDate = $campaignSendResult->CampaignRecievedDate;
                                                                            $clicks = $campaignSendResult->Clicks;
                                                                            $receivedContactID = $campaignSendResult->ContactID;
                                                                            $emailAddress = $campaignSendResult->EmailAddress;
                                                                            $firstTimeClicked = $campaignSendResult->FirstTimeClicked;
                                                                            $firstTimeOpened = $campaignSendResult->FirstTimeOpened;
                                                                            $forwards = $campaignSendResult->Forwards;
                                                                            $lastTimeClicked = $campaignSendResult->LastTimeClicked;
                                                                            $lastTimeOpened = $campaignSendResult->LastTimeOpened;
                                                                            $opens = $campaignSendResult->Opens;
                                                                            $unsubscribed = $campaignSendResult->Unsubscribed;
                                                                            $status = $campaignSendResult->Status;
                                                                            $statusMessage = $campaignSendResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Get results by pages

Get results by specifiying page sizes.

Call details

Call ID
CampaignResultsbyPages
Call
                                                            
                                                                  // C#
                                                                  CampaignHistoryResult[] campaignHistoryResult = List < CampaignHistoryResult > CampaignResultsbyPages(string tokenID, string campaignID, string pageNumber, string pageSize);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignHistoryResult = $APIFunctionsObj->CampaignResultsbyPages($Token, $CampaignID, $PageNumber, $PageSize);
                                                            
                                                      
Returns
Campaign results with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                                  string pageNumber
                                                                  string pageSize
                                                            
                                                      
Return parameters
                                                            
                                                                  string BounceType 
                                                                  string Bounced
                                                                  string CampaignDescription
                                                                  string CampaignID
                                                                  string CampaignName
                                                                  string CampaignReceivedDate
                                                                  string Clicks
                                                                  string ContactID
                                                                  string EmailAddress
                                                                  string FirstTimeClicked
                                                                  string FirstTimeOpened
                                                                  string Forwards
                                                                  string LastTimeClicked
                                                                  string LastTimeOpened
                                                                  string Opens
                                                                  string Unsubscribed
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignHistoryResult campaignHistoryResult = cmpClient.CampaignResultsbyPages(tokenID, "12345", "67890");

                                                                        if (campaignHistoryResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignHistoryResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < campaignHistoryResult.Length; i++)
                                                                              {
                                                                                    //Do something
                                                                                    string bounceType = campaignHistoryResult[i].BounceType.ToString();
                                                                                    string bounced = campaignHistoryResult[i].Bounced.ToString();
                                                                                    string campaignDescription = campaignHistoryResult[i].CampaignDescription.ToString();
                                                                                    string returnedCampaignID = campaignHistoryResult[i].CampaignID.ToString();
                                                                                    string campaignName = campaignHistoryResult[i].CampaignName.ToString();
                                                                                    string campaignReceivedDate = campaignHistoryResult[i].CampaignRecievedDate.ToString();
                                                                                    string clicks = campaignHistoryResult[i].Clicks.ToString();
                                                                                    string contactID = campaignHistoryResult[i].ContactID.ToString();
                                                                                    string emailAddress = campaignHistoryResult[i].EmailAddress.ToString();
                                                                                    string firstTimeClicked = campaignHistoryResult[i].FirstTimeClicked.ToString();
                                                                                    string firstTimeOpened = campaignHistoryResult[i].FirstTimeOpened.ToString();
                                                                                    string forwards = campaignHistoryResult[i].Forwards.ToString();
                                                                                    string lastTimeClicked = campaignHistoryResult[i].LastTimeClicked.ToString();
                                                                                    string lastTimeOpened = campaignHistoryResult[i].LastTimeOpened.ToString();
                                                                                    string opens = campaignHistoryResult[i].Opens.ToString();
                                                                                    string unsubscribed = campaignHistoryResult[i].Unsubscribed.ToString();
                                                                                    string status = campaignHistoryResult[i].Status.ToString();
                                                                                    string statusMessage = campaignHistoryResult[i].StatusMessage.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $CampaignID = "123456";
                                                                        $PageNumber = "1";
                                                                        $PageSize = "5";

                                                                        $campaignHistoryResult = $APIFunctionsObj->CampaignResultsbyPages($Token, $CampaignID, $PageNumber, $PageSize);

                                                                        if ($campaignHistoryResult->Status == "-1") {
                                                                            $statusMessage = $campaignHistoryResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $bounceType = $campaignHistoryResult->BounceType;
                                                                            $bounce = $campaignHistoryResult->Bounced;
                                                                            $campaignDescription = $campaignHistoryResult->CampaignDescription;
                                                                            $receivedCampaignID = $campaignHistoryResult->CampaignID;
                                                                            $campaignName = $campaignHistoryResult->CampaignName;
                                                                            $campaignReceivedDate = $campaignHistoryResult->CampaignRecievedDate;
                                                                            $clicks = $campaignHistoryResult->Clicks;
                                                                            $receivedContactID = $campaignHistoryResult->ContactID;
                                                                            $emailAddress = $campaignHistoryResult->EmailAddress;
                                                                            $firstTimeClicked = $campaignHistoryResult->FirstTimeClicked;
                                                                            $firstTimeOpened = $campaignHistoryResult->FirstTimeOpened;
                                                                            $forwards = $campaignHistoryResult->Forwards;
                                                                            $lastTimeClicked = $campaignHistoryResult->LastTimeClicked;
                                                                            $lastTimeOpened = $campaignHistoryResult->LastTimeOpened;
                                                                            $opens = $campaignHistoryResult->Opens;
                                                                            $unsubscribed = $campaignHistoryResult->Unsubscribed;
                                                                            $status = $campaignHistoryResult->Status;
                                                                            $statusMessage = $campaignHistoryResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Get send details

Get the send details for a given campaign based on campaignID.

Call details

Call ID
CampaignSummarySendDetailsFetch
Call
                                                            
                                                                  // C#
                                                                  CampaignSentDetailResult = CampaignSummarySendDetailsFetch(string tokenID, string campaignID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignSentDetailResult = $APIFunctionsObj->CampaignSummarySendDetailsFetch($Token, $CampaignID);
                                                            
                                                      
Returns
CampaignSentDetailResult object with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CampaignID 
                                                                  string HardBounceCount
                                                                  string MultiPartSendCount
                                                                  string SoftBounceCount
                                                                  string TextSendCount
                                                                  string TotalBounce
                                                                  string TotalMailSent
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignSentDetailResult campaignSentDetailResult = cmpClient.CampaignSummarySendDetailsFetch(tokenID, "12345");

                                                                        if(campaignSentDetailResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignSentDetailResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string resultCampaignID = campaignSentDetailResult.CampaignID.ToString();
                                                                              string hardBounceCount = campaignSentDetailResult.HardBounceCount.ToString();
                                                                              string multiPartSendCount = campaignSentDetailResult.MultiPartSendCount.ToString();
                                                                              string softBounceCount = campaignSentDetailResult.SoftBounceCount.ToString();
                                                                              string textSendCount = campaignSentDetailResult.TextSendCount.ToString();
                                                                              string totalBounce = campaignSentDetailResult.TotalBounce.ToString();
                                                                              string totalMailSent = campaignSentDetailResult.TotalMailSent.ToString();
                                                                              string status = campaignSentDetailResult.Status.ToString();
                                                                              string statusMessage = campaignSentDetailResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                    $CampaignID = "144402";

                                                                        $campaignSentDetailResult = $APIFunctionsObj->CampaignSummarySendDetailsFetch($Token, $CampaignID);

                                                                        if ($campaignSentDetailResult->Status == "-1") {
                                                                            $statusMessage = $campaignSentDetailResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $resultCampaignID = $campaignSentDetailResult->CampaignID;
                                                                            $hardBounceCount = $campaignSentDetailResult->HardBounceCount;
                                                                            $multiPartSendCount = $campaignSentDetailResult->MultiPartSendCount;
                                                                            $softBounceCount = $campaignSentDetailResult->SoftBounceCount;
                                                                            $textSendCount = $campaignSentDetailResult->TextSendCount;
                                                                            $totalBounce = $campaignSentDetailResult->TotalBounce;
                                                                            $totalMailSent = $campaignSentDetailResult->TotalMailSent;
                                                                            $status = $campaignSentDetailResult->Status;
                                                                            $statusMessage = $campaignSentDetailResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Get recipient criteria

Get the recipient criteria for a given campaign.

Call details

Call ID
CampaignSummaryRecipientCriteriaFetch
Call
                                                            
                                                                  // C#
                                                                  CampaignRecipientCriteriaResult = CampaignSummaryRecipientCriteriaFetch(string tokenID, string campaignID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignRecipientCriteriaResult = $APIFunctionsObj->CampaignSummaryRecipientCriteriaFetch($Token, $CampaignID);
                                                            
                                                      
Returns
CampaignRecipientCriteriaResult object with summary details
Request parameters
                                                            
                                                                  string      tokenID
                                                                  string      campaignID
                                                            
                                                      
Return parameters
                                                            
                                                                  string CampaignName 
                                                                  string EndDate
                                                                  string StartDate
                                                                  string TotalChannelSuppress
                                                                  string TotalGlobalSuppress
                                                                  string TotalInActive
                                                                  string TotalSelected
                                                                  string TotalUnVerified
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignRecipientCriteriaResult campaignRecipientCriteriaResult = cmpClient.CampaignSummaryRecipientCriteriaFetch(tokenID, "2");

                                                                        if (campaignRecipientCriteriaResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignRecipientCriteriaResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                              string campaignName = campaignRecipientCriteriaResult.CampaignName.ToString();
                                                                              string endDate = campaignRecipientCriteriaResult.EndDate.ToString();
                                                                              string startDate = campaignRecipientCriteriaResult.StartDate.ToString();
                                                                              string totalChannelSuppress = campaignRecipientCriteriaResult.TotalChannelSuppress.ToString();
                                                                              string totalGlobalSuppress = campaignRecipientCriteriaResult.TotalGlobalSuppress.ToString();
                                                                              string totalInActive = campaignRecipientCriteriaResult.TotalInActive.ToString();
                                                                              string totalSelected = campaignRecipientCriteriaResult.TotalSelected.ToString();
                                                                              string totalUnverified = campaignRecipientCriteriaResult.TotalUnVerified.ToString();
                                                                              string status = campaignRecipientCriteriaResult.Status.ToString();
                                                                              string statusMessage = campaignRecipientCriteriaResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $CampaignID = "144402";

                                                                        $campaignRecipientCriteriaResult = $APIFunctionsObj->CampaignSummaryRecipientCriteriaFetch($Token, $CampaignID);

                                                                        if ($campaignRecipientCriteriaResult->Status == "-1") {
                                                                            $statusMessage = $campaignRecipientCriteriaResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $campaignName = $campaignRecipientCriteriaResult->CampaignName;
                                                                            $endDate = $campaignRecipientCriteriaResult->EndDate;
                                                                            $startDate = $campaignRecipientCriteriaResult->StartDate;
                                                                            $totalChannelSuppress = $campaignRecipientCriteriaResult->TotalChannelSuppress;
                                                                            $totalGlobalSuppress = $campaignRecipientCriteriaResult->TotalGlobalSuppress;
                                                                            $totalInActive = $campaignRecipientCriteriaResult->TotalInActive;
                                                                            $totalSelected = $campaignRecipientCriteriaResult->TotalSelected;
                                                                            $totalUnverified = $campaignRecipientCriteriaResult->TotalUnVerified;
                                                                            $status = $campaignRecipientCriteriaResult->Status;
                                                                            $statusMessage = $campaignRecipientCriteriaResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Get email bounce by campaign id

Get the bounce history for a given campaign based on campaignID.

Call details

Call ID
EmailBounceFetchByCampaignID
Call
                                                            
                                                                  // C#
                                                                  EmailBounceResult[] EmailBounceResult = List < EmailBounceResult > EmailBounceFetchByCampaignID(string tokenID, string campaignID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $emailBounceResult = $APIFunctionsObj->EmailBounceFetchByCampaignID($Token, $CampaignID);
                                                            
                                                      
Returns
EmailBounceResult object array with detail
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                            
                                                      
Return parameters
                                                            
                                                                  string BounceDate 
                                                                  string EmailAddress
                                                                  string RecipientID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        EmailBounceResult[] emailBounceResult = cmpClient.EmailBounceFetchByCampaignID(tokenID, "123");

                                                                        if (emailBounceResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = emailBounceResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < emailBounceResult.Length; i++)
                                                                              {
                                                                                    // Do something
                                                                                    string bounceDate = emailBounceResult[i].BounceDate.ToString();
                                                                                    string emailAddress = emailBounceResult[i].EmailAddress.ToString();
                                                                                    string recipientID = emailBounceResult[i].RecipientID.ToString();
                                                                                    string status = emailBounceResult[i].Status.ToString();
                                                                                    string statusMessage = emailBounceResult[i].StatusMessage.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $CampaignID = "144402";

                                                                        $emailBounceResult = $APIFunctionsObj->EmailBounceFetchByCampaignID($Token, $CampaignID);

                                                                        if ($emailBounceResult->Status == "-1") {
                                                                            $statusMessage = $emailBounceResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $bounceDate = $emailBounceResult->BounceDate;
                                                                            $emailAddress = $emailBounceResult->EmailAddress;
                                                                            $recipientID = $emailBounceResult->RecipientID;
                                                                            $status = $emailBounceResult->Status;
                                                                            $statusMessage = $emailBounceResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Get email bounce by date range

Get email bounces for a given campaign within a specified date range.

Call details

Call ID
EmailBounceFetchByDateRange
Call
                                                            
                                                                  // C#
                                                                  EmailBounceResult[] EmailBounceResult = List < EmailBounceResult > EmailBounceFetchByDateRange(string tokenID, string startDate, string endDate);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $emailBounceResult = $APIFunctionsObj->EmailBounceFetchByDateRange($Token, $StartDate, $EndDate);
                                                            
                                                      
Returns
EmailBounceResult object array with detail
Request parameters
                                                            
                                                                  string tokenID
                                                                  string contactID
                                                                  string startDate
                                                                  string endDate
                                                            
                                                      
Return parameters
                                                            
                                                                  string BounceDate 
                                                                  string EmailAddress
                                                                  string RecipientID
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        EmailBounceResult[] emailBounceResult = cmpClient.EmailBounceFetchByDateRange(tokenID, "2017-01-31", "2017-04-26");

                                                                        if (emailBounceResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = emailBounceResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < emailBounceResult.Length; i++)
                                                                              {
                                                                                    // Do something
                                                                                    string bounceDate = emailBounceResult[i].BounceDate.ToString();
                                                                                    string emailAddress = emailBounceResult[i].EmailAddress.ToString();
                                                                                    string recipientID = emailBounceResult[i].RecipientID.ToString();
                                                                                    string status = emailBounceResult[i].Status.ToString();
                                                                                    string statusMessage = emailBounceResult[i].StatusMessage.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $StartDate = "2017-01-01";
                                                                        $EndDate = "2018-01-01";

                                                                        $emailBounceResult = $APIFunctionsObj->EmailBounceFetchByDateRange($Token, $StartDate, $EndDate);

                                                                        if (is_object($emailBounceResult)) {
                                                                            $emailBounceResult = array($emailBounceResult);
                                                                        }

                                                                        if ($emailBounceResult[0]->Status == "-1") {
                                                                            $statusMessage = $emailBounceResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($emailBounceResult as $bounces) {
                                                                                $bounceDate = $bounces->BounceDate;
                                                                                $emailAddress = $bounces->EmailAddress;
                                                                                $recipientID = $bounces->RecipientID;
                                                                                $status = $bounces->Status;
                                                                                $statusMessage = $bounces->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get recipient activity

Get recipient activity for a given campaign based on campaignID.

Call details

Call ID
CampaignRecipientActivityFetch
Call
                                                            
                                                                  // C#
                                                                  CampaignRecipientActivityResult = CampaignRecipientActivityFetch(string tokenID, string campaignID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignRecipientActivityResult = $APIFunctionsObj->CampaignRecipientActivityFetch($Token, $CampaignID);
                                                            
                                                      
Returns
CampaignRecipientActivityResult object with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                            
                                                      
Return parameters
                                                            
                                                                  string BouncesTotal
                                                                  string ClickthroughTotal
                                                                  string ClickthroughUniqueTotal
                                                                  string ComplaintsTotal
                                                                  string ConfirmedViewsTotal
                                                                  string ForwardsTotal
                                                                  string ForwardsUnique
                                                                  string NoRecordedActivityTotal
                                                                  string OpensTotal
                                                                  string OpensUniquesTotal
                                                                  string UnsubscribesTotal
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;
                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignRecipientActivityResult campaignRecipientActivityResult = cmpClient.CampaignRecipientActivityFetch(obj.TokenID, "2");

                                                                        if (campaignRecipientActivityResult.Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignRecipientActivityResult.StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              // Do something
                                                                            string bouncesTotal = campaignRecipientActivityResult.BouncesTotal.ToString();
                                                                            string clickthroughTotal = campaignRecipientActivityResult.ClickthroughTotal.ToString();
                                                                            string clickthroughUniqueTotal = campaignRecipientActivityResult.ClickthroughUniqueTotal.ToString();
                                                                            string complaintsTotal = campaignRecipientActivityResult.ComplaintsTotal.ToString();
                                                                            string confirmedViewsTotal = campaignRecipientActivityResult.ConfirmedViewsTotal.ToString();
                                                                            string forwardsTotal = campaignRecipientActivityResult.ForwardsTotal.ToString();
                                                                            string forwardsUnique = campaignRecipientActivityResult.ForwardsUnique.ToString();
                                                                            string noRecordedActivityTotal = campaignRecipientActivityResult.NoRecordActivityTotal.ToString();
                                                                            string opensTotal = campaignRecipientActivityResult.OpensTotal.ToString();
                                                                            string opensUniquesTotal = campaignRecipientActivityResult.OpensUniqueTotal.ToString();
                                                                            string unsubscribesTotal = campaignRecipientActivityResult.UnsubscribesTotal.ToString();
                                                                            string status = campaignRecipientActivityResult.Status.ToString();
                                                                            string statusMessage = campaignRecipientActivityResult.StatusMessage.ToString();
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $CampaignID = "144402";

                                                                        $campaignRecipientActivityResult = $APIFunctionsObj->CampaignRecipientActivityFetch($Token, $CampaignID);

                                                                        if ($campaignRecipientActivityResult->Status == "-1") {
                                                                            $statusMessage = $campaignRecipientActivityResult->StatusMessage;
                                                                        } else {
                                                                            // Do something
                                                                            $bouncesTotal = $campaignRecipientActivityResult->BouncesTotal;
                                                                            $clickthroughTotal = $campaignRecipientActivityResult->ClickthroughTotal;
                                                                            $clickthroughUniqueTotal = $campaignRecipientActivityResult->ClickthroughUniqueTotal;
                                                                            $complaintsTotal = $campaignRecipientActivityResult->ComplaintsTotal;
                                                                            $confirmedViewsTotal = $campaignRecipientActivityResult->ConfirmedViewsTotal;
                                                                            $forwardsTotal = $campaignRecipientActivityResult->ForwardsTotal;
                                                                            $forwardsUnique = $campaignRecipientActivityResult->ForwardsUnique;
                                                                            $noRecordedActivityTotal = $campaignRecipientActivityResult->NoRecordActivityTotal;
                                                                            $opensTotal = $campaignRecipientActivityResult->OpensTotal;
                                                                            $opensUniquesTotal = $campaignRecipientActivityResult->OpensUniqueTotal;
                                                                            $unsubscribesTotal = $campaignRecipientActivityResult->UnsubscribesTotal;
                                                                            $status = $campaignRecipientActivityResult->Status;
                                                                            $statusMessage = $campaignRecipientActivityResult->StatusMessage;
                                                                        }
                                                                  
                                                            

Get unique opens

Get a list of unique opens for a given campaign based on campaignID.

Call details

Call ID
CampaignUniqueOpens
Call
                                                            
                                                                  // C#
                                                                  CampaignUniqueOpensResult[] campaignUniqueOpensResult = List < CampaignUniqueOpensResult > CampaignUniqueOpens(string tokenID, string campaignID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignUniqueOpensResult = $APIFunctionsObj->CampaignUniqueOpens($Token, $CampaignID);
                                                            
                                                      
Returns
CampaignUniqueOpensResult object array with detail
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                            
                                                      
Return parameters
                                                            
                                                                  string EmailAddress
                                                                  string LastOpenedDate
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignUniqueOpensResult[] campaignUniqueOpensResult = cmpClient.CampaignUniqueOpens(tokenID, campaignID);

                                                                        if (campaignUniqueOpensResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignUniqueOpensResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int count = 0; count < campaignUniqueOpensResult.Length; count++)
                                                                              {
                                                                                    // Do something
                                                                                    string lastOpenDate = campaignUniqueOpensResult[i].LastOpenedDate.ToString();
                                                                                    string emailAddress = campaignUniqueOpensResult[i].EmailAddress.ToString();
                                                                                    string status = campaignUniqueOpensResult[i].Status.ToString();
                                                                                    string statusMessage = campaignUniqueOpensResult[i].StatusMessage.ToString();

                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $CampaignID = "144402";

                                                                        $campaignUniqueOpensResult = $APIFunctionsObj->CampaignUniqueOpens($Token, $CampaignID);

                                                                        if (is_object($campaignUniqueOpensResult)) {
                                                                            $campaignUniqueOpensResult = array($campaignUniqueOpensResult);
                                                                        }

                                                                        if ($campaignUniqueOpensResult[0]->Status == "-1") {
                                                                            $statusMessage = $campaignUniqueOpensResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($campaignUniqueOpensResult as $opens) {
                                                                                $lastOpenDate = $opens->LastOpenedDate;
                                                                                $emailAddress = $opens->EmailAddress;
                                                                                $status = $opens->Status;
                                                                                $statusMessage = $opens->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get confirmed views

Get a list of confirmed views for a given campaign based on campaignID.

Call details

Call ID
CampaignConfirmViews
Call
                                                            
                                                                  // C#
                                                                  CampaignConfirmViewsResult[] campaignConfirmViewsResult = List < CampaignConfirmViewsResult > CampaignConfirmViews(string tokenID, string campaignID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignConfirmViewsResult = $APIFunctionsObj->CampaignConfirmViews($Token, $CampaignID);
                                                            
                                                      
Returns
CampaignConfirmViewsResult object array with detail
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                            
                                                      
Return parameters
                                                            
                                                                  string ConfirmViewType 
                                                                  string EmailAddress
                                                                  string LastConfirmViewDate
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        CampaignConfirmViewsResult[] campaignConfirmViewsResult = cmpClient.CampaignConfirmViews(tokenID, campaignID);

                                                                        if (campaignConfirmViewsResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = campaignConfirmViewsResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < campaignConfirmViewsResult.Length; i++)
                                                                              {
                                                                                    // Do something
                                                                                    string confirmViewType = campaignConfirmViewsResult[i].ConfirmViewType.ToString();
                                                                                    string emailAddress = campaignConfirmViewsResult[i].EmailAddress.ToString();
                                                                                    string lastOpenDate = campaignConfirmViewsResult[i].LastConfirmViewDate.ToString();
                                                                                    string status = campaignConfirmViewsResult[i].Status.ToString();
                                                                                    string statusMessage = campaignConfirmViewsResult[i].StatusMessage.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $CampaignID = "144402";

                                                                        $campaignConfirmViewsResult = $APIFunctionsObj->CampaignConfirmViews($Token, $CampaignID);

                                                                        if (is_object($campaignConfirmViewsResult)) {
                                                                            $campaignConfirmViewsResult = array($campaignConfirmViewsResult);
                                                                        }

                                                                        if ($campaignConfirmViewsResult[0]->Status == "-1") {
                                                                            $statusMessage = $campaignConfirmViewsResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($campaignConfirmViewsResult as $views) {
                                                                                $confirmViewType = $views->ConfirmViewType;
                                                                                $lastConfirmViewDate = $views->LastConfirmViewDate;
                                                                                $emailAddress = $views->EmailAddress;
                                                                                $status = $views->Status;
                                                                                $statusMessage = $views->StatusMessage;
                                                                            }
                                                                        }
                                                                  
                                                            

Get unsubscribes

Get a list of recipients that have an ‘unsubscribed’ status for a given campaign based on campaignID.

Call details

Call ID
CampaignUnsubscribes
Call
                                                            
                                                                  // C#
                                                                  RecipientUnsubscribe[] recipientUnsubscribeResult = List < RecipientUnsubscribe > CampaignUnsubscribes(string tokenID, string campaignID);
                                                            
                                                      
                                                            
                                                                  // PHP
                                                                  $campaignUnsubscribesResult = $APIFunctionsObj->CampaignUnsubscribes($Token, $CampaignID);
                                                            
                                                      
Returns
RecipientUnsubscribe object array with details
Request parameters
                                                            
                                                                  string tokenID
                                                                  string campaignID
                                                            
                                                      
Return parameters
                                                            
                                                                  string EmailAddress 
                                                                  string Status
                                                                  string StatusMessage
                                                                  string UnsubscribeDate
                                                                  string Status
                                                                  string StatusMessage
                                                            
                                                      

Example Code

                                                                  
                                                                        tokenID = tokenResult.TokenID;

                                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                                        RecipientUnsubscribe[] recipientUnsubscribeResult = cmpClient.CampaignUnsubscribes(tokenID, campaignID);

                                                                        if (recipientUnsubscribeResult[0].Status == "-1")
                                                                        {
                                                                              string statusMessage = recipientUnsubscribeResult[0].StatusMessage.ToString();
                                                                        }
                                                                        else
                                                                        {
                                                                              for (int i = 0; i < recipientUnsubscribeResult.Length; i++)
                                                                              {
                                                                                    // Do something
                                                                                    string emailAddress = recipientUnsubscribeResult[i].EmailAddress.ToString();
                                                                                    string status = recipientUnsubscribeResult[i].Status.ToString();
                                                                                    string statusMessage = recipientUnsubscribeResult[i].StatusMessage.ToString();
                                                                                    string unsubscribeDate = recipientUnsubscribeResult[i].UnsubscribeDate.ToString();
                                                                                    string status = recipientUnsubscribeResult[i].Status.ToString();
                                                                                    string statusMessage = recipientUnsubscribeResult[i].StatusMessage.ToString();
                                                                              }
                                                                        }
                                                                  
                                                            
                                                                  
                                                                        $CampaignID = "144402";

                                                                        $campaignUnsubscribesResult = $APIFunctionsObj->CampaignUnsubscribes($Token, $CampaignID);

                                                                        if (is_object($campaignUnsubscribesResult)) {
                                                                            $campaignUnsubscribesResult = array($campaignUnsubscribesResult);
                                                                        }

                                                                        if ($campaignUnsubscribesResult[0]->Status == "-1") {
                                                                            $statusMessage = $campaignUnsubscribesResult[0]->StatusMessage;
                                                                        } else {
                                                                            foreach($campaignUnsubscribesResult as $unsubscribes) {
                                                                                $emailAddress = $unsubscribes->EmailAddress;
                                                                                $unsubscribeDate = $unsubscribes->UnsubscribeDate;
                                                                                $status = $unsubscribes->Status;
                                                                                $statusMessage = $unsubscribes->StatusMessage;
                                                                            }
                                                                        }