Getting all subscribers of a list (apiGetSubscriber)
With this option, you retrieve all subscribers to a list. This function takes a list ID as a parameter. This function only provides the e-mail address and therefore works faster. If you would also like to query the personalization fields, please use apiGetSubscriberDetails.
Request
Name | Type | Example | Required | Comment |
---|---|---|---|---|
listID | Integer | 123456789 | apiGetList() delivers all possible List IDs. | |
start | Integer | 0 | ||
count | Integer | 100 | limited to 100 |
Response
[subsriberResponse] => Array ( [0] => stdClass Object ( [subscriberID] => 123456789 [subscriberEmail] => joe.smith@example.com [subscriberTimestampSubscribe] => 1395692130 [subscriberTimestampUnsubscribe] => 1413447945 ) [...] )
Error Response
Code | Interpretation |
---|---|
404 | No valid List ID was passed. |
PHP5 Example
try{ $request = array( 'start'=> 0, 'count'=> 100, 'listID'=> 123456, ); $response=$client->apiGetSubscriber($request); } catch (SoapFault $exception) { echo ($exception->getMessage()); }