Getting a subscriber’s history (apiGetSubscriberHistory)
With this function, you can call up the history of a subscriber. It displays all the mailings that have been received by the subscriber.
Request
| Name | Type | Example | Required | Comment |
|---|---|---|---|---|
| subscriberID | Integer | 123456789 | apiGetSubscriber provides all possible subscriber IDs in a list |
Response
[subsriberHistoryResponse] => Array ( [0] => stdClass Object ( [newsletterID] => 1234 [newsletterName] => Newsletter #1 ) [1] => stdClass Object ( [newsletterID] => 1235 [newsletterName] => Newsletter #2 ) [...] )
Error Response
| Code | Interpretation |
|---|---|
| 204 | No history was found for the subscriber. |
| 404 | No valid ID list was passed. |
PHP5 example
try{
$request = array(
'subscriberID'=> 123456789
);
$response=$client->apiGetSubscriberHistory($request);
}
catch (SoapFault $exception) {
echo ($exception->getMessage());
}