SpreadWebServcie.AddSubscribersByInfo Method

It adds more then one subscribers into an existing subscription by his/her email as well as other Info. Such as First Name, Company, Job Title, etc.

public Dataset addSubscribersByInfo (

string loginEmail,

string password,

Subscriber[] subscriberArgs,

string subscription,

DoubleOptIn optInType

)

Parameters

Parameter

Type

Description

loginEmail

String

The login email of your Spread account.

password

String

The password of your Spread account or API Key which you can retrieve from your Spread account (My account=> Settings).

subscriberArgs

Subscriber[]

Array of info of subscribers to be added.

Note: 1. If the length of subscriberArgs is less than 100, it will return the result of uploading.

subscription

String

The name of target subscription to be added.

optInType

DoubleOptIn

Double Opt-in option.

Return Value

Dataset There will be including a datatble. the datatable will be like the following tables.

1. The length of subscriberArgs is less than 100. The count of rows will equal the length of subscriberArgs. There will be the result of all emails. The Error column will show the successful message and failed message.

Email

Error

alan@reasonables.com

success

reasonable@reasonable

Email address "reasonable@reasonable" is not valid!

Please provide a subscriber email.

Example

string loginName = "spread@reasonables.com";

string loginPassword = "spread";

string customerEmail = "alan@reasonables.com";

string targetSubscription = "NoClone VIP";

DoubleOptIn addOption = DoubleOptIn.Off;

Dataset errors;

 

//Create an array of subscriber

Subscriber[] customer = new Subscriber[2];

 

//Create more then one Subscriber objects

Subscriber customerA = new Subscriber();
customerA.email =
"alan@reasonables.com";
customerA.firstName =
"Alan";
customerA.lastName =
"Wo";
customerA.company =
"Reasonable Software";

 

Subscriber customerB = new Subscriber();
customerB.email =
" circle@reasonables.com";
customerB.firstName =
"Circle";
customerB.lastName =
"Ching";
customerB.jobTitle =
"CEO";

 

//Put the Subscriber objects into array

customer[0] = customerA;

customer[1] = customerB;

 

//Create a SpreadWebService object and use its method.

SpreadWebService MySpread = new SpreadWebService();

 

errors = MySpread.addSubscribersByInfo (loginName, loginPassword, customer, targetSubscription, addOption);

^