CMAdvantage 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.
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);
								

Send a notification email using a built in template.

Use this api call to send a notification email to your recipients.

Call details

Call ID
SendNotificationEmailThroughTemplate
Call
							
								// C#
								SendNotificationEmailThroughTemplate(TokenID, EmailAddress, TemplateID);
							
							
								// PHP
								$SendNotificationEmail = $APIFunctionsObj->SendNotificationEmailThroughTemplate($Token, $EmailAddress, $TemplateID);
							
Returns
SendNotificationEmailThroughTemplate object with status
Request parameters
							
								string tokenID
								string EmailAddress
								string TemplateID
							
Return parameters
							
								string Status
								string StatusMessage
							

Example Code

								
									tokenID = tokenResult.TokenID
									campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
									MessageResult messageResult = cmpClient.SendNotificationEmailThroughTemplate(tokenID, "user@example.com", "120902");
									if (messageResult.Status == "-1")
									{
										string statusMessage = messageResult.StatusMessage.ToString();
									}
									else
									{
										// Do something
										string status = messageResult.Status.ToString();
										string statusMessage = messageResult.StatusMessage.ToString();
									}
								
								
									$templateEditorLink = $APIFunctionsObj->SendNotificationEmailThroughTemplate($Token, $EmailAddress, $TemplateID);
								

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
								$campaignResult = $APIFunctionsObj->CampaignCreate($Token, "Campaign Name", "Campaign Description", "12");
							
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);
								

Resend a sent campaign to a single recipient.

Resend sent campaign to the recipient based on EmailAddress.

Call details

Call ID
ResendToRcptFromSentCampaign
Call
							
								// C#
								ResendToRcptFromSentCampaign(tokenID, emailAddress, listID, campaignID, CustomFieldEdit[] customFieldEdit);
							
							
								// PHP
								$resendToRecipient = $APIFunctionsObj->ResendToRcptFromSentCampaign($Token, $EmailAddress, $ListID, $CampaignID, $CustomFields);
							
Returns
MessageResult object with status message.
Request parameters
							
								string tokenID (Required)
								string emailAddress (Required)
								string listID (Required)
								string campaignID (Required)
								array customFieldEdit (Optional)
							
Return parameters
							
								string Status
								string StatusMessage
							

Example Code

								
									tokenID = tokenResult.TokenID;

									campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

									//Create CustomFieldEdit list object
									List customFieldEditList = new List();

									//Create CustomFieldEdit object
									CustomFieldEdit customFieldEdit;
									 
									// Add New CustomFieldEdit
									customFieldEdit = new CustomFieldEdit();
									customFieldEdit.FieldName = "First Name";
									customFieldEdit.FieldValue = "John";
									customFieldEditList.Add(customFieldEdit);
									customFieldEdit = new CustomFieldEdit();
									customFieldEdit.FieldName = "Birth Date";
									customFieldEdit.FieldValue = "1993-07-01";
									customFieldEditList.Add(customFieldEdit);
									 MessageResult messageResult = cmpClient.ResendToRcptFromSentCampaign(tokenID, "user@example.com", "112179", "448344", customFieldEditList.ToArray());

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

								
								
									$campaignEditorLink = $APIFunctionsObj->ResendToRcptFromSentCampaign($Token, $EmailAddress, $ListID, $CampaignID, $CustomFields);
								

Resend a sent campaign to a List of multiple recipeints.

Resend sent campaign to recipients in theList.

Call details

Call ID
ResendToListFromSentCampaign
Call
							
								// C#
								ResendToListFromSentCampaign(tokenID, listID, campaignID);
							
							
								// PHP
								$resendToRecipient = $APIFunctionsObj->ResendToListFromSentCampaign($Token, $ListID, $CampaignID);
							
Returns
MessageResult object with status message.
Request parameters
							
								string tokenID (Required)
								string listID (Required)
								string campaignID (Required)
							
Return parameters
							
								string Status
								string StatusMessage
							

Example Code

								
									tokenID = tokenResult.TokenID;

									campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

									 MessageResult messageResult = cmpClient.ResendToListFromSentCampaign(tokenID, "112179", "448344");

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

Resend a sent campaign using criteria.

If the listID parameter is blank the search will apply on whole database. If the listID parameter is passed then search will apply on the list.

Call details

Call ID
ResendUsingCriteriaFromSentCampaign
Call
							
								// C#
								ResendUsingCriteriaFromSentCampaign(tokenID, , Criteria[] criteria, listID, campaignID);
							
							
								// PHP
								$resendToRecipient = $APIFunctionsObj->ResendUsingCriteriaFromSentCampaign($Token, $Criteria, $ListID, $CampaignID);
							
Returns
MessageResult object with status message.
Request parameters
							
								string tokenID (Required)
								array  criteriaList (Reqired)
								string listID (Required)
								string campaignID (Required)
							
Return parameters
							
								string Status
								string StatusMessage
							

Example Code

								
									tokenID = tokenResult.TokenID;

					                // Create List object

									List criteriaList = new List();
					 
					                // Create criteria object
					                Criteria criteria;

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

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

					                criteria = new Criteria();
					                criteria.FieldName = "Last Name";
					                criteria.Operator = OperatorEnum.equals;
					                criteria.FieldValue = "Smith";
					                criteria.LogicalOperator = LogicalOperatorEnum.And;
					                criteriaList.Add(criteria);
					 
					                MessageResult messageResult = cmpClient.ResendUsingCriteriaFromSentCampaign(tokenID, criteriaList.ToArray(), null, "448344");

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

								
								
									$resendUsingCriteria = $APIFunctionsObj->ResendUsingCriteriaFromSentCampaign($Token, $Criteria, $ListID, $CampaignID);
								

Fetch campaign details by CampaignID.

Call details

Call ID
CampaignInformationFetchByID
Call
							
								// C#
								CampaignInformationFetchByID(tokenID, , CampaignIDObject[] );
							
							
								// PHP
								$resendToRecipient = $APIFunctionsObj->CampaignInformationFetchByID($Token, $CampaignIDObject[]);
							
Returns
MessageResult object with status message.
Request parameters
							
								string tokenID (Required)
								array CampaignIDObject (Required) 
							
Return parameters
							
								string Status
								string StatusMessage
							

Example Code

								
								tokenID = tokenResult.TokenID
								campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
								List lstCampaignIDObject = new List();
					                CampaignIDObject campaignIDObject = new CampaignIDObject();
					                campaignIDObject.CampaignID = "448342";
					                lstCampaignIDObject.Add(campaignIDObject);
					                campaignIDObject = new CampaignIDObject();
					                campaignIDObject.CampaignID = "478328";
					                lstCampaignIDObject.Add(campaignIDObject);
					                campaignIDObject = new CampaignIDObject();
					                campaignIDObject.CampaignID = "488335";
					                lstCampaignIDObject.Add(campaignIDObject);
					                CampaignResult[] campaignResult = cmpClient.CampaignInformationFetchByID(tokenID, lstCampaignIDObject.ToArray());
					                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 campaignStatus = campaignResult[i].CampaignStatus.ToString();
					                        string createdDate = campaignResult[i].CreatedDate.ToString();
					                        string modifiedDate = campaignResult[i].ModifiedDate.ToString();
					                        string sendDate = campaignResult[i].SendDate.ToString();                        
					                        string status = campaignResult[i].Status.ToString();
					                        string statusMessage = campaignResult[i].StatusMessage.ToString();
					                    }
					                }
								
								
									$fetchCampaignInfo = $APIFunctionsObj->CampaignInformationFetchByID($Token, $Criteria, $ListID, $CampaignIDObject[]);
								

