Getting a list of contacts in the address book

Method get.contacts
Description Retrieving a list of contacts in the address book
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 contact identifier
first_name string yes yes Contact name
last_name string yes yes Contact last name
patronymic string Contact middle name
full_name string yes yes Last name First name Patronymic
emails array Maximum 10 addresses yes Contact email address.
phone_numbers array Maximum 10 numbers yes List of contact numbers
Personal manager
personal_manager_id number yes Unique personal identifier manager
personal_manager_full_name string yes Last name First name Patronymic manager
Organization
organization_id number yes Unique identifier of the organization
organization_name string yes Organization name
Groups the contact belongs to
groups array yes List of groups the contact belongs to
group_id number Unique group identifier
group_name string Group name

JSON request structure```json

{ "jsonrpc":"2.0", "id":"number", "method":"get.contacts", "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",
        "last_name":"string",
        "first_name":"string",
        "patronymic":"string",
        "full_name":"string",
        "emails":[
          "email"
        ],
        "groups":[
          {
            "group_id":"number",
            "group_name":"string"
          }
        ],
        "phone_numbers":[
          "number"
        ],
        "personal_manager_id":"number",
        "personal_manager_full_name":"string",
        "organization_name":"string",
        "organization_id":"number"
      }
    ]
  }
}

List of returned errors

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