Restores the whole list of contacts (clients, employees, leads, users) with phone numbers
Parameters
- search (optional) - search bar. Search is carried out in combination by:
- names and phone numbers of clients, leads, employees and users
- users PBX extension number
- take (pagination) - how many contacts to return (20 by default)
- skip (pagination) - how many contacts to skip (0 by default)
Response
Response 1
Response 1:
{
"totalCount": 128,
"contacts": [
{
"contact_type": "customer",
},
{
"contact_type": "employee",
},
{
"contact_type": "lead",
},
{
"contact_type": "user",
}
]
}
where
- totalCount — total contact number (including search bar)
- contacts — contact array. Each of the contacts depending on its type (client, employee, lead, user) will have its own set of attributes.
Clients
Response 2
Response 2:
{
"contact_type": "customer",
"id": 3486,
"name": "Good Company",
"status": "company",
"type": "client",
"phone": {
"phone": "+44123456789",
"type": "work"
},
"responsible": {
"id": 234,
"name": "John Beam",
"ext_num": "100"
}
}
where
- contact_type — contact type:
- id — client identification
- name — client name
- status — client status. Possible values:
- individual — personal user
- company — company/business
- type — client type. Possible values:
- potential — potential client
- client — client
- reseller — reseller
- partner — partner
- phone — phone number. Contains the following fields:
- phone — the number itself
- type — number type. Possible values:
- work — work
- personal — personal
- responsible — responsible user. Contains the following field:
- id — user identification
- name — user name
- ext_num — user PBX extension number
Client's employee
Response 3
Response 3:
{
"contact_type": "employee",
"id": 8,
"name": "Michael Simpson",
"phone": {
"phone": "+44123456789",
"type": "work"
},
"position": {
"position": "manager",
"title": ""
},
"customer": {
"id": 3486,
"name": "Good Company"
},
"responsible": {
"id": 234,
"name": "John Beam",
"ext_num": "100"
}
}
where
- contact_type — contact type:
- id — employee identification
- name — employee name
- phone — phone number. Contains the following fields:
- phone — the number itself
- type — number type. Possible values:
- work — work
- personal — personal
- position — employee position. Contains the following dields:
- position — position value. Possible values:
- ceo — CEO
- director — director
- manager — manager
- sales_manager — sales manager
- hr — HR
- support — support
- custom — custom
- title — custom position title (for position = custom)
- customer — client to whom the employee is attached. Contains the following fields:
- id — client identification
- name — client name
- responsible — user responsible for parent entity client. Contains the following fields:
- id — user identification
- name — user name
- ext_num — user PBX extension number
Lead
Response 4
Response 4:
{
"contact_type": "lead",
"id": 3486,
"name": "Good Company",
"phone": {
"phone": "+44123456789",
"type": "work"
},
"responsible": {
"id": 234,
"name": "John Beam",
"ext_num": "100"
}
}
where
- contact_type — contact type:
- id — lead identification
- name — lead name
- phone — phone number. Contains the following fields:
- phone — the number itself
- type — number type. Possible values:
- work — work
- personal — personal
- responsible — responsible user. Contains the following fields:
- id — user identification
- name — user name
- ext_num — user PBX extension number
User
Response 5
Response 5:
{
"contact_type": "user",
"id": 234,
"name": "John Beam",
"avatar": 2457,
"role": "",
"status": "",
"phone": {
"phone": "100",
"type": "internal"
},
"group": {
"type": "admin",
"title": ""
}
}
where
- contact_type — contact type:
- id — user identification
- name — user name
- avatar — user avatar (file identification)
- role — user role
- status — user status
- phone — phone number. Contains the following fields:
- phone — the number itself
- type — number type. Possible values:
- work — work
- personal — personal
- internal — PBX extension number
- group — user group. Contains the following fields:
- type — group type. Possible values:
- admin — admins
- manager — managers
- chat_operator — operators
- trainee — trainees
- custom — custom
- title — custom group title (for type = custom)