SMS Campaigns

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

SMS Campaign Create

This call will create SMS type campaign.

Call details

Call ID
SMSCampaignCreate
Call
                            
                                                    // PHP
                                                    $SMSCampaignCreateResult = $APIFunctionsObj->SMSCampaignCreate($Token, "Campaign Name", "Campaign Description");
                                                
                            
                                                    // C#
                                                    SMSCampaignCreateResult = SMSCampaignCreate(string tokenID, string campaignName, string campaignDescription);
                                                
Returns
CampaignDetailsResult object with campaign details
Request parameters
                            
                                                    string tokenID
                                                    string campaignID
                                                    string campaignDescription
                                                
Return parameters
                            
                                                    string CampaignDescription
                                                    string CampaignID
                                                    string CampaignName
                                                    string CreatedDate
                                                    string ModifiedDate
                                                    string Status
                                                    string StatusMessage
                                                

Example Code

                                
                                                        tokenID = tokenResult.TokenID;

                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                        CreateSMSCampaign smsCampaignResult = cmpClient.SMSCampaignCreate(tokenID, "Campaign Name", "Campaign Description");

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

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

SMS Campaign Edit

This call will edit SMS type campaign details including template, validity, character set, message, allow extended message.

Call details

Call ID
SMSCampaignEdit
Call
                            
                                                    // PHP
                                                    $campaignDetailsResult = $APIFunctionsObj->SMSCampaignEdit($Token, $campaignID, $templateID, $validity, $characterSet, $message, $allowExtendedMsg);
                                                
                            
                                                    // C#
                                                    CampaignDetailsResult =  SMSCampaignEdit(token, campaignID, templateID, validity, characterSet, message, allowExtendedMsg);
                                                
Returns
CreateSMSCampaign object with campaign details
Request parameters
                            
                                                    string      tokenID
                                                    string      campaignID
                                                    string      templateID (optional)
                                                    string      validityInHours (1,2,3,4,6,9,12,18,24,30,36,48,60,72)
                                                    string      characterSet (unicode or gsm_3_38)
                                                    string      message
                                                    string      allowExtendedMsg (yes or no)
                                                
Return parameters
                            
                                                    string CampaignDescription
                                                    string CampaignID
                                                    string CampaignName
                                                    string CreatedDate
                                                    string ModifiedDate
                                                    string Status
                                                    string StatusMessage
                                                

Example Code

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

                                                        CreateSMSCampaign smsCampaignEditResult = cmpClient.SMSCampaignEdit(token, "12345", "", "24", "unicode", "your sms text body", "yes");

                                                        if (smsCampaignEditResult.Status == "-1")
                                                        {
                                                        string statusMessage = smsCampaignEditResult.StatusMessage.ToString();
                                                        }
                                                        else
                                                        {
                                                        // Do something
                                                        string returnedCampaignDescription = smsCampaignEditResult.CampaignDescription.ToString();
                                                        string campaignId = smsCampaignEditResult.CampaignID.ToString();
                                                        string returnedCampaignName = smsCampaignEditResult.CampaignName.ToString();
                                                        string createdDate = smsCampaignEditResult.CreatedDate.ToString();
                                                        string modifiedDate = smsCampaignEditResult.ModifiedDate.ToString();
                                                        string status = smsCampaignEditResult.Status.ToString();
                                                        string statusMessage = smsCampaignEditResult.StatusMessage.ToString();
                                                        }
                                                    
                                
                                                        
                                                        $smsCampaignEditResult = $APIFunctionsObj->SMSCampaignEdit($Token, "12345", "", "24", "unicode", "your sms text body", "yes");

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

Get SMS Campaign Text Body

This call will get SMS type campaign text body content.

Call details

Call ID
SMSCampaignTextGet
Call
                            
                                                    // PHP
                                                    $smsCampaignTextGetResult = $APIFunctionsObj->SMSCampaignTextGet($Token, $campaignID);
                                                
                            
                                                    // C#
                                                    smsCampaignTextGetResult = SMSCampaignTextGet(string tokenID, string campaignID);
                                                
Returns
SMSCampaignTextContent object with campaign details
Request parameters
                            
                                                    string tokenID
                                                    string campaignID
                                                
Return parameters
                            
                                                    string CampaignID
                                                    string CampaignName
                                                    string CreatedDate
                                                    string ModifiedDate
                                                    string Status
                                                    string StatusMessage
                                                    string TextContent
                                                

Example Code

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

                                                        SMSCampaignTextContent smsCampaignTextGetResult = cmpClient.SMSCampaignTextGet(token, "12345");

                                                        if (smsCampaignTextGetResult.Status == "-1")
                                                        {
                                                        string statusMessage = smsCampaignTextGetResult.StatusMessage.ToString();
                                                        }
                                                        else
                                                        {
                                                        // Do something
                                                        string campaignId = smsCampaignTextGetResult.CampaignID.ToString();
                                                        string returnedCampaignName = smsCampaignTextGetResult.CampaignName.ToString();
                                                        string createdDate = smsCampaignTextGetResult.CreatedDate.ToString();
                                                        string modifiedDate = smsCampaignTextGetResult.ModifiedDate.ToString();
                                                        string status = smsCampaignTextGetResult.Status.ToString();
                                                        string statusMessage = smsCampaignTextGetResult.StatusMessage.ToString();
                                                        string textContent = smsCampaignTextGetResult.TextContent.ToString();
                                                        }
                                                    
                                
                                                        $smsCampaignTextGetResult = $APIFunctionsObj->SMSCampaignTextGet($Token, "12345");

                                                        if ($smsCampaignTextGetResult->Status == "-1") 
                                                        {
                                                        $statusMessage = $smsCampaignTextGetResult->StatusMessage;
                                                        } 
                                                        else 
                                                        {
                                                        $campaignID = $smsCampaignTextGetResult->CampaignID;
                                                        $campaignName = $smsCampaignTextGetResult->CampaignName;
                                                        $createdDate = $smsCampaignTextGetResult->CreatedDate;
                                                        $modifiedDate = $smsCampaignTextGetResult->ModifiedDate;
                                                        $status = $smsCampaignTextGetResult->Status;
                                                        $statusMessage = $smsCampaignTextGetResult->StatusMessage;
                                                        $textContent = $smsCampaignTextGetResult->TextContent;
                                                        }
                                                    

Get SMS Campaign

This call will get SMS type campaign details.

Call details

Call ID
SMSCampaignFetchByID
Call
                            
                                                    // PHP
                                                    $smsCampaignFetchByIDResult = $APIFunctionsObj->SMSCampaignFetchByID($Token, "12345");
                                                
                            
                                                    // C#
                                                    smsCampaignFetchByIDResult = SMSCampaignFetchByID(string tokenID, "12345");
                                                
Returns
SMSCampaignFetchByIDResult object with details
Request parameters
                            
                                                    string tokenID
                                                    string campaignID
                                                
Return parameters
                            
                                                    string campaignID
                                                    string campaignDescription
                                                    string campaignName
                                                    string createdDate
                                                    string modifiedDate
                                                    string textContent
                                                    string templateID
                                                    string validity
                                                    string characterSet
                                                    string allowExtendedMsg
                                                    string replyTypeID
                                                    string replyText
                                                    string status
                                                    string statusMessage
                                                

Example Code

                                
                                                        tokenID = tokenResult.TokenID;

                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                        SMSCampaignFetchByIDResult smsCampaignFetchByIDResult = cmpClient.SMSCampaignFetchByID(tokenID, "12345");

                                                        if (smsCampaignFetchByIDResult.Status == "-1")
                                                        {
                                                        string statusMessage = smsCampaignFetchByIDResult.StatusMessage.ToString();
                                                        }
                                                        else
                                                        {
                                                        // Do something
                                                        string campaignId = smsCampaignFetchByIDResult.CampaignID.ToString();
                                                        string returnedCampaignName = smsCampaignFetchByIDResult.CampaignName.ToString();
                                                        string createdDate = smsCampaignFetchByIDResult.CreatedDate.ToString();
                                                        string modifiedDate = smsCampaignFetchByIDResult.ModifiedDate.ToString();
                                                        string status = smsCampaignFetchByIDResult.Status.ToString();
                                                        string statusMessage = smsCampaignFetchByIDResult.StatusMessage.ToString();
                                                        string textContent = smsCampaignFetchByIDResult.TextContent.ToString();
                                                        string templateID = smsCampaignFetchByIDResult.TemplateID.ToString();
                                                        string validity = smsCampaignFetchByIDResult.Validity.ToString();
                                                        string characterSet = smsCampaignFetchByIDResult.CharacterSet.ToString();
                                                        string allowExtendedMsg = smsCampaignFetchByIDResult.AllowExtendedMsg.ToString();
                                                        string replyTypeID = smsCampaignFetchByIDResult.ReplyTypeID.ToString();
                                                        string replyText = smsCampaignFetchByIDResult.ReplyText.ToString();
                                                        }
                                                    
                                
                                                        $smsCampaignFetchByIDResult = $APIFunctionsObj->SMSCampaignFetchByID($Token, "12345");

                                                        if ($smsCampaignFetchByIDResult->Status == "-1")
                                                        {
                                                        $statusMessage = $smsCampaignFetchByIDResult->StatusMessage;
                                                        }
                                                        else
                                                        {
                                                        $campaignID = $smsCampaignFetchByIDResult->CampaignID;
                                                        $campaignName = $smsCampaignFetchByIDResult->CampaignName;
                                                        $createdDate = $smsCampaignFetchByIDResult->CreatedDate;
                                                        $modifiedDate = $smsCampaignFetchByIDResult->ModifiedDate;
                                                        $status = $smsCampaignFetchByIDResult->Status;
                                                        $statusMessage = $smsCampaignFetchByIDResult->StatusMessage;
                                                        $textContent = $smsCampaignFetchByIDResult->TextContent;
                                                        $templateID = $smsCampaignFetchByIDResult->TemplateID;
                                                        $validity = $smsCampaignFetchByIDResult->Validity;
                                                        $characterSet = $smsCampaignFetchByIDResult->CharacterSet;
                                                        $allowExtendedMsg = $smsCampaignFetchByIDResult->AllowExtendedMsg;
                                                        $replyTypeID = $smsCampaignFetchByIDResult->ReplyTypeID;
                                                        $replyText = $smsCampaignFetchByIDResult->ReplyText;
                                                        }
                                                    

SMS Campaign Reply Options Add

This call will add type of reply options of SMS campaign.

Call details

Call ID
SMSCampaignReplyOptionsAdd
Call
                            
                                                    // PHP
                                                    $smsCampaignReplyOptionsAddResult = $APIFunctionsObj->SMSCampaignReplyOptionsAdd($Token, $CampaignID, );
                                                
                            
                                                    // C#
                                                    smsCampaignReplyOptionsAddResult = SMSCampaignReplyOptionsAdd(string tokenID, string campaignID);
                                                
Returns
SMSCampaignReplyOptionsResult object with details
Request parameters
                            
                                                    string tokenID
                                                    string campaignID
                                                    string replyTypeID
                                                    string replyText
                                                
Return parameters
                            
                                                    string CampaignID
                                                    string CampaignName
                                                    string CreatedDate
                                                    string ModifiedDate
                                                    string Status
                                                    string StatusMessage
                                                

Example Code

                                
                                                        tokenID = tokenResult.TokenID;
                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                        SMSCampaignReplyOptionsResult smsCampaignReplyOptionsAddResult = cmpClient.SMSCampaignReplyOptionsAdd(tokenID, "12345", "1", "asdas");

                                                        if (smsCampaignReplyOptionsAddResult.Status == "-1")
                                                        {
                                                        string statusMessage = smsCampaignReplyOptionsAddResult.StatusMessage.ToString();
                                                        }
                                                        else
                                                        {
                                                        string campaignId = smsCampaignReplyOptionsAddResult.CampaignID.ToString();
                                                        string returnedCampaignName = smsCampaignReplyOptionsAddResult.CampaignName.ToString();
                                                        string createdDate = smsCampaignReplyOptionsAddResult.CreatedDate.ToString();
                                                        string modifiedDate = smsCampaignReplyOptionsAddResult.ModifiedDate.ToString();
                                                        string status = smsCampaignReplyOptionsAddResult.Status.ToString();
                                                        string statusMessage = smsCampaignReplyOptionsAddResult.StatusMessage.ToString();
                                                        }
                                                    
                                

                                                        $smsCampaignReplyOptionsAddResult = $APIFunctionsObj->SMSCampaignReplyOptionsAdd($Token, "12345", "1", "asdas");

                                                        if ($CampaignContent->Status == "-1") {
                                                        $statusMessage = $smsCampaignReplyOptionsAddResult->StatusMessage;
                                                        } else {
                                                        $campaignID = $smsCampaignReplyOptionsAddResult->CampaignID;
                                                        $campaignName = $smsCampaignReplyOptionsAddResult->CampaignName;
                                                        $createdDate = $smsCampaignReplyOptionsAddResult->CreatedDate;
                                                        $modifiedDate = $smsCampaignReplyOptionsAddResult->ModifiedDate;
                                                        $status = $smsCampaignReplyOptionsAddResult->Status;
                                                        $statusMessage = $smsCampaignReplyOptionsAddResult->StatusMessage;
                                                        }
                                                    

Attach list to SMS campaign

This call will attach a given list to the specified SMS campaign.

Call details

