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.

Update Existing Contact

Occasional Participant

Update Existing Contact



I am able to get the xml from https://api.constantcontact.com/ws/customers/{username}/contacts/{contact-id} by using a GET function.



But I have no idea on how to write the POST or PUT function once I have modified the contacts details in the xml.


How will I do the GET function?


Please help I am using vb.net




There are two options available to you.  First, you could include the .dll files we supply as part of the C#.net wrapper library.  As they are compiled for .net 2.0 compatability, you can include them to a vb.net project and leverage our wrapper library from there.  You can find this code here: https://sourceforge.net/projects/ctctcsharplib/


The other option is you could use the HttpWebRequest object and define your own methods from scratch.  All you need to do is set the HttpMethod to PUT or POST and then use the RequestStream object to send the content of your POST or PUT method as the stream input (using a StreamWriter or derived object) to send the body of the request.  The C#.net library has a full example of how to do this in C# which can be translated to VB using any number of free C# -> VB code converters.


Hope this helps.


Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page