Sending to an existing list

Occasional Advisor

Sending to an existing list

I am trying to send an email campaign to an existing list. Is there a way to get the list URI using the name? The only way I can see is to get all the lists then loop through them looking for the one with the matching name, but it seems like there should be an easier way. Am I missing something?

3 REPLIES 3
Highlighted
CTCT Employee

list ID from list name

Hello,



The best way to get the list ID from the list name would be to do what you are doing. Do a GET call to your List collection and then find the name of the list, which will also include the ID for that list.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Occasional Advisor

How does paging work?

Since it will only return the first 50 lists. I can't find any documentation on it.

Highlighted
CTCT Employee

paging of lists

Hello,



The way that paging works is if there are more than 50 items on a list, it will also provide a link at the top of the XML file with a link to the next page.



An example of this would be here:



<link href="/ws/customers/USERNAME/lists?next=60" rel="next"></link>



If you then go to https://api.constantcontact.com/ws/customers/USERNAME/lists?next=60 it will give you the next 50 lists.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Developer Portal

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

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured