Query Information about the Service Available for Subscription
Query detailed information about specific service to which you are authorized to subscribe.
Note: This API interface is only available for P-Series
Plan for Appliance Edition, Software PBX (PSE
Self-hosted), Cloud PBX (PCE Instance), and
Cloud PBX (PCE Package).
Request URL
GET {base_url} /pricing/openapi/purchase/v1/purchase/add_on_info/{pricingServiceId}?{query parameters}
Request parameters
- Path parameter
-
Parameter Required Type Description pricingServiceId Yes String The unique pricing ID of the service for the desired product. Note: To obtain the pricing service ID, you need to first obtain product ID using the Query Available Subscription Products interface, then query the pricing service ID using the Query Available Subscription / Trial Plans and Services for a Product interface.
- Headers
-
Parameter Required Description User-Agent Yes Provide information about the user agent, such as the type of web browser, operating system, software version, etc., so as to help Yeastar Partner Portal to identify the user or the application that is making the request. Example:
User-Agent: OpenAPI.Authorization Yes Pass the access token in the header, so as to authenticate the API request. Format: Bearer {access_token}.
- Query parameters
-
Parameter Required Type Description productNo No String The Serial Number (SN) of the product for which you want to query available subscription service. Note: You can query this information using the Query Product List interface or obtain it from PBX web portal.productId Yes Integer The unique ID of the product. Note: You can query product ID using the Query Available Subscription Products interface.connectionPlanId No Integer The unique ID of the plan on which the service is dependent.Note: To obtain the plan ID, you need to obtain product ID first using the Query Available Subscription Products interface, then query Plan ID using the Query Available Subscription / Trial Plans and Services for a Product interface.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| code | String | The response message of the API request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| result | Object<Service_Info> | Detailed information about the subscriptions of services. |
| status | Integer | The HTTP status code of the API request. |
| Parameter | Type | Description |
|---|---|---|
| billingCycleList | Array<String> | The supported billing cycle of the
service.
|
| billingModelList | Array<String> | The supported billing model of the
service.
|
| connectionServiceList | Array<Additional_Service> | The list of additional services supported for the product. |
| name | String | Service name. |
| pricingServiceId | Integer | The unique pricing ID of the service. |
| purchaseMultiCycleList | Array | The billing cycle of the service. |
| purchaseParameter | Integer | The item that is available for subscription in the service. |
| purchaseParameterId | Integer | The unique ID of the item that is available for subscription in the service. |
| serviceId | String | The unique ID of the service. |
| unitName | String | The unit of the item in the service. |
- Additional_Service
-
Parameter Type Description billingCycle String The billing cycle of the service. annuallymonthly
billingModel String The billing model of the service. oncerecurring
connectionServiceList Array<Service_Details> Detailed information about additional services to which you can subscribe. - Service_Details
-
Parameter Type Description billingCycleList Array<String> The supported billing cycle of the service. annuallymonthly
billingModelList Array<String> The supported billing model of the service. oncerecurring
name String Service name. pricingServiceId Integer The unique pricing ID of the service. purchaseParameter String The item that is available for subscription in the service. purchaseParameterId Integer The unique ID of the item that is available for subscription in the service. purchaseType Array<String> The supported purchase type for the service. purchasetrialswitchswitchTrialrenew
serviceId String The unique ID of the service. trialPeriod Integer Trial period of the service. trialPrice Number Trial price of the service. trialQuantity Integer The supported quantity of the item that is available for trial in the service. unitName String The unit of the item in the service.
Example
Request example
Query information about the subscription of Hotel PMS
Integration service on a P-Series Software Edition (Pricing Service
ID: 22986; Connection Plan ID:
3049040650094403584; Product ID: 12; Product SN:
3651D4471503).
GET /pricing/openapi/purchase/v1/purchase/add_on_info/22986?productId=12&productNo=3651D4471503&connectionPlanId=3049040650094403584 HTTP/1.1
Host: openapi.partner.yeastar.com
User-Agent: OpenAPI
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTEzNjQ0ODkwODMyODk2XCIsXCJ1c2VyQ29kZVwiOlwiRGlzdHJpYnV0b3JcIixcInVzZXJJZFwiOlwiMzA3NjkxMzY0NDkxNTk5ODcyMFwiLFwidXNlcm5hbWVcIjpcImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbVwifSIsInVzZXJfbmFtZSI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3MzkyNTgwMTUsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwiYXV0aG9yaXRpZXMiOlsiNzciXSwianRpIjoibDkzTXhVMWlWYm1MeEhuOWkrdzRVaitqZ0JZPSIsImNsaWVudF9pZCI6ImFjMGYyZTViZWU3NmI2ZDdmNDU0NTY5NmMyNGZjMWYzIn0.4jMWQBsRMZp2Q0Lxo_NTOsM2V89r4FphvKlDe667oCA
Response example
{
"code": "success",
"detailMessage": "",
"requestId": "842a89a36782c5c455ef3ed82ceab584",
"result": {
"billingCycleList": [
"once"
],
"billingModelList": [
"once"
],
"connectionServiceList": [
{
"billingCycle": "once",
"billingModel": "once",
"connectionServiceList": [
{
"billingCycleList": [
"once",
"once"
],
"billingModelList": [
"once"
],
"name": "Maintenance",
"pricingServiceId": 22985,
"purchaseParameter": "",
"purchaseParameterId": null,
"purchaseType": [
"purchase"
],
"serviceId": "3111639376985194496",
"trialPeriod": null,
"trialPrice": null,
"trialQuantity": null,
"unitName": ""
}
]
}
],
"name": "PMS",
"pricingServiceId": 22986,
"purchaseMultiCycleList": [],
"purchaseParameter": "Extensions",
"purchaseParameterId": 400010001,
"serviceId": "3115983610256539648",
"unitName": "extensions"
},
"status": 200
}