Skip to content

Get import reports

ImportReports collection allows retrieving information about imports to subscribers list, suppressions list, blacklist or data tables.

Request data format

Request URL parameters:

ParameterTypeNotes
apiKeystringYour API key, required for authentication. Required.
reportTypestringRequired parameter. Type of data to retrieve. Supported report types are: Subscribers, Suppressions, Blacklist, DataTables.
startDatedateStart date. Optional. Both parameters (startDate, endDate) are required to specify report range. Otherwise they are ignored. YYYY-MM-DD format.
endDatedateSee startDate.
scheduledTaskIdintOptional. Scheduled Task which launched import.
listIdintOptional. Subscriber list ID where was import targeted. Taken with reportType = Subscribers. Otherwise ignored.
suppressionListIdintOptional. Suppression list ID where was import targeted. Taken with reportType = Suppressions. Otherwise ignored.

Example:

https://api.esv2.com/v2/Api/ImportReports?ReportType=Suppressions&apiKey=YOUR_API_KEY_HERE&StartDate=2017-10-27
https://api.esv2.com/v2/Api/ImportReports?ReportType=Subscribers&apiKey=YOUR_API_KEY_HERE&ScheduledTaskID=3344&StartDate=2017-10-26&EndDate=2017-10-28&ListId=7459

Response

Response Data element:

Element/attributeTypeNotes
ImportReportsarray[complex]Array of ImportReports elements.

ImportReport element children:

Element/attributeTypeNotes
IdintImport identifier.
FileNamestringName of file used for import source.
ImportDatedateDate of import execution.
FinishedDatedateDate of import finished execution(only for subscriber and data table imports).
ListIdintSubscribers or suppressions list ID.
ListNamestringSubscribers or suppressions list name.
ImportTypestringSelected import mode.
MatchingModestringSelected import key.
ScheduledTaskIdint Scheduled task which launched import.
TotalRowsint Total number of rows found in import file.
ValidRowsint Number of valid rows found in import file.
InvalidRowsint Number of invalid rows found in import file.
ConflictingRecordsint Number of conflicts with existing subscribers.
DuplicatedRowsint Number of duplicated rows found in import file. 
Entriescomplex
Entries element containing statistics grouped by import key type.
Subscriptionscomplex
Subscriptions element containing detailed statistics grouped by channel.
StatusstringTask completion status.
ErrorDescriptionstringDescription of data table error if occurs.

Entries element:

Element/attributeTypeNotes
EmailcomplexDetailed statistics for Email import key.
PhonecomplexDetailed statistics for Phone import key.
CustomSubscriberIdcomplexDetailed statistics for CustomSubscriberId import key.

Email/Phone/CustomSubscriberId elements’ children:

Element/attributeTypeNotes
ValidintNumber of valid entries found.
InvalidintNumber of invalid entries found.
DuplicatedintNumber of duplicated entries found.
EmptyintNumber of empty entries found.

Subscriptions element:

Element/attributeTypeNotes
EmailcomplexDetailed subscription statistics for Email channel.
PhonecomplexDetailed subscription statistics for Phone channel.

Subscriptions’ element children:

Element/attributeTypeNotes
AddedintNumber of added entries.
UpdatedintNumber of updated entries.
ReplacedintNumber of replaced entries.
SystemRejectedintNumber of entries rejected by the system.
BlacklistedintNumber of blacklisted entries.
UnsubscribedintNumber of unsubscriptions.

Example

DataTables import

Request:

GET 
https://api.esv2.com/v2/Api/ImportReports?ReportType=DataTables&apiKey= YOUR_API_KEY_HERE&StartDate=2017-10-31 HTTP/1.1 
Accept-Encoding: gzip,deflate 
User-Agent: Jakarta Commons-HttpClient/3.1 
Host: api.esv2.com

OK response:

