Skip to content

Get employees

Getting employees list

Method get.employees
Description Getting employees list
Who has access Agent, Customer

Parameters of a request

Title Type Required Description
access_token string yes Authentication session key
user_id number no Unique user ID of a customer or an agent who makes request.
Is mandatory for an agent
To get a list of customer users use the method "get.customer_users"
limit number no Number of returning inquiries. Refer to "Paging"
offset number no Offset that defines inquiries from which number to return, "limit" of inquiries. Default value is "0". Refer to "Paging"
filter object no Refer to "Filtering criteria"
fields array no Refer to "Viewing returning data"
sort array no Refer to "Data sorting"

Parameters of a reply

Title Type Valid value Filtering Sorting Description
id number yes Unique employee ID
first_name string yes yes Employee's first name
last_name string yes yes Employee's last name
patronymic string yes Employee's patronymic
full_name string yes yes Employee's full name
status enum
  • available
  • break
  • do_not_disturb
  • not_at_workplace
  • not_at_work
  • unknown
yes Employee's status
  • available - Available
  • break - On a break
  • do_not_disturb - Do not disturb
  • not_at_workplace - Not at workplace
  • not_at_work - Not at work
  • unknown - Unknown
allowed_in_call_types array
  • internal
  • external
yes Types of incoming calls allowed to an employee
  • internal - internal calls from company's employees/li>
  • external - external calls from clients
allowed_out_call_types array
  • internal
  • external
yes Types of outgoing calls allowed to an employee
  • internal - internal calls to company's employees
  • external - external calls beyond the company
email string yes Employee's email
call_recording enum
  • all - for all calls;
  • in - only incoming calls;
  • out - only outgoing calls;
  • off - switched off
yes Call recording status
calls_available boolean true, false yes yes
This parameter will be deleted soon. Instead, use the parameters: allowed_in_call_types, allowed_out_call_types
Avaialibity for calls
schedule_id number yes Schedule ID
schedule_name string yes Schedule name
Coach
coach object yes Coach for an employee
coach_full_name string Full name of a coach
coach_id number Unique ID of a coach
You can choose it from an employees list
coach_always_enabled boolean true, false As you enable this option, all emloyee's calls will also be duplicated for his or hers coach.
Employees groups
groups array yes Groups an employee belongs to
group_id number Group ID
group_name string Group name
Phone numbers
phone_numbers array 10 yes List of employee's phone numbers.
List of numbers should be sorted as according to the order of priority.
phone_number string Employee's phone number. Its format may allow extension dialing, such as "74955140578...2345", that is why the number may not comply with the standart E164.
If SIP already exists, we do not identify it with the number. Instead we just add the number as a PSTN number, i.e. a usual number.
channels_count number From 1 to 150 Default value is "1". Number of telephone lines
dial_time number From 1 to 100 Default value is "60". Time for dialing. Value is in seconds.
status enum active, inactive Default value is "active". Number status.
Extension phone number
extension object yes Extension phone number and its settings
extension_phone_number string Maximum length is 5 Extension phone number
extension_voice_mail_enabled boolean In case all the numbers in an employee's phone numbers list are busy, a caller can leave a voice message.
extension_queue_enabled boolean In case all the numbers, attributed to an employee in a list, are busy, a caller can get in line for a redial to phone numbers in a list. Than, he or she will wait for the first number to become available.
Employee is an operator of a chat
operator object Operatot of a workplace
operator_display_name string Operator's name in chat
operator_login string Operator's login for the app "Opeartor's workplace"
operator_position_id number Operator's job position ID
operator_position_name string Operator's job position name
operator_offline_message_enabled boolean Authorized to process offline messages or not
operator_invite_to_chat_enabled boolean Authorized to invite to join chats or not
operator_chat_enabled boolean Authorized to participate in chats with visitors or not
operator_chats_available boolean true, false Available for chats
Website
operator_sites array List of websites unique IDs and addresses that have access to an operator
site_id number Website ID
site_domain_name string Website domain name without protocol - "http://" or "https://".

JSON request structure

{
  "jsonrpc":"2.0",
  "id":"number",
  "method":"get.employees",
  "params":{
    "access_token":"string",
    "user_id":"number",
    "offset":"number",
    "limit":"number",
    "filter":{

    },
    "sort":[
      {
        "field":"string",
        "order":"string"
      }
    ],
    "fields":[
      "string"
    ]
  }
}

JSON reply structure

{
  "jsonrpc":"2.0",
  "id":"number",
  "result":{
    "metadata":{

    },
    "data":[
      {
        "id":"number",
        "first_name":"string",
        "last_name":"string",
        "patronymic":"string",
        "full_name":"string",
        "email":"string",
        "status": "enum",
        "allowed_in_call_types": "array",
        "allowed_out_call_types": "array",
        "groups":[
          {
            "group_id":"number",
            "group_name":"string"
          }
        ],
        "call_recording":"enum",
        "calls_available":"boolean",
        "schedule_id":"number",
        "schedule_name":"string",
        "coach":{
          "coach_id":"number",
          "coach_full_name":"string",
          "coach_always_enabled":"boolean"
        },
        "phone_numbers":[
          {
            "phone_number":"string",
            "channels_count":"number",
            "dial_time":"number",
            "status":"enum"
          }
        ],
        "extension":{
          "extension_phone_number":"string",
          "extension_voice_mail_enabled":"boolean",
          "extension_queue_enabled":"boolean"
        },
        "operator":{
          "operator_login":"string",
          "operator_display_name": "string",
          "operator_position_id":"number",
          "operator_position_name":"string",
          "operator_offline_message_enabled":"boolean",
          "operator_invite_to_chat_enabled":"boolean",
          "operator_chat_enabled":"boolean",
          "operator_chats_available":"boolean",
          "operator_sites":[
            {
              "site_id":"number",
              "site_domain_name":"string"
            }
          ]
        }
      }
    ]
  }
}

List of returning errors

Refer to "List of errors for methods with the verb get"