GetContactImportProgress

Gets the import status of a previously started contact import

This method gets the progress of a contact import. It will return a status indicating where the contact import is currently at.

The possible status types are:

  • 'Finished' - The import has been accepted and has successfully imported
  • 'NotFinished' - The import has been accepted, but has not yet finished
  • 'RejectedByWatchdog' - The import was rejected by the Data Watchdog due to concerns with the quality of your email data; please contact support
  • 'InvalidFileFormat' - The file imported was not in the advised CSV or Excel format
  • 'Unknown' - The import has an unknown state which could indicate an invalid import ID; please contact support
  • 'Failed' - The import has failed; please contact support
  • 'ExceedsAllowedContactLimit' - The contacts you're trying to import exceeds your account's contact limit
  • 'NotAvailableInThisVersion' - This feature is not available in the version of the API you're using

SOAP action: http://apiconnector.com/v2/ApiService/GetContactImportProgress

📘

Input and output parameters

The input and output parameters for this method are:

Input parameters

  • Import ID - required; GUID

Output parameters

  • GetContactImportProgressResult
    • Id - GUID
    • Status - string ('Finished', 'NotFinished', 'RejectedByWatchdog', 'InvalidFileFormat', 'ExceedsAllowedContactLimit', 'Unknown', 'Failed')

Example

using (var client = new ApiServiceClient())
{
	client.ClientCredentials.UserName.UserName = "username";
	client.ClientCredentials.UserName.Password = "password";

	var path = @"contacts.csv";
	var data = File.ReadAllBytes(path);
	var dataType = "test/csv";
	var contactImport = client.ImportContacts(data, dataType);
	
	while (contactImport.Status == ApiContactImportStatuses.NotFinished)
	{
	    Thread.Sleep(60000);
	    contactImport = client.GetContactImportProgress(contactImport.Id);
	}
}