icontact/icontact-api-php — Issue #2: limiting subscriptions to contacts with "normal" status
Author: mpelzsherman
Created: 2012-03-02 12:44:38+00:00
State: open

I've written some code for a client that moves contacts from one list to another based on how long they've been on the list.

I only want to move contacts who have a status of "normal"; in fact, the API will return an error if I try to move contacts with any non-normal status.

The URL I am using to fetch subscriptions looks like this:

/a/{$accountId}/c/{$clientFolderId}/subscriptions?listId={$prospectList}&status=normal&limit=10000&offset=0

It seems that the status of a subscription is not tied to the contact's status, because this query returns contacts with non-normal statuses.

As far as I can tell, my script has to fetch ALL of the subscriptions for the list, then for each subscription, hit iContact's servers again to get each contact and examine its status before moving it. So I'm having to make a lot more requests to the server than I should have to.

Is there any way of limiting subscriptions to contacts with "normal" status?

Thanks guys!