Przejdź do treści

Get snoozed subscribers

SnoozedSubscribers collection allows retrieving a list of subscribers that have suspended (snoozed) their subscription. The list can be filtered by subscriber’s list ID and date range.

Request format

Request URL parameters:

ParameterTypeNotes
apiKeystringYour API key, required for authentication. Required.
listIdsint (CSV)List identifiers. Optional. If specified, only snoozed subscribers from given lists will be returned. If not specified, snoozed subscribers from all lists will be returned. To specify multiple list IDs, use comma separated format, e.g.: 12,34,56,789
startDatedateStart date. Optional. If specified, subscribers whose subscription suspension expires prior to this date will not be returned. May be used together with endDate to specify a period of time. YYYY-MM-DD format.
endDatedateSee startDate.
channelstringLimits returned data to selected channel. Optional. Defaults to Email. Valid values:
All
Email
SmsMms

Note: Make notice that only apiKey parameter is required. If you omit other parameters, you will get a list of all snoozed subscribers, from any list, with any suspension expiration date.

Example URLs:

https://api.esv2.com/v2/Api/SnoozedSubscribers?apiKey=YOUR_API_KEY_HERE 

https://api.esv2.com/v2/Api/SnoozedSubscribers?apiKey=YOUR_API_KEY_HERE&listIds=1,3,16 

https://api.esv2.com/v2/Api/SnoozedSubscribers?apiKey=YOUR_API_KEY_HERE&startDate=2014-03-01&endDate=2014-03-10

Response

Response Data element:

Element/attributeTypeNotes
SnoozedSubscribersListarray[complex]Array of SnoozedSubscriber elements.

SnoozedSubscriber element children:

Element/attributeTypeNotes
EmailstringEmail of snoozed subscriber.
PhonestringPhone number of snoozed subscriber.
ListIdintIdentifier of list that subscriber snoozed his subscription from.
SnoozedUntildateTimeDate and time when subscription suspension expires.

Examples

Request:

GET https://api.esv2.com/v2/Api/SnoozedSubscribers?apiKey=test_api_key1&channel=All HTTP/1.1
Accept-Encoding: gzip,deflate
Host: api.esv2.com
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 5.1
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 05 Mar 2014 12:16:49 GMT
Content-Length: 591

<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Data>
    <SnoozedSubscribers>
      <SnoozedSubscriber>
        <Email>testsnoozed1@test123.com</Email>
        <ListId>22</ListId>
        <SnoozedUntil>2017-03-05T11:13:04Z</SnoozedUntil>
      </SnoozedSubscriber>
      <SnoozedSubscriber>
        <Email>testsnoozed2@test123.com</Email>
        <ListId>101</ListId>
        <SnoozedUntil>2017-04-28T15:09:44Z</SnoozedUntil>
      </SnoozedSubscriber>
      <SnoozedSubscriber>
        <Phone>48502123321</Phone>
        <ListId>101</ListId>
        <SnoozedUntil>2017-04-28T15:09:44Z</SnoozedUntil>
      </SnoozedSubscriber>
    </SnoozedSubscribers>
  </Data>
</ApiResponse>