Make a request »

ImportService.CreateImportByCsv

Batch import multiple subscribers using a CSV formatted file. NB! There is a file size limitation of 100 Mb so files larger than that should be in .zip format. Also note that the method will return the Import ID, and the status of the import can later be polled using the GetImportStatus method. Click here for detailed explanation of format and considerations. External files are downloaded asynchronously. They should thereby be kept at their location until the GetImportStatus method reports that the import is completed. The Xml files cannot be encrypted or password protected. Use DemographicDataMapping parameter to selectively specify import file columns from 7 to 107 to map to demographic data fields from 1 to 100. If DemographicDataMapping is provided, not mapped demographic data fields will not be imported.

2015-12-07 v3: Updates to do asynchronous download of external file for increased API performance. External files should now be kept at their location until the import is completely done.

2016-06-15 v4: Introduce DemographicDataMapping parameter for mapping import file columns to demographic data fields.

See code examples


URL Parameters

Http verb: POST
URI: Full url: http://se.api.anpdm.com/import/v4/csv
URL parameters:
Not used

Body parameters

Body parameters
import
Object containing the import parameters and URL to import data

MailingListId Int32 Id of the mailing list that you want to import subscribers to
Url String URL to CSV formatted file with subscriber data
HasHeader Boolean If CSV file has header (True) or not (False)
DelimiterChar String Which Delimiter character is used
QuoteChar String Which Quote character is used
EscapeChar String Which Escape character is used
CommentChar String Which Comment character is used
IsZipped Boolean If file is in zip format (True) or not (False)
ArchiveFileName String Name of the archived file. Used when file is zipped (Optional)
OperationMode String Subscription import mode. Import (default) - adds the subscribers from the import file to the selected mailing list; allows adding and updating subscriptions, but not deleting subscriptions. Sync - makes sure the selected mailing list contains only the subscribers from the import file; allows adding, updating and deleting subscriptions (Optional)
CallbackId Nullable<Guid> The identifier of a system to which the import completion callback will be HTTP-posted (Optional)
DemographicDataMapping List
<DemographicDataMapping>
Explicitly map CSV file column index to demographic data field index. Both indexes are 1-based. (Optional)
Body Example

Response

Body parameters
returnsResponseQueue identity that can be used for querying the queue for the import status
Body Example


Help

Code examples