webservices

Updating a List

by Administrator on ‎03-25-2011 09:54 AM

A Contact List is updated by issuing an HTTP PUT to the entry's URI. The PUT body must contain an Atom entry element with the changed content for the list. The Atom entry must include an <id> tag and that id must reflect the URI of the list you are updating, for example, if you want to update the list in the 'Create' example above, this line is required:

 

<id>http://api.constantcontact.com/ws/customers/joesflowers/lists/15</id>

As a general rule, your "PUT" entry should include all of the content you receive in "GET" for the resource you are updating. It may be simplest to "GET" the resource you would like to update, then change only the fields you want to update and "PUT" the updated resource back. The API will ignore read only fields (such as update time) and your entry will be complete.