We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

.Net Lib - How do find and update an existing contact

JLandon
Regular Participant

.Net Lib - How do find and update an existing contact

Hi..


Can you tell me how I find and update an existing contact using the .Net Lib?


How can delete a contact. so it can be re-added with out getting the 'CONFLICT' error.


thanks again for help


 

1 REPLY 1
David_J
Employee

In order to search for a contact you would need to:


1. Search for a Contact by Email Address


2. Obtaining a Contact's Detailed Information


3. Updating a Contact's information


//Search for Email Address

List<string> emails = new List<string>().Add(test@example.com);



string nextChunkId;

IList<Contact> searchContacts = Utility.SearchContactByEmail(authdata, emails, out nextChunkId);



//Get the first found contacts 'Details'

Contact c = Utility.GetContactDetailsById(authdata, searchContacts.Id);



//Update the found contact

c.FirstName = "John";

Utility.UpdateContactFullForm(authdata, c);

 

David J

Developer Portal

View API documentation, code samples, get your API key.

Visit Page