Subscriber Import
This is a Subscriber Import. It is the result of submitting a Subscriber Import Job entity. It contains information about how the import was specified, and also the results of the import. The import has a status
attribute, indicating if it is ongoing or finished.
Imports in progress
The import will have the status
attribute set to IN_PROGRESS
in this state. The progress
sub-tag of this entity is output while the import is running. The information here can be used to build a progress bar. The ping_after
field represents the time you should wait before polling again. Failing to observe this recommendation can result in rate limiting responses being returned.
Completed imports
Imports that complete successfully will have COMPLETED
as their status
attribute. Not all records need to be successful for an import to be considered to complete successfully
Cancelled imports
Imports can be cancelled using the Poppulo Web Application. Please note that there is no way to cancel an import using this API. Imports will have a status
of CANCELLED
in this case.
Error imports
If a fatal error occurred before the import could begin processing subscribers, the import will end in this state. The status
will be ERROR
.
Attributes
Name | Description | Type |
---|---|---|
created |
The date the corresponding import job was submitted | Date |
status |
The status of the import, as described above | Enumeration of IN_PROGRESS , COMPLETED , ERROR , CANCELLED |
Organisational Elements
A subscriber import is made up of three important sub-elements.
The progress
element is output when status
is IN_PROGRESS
.
Progress Fields
Field name | Description | Type/Allowed values |
---|---|---|
total_records |
The number of subscriber records in the import | Number |
records_processed |
The number of records that have been processed so far | Number |
ping_after |
The next time the client should request the current import state | Date |
The results
element is output when status
is COMPLETED
, CANCELLED
or ERROR
.
Results Fields
Field name | Description | Type/Allowed values |
---|---|---|
total_records |
The number of subscriber records in the import | Number |
new_subscribers |
The number of subscriber records added during this import | Number |
updated_subscribers |
The number of subscriber records updated during this import | Number |
invalid_subscribers |
The number of subscriber records rejected during this import, typically due to validation failures | Number |
duplicate_subscribers |
The number of subscriber records skipped because the email address had already been processed earlier in this import | Number |
previously_opted_out |
The number of subscriber records skipped because the subscriber indicates they no longer wish to receive emails | Number |
invalid_subscribers |
A link to the call to obtain a CSV file with the subscribers who were not imported (see related calls below) | Link |
The specification
element is always output. The meaning of the tags is identical to those in the Subscriber Import Job Entity. The only difference is the contents of the data
is omitted.
Examples
Import in Progress:
<subscriber_import created="datetime" status="IN_PROGRESS" uri="https://api.newsweaver.com/v2/test-account/subscriber_import/6732468">
<progress>
<total_records>5000</total_records>
<records_processed>1234</records_processed>
<ping_after>2012-01-11T16:41:13Z</ping_after>
</progress>
<specification>
<accept_terms>true</accept_terms>
<update_existing>true</update_existing>
<reactivate_api_removed>true</reactivate_api_removed>
<reactivate_admin_removed>true</reactivate_admin_removed>
<reactivate_bounced_removed>false</reactivate_bounced_removed>
<set_fields>
<set_field name="source">website</set_field>
</set_fields>
<add_permissions>
<permission name="Newsletter Permission" />
<permission name="Flyer Permission" />
</add_permissions>
<remove_permissions>
<permission name="Old Permission" />
<permission name="Outdated Permission" />
</remove_permissions>
<tags>
<tag name="Website Subscribers" />
<tag name="API Subscribers" />
</tags>
<subscriber_data>
<columns>email,name.first name,name.surname</columns>
<skip_first_line>true</skip_first_line>
<field_separator>comma</field_separator>
</subscriber_data>
</specification>
</subscriber_import>
Completed Import:
See calls: