Query All the Customers
Note: For the hosting user, only the customers that were created by
the hosting user can be queried.
HTTP method and endpoint
GET /api/v1/pbx/customers
Request parameters
| Parameter | Importance | Type | Description |
| pageNumber | Optional | Int | Defines which page is displayed. |
| pageSize | Optional | Int | Defines how many records per page. |
| sort | Optional | String | Defines the sorting field.
|
| order | Optional | String | Defines the sorting order.
|
Response parameters
PBX Customer Information
| Parameter | Type | Description |
| id | Integer | User ID. |
| company | String | Company name. |
| contactName | String | Contact name. |
| String | Email address. | |
| position | String | Job title. |
| cellphone | String | Cell phone number. |
| telephone | String | Telephone number. |
| fax | String | Fax number. |
| address | String | Company address. |
| remark | String | Remark. |
| externalId | String | External ID. |
Page Information
| Parameter | Type | Description |
| customers | Object | Customer information. |
| list | Array<PbxCustomerInfo> | Customer list. |
| total | Integer | The total number of PBX customers. |
| pageSize | Integer | How many records per page. |
Examples
Request example
- Display the page 1.
- Display 2 customers per page.
- Display the customers by the ascending order.
GET /api/v1/pbx/customers?pageSize=2&pageNumber=1&order=asc HTTP/1.1 Host: ympapi.yeastarcloud.com Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbl9uYW1lIjoiY2VjaWxpYUB5ZWFzdGFyLmNvbSIsInNjb3BlIjpbInRydXN0Il0sImV4cCI6MTU0Njk0MTU4MywiYXV0aG9yaXRpZXMiOlsiUk9MRV9hZG1pbiJdLCJqdGkiOiIyYzRmMDk2Yy05MjNkLTQ4Y2ItODRjZS1hNTM3NWFmNmMyMDciLCJjbGllbnRfaWQiOiI5Nzg5OTNmMDk2YzQ0MTFmYTljYzgwZWUyZTYyZjFmMiJ9.E0zt_URf9ZbQEm05fJY_C5qIgXtr8Q0bY6PzdTCFe1Q Cache-Control: no-cache
Response example
HTTP/1.1 200 OK { "status": "Success", "customers": { "list": [ { "address": "", "cellphone": "", "company": "cyt", "contactName": "cyt", "email": "cecilia@yeastar.com", "fax": "", "id": 2, "position": "", "remark": "", "telephone": "" }, { "address": "", "cellphone": "", "company": "fannie", "contactName": "fannie", "email": "fannie@yeastar.com", "fax": "", "id": 52, "position": "", "remark": "", "telephone": "" } ], "pageSize": 2, "total": 17 } }