Query the Customer(s) of a Cloud PBX

Query the customers that are associated with a specific Cloud PBX.

Request URL

GET {base_url}/dm/open_api/v1/cloud_pbx/instances/{cloudPbxId}/customers

Request parameters

Path parameter
Parameter Required Type Description
cloudPbxId Yes Long The ID of the Cloud PBX.
Note: You can query the Cloud PBX ID using Query All the Cloud PBXs.
Headers
Parameter Required Type Description
Authorization Yes String Pass the access token in the header.

Format: Bearer {access_token}.

Response parameters

Parameter Type Description
data Object <Details> The detailed information.
requestId String The unique ID of the request, which can be used to quickly locate the request.
status String Request result:
  • Success
  • Failed
time Long The response time.
Note: The YCM API response returns a timestamp, you can convert the timestamp to detailed date and time as needed. For more information, see Convert Timestamp to Local Date and Time.
Details
Parameter Type Description
customerIds Array <Long> The ID list of the customers that are associated with the Cloud PBX.

Example

Request example

Query the customer(s) that are associated with the Cloud PBX (ID: 7738).
GET /dm/open_api/v1/cloud_pbx/instances/7738/customers HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NjY0NSwidmVyc2lvbiI6MTY2Mzc0MTEyNSwicmVmcmVzaFZlcnNpb24iOjE2NjQ0NDE5NjF9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjY0NDQzNzYwLCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiIwNzM2ZDJkMS0wMDZjLTQ1ZmUtYTBiZS0zNWNjNjIxNTVmYjIiLCJjbGllbnRfaWQiOiJ5QXN4ZzdITkRFczNxSHprQk1aUU5Pblo2NTBPRUNNWSJ9.h3Hz2suOlciWP9X8bxrAtsOaoCGEFad76kWc3xxk-nQ
Response example
HTTP/1.1 200 OK
{
  "data": {
    "customerIds": [
      50086283
    ]
  },
  "requestId": "3ae82ea9024861836933a390eecb836a",
  "status": "Success",
  "time": 1664442936
}