Query Information about the Plan Available for Subscription

Query detailed information about specific plan to which you are authorized to subscribe.

Request URL

GET {base_url}/pricing/openapi/purchase/v1/purchase/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 No String The Serial Number (SN) of the product for which you want to query available subscription plans.
Note: This parameter is required when you query available subscription plans for Linkus Cloud Service or P-Series Plan for Appliance Edition.

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 subscription plans.
status Integer The HTTP status code of the API request.
Plan_Info
Parameter Type Description
billingCycleList Array<String> The supported billing cycle of the plan.
  • annually
  • monthly
billingModelList Array<String> The supported billing model of the plan.
  • once
  • recurring
connectionServiceList Array<Service_Info>

Detailed information about the service that you can try or subscribe to with the plan.

name String Plan name.
planId String The unique ID of the plan.
purchaseMultiCycleList Array<String> The specific billing cycle of the plan.
purchaseParameter String The item that is available for subscription in the plan.
purchaseParameterId Integer The unique ID of the item that is available for subscription in the plan.
unitName String The unit of the item in the plan.
Service_Info
Parameter Type Description
billingCycle String The billing cycle of the service.
  • annually
  • monthly
billingModel String The billing model of the service.
  • once
  • recurring
connectionServiceList Array<Service_Details> Detailed information about the services that you can try or subscribe.
Service_Details
Parameter Type Description
billingCycleList Array<String> The supported billing cycle of the service.
  • annually
  • monthly
billingModelList Array<String> The supported billing model of the service.
  • once
  • recurring
name String Service name.
pricingServiceId Integer The unique pricing ID of the service.
purchaseParameter String The item that is available for trial or subscription in the service.
purchaseParameterId Integer The unique ID of the item that is available for trial or subscription in the service.
purchaseType Array<String> The supported purchase type for the service.
  • purchase
  • trial
  • switch
  • switchTrial
  • renew
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 Enterprise Plan on a P-Series Software Edition (Product ID: 12 & Pricing Plan ID: 15438 & PBX SN: 3651E0233986).

GET /pricing/openapi/purchase/v1/purchase/plan_info/15438?productId=12&productNo=3651E0233986 HTTP/1.1
Host: openapi.partner.yeastar.com
User-Agent: OpenAPI
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTEzNjQ0ODkwODMyODk2XCIsXCJ1c2VyQ29kZVwiOlwiRGlzdHJpYnV0b3JcIixcInVzZXJJZFwiOlwiMzA3NjkxMzY0NDkxNTk5ODcyMFwiLFwidXNlcm5hbWVcIjpcImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbVwifSIsInVzZXJfbmFtZSI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3MzkyNTgwMTUsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwiYXV0aG9yaXRpZXMiOlsiNzciXSwianRpIjoibDkzTXhVMWlWYm1MeEhuOWkrdzRVaitqZ0JZPSIsImNsaWVudF9pZCI6ImFjMGYyZTViZWU3NmI2ZDdmNDU0NTY5NmMyNGZjMWYzIn0.4jMWQBsRMZp2Q0Lxo_NTOsM2V89r4FphvKlDe667oCA

Response example

{
    "code": "success",
    "detailMessage": "",
    "requestId": "7991ac49bf193e9a7482bc3f863ee2ef",
    "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": [
                            "purchase",
                            "trial"
                        ],
                        "serviceId": "3049060920480022528",
                        "trialPeriod": 30,
                        "trialPrice": 0.00,
                        "trialQuantity": null,
                        "unitName": "Extensions"
                    },
                    {
                        "billingCycleList": [
                            "annually",
                            "once"
                        ],
                        "billingModelList": [
                            "recurring",
                            "once"
                        ],
                        "name": "Maintenance",
                        "pricingServiceId": 22985,
                        "purchaseParameter": "",
                        "purchaseParameterId": null,
                        "purchaseType": [
                            "purchase"
                        ],
                        "serviceId": "3111639376985194496",
                        "trialPeriod": null,
                        "trialPrice": null,
                        "trialQuantity": null,
                        "unitName": ""
                    },
                   {
                        "billingCycleList": [
                            "annually"
                        ],
                        "billingModelList": [
                            "recurring"
                        ],
                        "name": "Outbound Call Center",
                        "pricingServiceId": 57551,
                        "purchaseParameter": "Channels",
                        "purchaseParameterId": 410161021,
                        "purchaseType": [
                            "purchase",
                            "trial"
                        ],
                        "serviceId": "3302296213345505280",
                        "trialPeriod": 30,
                        "trialPrice": 0.00,
                        "trialQuantity": 1,
                        "unitName": "channel (s)"
                    },
                    {
                        "billingCycleList": [
                            "annually"
                        ],
                        "billingModelList": [
                            "recurring"
                        ],
                        "name": "PMS",
                        "pricingServiceId": 22986,
                        "purchaseParameter": "Extensions",
                        "purchaseParameterId": 400010001,
                        "purchaseType": [
                            "purchase",
                            "trial"
                        ],
                        "serviceId": "3115983610256539648",
                        "trialPeriod": 30,
                        "trialPrice": 0.00,
                        "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
}