Query the Subscription of a YCM User

Query the subscription of a specific subordinate YCM user.

Request URL

GET {base_url}/open_api/v1/users/{userId}/subscription_info

Request parameters

Path parameter
Parameter Required Type Description
userId Yes Long The ID of the YCM user.
Note: You can query the user ID using Query All the YCM Users.
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
totalExtensions Integer The total number of extensions.
usedExtensions Integer The number of used extensions.
totalConcurrentCalls Integer The total number of concurrent calls.
usedConcurrentCalls Integer The number of used concurrent calls.
totalRecordings Integer The total number of call recording minutes.
usedRecordings Integer The used call recording minutes.
minimumExtPerPbx Integer The minimum number of extensions for each PBX.
highAvailability String Whether the High Availability service is enabled or not.
  • Enabled
  • Disabled
whiteLabel String Whether the White Label service is enabled or not.
  • Enabled
  • Disabled
totalCustomDomains Integer The total number of the custom domains the user can set in each region.

Example

Request example

Query the subscription of a YCM user (ID: 13123).
GET /dm/open_api/v1/users/13123/subscription_info HTTP/1.1
Host: ycm.yeastar.com
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NjY0NSwidmVyc2lvbiI6MTY2Mzc0MTEyNSwicmVmcmVzaFZlcnNpb24iOjE2NjQzNDIzOTB9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjY0MzQ0MTkwLCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiI1ODA1OWRjMC05NWQ4LTQzYWYtOGMyNi1iZDAzOWEwMGU3NjIiLCJjbGllbnRfaWQiOiJ5QXN4ZzdITkRFczNxSHprQk1aUU5Pblo2NTBPRUNNWSJ9.4tE1BwhZkkxLHuwfyU989EgQp9VvPWwthplR-8Bnsls
Response example
HTTP/1.1 200 OK
{
  "data": {
    "totalExtensions": 50,
    "usedExtensions": 0,
    "totalConcurrentCalls": 5,
    "usedConcurrentCalls": 0,
    "totalRecordings": 50,
    "usedRecordings": 0,
    "minimumExtPerPbx": 10,
    "highAvailability": "Enabled",
    "whiteLabel": "Enabled",
    
    "totalCustomDomains": 0
  },
  "requestId": "b350c75fbf2213fda3f0cc61d43f977e",
  "status": "Success",
  "time": 1664432266
}