changing status of contacts from list (contact id??)

Occasional Participant

changing status of contacts from list (contact id??)

Hello


This is in regards to removing contacts from a specific list.  Please excuse any ignorance I may display as I am fairly new with Constant Contact and especially with its REST API's.


 


According to http://developer.constantcontact.com/doc/contactsCollection


under Updating a Contact->Adding or Removing a Contact from a List:


There is an XML example I should use to update contacts.


I have trouble finding the contact ID as specified here:


<Contact xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/joesflowers/contacts/101">

 


What does "101" represent?  Assuming it is the ID number of an individual contact, how I would know what/who it is?  I only know the unique email address and the contact name.


I had to "guess" what the list id was and finding the individual contact id has been painful. 


Any feedback is greatly appreciated


 

1 REPLY 1
Moderator

The best way to get the contact ID is to query the contacts collection.  You can do this by simply adding a search query to a GET request on the Contacts Collection like this:


 


https://api.constantcontact.com/ws/customers/joesflowers/contacts?email=joe@joesflowers.com


 


This will return XML that will either have a contact's ID and basic information or a XML document reflecting that no one was found.  Regarding list IDs, you can run a GET on the lists collection to get the IDs of every list in your account.  The URI for that GET is:


 


https://api.constantcontact.com/ws/customers/joesflowers/lists


 


 

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page