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?
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.
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.
View API documentation, code samples, get your API key.Visit Page