Call ID
SMSCampaignAttachList
Call
                            
                                                    // PHP
                                                    $messageResult  = $APIFunctionsObj->SMSCampaignAttachList($Token, $CampaignID, $ListID, $Criteria);
                                                
                            
                                                    // C#
                                                    MessageResult = SMSCampaignAttachList(string tokenID, string campaignID, string listID, array criteriaList);
                                                
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.SMSCampaignAttachList(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->SMSCampaignAttachList($Token, $CampaignID, $ListID, $Criteria);

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

Send SMS campaign test

This call will send out a test message of campaign to specified test number.

Call details

Call ID
SMSCampaignSendTest
Call
                            
                                                    // C#
                                                    MessageResult = SMSCampaignSendTest(string tokenID, string campaignID, string testNumber);
                                                
                            
                                                    // PHP
                                                    $messageResult = $APIFunctionsObj->SMSCampaignSendTest($Token, $campaignID, $testNumber);
                                                
Returns
MessageResult object with status
Request parameters
                            
                                                    string tokenID
                                                    string campaignID
                                                    string testNumber

                                                
Return parameters
                            
                                                    
                                                    string Status
                                                    string StatusMessage
                                                

Example Code

                                
                                                        tokenID = tokenResult.TokenID;

                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                        MessageResult messageResult = cmpClient.SMSCampaignSendTest(tokenID, "12345", "xxxxxxxxxxx");

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

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

Get SMS campaign test message status

This call will get last test message status of campaign.

Call details

Call ID
SMSCampaignGetTestStatus
Call
                            
                                                    // C#
                                                     smsCampaignGetTestStatusResult = SMSCampaignGetTestStatus(string tokenID, string campaignID);
                                                
                            
                                                    // PHP
                                                    $smsCampaignGetTestStatusResult = $APIFunctionsObj->SMSCampaignGetTestStatus($Token, $CampaignID);
                                                
Returns
SMSTestMessageStatusResult object with details
Request parameters
                            
                                                    string tokenID
                                                    string campaignID

                                                
Return parameters
                            
                                                    string testMessageStatus
                                                    string Status
                                                    string StatusMessage

                                                

Example Code

                                
                                                        tokenID = tokenResult.TokenID;

                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                        SMSTestMessageStatusResult smsCampaignGetTestStatusResult = cmpClient.SMSCampaignGetTestStatus(tokenID, "12345");

                                                        if (smsCampaignGetTestStatusResult.Status == "-1")
                                                        {
                                                        string statusMessage = smsCampaignGetTestStatusResult.StatusMessage.ToString();
                                                        }
                                                        else
                                                        {
                                                        // Do something
                                                        string testMessageStatus = smsCampaignGetTestStatusResult.TestMessageStatus.ToString();
                                                        string status = smsCampaignGetTestStatusResult.Status.ToString();
                                                        string statusMessage = smsCampaignGetTestStatusResult.StatusMessage.ToString();
                                                        }
                                                    
                                
                                                        $smsCampaignGetTestStatusResult = $APIFunctionsObj->SMSCampaignSendTest($Token, "12345");

                                                        if ($smsCampaignGetTestStatusResult->Status == "-1") {
                                                        $statusMessage = $smsCampaignGetTestStatusResult->StatusMessage;
                                                        } else {
                                                        $testMessageStatus = $smsCampaignGetTestStatusResult->TestMessageStatus;
                                                        $status = $smsCampaignGetTestStatusResult->Status;
                                                        $statusMessage = $mess$smsCampaignGetTestStatusResultageResult->StatusMessage;
                                                        }
                                                    

Launch SMS campaign immediately

This call will launch a campaign immediately to the attached list..

Call details

Call ID
SMSCampaignLaunchImmediately
Call
                            
                                                    // C#
                                                    messageResult = SMSCampaignLaunchImmediately(string TokenID, string CampaignID)
                                                
                            
                                                    // PHP
                                                    $messageResult = $APIFunctionsObj->SMSCampaignLaunchImmediately($Token, $CampaignID);
                                                
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 messageResult = cmpClient.SMSCampaignLaunchImmediately(tokenID, "12345");

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

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

Schedule SMS campaign

This call will schedule a campaign to be sent at a specified date.

Call details

Call ID
SMSCampaignSchedule
Call
                            
                                                    // C#
                                                    messageResult = SMSCampaignSchedule(string tokenID, string campaignID,string scheduleDateTime);
                                                
                            
                                                    // PHP
                                                    $messageResult = $APIFunctionsObj->SMSCampaignSchedule($Token, $CampaignID, $ScheduleDateTime);
                                                
Returns
MessageResult object with status
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 messageResult = cmpClient.SMSCampaignSchedule(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->SMSCampaignSchedule($Token, $CampaignID, $ScheduleDateTime);

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

Get SMS Campaign Activity

Create a new campaign from an existing template.

Call details

Call ID
SMSCampaignActivityFetchByID
Call
                            
                                                    // C#
                                                    SMSCampResultModel smsCampaignActivityFetchByIDResult = SMSCampaignActivityFetchByID(string tokenID, string campaignName, string campaignDescription, string templateID);
                                                
                            
                                                    // PHP
                                                    $smsCampaignActivityFetchByIDResult = $APIFunctionsObj->SMSCampaignActivityFetchByID($Token, "Campaign Name", "Campaign Description", "12");
                                                
Returns
SMSCampResultModel object with campaign activity details
Request parameters
                            
                                                    string tokenID
                                                    string campaignID

                                                
Return parameters
                            
                                                    string CampaignID
                                                    string CampaignDescription
                                                    string CampaignName
                                                    string ContactSelected
                                                    string TotalSMSSent
                                                    string FailedMessages
                                                    string TotalUnsubscribes
                                                    string TotalReplies
                                                    string Status
                                                    string StatusMessage

                                                

Example Code

                                
                                                        tokenID = tokenResult.TokenID;

                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                        SMSCampResultModel smsCampaignActivityFetchByIDResult = cmpClient.SMSCampaignActivityFetchByID(tokenID, "12345");

                                                        if (smsCampaignActivityFetchByIDResult.Status == "-1")
                                                        {
                                                        string statusMessage = smsCampaignActivityFetchByIDResult.StatusMessage.ToString();
                                                        }
                                                        else
                                                        {
                                                        // Do something
                                                        string returnedCampaignDescription = smsCampaignActivityFetchByIDResult.CampaignDescription.ToString();
                                                        string campaignId = smsCampaignActivityFetchByIDResult.CampaignID.ToString();
                                                        string returnedCampaignName = smsCampaignActivityFetchByIDResult.CampaignName.ToString();
                                                        string contactSelected = smsCampaignActivityFetchByIDResult.ContactSelected.ToString();
                                                        string failedMessages = smsCampaignActivityFetchByIDResult.FailedMessages.ToString();
                                                        string totalReplies = smsCampaignActivityFetchByIDResult.TotalReplies.ToString();
                                                        string totalSMSSent = smsCampaignActivityFetchByIDResult.TotalSMSSent.ToString();
                                                        string totalUnsubscribes = smsCampaignActivityFetchByIDResult.TotalUnsubscribes.ToString();
                                                        string status = smsCampaignActivityFetchByIDResult.Status.ToString();
                                                        string statusMessage = smsCampaignActivityFetchByIDResult.StatusMessage.ToString();
                                                        }
                                                    
                                
                                                        $smsCampaignActivityFetchByIDResult = $APIFunctionsObj->SMSCampaignActivityFetchByID($Token, "12345");

                                                        if ($smsCampaignActivityFetchByIDResult->Status == "-1") {
                                                        $statusMessage = $smsCampaignActivityFetchByIDResult->StatusMessage;
                                                        } else {
                                                        $campaignDescription = $smsCampaignActivityFetchByIDResult->CampaignDescription;
                                                        $campaignID = $smsCampaignActivityFetchByIDResult->CampaignID;
                                                        $campaignName = $smsCampaignActivityFetchByIDResult->CampaignName;
                                                        $contactSelected = $smsCampaignActivityFetchByIDResult->ContactSelected;
                                                        $failedMessages = $smsCampaignActivityFetchByIDResult->FailedMessages;
                                                        $totalReplies = $smsCampaignActivityFetchByIDResult->TotalReplies;
                                                        $totalSMSSent = $smsCampaignActivityFetchByIDResult->TotalSMSSent;
                                                        $totalUnsubscribes = $smsCampaignActivityFetchByIDResult->TotalUnsubscribes;
                                                        $status = $smsCampaignActivityFetchByIDResult->Status;
                                                        $statusMessage = $smsCampaignActivityFetchByIDResult->StatusMessage;
                                                        }
                                                    

Get SMS Campaign Recipient Replies

This call will get SMS type campaign replies.

Call details

Call ID
SMSCampaignRecipientReplyFetch
Call
                            
                                                    // C#
                                                    smsCampaignRecipientReplyFetchResult = SMSCampaignRecipientReplyFetch(string tokenID, string campaignID);
                                                
                            
                                                    // PHP
                                                    $smsCampaignRecipientReplyFetchResult = $APIFunctionsObj->SMSCampaignRecipientReplyFetch($Token, "12345");
                                                
Returns
SMSCampaignRecipientReplyFetchResult object with campaign details and reply array.
Request parameters
                            
                                                    string tokenID
                                                    string campaignID

                                                
Return parameters
                            
                                                    string CampaignID
                                                    string CampaignDescription
                                                    string CampaignName
                                                    var SMSCampaignReplies
                                                        string RecipientNumber
                                                        string ReplyMessage
                                                        string Received (Date and time of the message received)
                                                    string Status
                                                    string StatusMessage

                                                

Example Code

                                
                                                        tokenID = tokenResult.TokenID;

                                                        campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();
                                                        smsCampaignRecipientReplyFetchResult = cmpClient.SMSCampaignRecipientReplyFetch(tokenID, "12345");

                                                        if (smsCampaignRecipientReplyFetchResult.Status == "-1")
                                                        {
                                                        string statusMessage = smsCampaignRecipientReplyFetchResult.StatusMessage.ToString();
                                                        }
                                                        else
                                                        {
                                                        // Do something
                                                        string campaignDescription = smsCampaignRecipientReplyFetchResult.CampaignDescription.ToString();
                                                        string campaignID = smsCampaignRecipientReplyFetchResult.CampaignID.ToString();
                                                        string campaignName = smsCampaignRecipientReplyFetchResult.CampaignName.ToString();
                                                        var SMSCampaignReplies = smsCampaignRecipientReplyFetchResult.SMSCampaignReplies;
                                                        for (int i = 0; i < SMSCampaignReplies.Length; i++)
                                                        {
                                                            string recipientNumber = SMSCampaignReplies[i].RecipientNumber.ToString();
                                                            string replyMessage = SMSCampaignReplies[i].ReplyMessage.ToString();
                                                            string received = SMSCampaignReplies[i].Received.ToString();
                                                        }
                                                        string status = smsCampaignRecipientReplyFetchResult.Status.ToString();
                                                        string statusMessage = smsCampaignRecipientReplyFetchResult.StatusMessage.ToString();
                                                        }
                                                    
                                
                                                        $smsCampaignRecipientReplyFetchResult = $APIFunctionsObj->SMSCampaignRecipientReplyFetch($Token, "12345");

                                                        if ($smsCampaignRecipientReplyFetchResult->Status == "-1") {
                                                        $statusMessage = $smsCampaignRecipientReplyFetchResult->StatusMessage;
                                                        } else {
                                                        $campaignDescription = $smsCampaignRecipientReplyFetchResult->CampaignDescription;
                                                        $campaignID = $smsCampaignRecipientReplyFetchResult->CampaignID;
                                                        $campaignName = $smsCampaignRecipientReplyFetchResult->CampaignName;
                                                        $smsCampaignReplies = $smsCampaignRecipientReplyFetchResult->SMSCampaignReplies;
                                                        foreach($smsCampaignRepliesResult as $smsCampaignReplies)
                                                        {
                                                            $recipientNumber =  $smsCampaignRepliesResult->RecipientNumber;
                                                            $replyMessage =  $smsCampaignRepliesResult->ReplyMessage;
                                                            $received =  $smsCampaignRepliesResult->Received;
                                                        }
                                                        $status = $smsCampaignRecipientReplyFetchResult->Status;
                                                        $statusMessage = $smsCampaignRecipientReplyFetchResult->StatusMessage;
                                                        }
                                                    

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 BounceCategory
								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 bounceCategory = campaignSendResult.BounceCategory.ToString();
										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
										$bounceCategory = $campaignSendResult->BounceCategory;
									    $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;
									    }
									}
								

