I have the list in my business unit. There are lots of subscribers. I need to be able to change the opt in opt out preferences for any subscriber from API call.
I found the next article http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/managing_subscribers_on_lists/
And here is my code... When I execute it, status is OK, but when I refresh the exacttarget page / list with subscribers, I don't see any changes. How to manage Opt In / Opt Out preferences for any particular list and subscriber?
var sub = new Subscriber
{
SubscriberKey = "10103-KZ-P-Cust",
Client = new ClientID
{
ID = 11011214,
IDSpecified = true
}
};
var benList = new SubscriberList
{
ID = 6851919,
IDSpecified = true,
Status = SubscriberStatus.Unsubscribed,
Action = "Update"
};
sub.Lists = new[] { benList };
var soap = new SoapClient();
soap.ClientCredentials.UserName.UserName = _login;
soap.ClientCredentials.UserName.Password = _password;
APIObject[] results;
string requestID;
string status;
UpdateResult[] updateResults =
soap.Update(new UpdateOptions(), new APIObject[] { sub }, out requestID, out status);