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.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
pickupgroupIntegerID of pickup group.Yes, unless phone is specified.
phoneStringTelephone line.Yes, unless pickupgroup is specified.

Specify pickupgroup or phone, but not both.

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.
404The 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

VersionChanges
3.13Function added.