Table of Contents
API : PBX : Phonebook group delete
Introduction
A phonebook group is a named group of phonebook contacts. Other features point at a group by its id, e.g. to route a call depending on whether the caller is in the group.
There are two kinds of groups:
- Customer groups hold the customers shared contacts. Every user of the customer can see them. Access level MANAGER or above is required to create, rename and delete them.
- Personal groups belong to one employee and hold that employees personal contacts. The employee manages them, and so does another employee who has the group right
readPhonebook(to see them) orwritePhonebook(to change them) on the employee.
A contact selects its groups through its groups property when it is created or updated. A shared contact can only be in customer groups, a personal contact only in the personal groups of its own employee.
This request deletes a group. The group is first taken out of every contact in it, so no contact keeps a reference to a group that no longer exists. The contacts themselves are not deleted.
A customer group that a value router routes calls on (rule type A_NUMBER_IN_PHONEBOOK_GROUP) cannot be deleted: the request fails with 409 and names the value routers. Remove those rules first.
Request
| URL | https://api.telecomx.dk/pbx/phonebookgroup/GROUP_ID | |
|---|---|---|
| Method | DELETE | |
| Access level | Customer group: MANAGER or OWNER if user belongs to the customer, RESELLER if customer belongs to the reseller, ADMIN. Personal group: the employee self, or an employee with the group right writePhonebook on the employee. |
|
| Param | GROUP_ID | Id of the group (24 hex-char string) |
Response
| JSON object | ||
|---|---|---|
| success | Boolean | True on success. |
| contacts | Number | Number of contacts the group was taken out of. |
{ success: true, contacts: 12 }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 404 | id | Phonebook group not found |
| 409 | valueRouters | The group is used by the value router(s) “Main number”, “Opening hours” - remove those rules first. check holds the names of the value routers, comma separated. |
| 422 | id | Not a valid id |
| 500 | internal_error | <Unspecified> |