Query Information about the Service Available for Trial
Query detailed information about specific service that you are authorized to get a trial.
Request URL
GET {base_url} /pricing/openapi/purchase/v1/trial/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 parameter
-
Parameter Required Type Description productId Yes Integer The unique ID of the product. Note: You can query product ID using the Query Available Subscription Products interface.productNo No String The Serial Number (SN) of the device for which you want to query information about the service available for trial. Note: You can query this information using the Query Product List interface or obtain it from PBX web portal.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 trials of services. |
| status | Integer | The HTTP status code of the API request. |
Service_Info
| Parameter | Type | Description |
|---|---|---|
| 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. |
| purchaseParameter | String | The item that is available for trial. |
| purchaseParameterId | Integer | The unique ID of the item that is available for trial. |
| 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. |
- Additional_Service
-
Parameter Type Description billingModel String The billing model of the service. oncerecurring
billingCycle String The billing cycle of the service. annuallymonthly
connectionServiceList Array<Service_Details> Detailed information about the service.
Example
Request example
Query information about the trial of Hot Standby service on a
P-Series Software Edition (Pricing Service ID: 22984; Connection
Plan ID: 3049040650094403584; Product ID: 12;
Product SN: 3651E1129201).
GET /pricing/openapi/purchase/v1/trial/add_on_info/22984?connectionPlanId=3049040650094403584&productId=12&productNo=3651E1129201 HTTP/1.1
Host: openapi.partner.yeastar.com
User-Agent: OpenAPI
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTEzNjQ0ODkwODMyODk2XCIsXCJ1c2VyQ29kZVwiOlwiRGlzdHJpYnV0b3JcIixcInVzZXJJZFwiOlwiMzA3NjkxMzY0NDkxNTk5ODcyMFwiLFwidXNlcm5hbWVcIjpcImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbVwifSIsInVzZXJfbmFtZSI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3MzkyNTgwMTUsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwiYXV0aG9yaXRpZXMiOlsiNzciXSwianRpIjoibDkzTXhVMWlWYm1MeEhuOWkrdzRVaitqZ0JZPSIsImNsaWVudF9pZCI6ImFjMGYyZTViZWU3NmI2ZDdmNDU0NTY5NmMyNGZjMWYzIn0.4jMWQBsRMZp2Q0Lxo_NTOsM2V89r4FphvKlDe667oCA
Response example
{
"code": "success",
"detailMessage": "",
"requestId": "9c722cf2271d8826509bdd21d840b6bc",
"result": {
"connectionServiceList": [
{
"billingCycle": "",
"billingModel": "",
"connectionServiceList": [
{
"billingCycleList": [],
"billingModelList": [],
"name": "PMS",
"pricingServiceId": 22986,
"purchaseParameter": "Extensions",
"purchaseParameterId": 400010001,
"purchaseType": [],
"serviceId": "3115983610256539648",
"trialPeriod": 30,
"trialPrice": 0.00,
"trialQuantity": null,
"unitName": "extensions"
}
]
}
],
"name": "Hot Standby",
"pricingServiceId": 22984,
"purchaseParameter": "Extensions",
"purchaseParameterId": 400010001,
"serviceId": "3049060920480022528",
"trialPeriod": 30,
"trialPrice": 0.00,
"trialQuantity": null,
"unitName": "Extensions"
},
"status": 200
}