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.
query Parameters
Request Body schema: application/jsonrequired
Include as much information as possible regarding the Import Contact Batch
OK
Bad Request
Forbidden
Not Found
Method Not Allowed
Conflict
Unsupported Media Type
Internal Server Error
- Payload
{- "importFileName": "APIContacts",
- "description": "Contact Import from Alliant API",
- "pageSize": 2,
- "totalItems": 2
}
- 201
- 400
- 403
- 404
- 405
- 409
- 415
- 500
{- "result": {
- "batchId": 1,
- "jobQueueGuid": "e29a07ac-4391-4846-9cf6-492fbba5b2dc"
}, - "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.
query Parameters
Request Body schema: application/jsonrequired
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.
OK
Bad Request
Forbidden
Not Found
Method Not Allowed
Conflict
Unsupported Media Type
Internal Server Error
- Payload
{- "pageNumber": 0,
- "items": [
- {
- "adminClassReference": {
- "id": "exampleID"
}, - "comment": "New Contact",
- "companyName": "RST",
- "contactAddresses": [
- {
- "address1": "124 Elm St",
- "address2": "124 Elm St",
- "address3": "124 Elm St",
- "addressTypeReference": {
- "id": "exampleID"
}, - "attentionFlag": true,
- "attentionName": "attn name",
- "careOfFlag": true,
- "careOfName": "care of name",
- "city": "Woodland Hills",
- "comment": "Contact Address Comment",
- "countryReference": {
- "id": "exampleID"
}, - "formattedAddress": "124 Elm St, Woodland Hills, CA, 91364",
- "postalCode": "91364",
- "stateReference": {
- "id": "exampleID"
}, - "useAsPrimaryFlag": true
}
], - "contactDeliveryGroups": [
- {
- "comment": "New Delivery Group",
- "contactDeliveryGroupDetails": [
- {
- "deliverToContactReference": {
- "id": "exampleID"
}, - "deliveryMethodReference": {
- "id": "exampleID"
}, - "emailTypeReference": {
- "id": "exampleID"
}, - "sortOrderNumber": 1
}
], - "deliveryGroupReference": {
- "id": "exampleID"
}, - "holdDeliveryFlag": false
}
], - "contactEmails": [
- {
- "allowAttachmentsFlag": true,
- "allowHtmlFlag": true,
- "comment": "email comment",
- "displayName": "default email",
- "emailAddress": "email@address.com",
- "emailTypeReference": {
- "id": "exampleID"
}, - "holdDeliveryFlag": false,
- "maxAttachmentsNumber": 3,
- "maxEmailSizeNumber": 1200,
- "sortOrderNumber": 1,
- "useFullNameAsFriendlyNameFlag": true
}
], - "contactFileSystems": [
- {
- "accessKeyValue": "access key",
- "authenticationMethodReference": {
- "id": "exampleID"
}, - "authenticationTypeReference": {
- "id": "exampleID"
}, - "cachedRefreshTokenExpiryDatetime": "2014-03-23",
- "cachedRefreshTokenFlag": true,
- "certificateTypeReference": {
- "id": "exampleID"
}, - "clientID": "client ID",
- "comment": "new contact file system",
- "enableTraceFlag": false,
- "fileSystemLocationReference": {
- "id": "exampleID"
}, - "fileSystemTypeReference": {
- "id": "exampleID"
}, - "firewallTypeReference": {
- "id": "exampleID"
}, - "ftpAccount": "ftp Account",
- "ftpEncryptionTypeReference": {
- "id": "exampleID"
}, - "ftpFirewallHost": "ftp.firewallserver.com",
- "ftpFirewallPort": 18,
- "ftpFirewallUserID": "userID",
- "ftpRemoteHost": "ftp.server.com",
- "ftpRemotePath": "remote\\path",
- "ftpRemotePort": 15,
- "ftpUsePassiveModeFlag": false,
- "ftpUserID": "userID",
- "holdDeliveryFlag": false,
- "maskedFtpFirewallPassword": "secure password",
- "maskedFtpPassword": "secure password",
- "maskedPrivateKeyPassword": "secure password",
- "maskedSecretKeyValue": "secret key",
- "privateKeyFileName": "file name",
- "projectID": "project ID",
- "refreshToken": "exampleToken",
- "remoteHostKeyFileName": "file name",
- "sortOrderNumber": 1,
- "tenantID": "tenant ID",
- "transferTypeReference": {
- "id": "exampleID"
}, - "webServerPort": 51,
- "wfcRemotePath": "remote\\path"
}
], - "contactRecipientGroups": [
- {
- "comment": "New Contact Recipient Group",
- "description": "New Contact Recipient Group",
- "contactRecipientGroupDetails": [
- {
- "allocationPercent": 100,
- "comment": "example comment",
- "deliveryGroupReference": {
- "id": "exampleID"
}, - "endPeriodReference": {
- "id": "exampleID"
}, - "paymentAddressReference": {
- "id": "exampleID"
}, - "paymentFlag": true,
- "paymentMethodReference": {
- "id": "exampleID"
}, - "recipientContactReference": {
- "gid": "exampleID"
}, - "recipientTypeReference": {
- "id": "exampleID"
}, - "sortOrderNumber": 1,
- "startPeriodReference": {
- "id": "exampleID"
}, - "statementAddressReference": {
- "id": "exampleID"
}, - "statementFlag": true,
- "statementGroupReference": {
- "id": "exampleID"
}
}
]
}
], - "contactTypeReference": {
- "id": "exampleID"
}, - "firstName": "New",
- "formattedName": "Test, New Contact",
- "guildFlag": false,
- "hasFileSystemAddressFlag": false,
- "holdDeliveryFlag": false,
- "id": "NewContactCreatedByAPI",
- "lastName": "Test",
- "middleName": "Contact",
- "namePrefix": "Dr.",
- "nameSuffix": "Jr.",
- "participantFlag": true,
- "sortByName": "Test, New Contact",
- "ud_userDefinedStringField": "ud field Value",
- "ud_userDefinedNumberField": 0,
- "ud_userDefinedReference": {
- "id": "exampleID"
}, - "udLookup_LookupUDField": {
- "udfLookupItems": [
- {
- "amount1Range": "1:3",
- "amount2Range": "2:4",
- "contact1Reference": {
- "id": "exampleID"
}, - "contact2Reference": {
- "id": "exampleID"
}, - "contact3Reference": {
- "id": "exampleID"
}, - "contact4Reference": {
- "id": "exampleID"
}, - "endActualPeriodReference": {
- "id": "exampleID"
}, - "endOtherPeriodReference": {
- "id": "exampleID"
}, - "endPostedPeriodReference": {
- "id": "exampleID"
}, - "fromDate": "2019-08-24T14:15:22Z",
- "price1Range": "4.21:30.45",
- "price2Range": "5.24:532.21",
- "rate1Range": "2.3:5.2",
- "rate2Range": "8.6:45.2",
- "rate3Range": "10.3:87.0",
- "sortOrderNumber": 1,
- "startActualPeriodReference": {
- "id": "exampleID"
}, - "startOtherPeriodReference": {
- "id": "exampleID"
}, - "startPostedPeriodReference": {
- "id": "exampleID"
}, - "text1": "example text",
- "text2": "example test",
- "toDate": "2019-08-24T14:15:22Z",
- "ud_LookupUDField": "exampleUDFValue",
- "udKeyXHierarchyTypeReference": {
- "id": "exampleID"
}, - "udKeyXListReference": {
- "description": "exampleDescription"
}, - "udKeyXReference": {
- "id": "exampleID"
}, - "unit1Range": "5:200",
- "unit2Range": "5:100"
}
]
}
}
]
}
- 200
- 400
- 403
- 404
- 405
- 409
- 415
- 500
{- "result": { },
- "errors": [ ],
- "warnings": [ ],
- "hasErrors": false,
- "hasWarnings": false
}
Read Import Contact Batch Data
Read the data for an Import Contact Batch.
query Parameters
OK
Bad Request
Forbidden
Not Found
Method Not Allowed
Conflict
Unsupported Media Type
Internal Server Error
- 200
- 400
- 403
- 404
- 405
- 409
- 415
- 500
{- "result": {
- "importFileName": "contacts",
- "importFileSID": 140,
- "description": "Contact Import from Alliant API",
- "fileDownloadNumber": null,
- "pageSize": 2,
- "totalItems": 2,
- "batchId": 22,
- "pageNumber": 0,
- "receivedItems": 2,
- "createdDateTime": "2022-27-25",
- "items": [
- {
- "adminClassReference": {
- "id": "exampleID"
}, - "comment": "New Contact",
- "companyName": "RST",
- "contactAddresses": [
- {
- "address1": "124 Elm St",
- "address2": "124 Elm St",
- "address3": "124 Elm St",
- "addressTypeReference": {
- "id": "exampleID"
}, - "attentionFlag": true,
- "attentionName": "attn name",
- "careOfFlag": true,
- "careOfName": "care of name",
- "city": "Woodland Hills",
- "comment": "Contact Address Comment",
- "countryReference": {
- "id": "exampleID"
}, - "formattedAddress": "124 Elm St, Woodland Hills, CA, 91364",
- "postalCode": "91364",
- "stateReference": {
- "id": "exampleID"
}, - "useAsPrimaryFlag": true
}
], - "contactDeliveryGroups": [
- {
- "comment": "New Delivery Group",
- "contactDeliveryGroupDetails": [
- {
- "deliverToContactReference": {
- "id": "exampleID"
}, - "deliveryMethodReference": {
- "id": "exampleID"
}, - "emailTypeReference": {
- "id": "exampleID"
}, - "sortOrderNumber": 1
}
], - "deliveryGroupReference": {
- "id": "exampleID"
}, - "holdDeliveryFlag": false
}
], - "contactEmails": [
- {
- "allowAttachmentsFlag": true,
- "allowHtmlFlag": true,
- "comment": "email comment",
- "displayName": "default email",
- "emailAddress": "email@address.com",
- "emailTypeReference": {
- "id": "exampleID"
}, - "holdDeliveryFlag": false,
- "maxAttachmentsNumber": 3,
- "maxEmailSizeNumber": 1200,
- "sortOrderNumber": 1,
- "useFullNameAsFriendlyNameFlag": true
}
], - "contactFileSystems": [
- {
- "accessKeyValue": "access key",
- "authenticationMethodReference": {
- "id": "exampleID"
}, - "authenticationTypeReference": {
- "id": "exampleID"
}, - "cachedRefreshTokenExpiryDatetime": "2014-03-23",
- "cachedRefreshTokenFlag": true,
- "certificateTypeReference": {
- "id": "exampleID"
}, - "clientID": "client ID",
- "comment": "new contact file system",
- "enableTraceFlag": false,
- "fileSystemLocationReference": {
- "id": "exampleID"
}, - "fileSystemTypeReference": {
- "id": "exampleID"
}, - "firewallTypeReference": {
- "id": "exampleID"
}, - "ftpAccount": "ftp Account",
- "ftpEncryptionTypeReference": {
- "id": "exampleID"
}, - "ftpFirewallHost": "ftp.firewallserver.com",
- "ftpFirewallPort": 18,
- "ftpFirewallUserID": "userID",
- "ftpRemoteHost": "ftp.server.com",
- "ftpRemotePath": "remote\\path",
- "ftpRemotePort": 15,
- "ftpUsePassiveModeFlag": false,
- "ftpUserID": "userID",
- "holdDeliveryFlag": false,
- "maskedFtpFirewallPassword": "secure password",
- "maskedFtpPassword": "secure password",
- "maskedPrivateKeyPassword": "secure password",
- "maskedSecretKeyValue": "secret key",
- "privateKeyFileName": "file name",
- "projectID": "project ID",
- "refreshToken": "exampleToken",
- "remoteHostKeyFileName": "file name",
- "sortOrderNumber": 1,
- "tenantID": "tenant ID",
- "transferTypeReference": {
- "id": "exampleID"
}, - "webServerPort": 51,
- "wfcRemotePath": "remote\\path"
}
], - "contactRecipientGroups": [
- {
- "comment": "New Contact Recipient Group",
- "description": "New Contact Recipient Group",
- "contactRecipientGroupDetails": [
- {
- "allocationPercent": 100,
- "comment": "example comment",
- "deliveryGroupReference": {
- "id": "exampleID"
}, - "endPeriodReference": {
- "id": "exampleID"
}, - "paymentAddressReference": {
- "id": "exampleID"
}, - "paymentFlag": true,
- "paymentMethodReference": {
- "id": "exampleID"
}, - "recipientContactReference": {
- "gid": "exampleID"
}, - "recipientTypeReference": {
- "id": "exampleID"
}, - "sortOrderNumber": 1,
- "startPeriodReference": {
- "id": "exampleID"
}, - "statementAddressReference": {
- "id": "exampleID"
}, - "statementFlag": true,
- "statementGroupReference": {
- "id": "exampleID"
}
}
]
}
], - "contactTypeReference": {
- "id": "exampleID"
}, - "firstName": "New",
- "formattedName": "Test, New Contact",
- "guildFlag": false,
- "hasFileSystemAddressFlag": false,
- "holdDeliveryFlag": false,
- "id": "NewContactCreatedByAPI",
- "lastName": "Test",
- "middleName": "Contact",
- "namePrefix": "Dr.",
- "nameSuffix": "Jr.",
- "participantFlag": true,
- "sortByName": "Test, New Contact",
- "ud_userDefinedStringField": "ud field Value",
- "ud_userDefinedNumberField": 0,
- "ud_userDefinedReference": {
- "id": "exampleID"
}, - "udLookup_LookupUDField": {
- "udfLookupItems": [
- {
- "amount1Range": "1:3",
- "amount2Range": "2:4",
- "contact1Reference": {
- "id": "exampleID"
}, - "contact2Reference": {
- "id": "exampleID"
}, - "contact3Reference": {
- "id": "exampleID"
}, - "contact4Reference": {
- "id": "exampleID"
}, - "endActualPeriodReference": {
- "id": "exampleID"
}, - "endOtherPeriodReference": {
- "id": "exampleID"
}, - "endPostedPeriodReference": {
- "id": "exampleID"
}, - "fromDate": "2019-08-24T14:15:22Z",
- "price1Range": "4.21:30.45",
- "price2Range": "5.24:532.21",
- "rate1Range": "2.3:5.2",
- "rate2Range": "8.6:45.2",
- "rate3Range": "10.3:87.0",
- "sortOrderNumber": 1,
- "startActualPeriodReference": {
- "id": "exampleID"
}, - "startOtherPeriodReference": {
- "id": "exampleID"
}, - "startPostedPeriodReference": {
- "id": "exampleID"
}, - "text1": "example text",
- "text2": "example test",
- "toDate": "2019-08-24T14:15:22Z",
- "ud_LookupUDField": "exampleUDFValue",
- "udKeyXHierarchyTypeReference": {
- "id": "exampleID"
}, - "udKeyXListReference": {
- "description": "exampleDescription"
}, - "udKeyXReference": {
- "id": "exampleID"
}, - "unit1Range": "5:200",
- "unit2Range": "5:100"
}
]
}
}
]
}, - "errors": [ ],
- "warnings": [ ],
- "hasErrors": false,
- "hasWarnings": false
}