Import v1.2
Bulk import subscribers into a list, creating a subscription for each record.
Bulk import subscribers into a list, creating a subscription for each record.
Import allows you to get subscribers into your Sign-Up.to account quickly:
source
as .CSV file accessible via HTTP or HTTPS. Read morecompleted
to see the status of your import.errorcode
and error
attributes will describe any issues which may arise during import. Read moreupdatemode
options provided.We recomended that your source
URL is served over HTTPS with basic authentication.
source
, LukeThe source
attribute must point to a file accessible via HTTP or HTTPS. We will then use this URL to fetch, parse and update your subscribers, creating a subscription for each valid record found.
We go to great lengths to keep your subscriber data safe and we advise you do the same. To ensure that your source
file isn't visible to prying eyes, please use HTTP basic authentication. This protocol cobines a simple username and password; it's widely compatible, doesn't require sessions/cookies and is easy to set up.
To specify HTTP basic authentication in your source
, the URL should include the username and password you set up. This should be formatted as "https://user@pass:mysite.com/path/to/data_file.csv".
As well as being comma separated (obviously), your .CSV must contain the subscriberProfileFields for the data you are importing. These subscriberProfileFields should be identified by their columnheader
attribute. These fields must be present on the first row, otherwise your import will error
.
Please note, we only accept a .CSV without headers if it has 1 column consisting of email addresses only.
email,firstname,surname,favourite_spoon mailbox@example.com,John,Smith,silver mailbox+1@example.com,Jane,Smith,gold mailbox+2@example.com,Foo,Bar,wooden
To get you started quickly, we've made a handy tool which creates a template .CSV with each columnheader
present. The tool needs some information from your account, so follow these three easy steps:
Attribute | Type | Filter | Sort | Description |
---|---|---|---|---|
id | int | Yes | Yes | Unique ID of the import. |
completed | bool | Yes | No | Flag indicating whether import processing has completed. Please note that "true" indicates that the import completed, but does not indicate that it did so successfully. |
error | string/null | No | No | Free-form system-generated text describing an error that prevented the import from completing. Null if the import has not yet been processed, or if it was processed successfully. |
errorcode | int/null | No | No | Code associated with the error in the "error" attribute. Null if the import has not yet been processed, or if it was processed successfully. |
list_id | int | Yes | No | ID of the list into which data is to be imported. |
recordcount | int/null | No | No | Number of records found in the data file. |
source | string/null | No | No | URL of data to be imported, either "http" or "https". |
updatemode | enum | No | No | Attribute update mode. Specifies the behaviour for data attributes: one of "add" (do not overwrite existing attribute data), "overwrite" (overwrite existing data), "delete" (blank input attributes cause deletion of existing data). |
user_id | int | Yes | No | ID of the user who created the import. |
cdate | decimal | No | Yes | Timestamp at which the import was created. |
Attribute | Type | Presence | Description |
---|---|---|---|
id | int | Optional | Unique ID of the import. |
completed | bool | Optional | Flag indicating whether import processing has completed. Please note that "true" indicates that the import completed, but does not indicate that it did so successfully. |
list_id | int | Optional | ID of the list into which data is to be imported. |
user_id | int | Optional | ID of the user who created the import. |
Attribute | Type | Presence | Description |
---|---|---|---|
list_id | int | Required | ID of the list into which data is to be imported. |
source | string/null | Required | URL of data to be imported, either "http" or "https". |
updatemode | enum | Required | Attribute update mode. Specifies the behaviour for data attributes: one of "add" (do not overwrite existing attribute data), "overwrite" (overwrite existing data), "delete" (blank input attributes cause deletion of existing data). |
This method is not supported.
This method is not supported.
This endpoint exposes any errors encountered during import through the errorcode
attribute. Please note, this errorcode
differs to those exposed through erroneous requests because this errorcode
is permanent and request-agnostic.
Error | Description |
---|---|
1 |
Internal exception. |
2 |
Invalid source . |
3 |
Unable to fetch the source file. |
4 |
Invalid column headers. |
5 |
No header was specified and the data does not validate as email addresses. |
6 |
Duplicate column header. Column headers must be unique. |
7 |
Column headers do not contain either "email" or "mobile". At least one of these are mandatory. |
{ "id": 123, "completed": true, "error": null, "errorcode": null, "list_id": 456789, "recordcount": 5400, "source": "https://user@pass:mysite.com/path/to/data_file.csv", "updatemode": "add", "user_id": 123, "cdate": 131674521 }