HTTP/1.1 200 OK 
Cache-Control: private 
Content-Type: text/xml; charset=utf-8 
Content-Encoding: gzip 
Vary: Accept-Encoding 
Server: Microsoft-IIS/7.5 
Set-Cookie: ASP.NET_SessionId=znbbf255rwgtzketrup04q55; path=/; HttpOnly 
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319 
X-Powered-By: ASP.NET 
Date: Fri, 31 Oct 2014 11:05:25 GMT 
Content-Length: 651 

<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Data>
    <ImportReports>
      <ImportReport>
        <Id>137</Id>
        <FileName>test_importu.csv</FileName>
        <ImportDate>2014-10-31T07:21:33</ImportDate>
        <FinishedDate>2014-10-31T07:35:26.283</FinishedDate>
        <ImportType>Synchronize table with import file</ImportType>
        <ScheduledTaskId>3347</ScheduledTaskId>
        <AddedEntries>0</AddedEntries>
        <Status>Error</Status>
        <ErrorDescription>Nie ma tabeli o podanej nazwie pliku: test_importu.csv</ErrorDescription>
      </ImportReport>
    </ImportReports>
  </Data>
</ApiResponse>

Subscribers import

Request:

GET 
https://api.esv2.com/v2/Api/ImportReports?ReportType=Subscribers&apiKey= YOUR_API_KEY_HERE&StartDate=2017-10-31 HTTP/1.1 
Accept-Encoding: gzip,deflate 
User-Agent: Jakarta Commons-HttpClient/3.1 
Host: api.esv2.com

OK response:

HTTP/1.1 200 OK 
Cache-Control: private 
Content-Type: text/xml; charset=utf-8 
Content-Encoding: gzip 
Vary: Accept-Encoding 
Server: Microsoft-IIS/7.5 
Set-Cookie: ASP.NET_SessionId=znbbf255rwgtzketrup04q55; path=/; HttpOnly 
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319 
X-Powered-By: ASP.NET 
Date: Fri, 31 Oct 2014 11:05:25 GMT 
Content-Length: 651  

<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Data>
    <ImportReports>
      <ImportReport>
        <Id>125</Id>
        <FileName>test_importu.csv</FileName>
        <ImportDate>2017-11-10T07:21:33</ImportDate>
        <FinishedDate>2017-11-10T07:35:26.283</FinishedDate>
        <ListId>29</ListId>
        <ListName>List_123</ListName>
        <ImportType>Add new subscribers and update data of subscribers existing on the list</ImportType>
        <MatchingMode>Email</MatchingMode>
        <TotalRows>41</TotalRows>
        <ValidRows>34</ValidRows>
        <InvalidRows>3</InvalidRows>
        <ConflictingRecords>4</ConflictingRecords>
        <DuplicatedRows>0</DuplicatedRows>
        <Entries>
            <Email>
                <Valid>38</Valid>
                <Duplicated>0</Duplicated>
                <Invalid>3</Invalid>
                <Empty>0</Empty>
            </Email>
            <Phone>
                <Valid>41</Valid>
                <Duplicated>0</Duplicated>
                <Invalid>0</Invalid>
                <Empty>0</Empty>
            </Phone>
            <CustomSubscriberId>
                <Valid>0</Valid>
                <Duplicated>0</Duplicated>
                <Invalid>0</Invalid>
                <Empty>0</Empty>
            </CustomSubscriberId>
        </Entries>
        <Subscriptions>
            <Email>
                <Added>4</Added>
                <Updated>33</Updated>
                <Replaced>0</Replaced>
                <SystemRejected>0</SystemRejected>
                <Blacklisted>1</Blacklisted>
                <Unsubscribed>0</Unsubscribed>
            </Email>
            <Phone>
                <Added>35</Added>
                <Updated>0</Updated>
                <Replaced>0</Replaced>
                <SystemRejected>1</SystemRejected>
                <Blacklisted>5</Blacklisted>
                <Unsubscribed>0</Unsubscribed>
            </Phone>   
        </Subscriptions>
      </ImportReport>
    </ImportReports>
  </Data>
</ApiResponse>
On this page
To top