Sample xml code to add a new contact (email) to the list

gilladarsh
Occasional Participant

Sample xml code to add a new contact (email) to the list

Hi All,

 


Can anybody help me by providing a sample xml code to add a new contact (email) to the list.


I am not sure of the cc url....




Cheers,

Gill


 


 

2 REPLIES 2
DaveBerard
Moderator


Here is a sample of a Create XML document, containing the minimum nodes for a create. This is taken directly from our Contacts Collection documentation found here.



<entry xmlns="http://www.w3.org/2005/Atom">
<title type="text"> </title>
<updated>2008-07-23T14:21:06.407Z</updated>
<author></author>
<id>data:,none</id>
<summary type="text">Contact</summary>
<content type="application/vnd.ctct+xml">
<Contact xmlns="http://ws.constantcontact.com/ns/1.0/">
<EmailAddress>test101@example.com</EmailAddress>
<FirstName>First</FirstName>
<LastName>Last</LastName>
<OptInSource>ACTION_BY_CONTACT</OptInSource>
<ContactLists>
<ContactList id="http://api.constantcontact.com/ws/customers/joesflowers/lists/1" />
</ContactLists>
</Contact>
</content>
</entry>


 
Dave Berard
Senior Product Manager, Constant Contact
gilladarsh
Occasional Participant

Dave,


Thanks! it is working fine now.


Gill...


 

Developer Portal

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

Visit Page