Get subscriber statistics
SmsMmsSubscriberStatistics collection allows retrieving data about performance of subscriber lists. This means current list size, number of subscribers that subscribed to or unsubscribed from the list in specified time period and so on.
Request data format
Request URL parameters:
Element/attribute | Type | Notes |
---|---|---|
apiKey | string | Your API key, required for authentication. Required. |
startDate | date | Start date. Optional. If not specified, business unit creation date will be taken. YYYY-MM-DD format. |
endDate | date | End date. Optional. If not specified, current date will be taken. YYYY-MM-DD format. |
scope | string | Filtering scope. Optional. If not specified, no filtering will be applied (data for the whole business unit will be returned). Available scopes are: List — only results for specific subscriber list SmsMmsMessageType — only results for specific SMS/MMS message type* Vendor — only results for specific vendor Tag — only results for messages marked with a tag |
scopeValue | string | Filtering scope value. Required if scope was specified. This is a mixed value, type depends on selected scope. List — List ID, int, e.g. 123S msMmsMessageType — SMS/MMS message type name, string, e.g. Newsletter* Vendor — vendor name, string, e.g. foobar Tag — Tag name, e.g. holidays |
scope2 | string | Second filtering scope — works just like «scope». |
scopeValue2 | string | Filtering scope value for «scope2». |
grouping | string | Results grouping. Optional. If not specified, results will be grouped by whole business unit (one row of data will be returned with all values summed up). Available groupings are: Date Month List Vendor Tag NOTE: It is impossible to filter and group by the same thing. scope parameter value must be different from grouping parameter value |
*Available message types: Newsletter, Test, WorkflowMessage.
Examples:
https://api.esv2.com/v2/Api/SmsMmsSubscriberStatistics?apiKey=YOUR_API_KEY_HERE
https://api.esv2.com/v2/Api/SmsMmsSubscriberStatistics?apiKey=YOUR_API_KEY_HERE&scope=List&scopeValue=1&grouping=Vendor
Response
Response Data element:
Element/attribute | Type | Notes |
---|---|---|
SubscriberStatistics | array[complex] | Array of SubscriberStatistic elements. |
SubscriberStatistic element children:
Element/attribute | Type | Notes |
---|---|---|
IsSummaryRow | boolean | If set to true, marks the summary row of statistic table (values are sums of all other rows).* |
Date | date | Date. Returned only if grouping by dates was requested. |
Month | string | Month represented as date period. Returned only if grouping by months was requested. Example: 2018-01-01 : 2018-01-31 |
ListId | int | Subscriber list ID. Returned only if grouping by lists was requested. |
ListName | string | Subscriber list name. Returned only if grouping by lists was requested. |
Vendor | string | Vendor name. Returned only if grouping by vendors was requested. If row contains data about subscribers with no vendor, dash («-«) will be returned. |
Tag | string | Tag name. Returned only if grouping by tags was requested. |
ListSize | int | Current list size. |
Growth | int | List size increase/decrease. |
Added | int | Overall number of subscribers that were added to the list. |
AddedUi | int | Number of subscribers added manually using ExpertSender web panel. |
AddedImport | int | Number of subscribers added using manual or automatic imports. |
AddedApi | int | Number of subscribers added using API. |
AddedWeb | int | Number of subscribers added using webforms. |
AddedSms | int | Number of subscribers added using SMS. |
Removed | int | Overall number of subscribers removed from the list. |
RemovedOptOut | int | Number of subscribers removed because they clicked unsubscribe link. |
RemovedUser | int | Number of subscribers removed manually using web panel. |
RemovedBounceLimit | int | Number of subscribers removed because they reached the maximum number of bounces. |
RemovedSpam | int | Number of subscribers removed because they sent a spam complaint. |
RemovedUserUnknown | int | Number of subscribers removed because their email address bounced with «User Unknown» status. |
RemovedBlacklist | int | Number of subscribers removed because they were added to blacklist. |
RemovedApi | int | Number of subscribers removed using API. |
*Summary rows do not contain grouping columns (e.g. Date, Month).
Examples
Request (ungrouped statistics):
GET https://api.esv2.com/v2/Api/SmsMmsSubscriberStatistics?apiKey=test_api_key1&scope=List&scopeValue=1&scope2=SmsMmsMessageType&scopeValue2=Newsletter HTTP/1.1
Accept-Encoding: gzip,deflate
Host: api.esv2.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
OK 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.2
X-AspNet-Version: 4.0.30319
Set-Cookie: TEMP_DATA=b8567a11-cbb2-4525-b355-782b8b3ea005; path=/
X-Powered-By: ASP.NET
Date: Wed, 29 Jul 2015 14:44:34 GMT
Content-Length: 870
<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Data>
<SubscriberStatistics>
<SubscriberStatistic>
<IsSummaryRow>true</IsSummaryRow>
<ListSize>469</ListSize>
<Growth>469</Growth>
<Added>470</Added>
<AddedUi>0</AddedUi>
<AddedImport>437</AddedImport>
<AddedApi>0</AddedApi>
<AddedWeb>0</AddedWeb>
<AddedSms>0</AddedSms>
<Removed>1</Removed>
<RemovedOptOut>1</RemovedOptOut>
<RemovedUser>0</RemovedUser>
<RemovedBounceLimit>0</RemovedBounceLimit>
<RemovedSpam>0</RemovedSpam>
<RemovedUserUnknown>0</RemovedUserUnknown>
<RemovedBlacklist>0</RemovedBlacklist>
<RemovedApi>0</RemovedApi>
</SubscriberStatistic>
</SubscriberStatistics>
</Data>
</ApiResponse>