Get clickthrough results

Get clickthrough results based on campaignID.

Call details

Call ID
ClickthroughResultByCampaignID
Call
// C#
ClickthroughResultByCampaignIDResult = ClickthroughResultByCampaignID(TokenID, CampaignID);
// PHP
$ClickthroughResultByCampaignIDResult = $APIFunctionsObj->ClickthroughResultByCampaignID($Token, $CampaignID);
Returns
Clickthrough result with details
Request parameters

                                                string tokenID
                                                string campaignID
                                            
Return parameters

                                                string CampaignDescription
                                                string CampaignID
                                                string CampaignName
                                                string CampaignDescription
                                                string CampaignStatus
                                                string CampaignType
                                                var ClickthroughResult
                                                string ClickthroughID
                                                string ClickthroughName
                                                string TotalClicks
                                                string UniqueClicks
                                                string Status
                                                string StatusMessage
                                            

Example Code


                                                    tokenID = tokenResult.TokenID;

                                                    campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                    CampaignClickThroughResults clickthroughResultByCampaignIDResult = cmpClient.ClickthroughResultByCampaignID(token, "123456");

                                                    if (clickthroughResultByCampaignIDResult.Status == "-1")
                                                    {
                                                        string statusMessage = clickthroughResultByCampaignIDResult.StatusMessage.ToString();
                                                    }
                                                    else
                                                    {
                                                        // Do something
                                                        string campaignDescription = clickthroughResultByCampaignIDResult.CampaignDescription.ToString();
                                                        string returnedCampaignID = clickthroughResultByCampaignIDResult.CampaignID.ToString();
                                                        string campaignName = clickthroughResultByCampaignIDResult.CampaignName.ToString();
                                                        string campaignStatus = clickthroughResultByCampaignIDResult.CampaignStatus.ToString();
                                                        string campaignType = clickthroughResultByCampaignIDResult.CampaignType.ToString();
                                                        var ClickThroughResults = clickthroughResultByCampaignIDResult.ClickThroughResults;
                                                        for (int i = 0; i < ClickThroughResults.Length; i++)
                                                        {
                                                            string clickthroughID = ClickThroughResults[i].ClickthroughID.ToString();
                                                            string clickthroughName= ClickThroughResults[i].ClickthroughName.ToString();
                                                            string totalClicks= ClickThroughResults[i].TotalClicks.ToString();
                                                            string uniqueClicks= ClickThroughResults[i].UniqueClicks.ToString();	
                                                        }
                                                        string status = clickthroughResultByCampaignIDResult[i].Status.ToString();
                                                        string statusMessage = clickthroughResultByCampaignIDResult[i].StatusMessage.ToString();
                                                    }
                                                


                                                    $CampaignID = "123456";

                                                    $clickthroughResultByCampaignIDResult = $APIFunctionsObj->ClickthroughResultByCampaignID($Token, $CampaignID);

                                                    if ($clickthroughResultByCampaignIDResult->Status == "-1")
                                                    {
                                                        $statusMessage = $clickthroughResultByCampaignIDResult->StatusMessage;
                                                    } 
                                                    else 
                                                    {
                                                        // Do something
                                                        $campaignDescription = $clickthroughResultByCampaignIDResult->CampaignDescription;
                                                        $returnedCampaignID = $clickthroughResultByCampaignIDResult->CampaignID;
                                                        $campaignName = $clickthroughResultByCampaignIDResult->CampaignName;
                                                        $campaignStatus = $clickthroughResultByCampaignIDResult->CampaignStatus;
                                                        $campaignType = $clickthroughResultByCampaignIDResult->CampaignType;
                                                        $ClickThroughResults = $clickthroughResultByCampaignIDResult->ClickThroughResults;    
                                                        foreach($ClickThroughResults as $clickthroughs)    
                                                        {
                                                            $clickthroughID =  $clickthroughs->clickthroughID;
                                                            $clickthroughNames =  $clickthroughs->clickthroughName;
                                                            $totalClicks =  $clickthroughs->totalClicks;
                                                            $uniqueClicks =  $clickthroughs->uniqueClicks;
                                                        }    
                                                        $status = $clickthroughResultByCampaignIDResult->Status;
                                                        $statusMessage = $clickthroughResultByCampaignIDResult->StatusMessage;
                                                    }
                                                

