ContactImporter APIs
-
Get Pending Imports
Description: Returns an array of import jobsUsage:
GET api/ContactLists/Importer/List
Returns:
Array of ImportFile objects
Examples:
-
Upload and Import a GZipped CSV
Description: Uploads a GZipped CSV of contacts and initializes the import process. The gzipped CSV contents should be sent in the HTTP POST body using a content-type of application x-www-form-urlencoded.Usage:
POST api/ContactLists/Importer/Import/Compressed/{ListCode}/{ImportName}
Parameter Type Source Description ListCode Int32 FromUri The unqiue numerical code identifying the list to import the contacts into ImportName String FromUri The name of the import job Returns:
Guid that uniquely identifies the new import job
Examples:
//-- Currently no examples for XML --//
-
Upload and Import CSV
Description: Uploads a CSV of contacts and initializes the import process. The CSV file should be sent in the HTTP POST body using a content-type of application x-www-form-urlencoded.Usage:
POST api/ContactLists/Importer/Import/{ListCode}/{ImportName}
Parameter Type Source Description ListCode Int32 FromUri The unqiue numerical code identifying the list to import the contacts into ImportName String FromUri The name of the import job Returns:
Guid that uniquely identifies the new import job
Examples:
-
Get Import Status
Description: Returns the current status of the given import jobUsage:
GET api/ContactLists/Importer/Status/{ImportGuid}
Parameter Type Source Description ImportGuid String FromUri Unique identifier for the import job Returns:
string with status information
Examples:
-
Cancel Import
Description: Cancels the import jobUsage:
PUT api/ContactLists/Importer/Cancel/{ImportGuid}
Parameter Type Source Description ImportGuid String FromUri Unique identifier for the import job Returns:
0 on success
Examples:
-
Get List of Invalid Contacts
Description: returns an array of the contact objects that failed validationUsage:
GET api/ContactLists/Importer/Failures/List/{ImportGuid}/{RowIndex}/{PageSize}
Parameter Type Source Description ImportGuid String FromUri Unique identifier for the import job RowIndex Int32 FromUri the starting row index for the page to get records from. The first row starts with 0. PageSize Int32 FromUri the total number of records to return in a page Returns:
Array of ImportedContact objects
Examples:
-
Get Invalid Contact Count
Description: Returns the total number of contact rows that failed validationUsage:
GET api/ContactLists/Importer/Failures/Count/{ImportGuid}
Parameter Type Source Description ImportGuid String FromUri Unique identifier for the import job Returns:
total number of failed rows
Examples:
-
Get Invalid Contact
Description: Returns the Contact data for the given guidUsage:
GET api/ContactLists/Importer/Failures/{ImportGuid}/{ItemGuid}
Parameter Type Source Description ImportGuid String FromUri Unique identifier for the import job ItemGuid String FromUri Unique identifier for the contact item to return Returns:
ImportedContact object including list of validation errors
Examples:
-
Updates Pending Contact
Description: Updates an imported contact to correct for prior validation errorsUsage:
PUT api/ContactLists/Importer/Failures/Update/{ImportGuid}/{ItemGuid}
Parameter Type Source Description ImportGuid String FromUri Unique identifier for the import job ItemGuid String FromUri Unique identifier for the contact item to update ContactItem ImportedContact FromBody The updated ImportedContact object Returns:
0 on success
Examples:
-
Delete Pending Contact
Description: Deletes an imported contact that has failed validationUsage:
DELETE api/ContactLists/Importer/Failures/Delete/{ImportGuid}/{ItemGuid}
Parameter Type Source Description ImportGuid String FromUri Unique identifier for the import job ItemGuid String FromUri Unique identifier for the contact item to delete Returns:
0 on success
Examples: