JSON API » numbers » numbers/list
Gets the fields of all numbers visible to the user in the given customer.
Input parameters
Requires authentication and the user or wholesale role privileges.
| Name | Type | Description | Required | Default value | 
|---|---|---|---|---|
| auth_username | String | Authentication username. | Yes | |
| auth_password | String | Authentication password. | Yes | |
| callerid | Integer | 1 to return only numbers that can be used as callerid, 0 to return all. | No | 0 | 
| callerid_location | Integer | 1 to return only numbers that can be used as location, 0 to return all. | No | 0 | 
| customer | Integer | ID of customer to get numbers for. | No | Customer of authentication user. | 
| count | Integer | 1 to return a count, 0 to return full data. | No | 0 | 
| limit | Integer | The maximum results to return. 0 for all. | No | 0 | 
| offset | Integer | The result to start at. 0 for the first. | No | 0 | 
| pages | Integer | 1 to return a reduced set of data for generating the pages select box, 0 to return full data. | No | 0 | 
Responses
| Code | Description | 
|---|---|
| 200 | Success. | 
| 400 | Invalid customer specified. | 
| 401 | The authentication details provided are invalid. | 
| 402 | Your role does not allow this. | 
Data returned
An array of fields, corresponding to the rows of the numbers table in the database.
Example: With required parameters
https://www.015pbx.net/local/api/json/numbers/list/?auth_username=user;auth_password=password{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "number":"2125551234", "description":"example1", ... }, { "number":"2125551235", "description":"example2", ... } ] }
