AuthorizeClient
// C#
TokenResult = AuthorizeClient(string emailID, string password);
// PHP
$Token = $APIFunctionsObj->AuthorizeClient($APIUsername, $APIPassword);
TokenResult
object with TokenID
string emailID
string password
string TokenID
string Status
string StatusMessage
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);
GetRecipients
// C#
GetRecipientsResult[] getRecipientsResult = List < GetRecipientsResult > GetRecipients(string tokenID, int pageNumber, Criteria[] criteria, int pageSize);
// PHP
$recipientsResult = $APIFunctionsObj->GetRecipients($Token, $PageNumber, $CriteriaList, $PageSize);
GetRecipientsResult
array with detail
string tokenID
int pageNumber
array criteria
int pageSize
string EmailAddress
string Status
string StatusMessage
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;
}
}
listID
.
RecipientsFetchByListID
// C#
RecipientResult[] recipientResult = List < RecipientResult > RecipientsFetchByListID(string tokenID, string listID);
// PHP
$recipientsResult = $APIFunctionsObj->RecipientsFetchByListID($Token, $ListID);
RecipientResult
array contacts with details
string tokenID
string listID
string CreatedDate
string EmailAddress
string EmailContentType
string IsActive
string IsVerified
string ListID
string ModifiedDate
string RecipientID
string Status
string StatusMessage
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;
}
}
RecipientAttachedListFetchByRecipientID
// C#
RecipientAttachedListResult[] recipientAttachedListResult = List < RecipientAttachedListResult > RecipientAttachedListFetchByRecipientID(string tokenID, string recipientID);
// PHP
$recipientAttachedListResult = $APIFunctionsObj->RecipientAttachedListFetchByRecipientID($Token, $RecipientID);
RecipientAttachedListResult
array contacts with details.
string tokenID
string recipientID
string ListID
string ListName
string Status
string StatusMessage
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;
}
}
contactID
.
RecipientCampaignSentHistoryFetch
// C#
CampaignHistoryResult[] CampaignHistoryResult = List < CampaignHistoryResult > RecipientCampaignSentHistoryFetch(string tokenID, string contactID);
// PHP
$campaignHistoryResult = $APIFunctionsObj->RecipientCampaignSentHistoryFetch($Token, $ContactID);
CampaignHistoryResult
array with details of campaign history
string tokenID
string contactID
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
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;
}
}
RecipientAdd
// C#
RecipientResult[] recipientResult = RecipientAdd(string tokenID, string emailAddress, ListIDObject[] listIDArray);
// PHP
$result = $APIFunctionsObj->RecipientAdd($Token, $EmailAddress, $Lists);
RecipientResult
object array with details
string tokenID
string emailaddress
array recipientList
string CreatedDate
string EmailAddress
string EmailContentType
string IsActive
string IsVerified
string ListID
string ModifiedDate
string RecipientID
string Status
string StatusMessage
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;
}
}
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
.
AddorUpdateRecipient
// C#
AddorUpdateRecipient(tokenID, emailAddress, recipientID, List , CustomFields);
// PHP
$recipientResult = $APIFunctionsObj->AddorUpdateRecipient($Token, $EmailAddress, $RecipientID, $Lists, $CustomFields);
string tokenID
string emailAddress
string recipientID
array ListID
array CustomFields
string CreatedDate
string EmailAddress
string EmailContentType
string IsActive
string IsVerified
string ListID
string ModifiedDate
string RecipientID
string Status
string StatusMessage
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;
}
}
recipientID
and listID
.
AddRecipientsToLists
// C#
AddRecipientsToLists(tokenId, List< ListIds >, List< RecipientIds >);
// PHP
$result = $APIFunctionsObj->AddRecipientsToLists($Token, $Lists, $Recipients);
String
with the status of the call
string tokenID
string ListID
string RecipientID
string result
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);
EmailAddress
.
RecipientEmailAddressEditByEmailAddress
// C#
RecipientResult RecipientEmailAddressEditByEmailAddress(string tokenID, string existingEmailaddress, string newEmailaddress);
// PHP
$recipientResult = $APIFunctionsObj->RecipientEmailAddressEditByEmailAddress($Token, $ExistingEmailAddress, $NewEmailAddress);
RecipientResult
object with details
string tokenID
string existingEmailaddress
string newEmailaddress
string CreatedDate
string EmailAddress
string EmailContentType
string IsActive
string IsVerified
string ListID
string ModifiedDate
string RecipientID
string Status
string StatusMessage
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;
}
recipientID
.
RecipientEmailAddressEditByRecipientID
// C#
RecipientResult RecipientEmailAddressEditByRecipientID(string tokenID, string recipientID, string newEmailaddress);
// PHP
$recipientResult = $APIFunctionsObj->RecipientEmailAddressEditByRecipientID($Token, $RecipientID, $NewEmailAddress);
RecipientResult
object with details
string tokenID
string recipientID
string newEmailAddress
string CreatedDate
string EmailAddress
string EmailContentType
string IsActive
string IsVerified
string ListID
string ModifiedDate
string RecipientID
string Status
string StatusMessage
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;
}
EmailAddress
.
RecipientUpdateByEmailAddress
// C#
RecipientResult RecipientUpdateByEmailAddress(string tokenID, string emailAddress, CustomFieldEdit[] customFieldEdit);
// PHP
$recipientResult = $APIFunctionsObj->RecipientUpdateByEmailAddress($Token, $EmailAddress, $CustomFields);
RecipientResult
object with details
string tokenID
string emailAddress
array customFieldEdit
string CreatedDate
string EmailAddress
string EmailcontentType
string IsActive
string IsVerified
string ListID
string ModifiedDate
string RecipientID
string Status
string StatusMessage
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;
}
recipientID
.
RecipientUpdateByRecipientID
// C#
RecipientResult RecipientUpdateByRecipientID(string tokenID, string recipientID, CustomFieldEdit[] customFieldEdit);
// PHP
$recipientResult = $APIFunctionsObj->RecipientUpdateByRecipientID($Token, $RecipientID, $CustomFields);
RecipientResult
object with details
string tokenID
string recipientID
array customFieldEdit
string CreatedDate
string EmailAddress
string EmailContentType
string IsActive
string IsVerified
string ListID
string ModifiedDate
string RecipientID
string Status
string StatusMessage
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;
}
EmailAddress
.
RecipientDeleteByEmailaddress
// C#
RecipientResult RecipientDeleteByEmailaddress(string tokenID, string emailaddress);
// PHP
$contactResult = $APIFunctionsObj->RecipientDeleteByEmailaddress($Token, $EmailAddress);
RecipientResult
object with status message
string tokenID
string emailaddress
string CreatedDate
string EmailAddress
string EmailContentType
string IsActive
string IsVerified
string ListID
string ModifiedDate
string RecipientID
string Status
string StatusMessage
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;
}
recipientID
.
RecipientDeleteFromDatabase
// C#
RecipientResult RecipientDeleteFromDatabase(string tokenID, string recipientID);
// PHP
$contactResult = $APIFunctionsObj->RecipientDeleteFromDatabase($Token, $RecipientID);
RecipientResult
object with success or failed message
string tokenID
string recipientID
string CreatedDate
string EmailAddress
string EmailContentType
string IsActive
string IsVerified
string ListID
string ModifiedDate
string RecipientID
string Status
string StatusMessage
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;
}
recipientID
and listID
.
RecipientDeleteFromList
// C#
RecipientResult RecipientDeleteFromList(string tokenID, string recipientID, string listID);
// PHP
$recipientResult = $APIFunctionsObj->RecipientDeleteFromList($Token, $RecipientID, $ListID);
RecipientResult
object with operation result
string tokenID
string recipientID
string listID
string CreatedDate
string EmailAddress
string EmailContentType
string IsActive
string IsVerified
string ListID
string ModifiedDate
string RecipientID
string Status
string StatusMessage
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;
}
DeleteRecipientsLists
// C#
DeleteRecipientsLists(tokenId, List< ListIds >, List< RecipientIds >);
// PHP
$result = $APIFunctionsObj->DeleteRecipientsLists($Token, $Lists, $Recipients);
string tokenID
string ListID
string RecipientID
string Status
string StatusMessage
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);
ListFetch
// C#
ListResult[] listResult = List < ListResult > ListFetch(string tokenID);
// PHP
$listResult = $APIFunctionsObj->ListFetch($Token);
ListResult
object array with ListName
, ListDesciption
, ListMasterID
, TotalCount
, CreateDate
, and ModifiedDate
string tokenID
string CreatedDate
string ListDescription
string ListMasterID
string ListName
string ModifiedDate
int TotalCount
string Status
string StatusMessage
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;
}
}
ListCreate
// C#
ListResult ListCreate(string tokenID, string listName, string listDescription);
// PHP
$listResult = $APIFunctionsObj->ListCreate($Token, "My List", "My List Description");
ListResult
object with ListName
, ListDesciption
, CreateDate
and ModifiedDate
string tokenID
string listName
string listDescription
string CreatedDate
string ListDescription
string ListMasterID
string ListName
string ModifiedDate
string TotalCount
string Status
string StatusMessage
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;
}
listID
.
ListEdit
// C#
MessageResult ListEdit(string tokenID, string listName, string listDescription, string listID);
// PHP
$messageResult = $APIFunctionsObj->ListEdit($Token, "New List Name", "New List Description", "123456");
MessageResult
object with message
string tokenID
string listName
string listDescription
string listID
string Status
string StatusMessage
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;
}
listID
.
ListDelete
// C#
MessageResult ListDelete(string tokenID, string listID);
// PHP
$messageResult = $APIFunctionsObj->ListDelete($Token, "43644");
MessageResult
object with status of the action
string tokenID
string listID
string Status
string StatusMessage
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;
}
ListDeleteWithRecipients
// C#
MessageResult ListDeleteWithRecipients(string tokenID, string listID);
// PHP
$messageResult = $APIFunctionsObj->ListDeleteWithRecipients($Token, "1");
MessageResult
object with status of the action
string tokenID
string listID
string Status
string StatusMessage
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;
}
RecipientEmptyList
// C#
MessageResult messageResult = cmpClient.RecipientEmptyList(tokenID, listID);
// PHP
$messageResult = $APIFunctionsObj->RecipientEmptyList($Token, "43644");
MessageResult
object with status of operation
string tokenID
string listID
string Status
string StatusMessage
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;
}
CustomFieldListFetch
// C#
CustomFieldResult[] customFieldResult = cmpClient.CustomFieldListFetch(tokenID);
// PHP
$customFieldResult = $APIFunctionsObj->CustomFieldListFetch($Token);
customFieldResult
object containing details of all custom fields
string tokenID
string DefaultValue
string FieldDescription
string FieldID
string FieldName
string FieldType
string IsRequired
string MaxLength
string Status
string StatusMessage
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;
}
}
EmailAddress
.
CustomFieldValueFetchByEmailAddress
// C#
RecipientCustomFieldResult[] recipientCustomFieldResult = List < RecipientCustomFieldResult > CustomFieldValueFetchByEmailAddress(string tokenID, string emailAddress);
// PHP
$recipientCustomFieldResult = $APIFunctionsObj->CustomFieldValueFetchByEmailAddress($Token, $EmailAddress);
RecipientCustomFieldResult
object array with details
string tokenID
string emailAddress
string FieldName
string FieldValue
string Status
string StatusMessage
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;
}
}
recipientID
.
CustomFieldValueFetchByRecipientID
// C#
CustomFieldResult[] customFieldResult = cmpClient.CustomFieldValueFetchByRecipientID(tokenID, recipientID);
// PHP
$recipientCustomFieldResult = $APIFunctionsObj->CustomFieldValueFetchByRecipientID($Token, $RecipientID);
RecipientCustomFieldResult
object array with details
string tokenID
string recipientID
string FieldName
string FieldValue
string Status
string StatusMessage
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;
}
}
SuppressContactGlobalListFetch
// C#
SuppressResullt[] SuppressResullt = List < SuppressResullt > SuppressContactGlobalListFetch(string tokenID);
// PHP
$suppressResult = $APIFunctionsObj->SuppressContactGlobalListFetch($Token);
string tokenID
string CreatedBy
string CreatedDate
string EmailAddress
string LastActionType
string SuppressContactID
string Status
string StatusMessage
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;
}
}
CustomFieldAdd
// 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");
CustomFieldResult
object with details
string tokenID
string fieldName
string fieldDescription
string fieldType
string maxLength
string defaultValue
string IsRequired
string DefaultValue
string FieldDescription
string FieldID
string FieldName
string FieldType
string IsRequired
string MaxLength
string Status
string StatusMessage
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;
}
}
CustomFieldDelete
// C#
MessageResult CustomFieldDelete(string tokenID, string customFieldID);
// PHP
$customFieldResult = $APIFunctionsObj->CustomFieldDelete($Token, $CustomFieldID);
MessageResult
object with status message
string tokenID
string customFieldID
string Status
string StatusMessage
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;
}
SuppressContactGlobally
// C#
MessageResult = SuppressContactGlobally(string tokenID, string emailAddress);
// PHP
$jobResult = $APIFunctionsObj->JobDelete($Token, $JobID);
MessageResult
object with message
string tokenID
string emailAddress
string Status
string StatusMessage
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;
}
jobID
.
JobDetailsFetchByID
// C#
JobResult = JobDetailsFetchByID(string tokenID, string jobID);
// PHP
$jobResult = $APIFunctionsObj->JobDetailsFetchByID($Token, $JobID);
JobResult
object with job details
string tokenID
string jobID
string ActualFileName
string EndDateTime
string JobDescMessage
string JobMasterID
string JobStatusID
string QueueDateTime
string StartDateTime
string Status
string StatusMessage
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;
}
jobID
.
JobDescMessageFetch
// C#
JobDescMessageFetch(tokenID, jobID)
// PHP
$jobResult = $APIFunctionsObj->JobDescMessageFetch($Token, $JobID);
string tokenID
string jobID
string ActualFileName
string EndDateTime
string JobDescMessage
string JobMasterID
string JobStatusID
string QueueDateTime
string StartDateTime
string Status
string StatusMessage
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;
}
JobListForContactsImportFetch
// C#
JobResult[] JobResult = List < JobResult > JobListForContactsImportFetch(string tokenID);
// PHP
$jobResult = $APIFunctionsObj->JobListForContactsImportFetch($Token);
JobResult
object array with job details
string tokenID
string ActualFileName
string EndDateTime
string JobDescMessage
string JobMasterID
string JobStatusID
string QueueDateTime
string StartDateTime
string Status
string StatusMessage
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;
}
}
JobListForCampaignScheduleFetch
// C#
JobResult[] JobResult = List < JobResult > JobListForCampaignScheduleFetch(string tokenID);
// PHP
$jobResult = $APIFunctionsObj->JobListForCampaignScheduleFetch($Token);
JobResult
object array with job details
string tokenID
string ActualFileName
string EndDateTime
string JobDescMessage
string JobMasterID
string JobStatusID
string QueueDateTime
string StartDateTime
string Status
string StatusMessage
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;
}
}
JobID
.
JobRecipientsImportedContactList
// C#
JobRecipientsImportedContactList(tokenID, jobID);
// PHP
$jobResult = $APIFunctionsObj->JobRecipientsImportedContactList($Token, $JobID);
JobResult
object array with details
string tokenID
string jobID
string ContactID
string EmailAddress
string ImportStatus
string ModifiedDate
string StatusMessage
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;
}
JobRecipientsImport
// C#
JobImportResult JobRecipientsImport(string tokenID, JobImportProperty jobImportProperty, string json);
// PHP
$jobImportResult = $APIFunctionsObj->JobRecipientsImport($Token, $JobImportProperty, $JSON);
JobImportResult
object with details
string tokenID
Object jobImportProperty
json Data
string JobID
string Status
string StatusMessage
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;
}
JobRecipientsImportWithDelimiter
// C#
JobRecipientsImportWithDelimiter(string tokenID, JobImportProperty jobImportProperty, string json);
// PHP
$jobImportResult = $APIFunctionsObj->JobRecipientsImportWithDelimiter($Token, $JobImportProperty, $JSON, $Delimiter);
JobImportResult
object with details
string tokenID
string jobID
Object jobImportProperty
json Data
string JobID
string Status
string StatusMessage
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;
}
jobID
.
JobDelete
// C#
MessageResult = JobDelete(string tokenID, string jobID);
// PHP
$jobResult = $APIFunctionsObj->JobDelete($Token, $JobID);
MessageResult
object with status
stringtokenID
string jobID
string Status
string StatusMessage
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;
}
TemplateListFetch
// C#
TemplateResult[] templateResult = List < TemplateResult > TemplateListFetch(string tokenID);
// PHP
$templateResult = $APIFunctionsObj->TemplateListFetch($Token);
TemplateResult
object array with status
string tokenID
string CreatedBy
string CreatedDate
string ModifiedBy
string ModifiedDate
string TemplateCategoryID
string TemplateDescription
string TemplateID
string TemplateName
string Status
string StatusMessage
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;
}
}
templateID
.
TemplateFetchHTMLContent
// C#
TemplateContentResult = TemplateFetchHTMLContent(string tokenID, string templateID);
// PHP
$templateContent = $APIFunctionsObj->TemplateFetchHTMLContent($Token, $TemplateID);
TemplateContentResult
object with details
string tokenID
string templateID
string HtmlContent
string TemplateID
string Status
string StatusMessage
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;
}
templateID
.
TemplateFetchTextContent
// C#
TemplateContentResult = TemplateFetchTextContent(string tokenID, string templateID);
// PHP
$templateContent = $APIFunctionsObj->TemplateFetchTextContent($Token, $TemplateID);
TemplateContentResult
object with detail
string tokenID
string templateID
string TextContent
string TemplateID
string Status
string StatusMessage
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;
}
TemplateCategoryListFetch
// C#
TemplateCategoryResult[] templateCategoryResult = List < TemplateCategoryResult > TemplateCategoryListFetch(string tokenID);
// PHP
$templateCategoryResult = $APIFunctionsObj->TemplateCategoryListFetch($Token);
TemplateCategoryResult
array with details
string tokenID
string CreatedDate
string ModifiedDate
string TemplateCategoryDesc
string TemplateCategoryID
string TemplateCategoryName
string Status
string StatusMessage
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;
}
TemplateCreate
// C#
TemplateResult = TemplateCreate(string tokenID, TemplateObject _tmpObj);
// PHP
$templateResult = $APIFunctionsObj->TemplateCreate($Token, $Template);
TemplateResult
object with TemplateID
, TemplateName
, TemplateDesciption
, CreateDate
and modifiedDate
string tokenID
string templateCategoryID
string templateCategoryName
string templateCategoryDesc
string CreatedDate
string ModifiedDate
string TemplateDesc
string TemplateID
string TemplateName
string Status
string StatusMessage
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;
}
TemplateCategoryCreate
// C#
TemplateCategoryResult = TemplateCategoryCreate(string tokenID, string templateCategoryName, string templateCategoryDesc);
// PHP
$templateCategoryResult = $APIFunctionsObj->TemplateCategoryCreate($Token, "Template Category Name", "Template Category Description");
TemplateCategoryResult
object with status message
string tokenID
string templateCategoryName
string templateCategoryDesc
string CreatedDate
string ModifiedDate
string TemplateCategoryDesc
string TemplateCategoryID
string TemplateCategoryName
string Status
string StatusMessage
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;
}
templateID
.
TemplateAddHTMLContent
// C#
MessageResult = TemplateAddHTMLContent(string tokenID, string templateID, string html);
// PHP
$messageResult = $APIFunctionsObj->TemplateAddHTMLContent($Token, $TemplateID, $HTML);
MessageResult
object with status
string tokenID
string templateID
string html
string Status
string StatusMessage
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;
}
templateID
.
TemplateAddTextContent
// C#
MessageResult = TemplateAddTextContent(string tokenID, string templateID, string textContent);
// PHP
$messageResult = $APIFunctionsObj->TemplateAddTextContent($Token, $TemplateID, $Text);
MessageResult
object with status
string okenID
string templateID
string textContent
string Status
string StatusMessage
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;
}
templateID
.
TemplateEdit
// C#
TemplateResult = TemplateEdit(string tokenID, TemplateObject _tmpObj, string templateID);
// PHP
$templateResult = $APIFunctionsObj->TemplateEdit($Token, $Template, $TemplateID);
TemplateResult
object with status
string TemplateCategoryID
string TemplateDescription
string TemplateName
string CreatedBy
string CreatedDate
string ModifiedBy
string ModifiedDate
string TemplateCategoryID
string TemplateDescription
string TemplateID
string TemplateName
string Status
string StatusMessage
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;
}
templateID
.
TemplateDelete
// C#
MessageResult = TemplateDelete(string tokenID, string templateID);
// PHP
$messageResult = $APIFunctionsObj->TemplateDelete($Token, $TemplateID);
MessageResult
object with status
string tokenID
string templateID
string Status
string StatusMessage
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;
}
templateCategoryID
.
TemplateCategoryDelete
// C#
MessageResult = TemplateCategoryDelete(string tokenID, string templateCategoryID);
// PHP
$templateResult = $APIFunctionsObj->TemplateCategoryDelete($Token, $TemplateCategoryID);
MessageResult
object with success or failed message
string tokenID
string templateCategoryID
string Status
string StatusMessage
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;
}
templateID
.
TemplateEditorLinkCreate
// C#
TemplateEditorLinkCreate(TokenID, CampaignID, HostedDomainName, IsEnableSSL);
// PHP
$templateEditorLink = $APIFunctionsObj->TemplateEditorLinkCreate($Token, $TemplateID, $HostedDomainName, true);
TemplateEditorLinkCreateResult
object with status
string tokenID
string TemplateID
string HostedDomainName
boolean IsEnableSSL
string TemplateEditorLinkCreateResult
string Status
string StatusMessage
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);
SendNotificationEmailThroughTemplate
// C#
SendNotificationEmailThroughTemplate(TokenID, EmailAddress, TemplateID);
// PHP
$SendNotificationEmail = $APIFunctionsObj->SendNotificationEmailThroughTemplate($Token, $EmailAddress, $TemplateID);
SendNotificationEmailThroughTemplate
object with status
string tokenID
string EmailAddress
string TemplateID
string Status
string StatusMessage
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);
CampaignFetchByID
// PHP
$campaignResult = $APIFunctionsObj->CampaignFetchByID($Token, $CampaignID);
// C#
CampaignDetailsResult = CampaignFetchByID(string tokenID, string campaignID);
CampaignDetailsResult
object with campaign details
string tokenID
string campaignID
string CampaignDescription
string CampaignID
string CampaignName
string FromAddress
string FromName
string ModifiedDate
string MultiListMasterID
string RedirectEmail
string Subject
string Status
string StatusMessage
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;
}
CampaignActivityFetchByDate
// PHP
$campaignActivityResult = $APIFunctionsObj->CampaignActivityFetchByDate($Token, $FromDate, $ToDate);
// C#
CampaignActivityResult[] campaignActivityResult = List < CampaignResult > CampaignActivityFetchByDate(token, fromDate, toDate);
CampaignActivityResult
array with results
string tokenID
string fromDate
string toDate
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
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;
}
}
DomainListFetch
// PHP
$redirectEmailResult = $APIFunctionsObj->RedirectEmailAddressList($Token);
// C#
DomainResult[] domainResult = List < DomainResult > DomainListFetch(string tokenID);
DomainResult
object array with domain details
string tokenID
string DomainName
string Status
string StatusMessage
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;
}
}
RedirectEmailAddressList
// PHP
$redirectEmailResult = $APIFunctionsObj->RedirectEmailAddressList($Token);
// C#
RedirectEmailResult[] redirectEmailResult = List < RedirectEmailResult > RedirectEmailAddressList(string tokenID);
RedirectEmailResult
array with details
string tokenID
string CreateDate
string DomainName
string FromAddress
string RedirectEmailAddress
string RedirectEmailID
string Status
string StatusMessage
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;
}
}
campaignID
.
CampaignFetchHTMLContent
// PHP
$CampaignContent = $APIFunctionsObj->CampaignFetchHTMLContent($Token, $CampaignID);
// C#
CampaignContentResult = CampaignFetchHTMLContent(string tokenID, string campaignID);
CampaignContentResult
object with details
string tokenID
string campaignID
string CampaignID
string HtmlContent
string TextContent
string Status
string StatusMessage
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;
}
campaignID
.
CampaignFetchTextContent
// PHP
$CampaignContent = $APIFunctionsObj->CampaignFetchTextContent($Token, $CampaignID);
// C#
CampaignContentResult = CampaignFetchTextContent(string tokenID, string campaignID);
CampaignContentResult
object with detail
string tokenID
string campaignID
string CampaignID
string HtmlContent
string TextContent
string Status
string StatusMessage
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;
}
CampaignWIPListFetch
// C#
CampaignResult[] campaignResult = List < CampaignResult > CampaignWIPListFetch(string tokenID);
// PHP
$campaignResult = $APIFunctionsObj->CampaignWIPListFetch($Token);
CampaignResult
object array with campaign details
string tokenID
string CampaignDescription
string CampaignID
string CampaignName
string CreatedDate
string ModifiedDate
string TemplateID
string Status
string StatusMessage
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;
}
}
tokenID
.
CampaignSentListFetch
// C#
CampaignResult[] campaignResult = List < CampaignResult > CampaignSentListFetch(string tokenID);
// PHP
$campaignResult = $APIFunctionsObj->CampaignSentListFetch($Token);
CampaignResult
array with campaign details
string tokenID
string CampaignDescription
string CampaignID
string CampaignName
string CreatedDate
string ModifiedDate
string TemplateID
string Status
string StatusMessage
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;
}
}
CampaignsSentByDate
// C#
CampaignsSentByDate(TokenID, FromDate, ToDate)
// PHP
$campaignResult = $APIFunctionsObj->CampaignsSentByDate($Token, $FromDate, $ToDate);
CampaignsSentByDateResult
array with campaign details
string tokenID
string fromDate
string toDate
string CampaignDescription
string CampaignID
string CampaignName
string SentDate
string Status
string StatusMessage
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;
}
}
tokenID
.
CampaignSceduledListFetch
// C#
CampaignScheduleResult[] campaignScheduleResult = List < CampaignScheduleResult > CampaignSceduledListFetch(string tokenID);
// PHP
$campaignResult = $APIFunctionsObj->CampaignSceduledListFetch($Token);
CampaignScheduleResult
object array with campaign details
string tokenID
string CampaignDescription
string CampaignID
string CampaignName
string CreatedDate
string ModifiedDate
string ScheduleDateTime
string Status
string StatusMessage
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;
}
}
CampaignCreate
// C#
CampaignResult = CampaignCreate(string tokenID, string campaignName, string campaignDescription, string templateID);
// PHP
$campaignResult = $APIFunctionsObj->CampaignCreate($Token, "Campaign Name", "Campaign Description", "12");
CampaignResult
object with campaign details
string tokenID
string campaignName
string campaignDescription
string templateID
string CampaignDescription
string CampaignID
string CampaignName
string CreatedDate
string ModifiedDate
string TemplateID
string Status
string StatusMessage
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;
}
CampaignEdit
// 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");
CampaignResult
object with campaign details
string tokenID
string campaignID
string fromName
string subjectLine
string fromAddress
string redirectEmailAddress
string CampaignDescription
string CampaignID
string CampaignName
string CreatedDate
string ModifiedDate
string TemplateID
string Status
string StatusMessage
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;
}
campaignID
.
CampaignWIPDelete
MessageResult = CampaignWIPDelete(string tokenID, string campaignID);
// PHP
$campaignResult = $APIFunctionsObj->CampaignWIPDelete($Token, "1234");
MessageResult
object with status
string tokenID
string campaignID
string Status
string StatusMessage
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;
}
RedirectEmailAddressAdd
// C#
RedirectEmailResult = RedirectEmailAddressAdd(string tokenID, string redirectEmailAddress, string fromAddress, string domainName);
// PHP
$redirectEmailResult = $APIFunctionsObj->RedirectEmailAddressAdd($Token, "redirect@example.com", "from@example.com", "example.com");
RedirectEmailResult
object with message
string tokenID
string redirectEmailAddress
string fromAddress
string domainName
string DomainName
string FromAddress
string RedirectEmailAddress
string RedirectEmailID
string Status
string StatusMessage
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;
}
RedirectEmailAddressEdit
// 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");
RedirectEmailResult
object with message
string tokenID
string redirectEmailAddress
string fromAddress
string domainName
string CreateDate
string DomainName
string FromAddress
string RedirectEmailAddress
string RedirectEmailID
string Status
string StatusMessage
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;
}
RedirectEmailAddressDelete
// C#
MessageResult = RedirectEmailAddressDelete(string tokenID, string redirectEmailAddressID);
// PHP
$messageResult = $APIFunctionsObj->RedirectEmailAddressDelete($Token, "8");
MessageResult
object with message
string tokenID
string redirectEmailAddressID
string Status
string StatusMessage
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;
}
CampaignAddHTMLContent
// C#
MessageResult = CampaignAddHTMLContent(string tokenID, string campaignID, string html);
// PHP
$messageResult = $APIFunctionsObj->CampaignAddHTMLContent($Token, $CampaignID, $HTML);
MessageResult
object with status
string TokenID
string campaignID
string html
string Status
string StatusMessage
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;
}
CampaignAddTextContent
// C#
MessageResult = CampaignAddTextContent(string tokenID, string campaignID, string textContent);
// PHP
$messageResult = $APIFunctionsObj->CampaignAddTextContent($Token, $CampaignID, $Text);
MessageResult
object with status
string tokenID
string campaignID
string textContent
string Status
string StatusMessage
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;
}
CampaignAttachList
// C#
MessageResult = CampaignAttachList(string tokenID, string campaignID, string listID, array criteriaList);
// PHP
$messageResult = $APIFunctionsObj->CampaignAttachList($Token, $CampaignID, $ListID, $Criteria);
MessageResult
object with status
string tokenID
string campaignID
string listID
array CriteriaList
string Status
string StatusMessage
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;
}
CampaignSendTestEmail
MessageResult = CampaignSendTestEmail(string tokenID, string campaignID, string testEmailAddress, string toEmails);
// PHP
$campaignSendTestEmailResult = $APIFunctionsObj->CampaignSendTestEmail($Token, $CampaignID, $TestEmailAddress, $ToEmails);
MessageResult
object with message
string tokenID
string campaignID
string testEmailAddress
string toEmails
string Status
string StatusMessage
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;
}
CampaignLaunchImmediately
// C#
MessageResult = CampaignLaunchImmediately(string tokenID, string campaignID);
// PHP
$campaignResult = $APIFunctionsObj->CampaignLaunchImmediately($Token, $CampaignID);
MessageResult
object with message
string tokenID
string campaignID
string Status
string StatusMessage
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;
}
CampaignSchedule
// C#
MessageResult = CampaignSchedule(string tokenID, string campaignID, string scheduleDateTime);
// PHP
$campaignResult = $APIFunctionsObj->CampaignSchedule($Token, $CampaignID, $ScheduleDateTime);
MessageResult
object with message
string tokenID
string campaignID
string scheduleDateTime
string Status
string StatusMessage
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;
}
campaignID
.
CampaignEditorLinkCreate
// C#
CampaignEditorLinkCreate(TokenID, CampaignID, HostedDomainName, IsEnableSSL);
// PHP
$campaignEditorLink = $APIFunctionsObj->CampaignEditorLinkCreate($Token, $CampaignID, $HostedDomainName, true);
editorLink
containing hyperlink to the editor
string tokenID
string CampaignID
string HostedDomainName
boolean IsEnableSSL
string CampaignEditLinkCreateResult
string Status
string StatusMessage
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);
EmailAddress.
ResendToRcptFromSentCampaign
// C#
ResendToRcptFromSentCampaign(tokenID, emailAddress, listID, campaignID, CustomFieldEdit[] customFieldEdit);
// PHP
$resendToRecipient = $APIFunctionsObj->ResendToRcptFromSentCampaign($Token, $EmailAddress, $ListID, $CampaignID, $CustomFields);
MessageResult
object with status message.
string tokenID (Required)
string emailAddress (Required)
string listID (Required)
string campaignID (Required)
array customFieldEdit (Optional)
string Status
string StatusMessage
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);
List
.
ResendToListFromSentCampaign
// C#
ResendToListFromSentCampaign(tokenID, listID, campaignID);
// PHP
$resendToRecipient = $APIFunctionsObj->ResendToListFromSentCampaign($Token, $ListID, $CampaignID);
MessageResult
object with status message.
string tokenID (Required)
string listID (Required)
string campaignID (Required)
string Status
string StatusMessage
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);
ResendUsingCriteriaFromSentCampaign
// C#
ResendUsingCriteriaFromSentCampaign(tokenID, , Criteria[] criteria, listID, campaignID);
// PHP
$resendToRecipient = $APIFunctionsObj->ResendUsingCriteriaFromSentCampaign($Token, $Criteria, $ListID, $CampaignID);
MessageResult
object with status message.
string tokenID (Required)
array criteriaList (Reqired)
string listID (Required)
string campaignID (Required)
string Status
string StatusMessage
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);
CampaignID
.CampaignInformationFetchByID
// C#
CampaignInformationFetchByID(tokenID, , CampaignIDObject[] );
// PHP
$resendToRecipient = $APIFunctionsObj->CampaignInformationFetchByID($Token, $CampaignIDObject[]);
MessageResult
object with status message.
string tokenID (Required)
array CampaignIDObject (Required)
string Status
string StatusMessage
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[]);
SMSCampaignCreate
// PHP
$SMSCampaignCreateResult = $APIFunctionsObj->SMSCampaignCreate($Token, "Campaign Name", "Campaign Description");
// C#
SMSCampaignCreateResult = SMSCampaignCreate(string tokenID, string campaignName, string campaignDescription);
CampaignDetailsResult
object with campaign details
string tokenID
string campaignID
string campaignDescription
string CampaignDescription
string CampaignID
string CampaignName
string CreatedDate
string ModifiedDate
string Status
string StatusMessage
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;
}
SMSCampaignEdit
// PHP
$campaignDetailsResult = $APIFunctionsObj->SMSCampaignEdit($Token, $campaignID, $templateID, $validity, $characterSet, $message, $allowExtendedMsg);
// C#
CampaignDetailsResult = SMSCampaignEdit(token, campaignID, templateID, validity, characterSet, message, allowExtendedMsg);
CreateSMSCampaign
object with campaign details
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)
string CampaignDescription
string CampaignID
string CampaignName
string CreatedDate
string ModifiedDate
string Status
string StatusMessage
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;
}
SMSCampaignTextGet
// PHP
$smsCampaignTextGetResult = $APIFunctionsObj->SMSCampaignTextGet($Token, $campaignID);
// C#
smsCampaignTextGetResult = SMSCampaignTextGet(string tokenID, string campaignID);
SMSCampaignTextContent
object with campaign details
string tokenID
string campaignID
string CampaignID
string CampaignName
string CreatedDate
string ModifiedDate
string Status
string StatusMessage
string TextContent
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;
}
SMSCampaignFetchByID
// PHP
$smsCampaignFetchByIDResult = $APIFunctionsObj->SMSCampaignFetchByID($Token, "12345");
// C#
smsCampaignFetchByIDResult = SMSCampaignFetchByID(string tokenID, "12345");
SMSCampaignFetchByIDResult
object with details
string tokenID
string campaignID
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
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;
}
SMSCampaignReplyOptionsAdd
// PHP
$smsCampaignReplyOptionsAddResult = $APIFunctionsObj->SMSCampaignReplyOptionsAdd($Token, $CampaignID, );
// C#
smsCampaignReplyOptionsAddResult = SMSCampaignReplyOptionsAdd(string tokenID, string campaignID);
SMSCampaignReplyOptionsResult
object with details
string tokenID
string campaignID
string replyTypeID
string replyText
string CampaignID
string CampaignName
string CreatedDate
string ModifiedDate
string Status
string StatusMessage
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;
}
SMSCampaignAttachList
// PHP
$messageResult = $APIFunctionsObj->SMSCampaignAttachList($Token, $CampaignID, $ListID, $Criteria);
// C#
MessageResult = SMSCampaignAttachList(string tokenID, string campaignID, string listID, array criteriaList);
MessageResult
object with status
string tokenID
string campaignID
string listID
array CriteriaList
string Status
string StatusMessage
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;
}
SMSCampaignSendTest
// C#
MessageResult = SMSCampaignSendTest(string tokenID, string campaignID, string testNumber);
// PHP
$messageResult = $APIFunctionsObj->SMSCampaignSendTest($Token, $campaignID, $testNumber);
MessageResult
object with status
string tokenID
string campaignID
string testNumber
string Status
string StatusMessage
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;
}
SMSCampaignGetTestStatus
// C#
smsCampaignGetTestStatusResult = SMSCampaignGetTestStatus(string tokenID, string campaignID);
// PHP
$smsCampaignGetTestStatusResult = $APIFunctionsObj->SMSCampaignGetTestStatus($Token, $CampaignID);
SMSTestMessageStatusResult
object with details
string tokenID
string campaignID
string testMessageStatus
string Status
string StatusMessage
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;
}
SMSCampaignLaunchImmediately
// C#
messageResult = SMSCampaignLaunchImmediately(string TokenID, string CampaignID)
// PHP
$messageResult = $APIFunctionsObj->SMSCampaignLaunchImmediately($Token, $CampaignID);
MessageResult
object with status
string tokenID
string campaignID
string Status
string StatusMessage
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;
}
SMSCampaignSchedule
// C#
messageResult = SMSCampaignSchedule(string tokenID, string campaignID,string scheduleDateTime);
// PHP
$messageResult = $APIFunctionsObj->SMSCampaignSchedule($Token, $CampaignID, $ScheduleDateTime);
MessageResult
object with status
string tokenID
string campaignID
string scheduleDateTime
string Status
string StatusMessage
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;
}
SMSCampaignActivityFetchByID
// C#
SMSCampResultModel smsCampaignActivityFetchByIDResult = SMSCampaignActivityFetchByID(string tokenID, string campaignName, string campaignDescription, string templateID);
// PHP
$smsCampaignActivityFetchByIDResult = $APIFunctionsObj->SMSCampaignActivityFetchByID($Token, "Campaign Name", "Campaign Description", "12");
SMSCampResultModel
object with campaign activity details
string tokenID
string campaignID
string CampaignID
string CampaignDescription
string CampaignName
string ContactSelected
string TotalSMSSent
string FailedMessages
string TotalUnsubscribes
string TotalReplies
string Status
string StatusMessage
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;
}
SMSCampaignRecipientReplyFetch
// C#
smsCampaignRecipientReplyFetchResult = SMSCampaignRecipientReplyFetch(string tokenID, string campaignID);
// PHP
$smsCampaignRecipientReplyFetchResult = $APIFunctionsObj->SMSCampaignRecipientReplyFetch($Token, "12345");
SMSCampaignRecipientReplyFetchResult
object with campaign details and reply array.
string tokenID
string campaignID
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
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;
}
CampaignResults
// C#
CampaignSummaryResult[] = CampaignResults(TokenID, CampaignID);
// PHP
$campaignSummaryResult = $APIFunctionsObj->CampaignResults($Token, $CampaignID);
string tokenID
string campaignID
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
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;
}
EmailAddress
.
CampaignResultsbyEmailAddress
// C#
CampaignSendResult = CampaignResultsbyEmailAddress(string tokenID, string campaignID, string emailAddress);
// PHP
$campaignSendResult = $APIFunctionsObj->CampaignResultsbyEmailAddress($Token, $CampaignID, $EmailAddress);
string tokenID
string campaignID
string emailAddress
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
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;
}
contactID
.
CampaignResultsbyContactID
// C#
CampaignSendResult = CampaignResultsbyContactID(string tokenID, string campaignID, string contactID);
// PHP
$campaignSendResult = $APIFunctionsObj->CampaignResultsbyContactID($Token, $CampaignID, $ContactID);
string tokenID
string campaignID
string contactID
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
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;
}
CampaignResultsbyPages
// C#
CampaignHistoryResult[] campaignHistoryResult = List < CampaignHistoryResult > CampaignResultsbyPages(string tokenID, string campaignID, string pageNumber, string pageSize);
// PHP
$campaignHistoryResult = $APIFunctionsObj->CampaignResultsbyPages($Token, $CampaignID, $PageNumber, $PageSize);
string tokenID
string campaignID
string pageNumber
string pageSize
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
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;
}
campaignID
.
CampaignSummarySendDetailsFetch
// C#
CampaignSentDetailResult = CampaignSummarySendDetailsFetch(string tokenID, string campaignID);
// PHP
$campaignSentDetailResult = $APIFunctionsObj->CampaignSummarySendDetailsFetch($Token, $CampaignID);
CampaignSentDetailResult
object with details
string tokenID
string campaignID
string CampaignID
string HardBounceCount
string MultiPartSendCount
string SoftBounceCount
string TextSendCount
string TotalBounce
string TotalMailSent
string Status
string StatusMessage
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;
}
CampaignSummaryRecipientCriteriaFetch
// C#
CampaignRecipientCriteriaResult = CampaignSummaryRecipientCriteriaFetch(string tokenID, string campaignID);
// PHP
$campaignRecipientCriteriaResult = $APIFunctionsObj->CampaignSummaryRecipientCriteriaFetch($Token, $CampaignID);
CampaignRecipientCriteriaResult
object with summary details
string tokenID
string campaignID
string CampaignName
string EndDate
string StartDate
string TotalChannelSuppress
string TotalGlobalSuppress
string TotalInActive
string TotalSelected
string TotalUnVerified
string Status
string StatusMessage
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;
}
campaignID
.
EmailBounceFetchByCampaignID
// C#
EmailBounceResult[] EmailBounceResult = List < EmailBounceResult > EmailBounceFetchByCampaignID(string tokenID, string campaignID);
// PHP
$emailBounceResult = $APIFunctionsObj->EmailBounceFetchByCampaignID($Token, $CampaignID);
EmailBounceResult
object array with detail
string tokenID
string campaignID
string BounceDate
string EmailAddress
string RecipientID
string Status
string StatusMessage
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;
}
EmailBounceFetchByDateRange
// C#
EmailBounceResult[] EmailBounceResult = List < EmailBounceResult > EmailBounceFetchByDateRange(string tokenID, string startDate, string endDate);
// PHP
$emailBounceResult = $APIFunctionsObj->EmailBounceFetchByDateRange($Token, $StartDate, $EndDate);
EmailBounceResult
object array with detail
string tokenID
string contactID
string startDate
string endDate
string BounceDate
string EmailAddress
string RecipientID
string Status
string StatusMessage
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;
}
}
campaignID
.
CampaignRecipientActivityFetch
// C#
CampaignRecipientActivityResult = CampaignRecipientActivityFetch(string tokenID, string campaignID);
// PHP
$campaignRecipientActivityResult = $APIFunctionsObj->CampaignRecipientActivityFetch($Token, $CampaignID);
CampaignRecipientActivityResult
object with details
string tokenID
string campaignID
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
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;
}
campaignID
.
CampaignUniqueOpens
// C#
CampaignUniqueOpensResult[] campaignUniqueOpensResult = List < CampaignUniqueOpensResult > CampaignUniqueOpens(string tokenID, string campaignID);
// PHP
$campaignUniqueOpensResult = $APIFunctionsObj->CampaignUniqueOpens($Token, $CampaignID);
CampaignUniqueOpensResult
object array with detail
string tokenID
string campaignID
string EmailAddress
string LastOpenedDate
string Status
string StatusMessage
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;
}
}
campaignID
.
CampaignConfirmViews
// C#
CampaignConfirmViewsResult[] campaignConfirmViewsResult = List < CampaignConfirmViewsResult > CampaignConfirmViews(string tokenID, string campaignID);
// PHP
$campaignConfirmViewsResult = $APIFunctionsObj->CampaignConfirmViews($Token, $CampaignID);
CampaignConfirmViewsResult
object array with detail
string tokenID
string campaignID
string ConfirmViewType
string EmailAddress
string LastConfirmViewDate
string Status
string StatusMessage
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;
}
}
campaignID
.
CampaignUnsubscribes
// C#
RecipientUnsubscribe[] recipientUnsubscribeResult = List < RecipientUnsubscribe > CampaignUnsubscribes(string tokenID, string campaignID);
// PHP
$campaignUnsubscribesResult = $APIFunctionsObj->CampaignUnsubscribes($Token, $CampaignID);
RecipientUnsubscribe
object array with details
string tokenID
string campaignID
string EmailAddress
string Status
string StatusMessage
string UnsubscribeDate
string Status
string StatusMessage
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;
}
}
campaignID
.
ClickthroughResultByCampaignID
// C#
ClickthroughResultByCampaignIDResult = ClickthroughResultByCampaignID(TokenID, CampaignID);
// PHP
$ClickthroughResultByCampaignIDResult = $APIFunctionsObj->ClickthroughResultByCampaignID($Token, $CampaignID);
string tokenID
string campaignID
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
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;
}
clickthroughID
.
ClickthroughResultsByClickthroughID
// C#
clickthroughResultsByClickthroughIDResult = ClickthroughResultsByClickthroughID(string tokenID, string campaignID, string clickthroughID, string pageNumber, string pageSize);
// PHP
$ClickthroughResultsByClickthroughIDResult = $APIFunctionsObj->ClickthroughResultsByClickthroughID($Token, $CampaignID, $clickthroughID, $pageNumber, $pageSize);
string tokenID
string campaignID
string clickthroughID
string pageNumber
string pageSize
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
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;
}
GetAutomationCampaigns
// C#
CampaignResult[] campaignResult = List < CampaignResult > GetAutomationCampaigns(string tokenID);
// PHP
$campaignResult = $APIFunctionsObj->GetAutomationCampaigns($Token);
CampaignResult
object with campaign details
string tokenID
string CampaignID
string CampaignName
string CampaignDescription
string CampaignStatus
string CreatedDate
string ModifiedDate
string Status
string StatusMessage
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;
}
}
GetAutomationCampaignResults
// 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);
AutomationCampaignResult
object with details
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)
string Status
string StatusMessage
string RuleID
string RuleName
string CampaignID
string CampaignName
string RecipientID
string RecipientEmail
string SentDate
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;
}
GetDataCaptureForms
// C#
DataCaptureFormsDetails[] dataCaptureFormsDetails = GetDataCaptureForms(string tokenID, string pageNumber, string pageSize);
// PHP
$GetDataCaptureFormsResult = $apifunctionsobj->GetDataCaptureForms($Token, $PageNumber, $PageSize)->GetDataCaptureFormsResult;
DataCaptureFormsDetails
object array with data capture forms details
string tokenID (Required)
string pageNumber (Optional)
string pageSize (Optional)
string DataCaptureFormID
string DataCaptureFormName
string PageTitle
string EditorType
string RedirectUrl
string DateStatus
string StartDate
string EndDate
string DataCaptureUrl
string Status
string StatusMessage
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;
}
}
GetDataCaptureFormDetailsByDCFormID
// C#
DataCaptureFormsDetails dataCaptureFormDetails = GetDataCaptureFormDetailsByDCFormID(string tokenID, string dcFormID);
// PHP
$GetDataCaptureFormDetailsByDCFormIDResult = $APIFunctionsObj->GetDataCaptureFormDetailsByDCFormID($Token, $dcFormID)->GetDataCaptureFormDetailsByDCFormIDResult;
DataCaptureFormDetailsByDCFormIDResult
object with data capture form details
string tokenID (Required)
string dcFormID (Required)
string DataCaptureFormID
string DataCaptureFormName
string PageTitle
string EditorType
string RedirectUrl
string DateStatus
string StartDate
string EndDate
string DataCaptureUrl
string Status
string StatusMessage
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;
}
GetDataCaptureFormAdhocFields
// C#
DCFormAdhocFieldList[] dcFormAdhocFieldList = GetDataCaptureFormAdhocFields(string tokenID, string DCFormID, string PageNumber, string PageSize);
// PHP
$GetDataCaptureFormAdhocFieldsResult = $APIFunctionsObj->GetDataCaptureFormAdhocFields($Token, $DCFormID, $PageNumber, $PageSize)->GetDataCaptureFormAdhocFieldsResult;
DCFormAdhocFieldList
object arrary with adhoc field details
string tokenID (Required)
string DCFormID (Required)
string PageNumber (Optional)
string PageSize (Optional)
string DCFormID
string AdhocFieldID
string AdhocFieldName
string AdhocFieldType
string IsRequired
string Status
string StatusMessage
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;
}
GetDataCaptureFormResults
// C#
DataCaptureFormResults dataCaptureFormResults = GetDataCaptureFormResults (string tokenID, string dcformID, string fromDate, string toDate);
// PHP
$GetDataCaptureFormResults = $APIFunctionsObj->GetDataCaptureFormResults($Token, $dcformID, $fromDate, $toDate)->GetDataCaptureFormResultsResult;
DataCaptureFormResults
object with results
string tokenID (Required)
string DCFormID (Required)
string FromDate (Optional)
string ToDate (Optional)
string Status
string StatusMessage
jSON object Results
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);
}