Adding a client to the CC database

Description: The method allows you to add or create a new client / clients in the KC database

Method: POST

URL: /api/v1/clients/exec.do

Example of query data:* - the type of parameters may differ (see description below)

Description of fields: * - required parameters.
recovery - is a parameter that is responsible for restoring a client card when a client is added to the CC database again
Client/Clients information is generated and transmitted in a common "clients" array.

Decoding fields for the info client is given in the table:

Field Value type Description
uuid * string() unique uuid for each client within the limits of one client creation request. Required to obtain confirmation of the creation of a specific client or group of clients in the request
clientRoleId * integer(25) Client's role in the system. Depending on the CC configuration, the client in the CC system may have any roles configured by the user. How to find out the value of clientRoleId
type * string() the type of client in the system. Can have two standardized values ​​"SIMPLE", "VIP"
timeZone * string(25) client's time zone. Needed to call clients based on time zone changes. List of available time zones
fields * array() defines the desired list of custom client card fields to be transmitted to the system. If the field is defined as mandatory and as a synchronization identifier, it must be present in the list and cannot be blank, otherwise there will be an error about the inability to add clients. The name of the field is determined by the name configured on the client card in the Sync column.

An example of a filled array:
"fields": {
  "fio": "TEST-API_VP",
  "offerName": "TEST",
  "offerId": 10,
  "externalId": 0
}
Learn in detail how to create a list of fields in the array "fields"
phones * array() contains a list of phones attached to the client. The client's phone can have one or several phones.

Phone array fields: * - required parameters
phoneNumber* string() Phone number
type* string() Phone type. Phone types are standardized and can have the following meanings: MOB, HOME, WORK, FAX.
active boolean() Phone number status (Active (true), Inactive (false)). The default value is true
disabled boolean() the parameter indicates the normalization of the phone. The default value is false.
Examples of the generated array:
  
"phones": [{ "phoneNumber": "790000000000", "type": "MOB" }]
"phones": [{ "phoneNumber": "790000000000", "type": "MOB" }, { "phoneNumber": "798888888888", "type": "HOME", "active": false } ]
addresses* array() contains a list of addresses assigned to the client. If not provided, it should be passed to blank "addresses":[]

Address array fields: * - are required parameters
address* string() the value of the address
type* string() type of address. Address types are standardized and can have the following values: WORK, HOME
active boolean() address status (Active (true), Inactive (false)). The default value is true
Examples of the generated array:
          
"addresses": [{ "address": "Client’s address", "type": "WORK", "active": true }]
"addresses": [{ "address": "Client’s address", "type": "WORK", "active": true }, { "address": "Client’s address 2", "type": "HOME", "active": true }]
emails* array() contains a list of e-mail addresses of the client. If not provided, it should be "emails":[]

Address array fields: * - are required parameters
email* string() the value of the email address
active boolean() email status (Active (true), Inactive (false)). The default value is true
Examples of the generated array:
          
"emails": [{ "email": "test@test.com", "active": true }]
"emails": [{ "email": "test@test.com", "active": true }, { "email": "test2@test.com", "active": true }]

Possible answers:
Upon successful request, the server will respond with an HTTP status 201, and a JSON array with data about the result of each client being added to the request:

{
	"createResult": [{
		"uuid": "000000000",
		"result": "Success",
		"createdClientId": 1783162
	}]
}

uuid - is a unique uuid for each client within the boundaries of this request
result - the result of creation. Success
createdClientId - The value of the internal ID of the created client

Examples of unsuccessful response (errors):

    {
	"createResult": [{
		"uuid": "1234567890",
		"result": "Success",
		"createdClientId": 21230
	}, {
		"uuid": "1234567891",
		"result": "Client doesn't have all syncronize identifier fields."
	}, {
		"uuid": "1234567892",
		"result": "Field [first_name] is required."
	}]
}

 

 


Changing client data by identifiers

Description: The method allows changing the data on the client of the CC (change the data in the client card, for example, their name or surname, or others)

Method: PUT

URL: /api/v1/clients/exec.do

Query data:

Description of fields: * - required parameters

Field Value type Description
syncIdentifiers* array() must contain a list of custom client card fields as the synchronization identifier by which the client will be identified on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured in the client card in the “Sync” column Learn in detail how to form fields in this array
fieldsToUpdate* array() defines a list of custom client card fields that need to be modified. The name of the field is determined by the name configured in the client card in the “Sync” column Learn in detail how to form fields in this array

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the data will be OK

Examples of unsuccessful response (errors):
{ "errorMessage": "No clients with identifiers: [{offerDomain=dev1, offerId=458}]" }

 

 


Adding a phone number to a client card

Description: The method allows you to add a new phone number to the client card

Method: POST

URL: /api/v1/clients/phones/exec.do

Query data:

Description of fields: * - required parameters

Field Value type Description
clientSyncIdentifiers* array() must contain a list of custom client card fields as the synchronization identifier by which the client will be identified on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured in the client card in the “Sync” column. Learn in detail how to form fields in this array
phoneNumber* string() Phone number
type* string() Phone type. Phone types are standardized and can have the following meanings: MOB, HOME, WORK, FAX.

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the data will be OK

Examples of unsuccessful response (errors):
{ "errorMessage": "No clients with identifiers: [{offerDomain=project-051, offerId=142}]" }

 

 


Change the status of a phone number on a client card

Description: The method allows you to change the status of the client's phone number to active or inactive.

Method: PUT

URL: /api/v1/clients/phones/statuses/exec.do

Query data:

Description of fields: * - required parameters

Field Value type Description
clientSyncIdentifiers* array() must contain a list of custom client card fields as the synchronization identifier by which the client will be identified on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured in the client card in the “Sync” column. Learn in detail how to form fields in this array
phoneNumber* string() Phone number
active* boolean() Phone status. Active - true; inactive - false

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the data will be OK

Examples of unsuccessful response (errors):
{ "errorMessage": "No clients with identifiers: [{offerDomain=project-051, offerId=142}]" }

 

 


Adding email to a client card

Description: The method allows you to add a new Email to the client card

Method: POST

URL: /api/v1/clients/emails/exec.do

Query data:

Description of fields: * - required parameters

Field Value type Description
clientSyncIdentifiers* array() Must contain a list of custom client card fields as the synchronization identifier by which the client will be identified on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured in the client card in the “Sync” column. Learn in detail how to form fields in this array
emailAddress* string() The value of the e-mail address

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the data will be OK

Examples of unsuccessful response (errors):
{ "errorMessage": "No clients with identifiers: [{offerDomain=project-051, offerId=142}]" }

 

 


Change the status of the email on the client card

Description:The method allows you to change the status of email to active or inactive.

Method: PUT

URL: /api/v1/clients/emails/statuses/exec.do

Query data:

Description of fields: * - required parameters

Field Value type Description
clientSyncIdentifiers* array() Must contain a list of custom client card fields as the synchronization identifier by which the client will be identified on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured in the client card in the “Sync” column. Learn in detail how to form fields in this array
emailAddress* string() The value of the e-mail address
active* boolean() Email status. Active - true; inactive - false

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the data will be OK

Examples of unsuccessful response (errors):
{ "errorMessage": "No clients with identifiers: [{offerDomain=project-051, offerId=142}]" }

 

 


Adding an address to the client card

Description: The method allows you to add address to the client card

Method: POST

URL: /api/v1/clients/addresses/exec.do

Query data:

Description of fields: * - required parameters

Field Value type Description
clientSyncIdentifiers* array() Must contain a list of custom client card fields as the synchronization identifier by which the client will be identified on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured in the client card in the “Sync” column. Learn in detail how to form fields in this array
clientAddress* string() The value of the client address
type* string() Type of address. Address types are standardized and can have the following values: WORK, HOME.

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the data will be OK

Examples of unsuccessful response (errors):
{ "errorMessage": "No clients with identifiers: [{offerDomain=project-051, offerId=142}]" }

 

 


Change the status of the address in the client card

Description: The method allows you to change the status of the address to active or inactive

Method: PUT

URL: /api/v1/clients/addresses/statuses/exec.do

Query data:

Description of fields: * - required parameters

Field Value type Description
clientSyncIdentifiers* array() Must contain a list of custom client card fields as the synchronization identifier by which the client will be identified on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured in the client card in the “Sync” column. Learn in detail how to form fields in this array
clientAddress* string() The value of the client address
active* boolean() Client address status. Active - true; inactive - false

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the data will be OK

Examples of unsuccessful response (errors):
{ "errorMessage": "No clients with identifiers: [{offerDomain=project-051, offerId=142}]" }

 

 


Change the synchronized fields in the client card

Description: The method allows you to change the values ​​of the synchronized client card field by an internal identifier

Method: PUT

URL: /api/v1/clients/{clientId}/syncIdentifiers/exec.do

Query data:

Description of fields: * - required parameters

Field Value type Description
{clientId}* integer() Internal client ID. Find out where to get {clientId}
clientSyncIdentifiers* array() Must contain a list of custom client card fields as a synchronization identifier (there may be one or more fields). The name of the field is determined by the name configured in the client card in the “Sync” column. Learn in detail how to form fields in this array

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the data will be OK

