None of the new lists I have created through the ConstantContact website are coming back through the api call GetUserContactListCollection()
If I use the ConstantContact website to change the sort order, the lists come back through API sorted properly (so doesn't seem like a browser caching issue) but my newly created list(s) will be ignored/omitted from the results, no matter if i order it first, last, or in the middle. I have less than 50 lists so it's not in a different "chunk" of data either. Is there some setting on the list that make it available to the API?
protected void LoadLists()
IList<ContactList> lists = Utility.GetUserContactListCollection(_AuthenticationData, out nextChunkId);
foreach (ContactList cl in lists)
ListItem l = newListItem();
l.Text = cl.Name;
l.Value = cl.Id;
l.Selected = false;
} // end LoadLists()
The sort order is only referenced from with in the Constant Contact graphic user interface. The api does not return the contact lists as the sort order value. It is going to return the lists in the order of the ID's. I am not a C# expert, however I believe you could still do this by sorting the ContactList object by the value of sortOrder. You can find an example on how to do this here.
Please let me know if that helps.
First, I truly appreciate you taking the time to respond to my question because this is driving me insane.
My issue isn't with the sort, that's actually working and returning items properly sorted...which is somewhat confusing since you expected it not to? But that's a whole different discussion...
My issue is when I call GetUserContactListCollection() from the api, it doesn't return all of my lists. I have less than 50 lists, so its not in "the next chunk of data". I was using the sort example as proof that it is not a browser caching issue...I can change the sort order on the constant contact website and the lists come back in the newly sorted order through the api call. I have figured out that the missing lists through the api are the lists that I have newly created since getting a developer api key. FYI - These new lists I am creating are through the constant contact website (not the api).
My expectation was I could add a new list and then a call through the api would pull that new list with all of the rest of my lists, but that is not happening and I don't know why? Is there some sort of setting that makes lists available/visible through the api? Do I need to get a new developer key in order to see any newly created lists? Is there something simple I am missing here?
Thanks again for your help!