JSON API » pickupgroups » pickupgroups/phones/list
Gets list of telephone lines in a pickup group, or list of pickup groups a telephone line is in.
Input parameters
Requires authentication and the administrator or wholesale role privileges.
| Name | Type | Description | Required | Default value |
|---|---|---|---|---|
| auth_username | String | Authentication username. | Yes | |
| auth_password | String | Authentication password. | Yes | |
| pickupgroup | Integer | ID of pickup group. | Yes, unless phone is specified. | |
| phone | String | Telephone line. | Yes, unless pickupgroup is specified. |
Specify pickupgroup or phone, but not both.
Responses
| Code | Description |
|---|---|
| 200 | Success. |
| 401 | The authentication details provided are invalid. |
| 402 | Your role does not allow this. |
| 404 | The pickup group or telephone line does not exist, or you do not have permission to view it. |
Data returned
If pickupgroup was specified, a list of telephone lines. If phone was specified, a list of IDs of pickup groups.
Example: With pickupgroup
http://enswitch.example.com/api/json/pickupgroups/phones/list/?auth_username=user;auth_password=password;pickupgroup=123{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ "1234567", "1234568" ] }
Example: With phone
http://enswitch.example.com/api/json/pickupgroups/phones/list/?auth_username=user;auth_password=password;phone=1234567{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ "1", "2" ] }
Change history
| Version | Changes |
|---|---|
| 3.13 | Function added. |
