Query Information about the Service Available for Subscription

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

Tip: We provide step-by-step guidance for purchasing products via API. You can refer to the API tutorial to get started quickly.

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
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:
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.

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.
Service_Info
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
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.
purchaseInput Object<Purchase_Limit> The purchase limit for subscription 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.
  • annually
  • monthly
billingModel String The billing model of the service.
  • once
  • recurring
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.
  • 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.
purchaseInput Object<Purchase_Limit> The purchase limit for flat-rate or quantity-based subscription service.
purchaseMandatory Boolean

Whether the service must be renewed together with the subscription plan.

  • true: The service can only be renewed together with the subscription plan and shares the same expiration date.
  • false: The service can be renewed independently of the subscription plan.
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.
  • 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.
Purchase_Limit
Note: The purchase limit indicates the allowed range for the unitName in subscription service.
Parameter Type Description
inputMaxValue String The maximum value allowed.
Note: If an expression is returned, it indicates that the service depends on another parameter. For example, 0.5*Concurrent Calls indicates that the maximum value allowed is half of the concurrent calls supported by the phone system.
inputMinValue Integer The minimum value allowed.
inputUnit String The valid values or the billing unit, depending on the pricing model.
  • Flat-rate subscription: The valid values.
  • Quantity-based subscription: The billing unit.

    For example, 1000 indicates that the service can be purchased in increments of 1000.

Purchase_Limit
Note: The purchase limit indicates the allowed range for the unitName in subscription plan.
Parameter Type Description
inputMaxValue String The maximum value allowed.
inputMinValue Integer The minimum value allowed.
inputUnit String The valid values or the billing unit, depending on the pricing model.
  • Flat-rate subscription: The valid values.
  • Quantity-based subscription: The billing unit.

    For example, 1000 indicates that the billing unit can be purchased in increments of 1000.

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": "8c699174bf57464d0ac254dd9d2fa5cc",
    "result": {
        "billingCycleList": [
            "once"
        ],
        "billingModelList": [
            "once"
        ],
        "connectionServiceList": [
            {
                "billingCycle": "once",
                "billingModel": "once",
                "connectionServiceList": [
                    {
                        "billingCycleList": [
                            "annually"
                        ],
                        "billingModelList": [
                            "recurring"
                        ],
                        "name": "Maintenance",
                        "pricingServiceId": 22985,
                        "purchaseInput": null,
                        "purchaseMandatory": null,
                        "purchaseParameter": "Channels",
                        "purchaseParameterId": 410161021,
                        "purchaseType": [
                            "purchase"
                        ],
                        "serviceId": "3111639376985194496",
                        "trialPeriod": null,
                        "trialPrice": null,
                        "trialQuantity": null,
                        "unitName": "channel (s)"
                    },
                    {
                        "billingCycleList": [
                            "annually"
                        ],
                        "billingModelList": [
                            "recurring"
                        ],
                        "name": "Hot Standby",
                        "pricingServiceId": 22984,
                        "purchaseInput": null,
                        "purchaseMandatory": null,
                        "purchaseParameter": "Extensions",
                        "purchaseParameterId": 400010001,
                        "purchaseType": [
                            "purchase",
                            "trial"
                        ],
                        "serviceId": "3049060920480022528",
                        "trialPeriod": 30,
                        "trialPrice": 0.00,
                        "trialQuantity": null,
                        "unitName": "extension(s)"
                    },
                    {
                        "billingCycleList": [
                            "annually"
                        ],
                        "billingModelList": [
                            "recurring"
                        ],
                        "name": "Outbound Call Center",
                        "pricingServiceId": 57550,
                        "purchaseInput": {
                            "inputMaxValue": "1*Concurrent Calls",
                            "inputMinValue": 1,
                            "inputUnit": "1"
                        },
                        "purchaseMandatory": null,
                        "purchaseParameter": "Channels",
                        "purchaseParameterId": 410161021,
                        "purchaseType": [
                            "purchase",
                            "trial"
                        ],
                        "serviceId": "3296479635177226240",
                        "trialPeriod": 30,
                        "trialPrice": 0.00,
                        "trialQuantity": 1,
                        "unitName": "channel (s)"
                    },
                    {
                        "billingCycleList": [
                            "annually"
                        ],
                        "billingModelList": [
                            "recurring"
                        ],
                        "name": "AI Transcription (On-Demand Minute Pack)",
                        "pricingServiceId": 80781,
                        "purchaseInput": {
                            "inputMaxValue": "1000000",
                            "inputMinValue": 1000,
                            "inputUnit": "1"
                        },
                        "purchaseMandatory": null,
                        "purchaseParameter": "Transcription Minutes",
                        "purchaseParameterId": 410161022,
                        "purchaseType": [
                            "purchase"
                        ],
                        "serviceId": "3362460514919010304",
                        "trialPeriod": null,
                        "trialPrice": null,
                        "trialQuantity": null,
                        "unitName": "mins"
                    },
                    {
                        "billingCycleList": [
                            "once"
                        ],
                        "billingModelList": [
                            "once"
                        ],
                        "name": "AI Receptionist (On-Demand Minute Pack)",
                        "pricingServiceId": 103403,
                        "purchaseInput": {
                            "inputMaxValue": "1000000",
                            "inputMinValue": 500,
                            "inputUnit": "500"
                        },
                        "purchaseMandatory": null,
                        "purchaseParameter": "Receptionist Minutes",
                        "purchaseParameterId": 410161025,
                        "purchaseType": [
                            "purchase"
                        ],
                        "serviceId": "3431597423790321664",
                        "trialPeriod": null,
                        "trialPrice": null,
                        "trialQuantity": null,
                        "unitName": "mins"
                    },
                    {
                        "billingCycleList": [
                            "annually"
                        ],
                        "billingModelList": [
                            "recurring"
                        ],
                        "name": "AI Transcription (Monthly Rolling Plan)",
                        "pricingServiceId": 110475,
                        "purchaseInput": {
                            "inputMaxValue": "999999",
                            "inputMinValue": 1,
                            "inputUnit": "1"
                        },
                        "purchaseMandatory": null,
                        "purchaseParameter": "Transcription Pack",
                        "purchaseParameterId": 410161026,
                        "purchaseType": [
                            "purchase"
                        ],
                        "serviceId": "3451995285171306496",
                        "trialPeriod": null,
                        "trialPrice": null,
                        "trialQuantity": null,
                        "unitName": "pack (s)"
                    },
                    {
                        "billingCycleList": [
                            "annually"
                        ],
                        "billingModelList": [
                            "recurring"
                        ],
                        "name": "AI Receptionist (Monthly Rolling Plan)",
                        "pricingServiceId": 110476,
                        "purchaseInput": {
                            "inputMaxValue": "999999",
                            "inputMinValue": 1,
                            "inputUnit": "1"
                        },
                        "purchaseMandatory": null,
                        "purchaseParameter": "Receptionist Pack",
                        "purchaseParameterId": 410161027,
                        "purchaseType": [
                            "purchase"
                        ],
                        "serviceId": "3451995621156028416",
                        "trialPeriod": null,
                        "trialPrice": null,
                        "trialQuantity": null,
                        "unitName": "pack (s)"
                    }
                ]
            }
        ],
        "name": "PMS",
        "pricingServiceId": 22986,
        "purchaseInput": null,
        "purchaseMultiCycleList": [],
        "purchaseParameter": "Channels",
        "purchaseParameterId": 410161021,
        "serviceId": "3115983610256539648",
        "unitName": "extensions"
    },
    "status": 200
}