Query Available Subscription Products
Query the products to which you are authorized to subscribe.
Request URL
GET {base_url}/pricing/openapi/purchase/v1/product_list
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
- None.
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 | Array<Product_Info> | The detailed information about the products to which you are authorized to subscribe. |
status | Integer | The HTTP status code of the API request. |
- Product_Info
-
Parameter Type Description name String Product name. productId Integer The unique ID of the product.
Example
Request example
GET /pricing/openapi/purchase/v1/product_list HTTP/1.1
Host: openapi.partner.yeastar.com
User-Agent: OpenAPI
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTEzNjQ0ODkwODMyODk2XCIsXCJ1c2VyQ29kZVwiOlwiRGlzdHJpYnV0b3JcIixcInVzZXJJZFwiOlwiMzA3NjkxMzY0NDkxNTk5ODcyMFwiLFwidXNlcm5hbWVcIjpcImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbVwifSIsInVzZXJfbmFtZSI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3MzkyNTgwMTUsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwiYXV0aG9yaXRpZXMiOlsiNzciXSwianRpIjoibDkzTXhVMWlWYm1MeEhuOWkrdzRVaitqZ0JZPSIsImNsaWVudF9pZCI6ImFjMGYyZTViZWU3NmI2ZDdmNDU0NTY5NmMyNGZjMWYzIn0.4jMWQBsRMZp2Q0Lxo_NTOsM2V89r4FphvKlDe667oCA
Response example
{
"code": "success",
"detailMessage": "",
"requestId": "706be51dd6dfaa311ea2931c47081763",
"result": [
{
"name": "P-Series Cloud Edition",
"productId": 13
},
{
"name": "P-Series Plan for Appliance Edition",
"productId": 11
},
{
"name": "P-Series Software Edition",
"productId": 12
},
{
"name": "Linkus Cloud Service",
"productId": 9
}
],
"status": 200
}