Is there an API call to see whether or not an email address is in a particular contact list? For now I'm calling /members on a list and then checking for the email address in the XML. But this won't scale nicely for lists with a large number of members.
Thanks,
~Elan
Solved! Go to Solution.
Hey Elan,
You can always do a search for the contact and do get on that particular contact and check to see if the list ID is inside of a ContactList inside of that contact.
Hey Elan,
You can always do a search for the contact and do get on that particular contact and check to see if the list ID is inside of a ContactList inside of that contact.
Pre apologies, I'm not looking at the xml right now, but some clarity and perhaps I'll need a new thread to clarify this & similar newbi Q's.
Does the contact xml contain a "contactlist" that contains list ID's?
I would have assumed that the contact contains a <lists> tag containing mailing list numbers 3,6,12,42...
TIA
Hey,
By doing a get to a specific contact you will get information back such as:
<?xml version='1.0' encoding='UTF-8'?> <entry xmlns="http://www.w3.org/2005/Atom"> <link href="/ws/customers/joesflowers/contacts/22199" rel="edit" /> <id>http://api.constantcontact.com/ws/customers/joesflowers/contacts/22199</id> <title type="text">Contact: joe@example.com</title> <updated>2009-11-20T20:41:19.243Z</updated> <author> <name>Constant Contact</name> </author> <content type="application/vnd.ctct+xml"> <Contact xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact. com/ws/customers/joesflowers/contacts/22199"> <Status>Active</Status> <EmailAddress>joe@example.com</EmailAddress> <EmailType>HTML</EmailType> <Name>Customer Joe</Name> <FirstName>Joe</FirstName> <MiddleName></MiddleName> <LastName>Smith</LastName> <JobTitle></JobTitle> <CompanyName></CompanyName> <HomePhone></HomePhone> <WorkPhone></WorkPhone> <Addr1></Addr1> <Addr2></Addr2> <Addr3></Addr3> <City></City> <StateCode>MA</StateCode> <StateName>Massachusetts</StateName> <CountryCode>us</CountryCode> <CountryName>United States</CountryName> <PostalCode>02154</PostalCode> <SubPostalCode>1781</SubPostalCode> <Note></Note> <CustomField1></CustomField1> <CustomField2></CustomField2> <CustomField3></CustomField3> <CustomField4></CustomField4> <CustomField5></CustomField5> <CustomField6></CustomField6> <CustomField7></CustomField7> <CustomField8></CustomField8> <CustomField9></CustomField9> <CustomField10></CustomField10> <CustomField11></CustomField11> <CustomField12></CustomField12> <CustomField13></CustomField13> <CustomField14></CustomField14> <CustomField15></CustomField15> <ContactLists> <ContactList id="http://api.constantcontact.com/ws/customers/joesflowers/lists/3"> <link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/joesflowers/lists/3" rel="self" /> <OptInSource>ACTION_BY_CONTACT</OptInSource> <OptInTime>2009-11-20T20:41:06.595Z</OptInTime> </ContactList> </ContactLists> <Confirmed>false</Confirmed> <InsertTime>2009-11-20T20:41:06.593Z</InsertTime> <LastUpdateTime>2009-11-20T20:41:19.243Z</LastUpdateTime> </Contact> </content> <source> <id>http://api.constantcontact.com/ws/customers/joesflowers/contacts</id> <title type="text">Contacts for Customer: joesflowers</title> <link href="contacts" /> <link href="contacts" rel="self" /> <author> <name>joesflowers</name> </author> <updated>2009-11-20T20:45:44.199Z</updated> </source> </entry>
Which you would fine a ContactLists node which is an array of ContactList.
You can read more about it here.
The holidays have come and gone. For many seasonal businesses, this means the rush of shoppers has decreased as well. Instead of turning off the lights and waiting for spring, make your email marketi...
See Article