Getting a list of employees

Method get.employees
Description Getting a list of employees
Available to Agent, Client

Request parameters

Title Type Required Description
access_token string yes Authentication session key
user_id number no Unique user identifier of the client agent on behalf of which the request is made
Is required for the agent
To obtain a list of client users, you must use the method "get.customer_users"
limit number no Number of records returned. See section "Paging"
offset number no Shift determines from which record number to return "limit" records. Default is "0". See section "Paging"
filter object no See section "Filtering criteria"
fields array no See section "View of returned data"
sort array no See section "Sorting data"

Response parameters

Name Type Valid values Filtering Sorting Description
id number yes Unique employee identifier
login string yes yes User login to access your personal account
first_name string yes yes Employee name
last_name string yes yes Employee's last name
patronymic string yes Employee's middle name
full_name string yes yes Last name First name Patronymic
status enum
  • available
  • break
  • do_not_disturb
  • not_at_workplace
  • not_at_work
  • unknown
yes
The parameter will be removed shortly. Use the status_id
parameter instead Employee status. Will be filled in if the employee has a standard status selected
  • available - Available
  • break - Break
  • do_not_disturb - Do not disturb
  • not_at_workplace - Out of office
  • not_at_work - Not at work
  • auto_out_call - Outgoing call
  • unknown - Unknown
status_id number yes Unique status identifier. To get a complete list of statuses, you must use the "get.statuses" method
calls_available boolean true, false yes yes
The parameter will be removed shortly. Use the parameters instead: in_external_allowed_call_directions, in_internal_allowed_call_directions
Availability for calls
allowed_in_call_types array
  • internal
  • external
yes
The parameter will be removed shortly. Use the parameters instead: in_external_allowed_call_directions, in_internal_allowed_call_directions
What types of incoming calls are allowed to an employee?
  • internal - internal calls from company employees
  • external - external calls from clients
in_external_allowed_call_directions array
  • in
  • out
yes What call directions are an employee allowed for incoming external calls?
  • in - incoming calls
  • out - outgoing calls
in_internal_allowed_call_directions array
  • in
  • out
yes What call directions are an employee allowed for incoming internal calls?
  • in - incoming calls
  • out - outgoing calls
allowed_out_call_types array
  • internal
  • external
yes
The parameter will be removed shortly. Use the parameters instead: out_external_allowed_call_directions, out_internal_allowed_call_directions
What types of outgoing calls are allowed to an employee?
  • internal - internal calls to company employees
  • external - calls outside the company
out_external_allowed_call_directions array
  • in
  • out
yes What call directions are an employee allowed for outgoing external calls?
  • in - incoming calls
  • out - outgoing calls
out_internal_allowed_call_directions array
  • in
  • out
yes What call directions are an employee allowed for outgoing internal calls?
  • in - incoming calls
  • out - outgoing calls
email string yes Employee email address
call_recording enum
  • all - for all calls;
  • in - incoming only;
  • out - for outgoing only;
  • off - disabled
yes Call recording status
schedule_id number yes Unique identifier of the activity graph
schedule_name string yes Name of the activity graph
Trainer
coach object yes Trainer for an employee
coach_full_name string Teacher's full name
coach_id number Unique trainer identifier
Selected from the list of employees
coach_always_enabled boolean true, false When this option is activated, all incoming calls from the employee will be duplicated to his trainer.
Employee groups
groups array yes Groups the employee belongs to
group_id number Unique group identifier
group_name string Group name
Phones
phone_numbers array 10 pieces yes List of employee phone numbers.
The list of numbers must be sorted by priority.
phone_id number Unique employee phone identifier
phone_number string Employee phone number. Number format maybe with additional recruitment, for example "74955140578...2345", so the number does not have E164 format
If SIP is specified, then we don’t do it links, but simply add as PSTN type number, i.e. as usual number
channels_count number From 1 to 150 Default value "1". Quantity lines on the phone
dial_time number From 1 to 100 Default value "60". Call time by phone. Value in seconds.
status enum active, inactive Default value "active". Status numbers.
Internal number
extension object yes Extension number and its settings
extension_phone_number string Maximum length 5 Extension number
extension_voice_mail_enabled boolean If all numbers specified for this employee in the phone list, are busy, then the calling subscriber will prompted to leave a voice message.
extension_queue_enabled boolean If all numbers specified for this employee in the phone list, are busy, the caller will stand up queue to redial phones on the list and will be waiting first vacant number.
The employee is a chat operator
operator object Workstation operator
operator_display_name string Operator name in chat
operator_login string Operator login to enter the application "Operator's workplace"
operator_position_id number Unique identifier of the position operator in signature
operator_position_name string Operator position name in signature
operator_offline_message_enabled boolean Is it allowed to process applications
operator_invite_to_chat_enabled boolean Is it allowed to invite to chat
operator_chat_enabled boolean Is it allowed to participate in chats with visitors
operator_chats_available booleantrue, false Chat availability
Website
operator_sites array List of unique identifiers and website addresses for which it is available operator
site_id number Unique site identifier
site_domain_name string Site address on the Internet. Without indication protocol - "http://" or "https://".

JSON request structure```json

{ "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 response structure```json
{
  "jsonrpc":"2.0",
  "id":"number",
  "result":{
    "metadata":{

    },
    "data":[
      {
        "id":"number",
        "first_name":"string",
                "login":"string",
        "last_name":"string",
        "patronymic":"string",
        "full_name":"string",
        "email":"string",
        "status": "enum",
        "calls_available":"boolean",
        "allowed_in_call_types": "array",
        "in_external_allowed_call_directions": "array",
        "in_internal_allowed_call_directions": "array",
        "allowed_out_call_types": "array",
        "out_external_allowed_call_directions": "array",
        "out_internal_allowed_call_directions": "array",
        "groups":[
          {
            "group_id":"number",
            "group_name":"string"
          }
        ],
        "call_recording":"enum",
        "schedule_id":"number",
        "schedule_name":"string",
        "coach":{
          "coach_id":"number",
          "coach_full_name":"string",
          "coach_always_enabled":"boolean"
        },
        "phone_numbers":[
          {
            "phone_id": "integer",
            "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 returned errors

See the section "List of errors for methods with the verb get"