Get clickthrough results by clickthroughID

Get clickthrough results based on clickthroughID.

Call details

Call ID
ClickthroughResultsByClickthroughID
Call
// C#
clickthroughResultsByClickthroughIDResult = ClickthroughResultsByClickthroughID(string tokenID, string campaignID, string clickthroughID, string pageNumber, string pageSize);
// PHP
$ClickthroughResultsByClickthroughIDResult = $APIFunctionsObj->ClickthroughResultsByClickthroughID($Token, $CampaignID, $clickthroughID, $pageNumber, $pageSize);
Returns
Clickthrough result with details
Request parameters

                                                string tokenID
                                                string campaignID
                                                string clickthroughID
                                                string pageNumber
                                                string pageSize
Return parameters

                                                string CampaignDescription
                                                string CampaignID
                                                string CampaignName
                                                string CampaignDescription
                                                string CampaignStatus
                                                string CampaignType
                                                string ClickthroughID
                                                string ClickthroughName
                                                var ContactResults
                                                    string ContactID
                                                    string EmailAddress
                                                    string Clicks
                                                string Status
                                                string StatusMessage

Example Code


                                                tokenID = tokenResult.TokenID;

                                                campRef.CampaignManagementClient cmpClient = new CampaignManagementClient();

                                                ClickThroughContactResults  clickthroughResultsByClickthroughIDResult  = cmpClient.ClickthroughResultsByClickthroughID(tokenID, "123456", "987654", "1", "10");

                                                if (clickthroughResultsByClickthroughIDResult.Status == "-1")
                                                {
                                                    string statusMessage = clickthroughResultsByClickthroughIDResult.StatusMessage.ToString();
                                                }
                                                else
                                                {
                                                    // Do something
                                                    string campaignDescription = clickthroughResultsByClickthroughIDResult.CampaignDescription.ToString();
                                                    string returnedCampaignID = clickthroughResultsByClickthroughIDResult.CampaignID.ToString();
                                                    string campaignName = clickthroughResultsByClickthroughIDResult.CampaignName.ToString();
                                                    string campaignStatus = clickthroughResultsByClickthroughIDResult.CampaignStatus.ToString();
                                                    string campaignType = clickthroughResultsByClickthroughIDResult.CampaignType.ToString();
                                                    string ClickthroughID = clickthroughResultsByClickthroughIDResult.ClickthroughID.ToString();
                                                    string ClickthroughName = clickthroughResultsByClickthroughIDResult.ClickthroughName.ToString();
                                                    var ContactResults = clickthroughResultsByClickthroughIDResult.ContactResults;
                                                    for (int i = 0; i < ContactResults.Length; i++)
                                                    {
                                                        string contactID = ContactResults[i].ContactID.ToString();
                                                        string emailAddress= ContactResults[i].EmailAddress.ToString();
                                                        string clicks= ContactResults[i].Clicks.ToString();	
                                                    }
                                                    string status = clickthroughResultsByClickthroughIDResult.Status.ToString();
                                                    string statusMessage = clickthroughResultsByClickthroughIDResult.StatusMessage.ToString();
                                                }
                                            

                                                $CampaignID = "123456";
                                                $ClickthroughID = "987654";
                                                $pageNumber = "1";
                                                $pageSize = "10";

                                                $clickthroughResultsByClickthroughIDResult = $APIFunctionsObj->ClickthroughResultsByClickthroughID($Token, $CampaignID, $ClickthroughID, $pageNumber, $pageSize);

                                                if($clickthroughResultsByClickthroughIDResult->Status == "-1") 
                                                {
                                                    $statusMessage = $clickthroughResultsByClickthroughIDResult->StatusMessage;
                                                } 
                                                else 
                                                {
                                                    // Do something
                                                    $campaignDescription< = $clickthroughResultsByClickthroughIDResult->CampaignDescription;
                                                    $returnedCampaignID = $clickthroughResultsByClickthroughIDResult->CampaignID;
                                                    $campaignName = $clickthroughResultsByClickthroughIDResult->CampaignName;
                                                    $campaignStatus = $clickthroughResultsByClickthroughIDResult->CampaignStatus;
                                                    $campaignType = $clickthroughResultsByClickthroughIDResult->CampaignType;
                                                    $clickthroughID = $clickthroughResultsByClickthroughIDResult->ClickthroughID;
                                                    $clickthroughName = $clickthroughResultsByClickthroughIDResult->ClickthroughName;
                                                    $ContactResults = $clickthroughResultsByClickthroughIDResult->ContactResults;
                                                    foreach($ContactResults as $clickthroughs)
                                                    {
                                                        $contactID =  $clickthroughs->ContactID;
                                                        $emailAddress =  $clickthroughs->EmailAddress;
                                                        $clicks =  $clickthroughs->Clicks;
                                                    }
                                                    $status = $clickthroughResultsByClickthroughIDResult->Status;
                                                    $statusMessage = $clickthroughResultsByClickthroughIDResult->StatusMessage;
                                                }
                                                

Automation

This section describes calls necessary to work with CMAdvantage Automation module.

Get Automation Campaigns

Get list of all automation campaigns within CMAdvantage.

Call details

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

