[HTTP POST] ~/contactLists/{contactListId}/import

Description: Create an Import job for a specific ContactList

Request Information

URI Parameters

NameDescriptionTypeAdditional information
contactListId

integer

Required

Body Parameters

[In Request Body] Includes the names of the fields to import from your contacts

ImportJobCreateRequest
NameDescriptionTypeAdditional information
FieldNames

The Names of the fields to extract from the Contact records

Collection of string

None.

Formats

application/json, text/json

Sample:
{
  "FieldNames": [
    "sample string 1",
    "sample string 2"
  ]
}

application/csp-report

Sample:
{"FieldNames":["sample string 1","sample string 2"]}

application/xml, text/xml

Sample:
<ImportJobCreateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/W50API.Controllers">
  <FieldNames xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </FieldNames>
</ImportJobCreateRequest>

Response Information

Description

Successful Response - OK (200):

Response Content : ImportJob

NameDescriptionTypeAdditional information
Id

The Id of the ImportJob

integer

None.

ContactListId

The ContactList this ImportJob is attached to

integer

None.

InvalidEmailCount

The number of Invalid Emails Addresses found by this Import Job

integer

None.

InvalidSmsCount

The number of Invalid TextMessage Numbers found by this ImportJob

integer

None.

ProgressPercent

The completion percent of this Import Job

integer

None.

CurrentStatus

The current status of this Import Job

string

None.

StartDate

When this ImportJob Started

date

None.

FinishDate

When this ImportJob finished

date

None.

InsertedContacts

How many new contacts were created as part of the ImportJob

integer

None.

UpdatedContacts

How many existing contacts were updated as part of the ImportJob

integer

None.

DroppedContacts

How many existing contacts were deleted as part of the ImportJob

integer

None.

NotUpdatedContacts

How many existing contacts where NOT updated as part of the ImportJob

integer

None.

TotalContacts

The Total number of contacts Inserted/Updated as part of this ImportJob

integer

None.


Response Codes:

  • 200 - OK
    • The Import Job was created successfully
  • 401 - Unauthorized
    • Request has been denied as it lacks valid Authentication credentials.
  • 403 - Forbidden
    • The user does not have the relevant permissions to perform this action.
  • 404 - NotFound
    • The specified Contactlist was not found - could not create Import Job.
  • 500 - InternalServerError
    • An error occurred while processing this request.

Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "ContactListId": 1,
  "InvalidEmailCount": 1,
  "InvalidSmsCount": 1,
  "ProgressPercent": 1,
  "CurrentStatus": "sample string 2",
  "StartDate": "2024-05-06T02:25:30.2874654+01:00",
  "FinishDate": "2024-05-06T02:25:30.2874654+01:00",
  "InsertedContacts": 1,
  "UpdatedContacts": 1,
  "DroppedContacts": 1,
  "NotUpdatedContacts": 1,
  "TotalContacts": 1
}

application/csp-report

Sample:
{"Id":1,"ContactListId":1,"InvalidEmailCount":1,"InvalidSmsCount":1,"ProgressPercent":1,"CurrentStatus":"sample string 2","StartDate":"2024-05-06T02:25:30.2874654+01:00","FinishDate":"2024-05-06T02:25:30.2874654+01:00","InsertedContacts":1,"UpdatedContacts":1,"DroppedContacts":1,"NotUpdatedContacts":1,"TotalContacts":1}

application/xml, text/xml

Sample:
<ImportJob xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/W50API.Models.DTO">
  <ContactListId>1</ContactListId>
  <CurrentStatus>sample string 2</CurrentStatus>
  <DroppedContacts>1</DroppedContacts>
  <FinishDate>2024-05-06T02:25:30.2874654+01:00</FinishDate>
  <Id>1</Id>
  <InsertedContacts>1</InsertedContacts>
  <InvalidEmailCount>1</InvalidEmailCount>
  <InvalidSmsCount>1</InvalidSmsCount>
  <NotUpdatedContacts>1</NotUpdatedContacts>
  <ProgressPercent>1</ProgressPercent>
  <StartDate>2024-05-06T02:25:30.2874654+01:00</StartDate>
  <TotalContacts>1</TotalContacts>
  <UpdatedContacts>1</UpdatedContacts>
</ImportJob>