Get a list of all available groups

Description: the method allows you to get a list of all available groups in the CC system

Method: GET

URL: /api/v1/groups/all.json

Description of fields: * - required parameters

Field Value type Description

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

{
    "groups": [
        {
            "id": 839,
            "name": "Campaign",
            "taskSelectionMode": "BY_PRIORITY"
        },
        {
            "id": 853,
            "name": "Campaign - 2",
            "taskSelectionMode": "BY_ROUND"
        },
        {
            "id": 856,
            "name": "Campaign -3 ",
            "taskSelectionMode": "BY_ROUND"
        },
        {
            "id": 943,
            "name": "Campaign -4",
            "taskSelectionMode": "BY_ROUND"
        }
    ]
}

Examples of unsuccessful response (error):

 

 


Web Recall (Web Callback) Creation

Description: the method allows you to create a web recall (web callback) with the desired date and time of the callback

Method: POST

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

Request data:

Client cards are searched by the external client identifier (if this functionality was enabled in the recall task) or by phone number. If the system did not find the client card by external identifier, the search will occur by phone number. The system will create a new client card if there is no client with that phone number in the CC database. The structure of the JSON request in this case:

Description of fields: * - required parameters

Field Value type Description
recalls* array() Array with Web recall parameters.
phone* string() Phone number for creating a Web callback
accountId* integer() Web Recall account id. How to find out this parameter
callDate* string() desired date and time of the call in ISO format (2016-07-22T15: 48: 32 + 03: 00). It may be less than the current date for an immediate call
fullUrl string(25) The name of the field that is included in the configuration of the fields that are allowed to be transferred for one or another recall task. (given name is an example)

Possible answers:
Upon successful request, the server will respond with HTTP status 201, and with the data with the id of the created user: Created

Examples of unsuccessful response (errors):

 

 


Cancel Web Recall (Web Callback)

Description: the method allows you to cancel a previously created / ordered web recall (for example, if a new web recall has the NEW status and there should be a call made, then after the request is executed, its status will change to EXPIRED and the call will not be made)

Method: DELETE

URL: /api/v1/webrecalls/{webRecallId}/phones/{phoneNumber}.do

Description of fields: * - required parameters

Field Value type Description
{accountId}* integer() Web Recall account id. How to find out this parameter
{phoneNumber}* string() Phone number to cancel the recall

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

Examples of unsuccessful response (errors):

 

 


Token Authorization

Description: метод позволяет создать авторизационный токен на запросы к АРІ. При этом его нужно передавать http хедером x-auth-token с каждым запросом. Для получения token используется Basic авторизация (https://en.wikipedia.org/wiki/Basic_access_authentication#Client_side)

Method: POST

URL: /api/v1/tokens.do

Description of fields: * - required parameters

Field Value type Description

Possible answers:
Upon successful request, the server will respond with HTTP status 201,
If authorization is successful, the response status should be 201 (Created), and the x-auth-token header will contain a unique token of the form 51f9a273-bf96-4fa5-b034-250567944e91, by which the user will be authorized for further requests to the system. The token lifetime is limited to 30 minutes since the last API call.

Examples of unsuccessful response (errors):