Contact Import

You can use Alliant API to Import Contact data to the Alliant system by sending requests with pages of Contact data to the Import Contact endpoints. When all of the Contacts in an Import Contact Batch have been sent, you use the Submit parameter to submit the Import Batch Job for processing by the Import Batch Service. When you want to Import Contact data into the Alliant system, you must first create the Import Contact Batch using the HTTP POST api/Import/Contacts/Batch endpoint. You can send the first page of Contact data with the POST endpoint. When the Import Contact Batch includes only a single page of Contact data that is included in the POST request, you can create the Import Contact Batch and submit it for processing in the same request using the Submit parameter. When the Import Contact Batch includes multiple pages of Contact data, you send each page of Contacts and submit the batch for processing using the HTTP PATCH api/Import/Contacts/Batch/{batchId} endpoint after the Import Contact Batch is created using the HTTP POST endpoint. You can read the data for an Import Contact Batch using the HTTP GET api/Import/Contacts/Batch/{batchId} endpoint. When you want to clear the Contacts from an Import Contact Batch, you can use the HTTP POST api/Import/Contacts/Batch/{batchId}/clear.

Create an Import Contact Batch

When you want to Import Contact data into the Alliant system, you must first issue this endpoint to create the Import Contact Batch.

The POST Request Body must include the Import File Name, the page size (the number of Contacts to be submitted per batch), and the total number of Contacts. When a batch of Contact data is included in the initial POST Request, the POST Request Body also includes a Description for the batch, a page number for the batch, and an array of Contact data. When the entire batch of Contacts is contained within the POST request, you can use the Submit parameter to submit the job for processing in the same request. The request response includes the batchId value used to submit subsequent pages of Import Contact data for the Batch Job.

SecurityHeaderToken
Request
query Parameters
submit
integer

Use the submit parameter to submit the Import job for processing by the Import Batch Service. You should only include this parameter with the last page of Items or after all of the Items for the batch have been submitted.

jobPriority
integer

Use the jobPriority parameter when submitting the Import Job to set the Job Priority value for the Import Job. When you do not specify this value when submitting the Import Job, the Highest Priority value for the associated Job Class is used for the Import Job. This value is ignored when the submit parameter is not present.

Examples:
Specifies a Job Priority value of 1.
jobPriority=1
jobClass
string

Use the jobClass parameter when submitting the Import Job to specify the Job Class for the Import Job. When you do not specify this value when submitting the Import Job, the first Job Class in the Alliant system for which the Alliant User has permissions (determined alphabetically by the Job Class Description values) is used for the Import Job. This value is ignored when the submit parameter is not present.

Examples:
Specifies the 'Any Time of the Day' Job Class.
jobClass=Any Time of the Day
Request Body schema: application/json
required

Include as much information as possible regarding the Import Contact Batch

importFileName
required
string [ 1 .. 255 ] characters

Specify the name of the Import File Definition that you want to use to Import the Contact data. The Import File Definition must be associated with an Import File Type that is configured to use the Contact Staging Area to Import to the Posted History table.

description
string [ 1 .. 255 ] characters

Specify a Description for the Import Contact Batch.

pageSize
required
integer [ 1 .. 4 ] characters

Specify the page size (the number of Contacts per page) for submitting Contacts for the Batch. This is a required value that must be between 1 and 1000.

totalItems
required
integer [ 1 .. 10 ] characters

Specify the total number of Contacts to be submitted for the Batch. This is a required value that must be between 1 and 2147483647.

pageNumber
integer

Specify a Page Number value for the Contacts included in the request, when necessary. This must be a unique value for the Import Contact Batch. The first Page Number must be 0, the second Page Number is 1, and so forth.

Array of objects (Contact Import Properties)

Contacts

Responses
201

OK

400

Bad Request

403

Forbidden

404

Not Found

405

Method Not Allowed

409

Conflict

415

Unsupported Media Type

500

Internal Server Error

