Get rejected subscribers
ImportToListRejected collection allows retrieving a list of subscribers that were rejected during an import for various reasons. Executing a GET request on this collection will return the data in CSV format. This is the same information that can be retrieved manually through Reports->Imports page in ExpertSender Panel application.
Request data format
Request URL parameters:
Element/attribute | Type | Notes |
---|---|---|
apiKey | string | Your API key, required for authentication. Required. |
id | integer | ID of import to list task. ID can be obtained while scheduling the task. |
Example URL:
https://api.esv2.com/v2/Api/ImportToListRejected?apiKey=YOUR_API_KEY_HERE&id=123
Response
The response from this method is always data in CSV format, rather than XML, because the amount of data returned can be substantial.
CSV response minimizes overheads and allows for seamless integration with third party code/systems.
Response content type is “text/csv”. Returned data contains a header with column names in the first row.
CSV output is formatted using following settings:
- Field separator: comma (,)
- Quoting character: (“)
- Escape character: (“)
- Encoding: UTF-8
CSV response columns:
Name | Type | Notes |
---|---|---|
Value | string | Value (e.g. email address, phone number) that was rejected. |
Problem | string | Reason why email was rejected. See below for all possible reasons. |
Problem types (one of those will be in Problem column in CSV):
Name | Description |
---|---|
Conflicting Custom Subscriber ID | Custom Subscriber ID conflicted with existing subscribers. |
Conflicting Email | email address conflicted with existing subscribers. |
Conflicting Phone | phone number conflicted with existing subscribers. |
Country/Region blacklisted | value was rejected because its dialing prefix was present on a local blacklist. |
Domain blacklisted | value was rejected because its domain is present on blacklist. |
Domain rejected | value was rejected because its domain is present on global blacklist. |
Duplicated Custom Subscriber ID | Custom Subscriber ID was duplicated in the import. |
Duplicated Email | email was duplicated in the import. |
Duplicated Phone | phone number was duplicated in the import. |
Email blacklisted | email was rejected because it was present on a local blacklist. |
Email rejected | value was rejected using internal rule. It usually means that subscriber either does not exist or issued spam complaints. |
Empty Custom Subscriber ID | Custom Subscriber ID was empty |
Empty email | email address was empty |
Empty phone number | phone number was empty |
Entries skipped because of selected import type | value was skipped because it did not fit the import criteria. |
Invalid | string is not valid (wrong formatting etc). |
Invalid Custom Subscriber ID | string is not a valid Custom Subscriber ID |
Invalid email address | string is not a valid email address |
Invalid phone number | string is not a valid phone number |
Opted out | subscriber previously unsubscribed from the list (only during imports with AllowImportingUnsubscribed option set to false). |
Parsing error | line of imported file is corrupted and could not be parsed. |
Phone blacklisted | phone was rejected because it was present on a local blacklist |
Phone rejected | phone was rejected because it was present on a global blacklist |
Skipped due to no value of a required custom field | self-explanatory. |
Skipped Email | value was skipped because it was not found on the list (in ReplaceOnly and UpdateOnly mode) or because it it already existed on a list (in AddOnly mode). |
Skipped Phone | value was skipped because it was not found on the list (in ReplaceOnly and UpdateOnly mode) or because it it already existed on a list (in AddOnly mode) |
Examples
Request:
GET http://api.esv2.com/v2/Api/ImportToListRejected?apiKey=test_api_key1&id=287 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/csv; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 5.1
X-AspNet-Version: 4.0.30319
Set-Cookie: TEMP_DATA=27aa335a-4ef6-49c0-af32-d143691fa14b; path=/
X-Powered-By: ASP.NET
Date: Tue, 24 Jun 2014 10:47:38 GMT
Content-Length: 31336
Value,Problem
invalid1.@domain.com,Invalid email address
123invalid678,Invalid phone number
blacklisted@domain.com,Email blacklisted
username@blacklisted.com,Domain blacklisted
48506089829,Skipped Phone
...