Between 8:00 - 9:00 am ET on 10/25 we need to take our site down to make updates. We recommend logging out before 8:00am ET and not using your account during this time. Thank you for your patience while we make these important updates.

Update Existing Contact

Occasional Participant

Update Existing Contact

Hi,

 

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

 

Thanks

1 REPLY 1
Moderator

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