Query Information about the Service Available for Renewal

Query detailed information about specific service that you are authorized to renew.

Request URL

GET {base_url} /pricing/openapi/purchase/v1/renew/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
productNo Yes String The Serial Number (SN) of the product for which you want to query information about the service available for renewal.
Note: You can query this information using the Query Product List interface or obtain it from PBX web portal.
productId Yes Integer The unique ID of the product.
Note: You can query product ID using the Query Available Subscription Products 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<Details> Detailed information about the renewal of services.
status Integer The HTTP status code of the API request.

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
connectionServiceList Array<Additional_Service> The list of additional services that can be renewed.
name String Service name.
pricingServiceId Integer The unique pricing ID of the service.
purchaseMultiCycleList Array The billing cycle of the service.
purchaseParameter String The item that is available for renewal.
purchaseParameterId Integer The unique ID of the item that is available for renewal.
serviceId String The unique ID of 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.
  • once
  • recurring
billingCycle String The billing cycle of the service.
  • annually
  • monthly
connectionServiceList Array<Service_Details> Detailed information about the additional services that can be renewed.
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 renewal.
purchaseParameterId Integer The unique ID of the item that is available for renewal.
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

Query information about the renewal of Hotel PMS Integration service on a P-Series Appliance Edition (Product ID: 11 & Pricing Plan ID: 27946 & PBX SN: 3632E0965333).

Request example

GET /pricing/openapi/purchase/v1/renew/add_on_info/27946?productNo=3632E0965333&productId=11 HTTP/1.1
Host: openapi.partner.yeastar.com
User-Agent: OpenAPI
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTEzNjQ0ODkwODMyODk2XCIsXCJ1c2VyQ29kZVwiOlwiRGlzdHJpYnV0b3JcIixcInVzZXJJZFwiOlwiMzA3NjkxMzY0NDkxNTk5ODcyMFwiLFwidXNlcm5hbWVcIjpcImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbVwifSIsInVzZXJfbmFtZSI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3MzkyNTgwMTUsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwiYXV0aG9yaXRpZXMiOlsiNzciXSwianRpIjoibDkzTXhVMWlWYm1MeEhuOWkrdzRVaitqZ0JZPSIsImNsaWVudF9pZCI6ImFjMGYyZTViZWU3NmI2ZDdmNDU0NTY5NmMyNGZjMWYzIn0.4jMWQBsRMZp2Q0Lxo_NTOsM2V89r4FphvKlDe667oCA
Response example
{
    "code": "success",
    "detailMessage": "",
    "requestId": "bcd5d88e5e0fa7b09296df663b9d6db1",
    "result": {
        "billingCycleList": [
            "annually"
        ],
        "billingModelList": [
            "recurring"
        ],
        "connectionServiceList": [],
        "name": "Hotel PMS Integration",
        "pricingServiceId": 27946,
        "purchaseMultiCycleList": [],
        "purchaseParameter": "",
        "purchaseParameterId": null,
        "serviceId": "3116037397465776128",
        "unitName": ""
    },
    "status": 200
}