API: Get list of contacts by saved search
Wanting to get some feedback if I am doing this correctly or there is a better way!
Goal: I have 13 SavedSearches and I want to create 13 separate Google SS (using Google Script) with the details of members (some custom fields I have created as well) returned by each SavedSearch.
Step 1: I use the api SavedSearch request to return the contactIds.
Step 2: Iterate through the returned list and make an api call to contacts using the contactId.
Here is the problem I am encountering. The limit on individual contact calls is 60 / minute. All my searches have more than 60 records. So the SS population stops at 60. :( (http://help.wildapricot.com/display/DOC/API+Version+2#APIVersion2-APIrequestlimits)
The solution is to call
GET …/contacts?$filter=id in [1,2,34,85,…….] and instead of numbers add the ids you received from saved search call results (it returns them too).
Yes, that worked! My first request returned array of ids which I then converted into a string and appended to the second request. Thanks so much!
Forgot to add - if when you use /contacts/... call, use it like
.../contacts?$filter=id in [1,2,34,85,.......] and instead of numbers add the ids you received from saved search call results (it returns them too).
We will add into our backlog to add more straightforward way to return contacts filtered by saved search id.
Either embed delays into your code (so you don't exceed the threshold), or better use another call allowing to receive all contact detais at once - http://help.wildapricot.com/display/DOC/Contacts+API+V2+call#ContactsAPIV2call-Retrievinginformationforallcontacts