post/api/import/contacts/batch
Request samples
application/json
{
  • "importFileName": "APIContacts",
  • "description": "Contact Import from Alliant API",
  • "pageSize": 2,
  • "totalItems": 2
}
Response samples
application/json
{
  • "result": {
    },
  • "errors": [ ],
  • "warnings": [ ],
  • "hasErrors": false,
  • "hasWarnings": false
}

Submit Contacts for an Import Contact Batch

Once the Import Contact Batch is created using the HTTP POST endpoint, you submit each page of Contacts using this endpoint.

When you are submitting a page of Contact data, the PATCH Request Body must include the Page Number for the Contacts and an array of Contact data.  When you are submitting the final page of Contacts, you can also include the Submit parameter to submit the batch for processing.

When you are not submitting a page of Contact data but only submitting the batch for processing, no Request Body data is required and you must include the Submit parameter to submit the batch for processing.

Note: You cannot submit pages of Contacts to an Import Contact Batch that has been cleared. When you clear an Import Contact Batch, the Contact data is removed from the Database. However, you must create a new Import Contact Batch to submit new pages of Contacts.

SecurityHeaderToken
Request
path Parameters
batchID
required
string

Import Contact Batch ID

query Parameters
submit
integer

Use the submit parameter to submit the Import job for processing by the Import Batch Service. You should only include this parameter with the last page of Items or after all of the Items for the batch have been submitted.

jobPriority
integer

Use the jobPriority parameter when submitting the Import Job to set the Job Priority value for the Import Job. When you do not specify this value when submitting the Import Job, the Highest Priority value for the associated Job Class is used for the Import Job. This value is ignored when the submit parameter is not present.

Examples:
Specifies a Job Priority value of 1.
jobPriority=1
jobClass
string

Use the jobClass parameter when submitting the Import Job to specify the Job Class for the Import Job. When you do not specify this value when submitting the Import Job, the first Job Class in the Alliant system for which the Alliant User has permissions (determined alphabetically by the Job Class Description values) is used for the Import Job. This value is ignored when the submit parameter is not present.

Examples:
Specifies the 'Any Time of the Day' Job Class.
jobClass=Any Time of the Day
Request Body schema: application/json
required

Include the Page Number and the Contact data for the page of Contacts.

Note: The Request Body is required only when submitting a page of Contact data. When submitting the Import job for processing without a page of Contact data, no Request Body is required.

pageNumber
integer

Specify a Page Number value for the Contacts included in the request, when necessary. This must be a unique value for the Import Contact Batch. The first Page Number must be 0, the second Page Number is 1, and so forth.

Array of objects (Contact Import Properties)

Contacts

Responses
200

OK

400

Bad Request

403

Forbidden

404

Not Found

405

Method Not Allowed

409

Conflict

415

Unsupported Media Type

500

Internal Server Error

patch/api/import/contacts/batch/{batchID}
Request samples
application/json
{
  • "pageNumber": 0,
  • "items": [
    ]
}
Response samples
application/json
{
  • "result": { },
  • "errors": [ ],
  • "warnings": [ ],
  • "hasErrors": false,
  • "hasWarnings": false
}

Read Import Contact Batch Data

Read the data for an Import Contact Batch.

SecurityHeaderToken
Request
path Parameters
batchID
required
string

Import Contact Batch ID

query Parameters
pageNumber
integer

Use the pageNumber parameter when reading Import Contact Batch data to specify the page of Contact data that you want to retrieve, when applicable. The first Page Number is 0, the second Page Number is 1, and so forth.

Examples:
Specifies a Page Number value of 1.
pageNumber=1
Responses
200

OK

400

Bad Request

403

Forbidden

404

Not Found

405

Method Not Allowed

409

Conflict

415

Unsupported Media Type

500

Internal Server Error

get/api/import/contacts/batch/{batchID}
Response samples
application/json
{
  • "result": {
    },
  • "errors": [ ],
  • "warnings": [ ],
  • "hasErrors": false,
  • "hasWarnings": false
}