Query Subscription Price
Check the original price before subscribing to a specific plan or service.
Request URL
GET {base_url}/pricing/openapi/purchase/v1/my_price_info?{query parameters}
Request parameters
- 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.partnerId No String The unique ID of the user for whom you want to query subscription service. Note: You can query user ID using the Query Subordinate User List interface.billingCycle Yes String Billing cycle. Valid value:once: One-off plan/service.annuallyormonthly: Recurring plan/service.
offeringId Yes String The unique offering ID of a product. Note: You can query offering 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<Price_Info> | Detailed information about the subscription price. |
| status | Integer | The HTTP status code of the API request. |
Price_Info
| Parameter | Type | Description |
|---|---|---|
| offeringId | String | The unique offering ID of the product. |
| planList | Array<Plan_Info> |
Price information for plan and the associated service. |
| serviceList | Array<Service_Info> |
Price information for add-on service. |
- Plan_Info
-
Parameter Type Description planName String Name of the subscription plan. pricingModel String Pricing model of the subscription plan. pricingPlanId Integer The unique pricing ID of the plan. billingCycle String Billing cycle of the subscription plan. billingCycleList Array<Billing_Cycle_Details> Detailed information about billing cycle of the subscription plan. connectionServiceList Array<Service_Details> Detailed information about the services associated with the plan. - Billing_Cycle_Details
-
Parameter Type Description productModel String Product model. unitName String Name of the billable item. billingUnit Integer Billing unit of the billable item.
price Number Unit price of the billable item. quantityPriceList Array <Quantity_Price_Info> Detailed information about price for different quantities of the billable item.
- Quantity_Price_Info
-
Parameter Type Description unit Integer Billing unit of the billable item. price Number Unit price of the billable item. firstUnit String The starting range of the billing unit. lastUnit String The end range of the billing unit.
- connectionServiceList
-
Parameter Type Description serviceName String Name of the service. pricingServiceId Integer The unique pricing ID of the service. pricingModel String Pricing model of the service. billingCycle String Billing cycle. billingCycleList Array<Billing_Cycle_Details> Detailed information about billing cycle of the service. - billingCycleList
-
Parameter Type Description productModel String Product model. billingUnit Integer Billing unit of the billable item.
price Number Unit price of the billable item. unitName String Name of the billable item. quantityPriceList Array <Quantity_Price_Info> Detailed information about pricing for different quantities of the billable item.
- Quantity_Price_Info
-
Parameter Type Description price Number Unit price of the billable item. firstUnit String The starting range of the billing unit. lastUnit String The end range of the billing unit. unit Integer Billing unit of the billable item.
- Service_Details
-
Parameter Type Description pricingServiceId Integer The unique pricing ID of the add-on service. serviceName String Add-on service name. pricingModel String Pricing model of the add-on service. billingCycle String Billing cycle. billingCycleList Array<Billing_Cycle_Details> Detailed information about billing cycle of the add-on service. - Billing_Cycle_Details
-
Parameter Type Description productModel String Product model. billingUnit Integer Billing unit of the billable item.
price Number Unit price of the billable item. unitName String Name of the billable item. quantityPriceList Array <Quantity_Price_Info> Detailed information about pricing for different quantities of the billable item.
- Quantity_Price_Info
-
Parameter Type Description price Number Unit price of the billable item. firstUnit String The starting range of the billing unit. lastUnit String The end range of the billing unit. unit Integer Billing unit of the billable item.
Example
Query the subscription price for P-Series Appliance Edition.
Request example
GET /pricing/openapi/purchase/v1/my_price_info?productId=11&billingCycle=annually&offeringId=3048558386750566400 HTTP/1.1
Host: openapi.partner.yeastar.com
User-Agent: OpenAPI
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTEzNjQ0ODkwODMyODk2XCIsXCJ1c2VyQ29kZVwiOlwiRGlzdHJpYnV0b3JcIixcInVzZXJJZFwiOlwiMzA3NjkxMzY0NDkxNTk5ODcyMFwiLFwidXNlcm5hbWVcIjpcImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbVwifSIsInVzZXJfbmFtZSI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3MzkyNTgwMTUsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwiYXV0aG9yaXRpZXMiOlsiNzciXSwianRpIjoibDkzTXhVMWlWYm1MeEhuOWkrdzRVaitqZ0JZPSIsImNsaWVudF9pZCI6ImFjMGYyZTViZWU3NmI2ZDdmNDU0NTY5NmMyNGZjMWYzIn0.4jMWQBsRMZp2Q0Lxo_NTOsM2V89r4FphvKlDe667oCA
Response example
{
"code": "success",
"detailMessage": "",
"requestId": "b850a4b5234730cccb1b27fb2136a817",
"result": {
"offeringId": 3048558386750566400,
"planList": [
{
"billingCycle": "annually",
"billingCycleList": [
{
"billingUnit": null,
"price": 99.50,
"productModel": "P520",
"quantityPriceList": [],
"unitName": ""
},
{
"billingUnit": null,
"price": 224.50,
"productModel": "P550",
"quantityPriceList": [],
"unitName": ""
},
{
"billingUnit": null,
"price": 374.50,
"productModel": "P560",
"quantityPriceList": [],
"unitName": ""
},
{
"billingUnit": null,
"price": 499.50,
"productModel": "P570",
"quantityPriceList": [],
"unitName": ""
}
],
"connectionServiceList": [],
"planName": "Standard Plan",
"pricingModel": "fixed",
"pricingPlanId": 21913
},
{
"billingCycle": "annually",
"billingCycleList": [
{
"billingUnit": null,
"price": 199.50,
"productModel": "P520",
"quantityPriceList": [],
"unitName": ""
},
{
"billingUnit": null,
"price": 249.50,
"productModel": "P550",
"quantityPriceList": [],
"unitName": ""
},
{
"billingUnit": null,
"price": 399.50,
"productModel": "P560",
"quantityPriceList": [],
"unitName": ""
},
{
"billingUnit": null,
"price": 85.36,
"productModel": "P570",
"quantityPriceList": [],
"unitName": ""
}
],
"connectionServiceList": [],
"planName": "Enterprise Plan",
"pricingModel": "fixed",
"pricingPlanId": 21914
},
{
"billingCycle": "annually",
"billingCycleList": [
{
"billingUnit": null,
"price": 299.50,
"productModel": "P520",
"quantityPriceList": [],
"unitName": ""
},
{
"billingUnit": null,
"price": 449.50,
"productModel": "P550",
"quantityPriceList": [],
"unitName": ""
},
{
"billingUnit": null,
"price": 749.50,
"productModel": "P560",
"quantityPriceList": [],
"unitName": ""
},
{
"billingUnit": null,
"price": 42.24,
"productModel": "P570",
"quantityPriceList": [],
"unitName": ""
}
],
"connectionServiceList": [],
"planName": "Ultimate Plan",
"pricingModel": "fixed",
"pricingPlanId": 21915
}
],
"serviceList": [
{
"billingCycle": "annually",
"billingCycleList": [
{
"billingUnit": null,
"price": 1.00,
"productModel": "P520",
"quantityPriceList": [],
"unitName": ""
},
{
"billingUnit": null,
"price": 2.00,
"productModel": "P550",
"quantityPriceList": [],
"unitName": ""
},
{
"billingUnit": null,
"price": 3.00,
"productModel": "P560",
"quantityPriceList": [],
"unitName": ""
},
{
"billingUnit": null,
"price": 4.00,
"productModel": "P570",
"quantityPriceList": [],
"unitName": ""
}
],
"pricingModel": "fixed",
"pricingServiceId": 54539,
"serviceName": "Hotel"
}
]
},
"status": 200
}