Example Code

								
									tokenID = tokenResult.TokenID;
									campRef.CampaignManagementClient cmpClient = new CampaignManagementClient ();
									CampaignResult [] campaignResult = cmpClient.GetAutomationCampaigns(tokenID).ToArray();
									if (campaignResult [0]. Status == "-1")
									{
										string statusMessage = campaignResult [0].StatusMessage.ToString();
									}
									else
									{
										for (int i = 0; i < campaignResult.Length; i++)
											{
												// Do something		
												string campaignID = campaignResult[i].CampaignID.ToString();
												string campaignName = campaignResult[i].CampaignName.ToString();
												string campaignDescription = campaignResult[i].CampaignDescription.ToString();
												string campaignStatus = campaignResult[i].CampaignStatus.ToString();
												string createdDate = campaignResult[i].CreatedDate.ToString();
												string modifiedDate = campaignResult[i].ModifiedDate.ToString(); 
												string status = campaignResult[i].Status.ToString();
												string statusMessage = campaignResult[i].StatusMessage.ToString();
											}
									}
								
								
									$automationCampaignResult = $APIFunctionsObj->GetAutomationCampaigns($Token);
									if (is_object($automationCampaignResult)) 
									{
										$automationCampaignResult = array($automationCampaignResult);
									}
									if ($automationCampaignResult[0]->Status == "-1") {
										$statusMessage = $automationCampaignResult[0]->StatusMessage;
									} 
									else 
									{	
										foreach($automationCampaignResult 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 Automation Campaign Results

Get automation campaign results based on campaign ID which have approved status within CMAdvantage.

Call details

Call ID
GetAutomationCampaignResults
Call
							
								// C#
								AutomationCampaignResult [] = GetAutomationCampaignResults (string tokenID, string ruleID, string ruleName, string campaignID, string campaignName, string contactID, string emailAddress, string fromDate,string toDate,string pageNumber,string pageSize);
							
							
								// PHP
								$campaignResult = $APIFunctionsObj->GetAutomationCampaignResults($Token, $ruleID, $ruleName, $campaignID, $campaignName, $contactID, emailAddress, $fromDate, $toDate, $pageNumber, $pageSize);
							
Returns
An AutomationCampaignResult object with details
Request parameters
							
								string tokenID (Required)
								string ruleID (Optional), 
								string ruleName (Optional), 
								string campaignID (Optional),
								string campaignName (Optional), 
								string contactID (Optional),
								string emailAddress (Optional), 
								string fromDate (Optional)
								string toDate (Optional)
								string pageNumber (Optional)
								string pageSize (Optional)
							
Return parameters
							
									string Status
									string StatusMessage
									string RuleID
									string RuleName 
									string CampaignID
									string CampaignName
									string RecipientID
									string RecipientEmail
									string SentDate
							

Example Code

								
									campRef.CampaignManagementClient cmpClient = new CampaignManagementClient ();
									AutomationCampaignResult automationCampaignResult = cmpClient.CampaignResults($Token,"ruleid","rulename","campaignid","campaignname","recipientid","emailaddress","2018-12-22","2018-12-22","1","10");
									 if (automationCampaignResult.Status == "-1")
									 {
									 	string statusMessage = automationCampaignResult.StatusMessage.ToString();
									 }
									 else
									 {
									 	for (int i = 0; i < automationCampaignResult.Results.Length; i++)
									 	{
									 		// Do something
									 		string campaignName = automationCampaignResult.Results[i].CampaignName.ToString();
									 		string recipientEmail = automationCampaignResult.Results[i].RecipientEmail.ToString();
									 		string sentDate = automationCampaignResult.Results[i].SentDate.ToString().ToString();
									 	}
									 }
								
								
									$automationCampaignResult = $APIFunctionsObj->GetAutomationCampaignResults($Token,"ruleid","rulename","campaignid","campaignname","recipientid","emailaddress","2018-12-22","2018-12-22","1","10")->Results->CampaignResults;
									if (is_object($automationCampaignResult)) {
										$automationCampaignResult = array($automationCampaignResult);
										 }
									foreach($automationCampaignResult as $campaigns)
									{
										$campaignID = $campaigns->CampaignID;
										$campaignName = $campaigns->CampaignName;
										$recipientEmail = $campaigns->RecipientEmail;
										$recipientID = $campaigns->RecipientID;
										$ruleID = $campaigns->RuleID;
										$ruleName = $campaigns->RuleName;
										$sentDate = $campaigns->SentDate;
									}
								

Data Capture Form

This section describes calls necessary to work with CMAdvantage Data Capture module.

Get Data Capture Forms

Get list of all data capture forms within CMAdvantage.

Call details

Call ID
GetDataCaptureForms
Call
							
    // C#
    DataCaptureFormsDetails[] dataCaptureFormsDetails = GetDataCaptureForms(string tokenID, string pageNumber, string pageSize);

							
    // PHP
    $GetDataCaptureFormsResult = $apifunctionsobj->GetDataCaptureForms($Token, $PageNumber, $PageSize)->GetDataCaptureFormsResult;

Returns
A DataCaptureFormsDetails object array with data capture forms details
Request parameters
							
    string tokenID (Required)
    string pageNumber (Optional)
    string pageSize (Optional)

Return parameters
							
    string DataCaptureFormID
    string DataCaptureFormName
    string PageTitle
    string EditorType
    string RedirectUrl
    string DateStatus
    string StartDate
    string EndDate
    string DataCaptureUrl
    string Status
    string StatusMessage

Example Code

								
    tokenID = tokenResult.TokenID;
    campRef.CampaignManagementClient cmpClient = new CampaignManagementClient ();
    DataCaptureFormsDetails[] dataCaptureFormsDetails = cmpClient.GetDataCaptureForms(tokenID, "1", "5");
    if (dataCaptureFormsDetails[0]. Status == "-1")
    {
    string statusMessage = dataCaptureFormsDetails[0].StatusMessage.ToString();
    }
    else
    {
    for (int i = 0; i < dataCaptureFormsDetails.Length; i++)
    {
    // Do something
    string dataCaptureFormID = dataCaptureFormsDetails[i].DataCaptureFormID.ToString();
    string dataCaptureFormName = dataCaptureFormsDetails[i].DataCaptureFormName.ToString();
    string pageTitle = dataCaptureFormsDetails[i].PageTitle.ToString();
    string editorType = dataCaptureFormsDetails[i].EditorType.ToString();
    string redirectURL = dataCaptureFormsDetails[i].RedirectUrl.ToString();
    string dateStatus = dataCaptureFormsDetails[i].DateStatus.ToString();
    string startDate = dataCaptureFormsDetails[i].StartDate.ToString();
    string endDate = dataCaptureFormsDetails[i].EndDate.ToString();
    string dataCaptureURL = dataCaptureFormsDetails[i].DataCaptureUrl.ToString();
    string status = dataCaptureFormsDetails[i].Status.ToString();
    string statusMessage = dataCaptureFormsDetails[i].StatusMessage.ToString();
    }
    }

								
    $GetDataCaptureFormsResult = $APIFunctionsObj->GetDataCaptureForms($Token, "1", "5")->GetDataCaptureFormsResult;
    if ($GetDataCaptureFormsResult->DataCaptureFormsDetails->Status == "-1") {
    $statusMessage = $GetDataCaptureFormsResult->DataCaptureFormsDetails->StatusMessage;
    }
    else
    {
    foreach($GetDataCaptureFormsResult->DataCaptureFormsDetails as $dataCaptureForm)
    {
    $dataCaptureFormID  = $dataCaptureForm->DataCaptureFormID;
    $dataCaptureFormName = $dataCaptureForm->DataCaptureFormName;
    $pageTitle = $dataCaptureForm->PageTitle;
    $editorType = $dataCaptureForm->EditorType;
    $redirectURL = $dataCaptureForm->RedirectUrl;
    $dateStatus = $dataCaptureForm->DateStatus;
    $startDate = $dataCaptureForm->StartDate;
    $endDate = $dataCaptureForm->EndDate;
    $dataCaptureURL = $dataCaptureForm->DataCaptureUrl;
    $status = $dataCaptureForm->Status;
    $statusMessage = $dataCaptureForm->StatusMessage;
    }
    }

Get Data Capture Forms By DC Form ID

Get a data capture form details by DC form id from within CMAdvantage.

Call details

Call ID
GetDataCaptureFormDetailsByDCFormID
Call
							
    // C#
    DataCaptureFormsDetails dataCaptureFormDetails = GetDataCaptureFormDetailsByDCFormID(string tokenID, string dcFormID);

							
    // PHP
    $GetDataCaptureFormDetailsByDCFormIDResult = $APIFunctionsObj->GetDataCaptureFormDetailsByDCFormID($Token, $dcFormID)->GetDataCaptureFormDetailsByDCFormIDResult;

Returns
A DataCaptureFormDetailsByDCFormIDResult object with data capture form details
Request parameters
							
    string tokenID (Required)
    string dcFormID (Required)

Return parameters
							
    string DataCaptureFormID
    string DataCaptureFormName
    string PageTitle
    string EditorType
    string RedirectUrl
    string DateStatus
    string StartDate
    string EndDate
    string DataCaptureUrl
    string Status
    string StatusMessage

Example Code

								
    tokenID = tokenResult.TokenID;
    campRef.CampaignManagementClient cmpClient = new CampaignManagementClient ();
    DataCaptureFormsDetails dataCaptureFormDetails = cmpClient.GetDataCaptureFormDetailsByDCFormID(tokenID, "123");
    if (dataCaptureFormDetails.Status == "-1")
    {
    string statusMessage = dataCaptureFormDetails.StatusMessage.ToString();
    }
    else
    {

    // Do something
    string dataCaptureFormID = dataCaptureFormDetails.DataCaptureFormID.ToString();
    string dataCaptureFormName = dataCaptureFormDetails.DataCaptureFormName.ToString();
    string pageTitle = dataCaptureFormDetails.PageTitle.ToString();
    string editorType = dataCaptureFormDetails.EditorType.ToString();
    string redirectURL = dataCaptureFormDetails.RedirectUrl.ToString();
    string dateStatus = dataCaptureFormDetails.DateStatus.ToString();
    string startDate = dataCaptureFormDetails.StartDate.ToString();
    string endDate = dataCaptureFormDetails.EndDate.ToString();
    string dataCaptureURL = dataCaptureFormDetails.DataCaptureUrl.ToString();
    string status = dataCaptureFormDetails.Status.ToString();
    string statusMessage = dataCaptureFormDetails.StatusMessage.ToString();

    }

								
    $GetDataCaptureFormDetailsByDCFormIDResult = $APIFunctionsObj->GetDataCaptureFormDetailsByDCFormID($Token, "123")->GetDataCaptureFormDetailsByDCFormIDResult;

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

    $dataCaptureFormID  = $GetDataCaptureFormDetailsByDCFormIDResult->DataCaptureFormID;
    $dataCaptureFormName = $GetDataCaptureFormDetailsByDCFormIDResult->DataCaptureFormName;
    $pageTitle = $GetDataCaptureFormDetailsByDCFormIDResult->PageTitle;
    $editorType = $GetDataCaptureFormDetailsByDCFormIDResult->EditorType;
    $redirectURL = $GetDataCaptureFormDetailsByDCFormIDResult->RedirectUrl;
    $dateStatus = $GetDataCaptureFormDetailsByDCFormIDResult->DateStatus;
    $startDate = $GetDataCaptureFormDetailsByDCFormIDResult->StartDate;
    $endDate = $GetDataCaptureFormDetailsByDCFormIDResult->EndDate;
    $dataCaptureURL = $GetDataCaptureFormDetailsByDCFormIDResult->DataCaptureUrl;
    $status = $GetDataCaptureFormDetailsByDCFormIDResult->Status;
    $statusMessage = $GetDataCaptureFormDetailsByDCFormIDResult->StatusMessage;

    }

Get Data Capture Form Adhoc Fields

Get adhoc fields based on data capture form ID within CMAdvantage.

Call details

Call ID
GetDataCaptureFormAdhocFields
Call
							
    // C#
    DCFormAdhocFieldList[] dcFormAdhocFieldList = GetDataCaptureFormAdhocFields(string tokenID, string DCFormID, string PageNumber, string PageSize);

							
    // PHP
    $GetDataCaptureFormAdhocFieldsResult = $APIFunctionsObj->GetDataCaptureFormAdhocFields($Token, $DCFormID, $PageNumber, $PageSize)->GetDataCaptureFormAdhocFieldsResult;

Returns
An DCFormAdhocFieldList object arrary with adhoc field details
Request parameters
							
    string tokenID (Required)
    string DCFormID (Required)
    string PageNumber (Optional)
    string PageSize (Optional)

Return parameters
							
    string DCFormID
    string AdhocFieldID
    string AdhocFieldName
    string AdhocFieldType
    string IsRequired
    string Status
    string StatusMessage

Example Code

								
    campRef.CampaignManagementClient cmpClient = new CampaignManagementClient ();
    DCFormAdhocFieldList [] dcFormAdhocFieldList = cmpClient.GetDataCaptureFormAdhocFields($Token,"123","1","10");
    if (dcFormAdhocFieldList[0].Status == "-1")
    {
    string statusMessage = dcFormAdhocFieldList[0].StatusMessage.ToString();
    }
    else
    {
    for (int i = 0; i < dcFormAdhocFieldList.Length; i++)
    {
    // Do something
    string dcFormID = dcFormAdhocFieldList[i].DCFormID.ToString();
    string adhocFieldID = dcFormAdhocFieldList[i].AdhocFieldID.ToString();
    string adhocFieldName = dcFormAdhocFieldList[i].AdhocFieldName.ToString();
    string adhocFieldType = dcFormAdhocFieldList[i].AdhocFieldType.ToString();
    string isRequired = dcFormAdhocFieldList[i].IsRequired.ToString();
    string status = dcFormAdhocFieldList[i].Status.ToString().ToString();
    string statusMessage = dcFormAdhocFieldList[i].StatusMessage.ToString();
    }
    }

								
    $GetDataCaptureFormAdhocFieldsResult = $apifunctionsobj->GetDataCaptureFormAdhocFields($Token, "62170","1", "10")->GetDataCaptureFormAdhocFieldsResult;
    if ($GetDataCaptureFormAdhocFieldsResult->DCFormAdhocFieldList[0]->Status == "-1") {
    $statusMessage = $GetDataCaptureFormAdhocFieldsResult->DCFormAdhocFieldList[0]->StatusMessage;
    }
    foreach($GetDataCaptureFormAdhocFieldsResult->DCFormAdhocFieldList as $dcFormAdhocFieldList)
    {
    $dcFormID = $dcFormAdhocFieldList->DCFormID;
    $adhocFieldID = $dcFormAdhocFieldList->AdhocFieldID;
    $adhocFieldName = $dcFormAdhocFieldList->AdhocFieldName;
    $adhocFieldType = $dcFormAdhocFieldList->AdhocFieldType;
    $isRequired = $dcFormAdhocFieldList->IsRequired;
    $status = $dcFormAdhocFieldList->Status;
    $statusMessage = $dcFormAdhocFieldList->StatusMessage;
    }

Get Data Capture Form Results

Get data capture form results based on data capture form ID within CMAdvantage.

Call details

Call ID
GetDataCaptureFormResults
Call
							
    // C#
    DataCaptureFormResults dataCaptureFormResults = GetDataCaptureFormResults (string tokenID, string dcformID, string fromDate, string toDate);

							
    // PHP
    $GetDataCaptureFormResults = $APIFunctionsObj->GetDataCaptureFormResults($Token, $dcformID, $fromDate, $toDate)->GetDataCaptureFormResultsResult;

Returns
An DataCaptureFormResults object with results
Request parameters
							
    string tokenID (Required)
    string DCFormID (Required)
    string FromDate (Optional)
    string ToDate (Optional)

Return parameters
							
									string Status
									string StatusMessage
									jSON object Results

							

Example Code

								
    campRef.CampaignManagementClient cmpClient = new CampaignManagementClient ();
    DataCaptureFormResults dataCaptureFormResults = cmpClient.DataCaptureFormResults(Token,"123","01/08/2022","07/08/2022");
    if (dataCaptureFormResults.Status == "-1")
    {
    string statusMessage = dataCaptureFormResults.StatusMessage.ToString();
    }
    else
    {
    var objJsonResults = dataCaptureFormResults.Results;

    // Do something
    DataTable dtResults = JsonConvert.DeserializeObject(objJsonResults);

    }

								
    $GetDataCaptureFormResults = $APIFunctionsObj->DataCaptureFormResults($Token,"123","01/08/2022","07/08/2022")->GetDataCaptureFormResultsResult;
    if ($GetDataCaptureFormResults->Status == "-1") {
    $statusMessage = $GetDataCaptureFormResults->StatusMessage;
    }
    else
    {
    // Do something
    $DCFormResults = json_decode($GetDataCaptureFormResults->Results);

    }