Examples of unsuccessful response (errors):

 

 


Retrieve ClientDTO card data

Description:The method allows you to retrieve data from a client card by synchronization identifiers

Method: POST

URL: /api/v1/clients/by/syncIds.json

Query data:

Description of fields: * - required parameters

Field Value type Description
clientSyncIdentifiers* array() Must contain a list of custom client card fields as the synchronization identifier by which the client will be identified on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured in the client card in the “Sync” column. Learn in detail how to form fields in this array

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and JSON with client information regarding the client card configuration (response example):


  {
      "clientFieldsToValues": {
          "offerDomain": "project-05",
          "fullUrl": "http://site/client/order/142",
          "fullName": "Проэкт 5",
          "offerId": 142,
          "id": 1510359313,
          "clientType": "SIMPLE",
          "timeZone": "Europe/Kiev",
          "externalIdStr": null,
          "personalOperatorId": 0,
          "legalAddress": null,
          "presentation": "project-05"
      }
  }

Examples of unsuccessful response (errors):
{ "errorMessage": "No clients with identifiers: [{offerDomain=project-051, offerId=142}]" }

 

 


Removal of the client from the system by identifiers

Description: method allows removing the client from the CC system (the client in the CC is translated to the status deleted true, if necessary, data on it can be restored)

Method: DELETE

URL: /api/v1/clients/exec.do

Query data:

Description of fields: * - required parameters

Field Value type Description
syncIdentifiers* array() Must contain a list of custom client card fields as the synchronization identifier by which the client will be identified on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured in the client card in the “Sync” column Learn in detail how to form fields in this array

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the information is OK

Examples of unsuccessful response (errors):
{ "errorMessage": "No clients with identifiers: [{offerDomain=project-051, offerId=142}]" }

 

 


Create a call application in TM campaign From the client

Description:The method allows you to add a CC client as a call application into the desired TM campaign by the given identifier

Method: POST

URL: /api/v1/tacs/campaigns/{campaigId}/exec.do

Query data:

Description of fields: * - required parameters

Field Value type Description
{campaigId}* integer() Id of a telemarketing campaign to which you want to add a client to your call campaign
maxCallCount* integer() the maximum number of calls to the client, the number from 1 to the desired value of the call
disableDuplicatePhonesValidation boolean() check for phone duplicates. The default value is true. If we pass false, then we check for the same phone numbers; if true, no.
clients* array() an array of client IDs to add to the call campaign. Each element of the array is defined by the clientIdentifiers, array, which contains the client identifier fields.
clientIdentifiers* array() Must contain a list of custom client card fields as the synchronization identifier by which the client will be identified on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured on the client card in the “Sync” column.
Example of adding one client:
  "clients": [{
     "clientIdentifiers": {
         "offerName": "TEST",
         "offerId": 10
     }
 }]
Example of adding more than one client:
  "clients": [{
     "clientIdentifiers": {
         "offerName": "TEST",
         "offerId": 10
     }
 },
 {
    "clientIdentifiers": {
        "offerName": "TEST",
        "offerId": 11
    }
}]

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and an empty JSON {}

Examples of unsuccessful response (errors):
{ "errors": [ { "clientIdentifiers": { "offerName": "TEST", "offerId": 11 }, "errorMessage": "Client already exists" } ] }
{ "errors": [ { "clientIdentifiers": { "offerName": "TEST", "offerId": 11 }, "errorMessage": "Client is in blacklist" } ] }
{ "errors": [ { "clientIdentifiers": { "offerName": "TEST", "offerId": 11 }, "errorMessage": "No such client" } ] }

 

 


Receiving all call campaign applications created on the client

Description: The method returns a list of all existing call entries from telemarketing campaigns for the specified client

Method: GET

URL: /api/v1/tacs/byClientIdentifiers.json?{ClientsIdentifiers}

Description of fields: * - required parameters

Field Value type Description
{ClientsIdentifiers}* FormArray() Should list the fields as GET parameters configured by the client card, as the synchronization identifier by which the client will be identified on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured in the client card in the “Sync” column

Possible answers:
Upon successful request, the server will respond with HTTP status 200, and an array with information about the status of applications in JSON format

  [
    {
        "maxCallCount": 30,
        "calledCount": 9,
        "status": "NONE",
        "lastCall": 1563199899000,
        "nextCall": 1563203559000,
        "nextPhoneNumber": "7999999999",
        "telemarketCampaignId": 2295,
        "hasRecall": false,
        "id": 12289510
    }
]

Examples of unsuccessful response (errors):
{ "errorMessage": "No clients with identifiers: [{offerDomain=project-051, offerId=142}]" }