Query Information about the Plan Available for Renewal
Query detailed information about specific plan that you are authorized to renew.
Request URL
GET {base_url}/pricing/openapi/purchase/v1/renew/plan_info/{pricingPlanId}?{query parameters}
Request parameters
- Path parameter
-
Parameter Required Type Description pricingPlanId Yes String The unique pricing ID of specific plan for the desired product.
Note: To obtain the pricing plan ID, you need to first obtain product ID using the Query Available Subscription Products interface, then query the pricing plan 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 productId Yes Integer The unique ID of the product. Note: You can query product ID using the Query Available Subscription Products interface.productNo Yes String The Serial Number (SN) of the device for which you want to query information about the plan available for renewal. Note: You can query this information using the Query Product List interface or obtain it from PBX web portal.
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<Plan_Info> |
Detailed information about the renewal of plan. |
| status | Integer | The HTTP status code of the API request. |
Plan_Info
| Parameter | Type | Description |
|---|---|---|
| billingCycleList | Array | The supported billing cycle of the plan.
|
| billingModelList | Array | The supported billing model of the plan.
|
| connectionServiceList | Array<Service_Info> | Detailed information about the services that can be renewed with the plan. |
| name | String | Plan name. |
| planId | String | The unique ID of the plan. |
| purchaseMultiCycleList | Array<Cycle_Info> | The list of available renewal periods in years for renewal. |
| purchaseParameter | String | The item that is available for renewal in the plan. |
| purchaseParameterId | Integer | The unique ID of the item that is available for renewal in the plan. |
| unitName | String | The unit of the item in the plan. |
- Cycle_Info
-
Parameter Type Description multiCycleIndex Integer The specific number of years for renewal.
- Service_Info
-
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 services that you can renew.
Example
Request exampleQuery
information about the renewal of Enterprise Plan on a
P-Series Software Edition (Product ID: 12 & Pricing Plan ID:
15438 & PBX SN:
3651D5061439).
GET /pricing/openapi/purchase/v1/renew/plan_info/15438?productId=12&productNo=3651D5061439 HTTP/1.1
Host: openapi.partner.yeastar.com
User-Agent: OpenAPI
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTEzNjQ0ODkwODMyODk2XCIsXCJ1c2VyQ29kZVwiOlwiRGlzdHJpYnV0b3JcIixcInVzZXJJZFwiOlwiMzA3NjkxMzY0NDkxNTk5ODcyMFwiLFwidXNlcm5hbWVcIjpcImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbVwifSIsInVzZXJfbmFtZSI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3MzkyNTgwMTUsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwiYXV0aG9yaXRpZXMiOlsiNzciXSwianRpIjoibDkzTXhVMWlWYm1MeEhuOWkrdzRVaitqZ0JZPSIsImNsaWVudF9pZCI6ImFjMGYyZTViZWU3NmI2ZDdmNDU0NTY5NmMyNGZjMWYzIn0.4jMWQBsRMZp2Q0Lxo_NTOsM2V89r4FphvKlDe667oCAResponse
example{
"code": "success",
"detailMessage": "",
"requestId": "d54863315354c43111f1827700ea6fff",
"result": {
"billingCycleList": [
"annually"
],
"billingModelList": [
"recurring"
],
"connectionServiceList": [
{
"billingCycle": "annually",
"billingModel": "recurring",
"connectionServiceList": [
{
"billingCycleList": [
"annually"
],
"billingModelList": [
"recurring"
],
"name": "Hot Standby",
"pricingServiceId": 22984,
"purchaseParameter": "Extensions",
"purchaseParameterId": 400010001,
"purchaseType": [
"renew"
],
"serviceId": "3049060920480022528",
"trialPeriod": null,
"trialPrice": null,
"trialQuantity": null,
"unitName": "Extensions"
}
]
}
],
"name": "Enterprise Plan",
"planId": "3049040650094403584",
"purchaseMultiCycleList": [
{
"multiCycleIndex": 1
},
{
"multiCycleIndex": 2
},
{
"multiCycleIndex": 3
},
{
"multiCycleIndex": 4
},
{
"multiCycleIndex": 5
}
],
"purchaseParameter": "Extensions",
"purchaseParameterId": 400010001,
"unitName": "Extensions"
},
"status": 200
}