Query Product List
Query the list of purchased products as well as the product information.
Request URL
GET {base_url}/product/openapi/instance_product/v1/client/instance_product_list?{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 pageSize No Integer Define how many records per page. Default value: 25
pageNo No Integer Define which page is displayed. Default value: 1
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> | The detailed information of the queried products. |
| status | Integer | The HTTP status code of the API request. |
Details
| Parameter | Type | Description |
|---|---|---|
| count | Integer | The total number of the products. |
| pageNo | Integer | Which page is displayed. |
| pageSize | Integer | How many records are displayed per page. |
| results | Array<Product_Info> | The information list of the products. |
| total | Integer | The total number of products. |
| totalPage | Integer | The total number of pages. |
- Product_Info
-
Parameter Type Description activationCode String Activation code of the product. activationStatus String Activation status of the product. unknownunactivatedactivated
comment String Comments. createTime Long The order creation time of the product. currentPlan String Current subscription plan. Note: This parameter returns information only when the current subscription plan of the product is switching to another one.currentPlanExpireDate String Expiration date of the current subscription plan. Note: This parameter returns information only when the current subscription plan of the product is switching to another one.customerEmail String Email address of the customer associated with the product. endUserInfo Object<Enduser_Info> End user information. model String Product model. Note: This parameter returns the product model of the PBX that has been subscribed to the P-Series Plan for Appliance Edition or Linkus Cloud Service.nextPlan String The next subscription plan to which the product will be switched. Note: This parameter returns information only when the current subscription plan of the product is switching to another one.nextPlanExpireDate String Expiration date of the next subscription plan. Note: This parameter returns information only when the current subscription plan of the product is switching to another one.nextPlanStartDate String Start date of the next subscription plan. Note: This parameter returns information only when the current subscription plan of the product is switching to another one.partnerEmail String Your email address. planAutoRenewal Integer Auto renewal status of the subscription plan. 0: Disabled.1: Enabled.
planExpireDate Long Expiration date of the subscription plan. planId String The unique ID of the subscription plan. planName String Name of the subscription plan. planServicePeriod Integer Validity period of the subscription plan. Note: This parameter is returned only for P-Series Software Edition.planStatus String Status of the subscription plan. trialingsubscribingpurchasedexpiringexpiredswitching
productAdminEmail String Email address of the PBX super administrator. productNo String The unique product identifier. This parameter returns the SN of the PBX that has been subscribed to the product.
quantity String The quantity of the purchased item in the plan. referrer String Email address of the referrer. serviceList Array<Service_Info> The detailed information of the service(s) associated with the product. url String FQDN for P-Series Software Edition or PBX URL for P-Series Cloud Edition. yeastarId String The unique ID of the user who owns the product.
Example
Request example
Query the product list of P-Series Cloud Edition.
GET /product/openapi/instance_product/v1/client/instance_product_list?productId=13 HTTP/1.1
Host: openapi.partner.yeastar.com
User-Agent: OpenAPI
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTE1NDU0NDY4NzY3NzQ0XCIsXCJ1c2VyQ29kZVwiOlwiUGFydG5lclwiLFwidXNlcklkXCI6XCIzMDc2OTE1NDU0NDg5NzM5MjY0XCIsXCJ1c2VybmFtZVwiOlwicGFydG5lcmV4YW1wbGVAb3V0bG9vay5jb21cIn0iLCJ1c2VyX25hbWUiOiJwYXJ0bmVyZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3Mzk2MTk4MjEsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwiYXV0aG9yaXRpZXMiOlsiNzkiXSwianRpIjoiZldUR0lTU3g1VzRobi8vZSthM3IvRC9tL05BPSIsImNsaWVudF9pZCI6IjE0NDI5NjM2ODBiMjM0YjA0YmRjZDVjMTZmODcyOWQ2In0.Ve8eXqvNj5QoZkinLQMy5I26X4dYqil1lpCZURJ17yA
Response example
{
"code": "success",
"detailMessage": "",
"requestId": "7cced72314a6172c8810cffbea3a2335",
"result": {
"count": 2,
"pageNo": 1,
"pageSize": 25,
"results": [
{
"activationCode": "EQQI-CFKS-KSKW-EFFP-KQE6",
"activationStatus": "activated",
"comment": "",
"createTime": null,
"currentPlan": "",
"currentPlanExpireDate": null,
"customerEmail": "",
"endUserInfo": null,
"model": "",
"nextPlan": "",
"nextPlanExpireDate": null,
"nextPlanStartDate": null,
"partnerEmail": "example@outlook.com",
"planAutoRenewal": 0,
"planExpireDate": 1730345636000,
"planId": "3048572026291630080",
"planName": "Ultimate Plan",
"planStatus": "trialing",
"productAdminEmail": "admin@testmail.com",
"productNo": "3658B4311196UZ4A",
"quantity": "5",
"referrer": "",
"serviceList": [],
"url": "docs.test.yeastarcloud.com",
"yeastarId": "test@mailtest.com"
},
{
"activationStatus": "activated",
"comment": "",
"createTime": 1704854634000,
"currentPlan": "Ultimate Plan",
"currentPlanExpireDate": 1736390176000,
"customerEmail": "",
"endUserInfo": {
"address": "Customer Address.",
"companyName": "PCE Customer Test Company",
"contactName": "PCE Customer Test",
"email": "customer@test.com"
},
"model": "",
"nextPlan": "Enterprise Plan",
"nextPlanExpireDate": 1767926176000,
"nextPlanStartDate": 1736390177000,
"partnerEmail": "example@outlook.com",
"planAutoRenewal": 0,
"planExpireDate": 1736390176000,
"planId": "3048572026291630080",
"planName": "Ultimate Plan",
"planStatus": "switching",
"productAdminEmail": "docs@yeastar.com",
"productNo": "3658B4311196WEFY",
"quantity": "20",
"referrer": "",
"serviceList": [
{
"quantity": "100",
"serviceAutoRenewal": 0,
"serviceExpireDate": 1713421999000,
"serviceId": "3048573759449317376",
"serviceName": "Recording Minutes",
"serviceStatus": "switching"
}
],
"url": "docstest.test3.yeastarcloud.com",
"yeastarId": "example@outlook.com"
}
],
"total": 2,
"totalPage": 1
},
"status": 200
}