Enable Auto-renewal

Enable auto-renewal for a specific product.

Request URL

POST {base_url}/product/openapi/instance_subscription/v1/active

Request parameters

Headers
Parameter Required Description
Content-Type Yes Specify the type of data that is sent in the body of the POST request.

Valid value: application/json.

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

Body parameters
Parameter Required Type Description
productNo Yes String The unique product identifier.

Valid value: The Serial Number (SN) of the PBX.

Note: You can query this information using the Query Product List interface.
productId Yes String The unique ID of the product.
Note: You can query product ID using the Query Available Subscription Products interface.
planOrServiceId Yes Long The unique ID of the plan that you want to renew.
Note: You can query the plan 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 Boolean Whether the operation is successful.
  • true: Success. The auto renewal is enabled.
status Integer The HTTP status code of the API request.

Example

Request example

Activate the auto-renewal of a P-Series Software Edition.

POST /product/openapi/instance_subscription/v1/active HTTP/1.1
Host: openapi.partner.yeastar.com
User-Agent: OpenAPI
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTE1NDU0NDY4NzY3NzQ0XCIsXCJ1c2VyQ29kZVwiOlwiUGFydG5lclwiLFwidXNlcklkXCI6XCIzMDc2OTE1NDU0NDg5NzM5MjY0XCIsXCJ1c2VybmFtZVwiOlwicGFydG5lcmV4YW1wbGVAb3V0bG9vay5jb21cIn0iLCJ1c2VyX25hbWUiOiJwYXJ0bmVyZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3Mzk2MjYxOTMsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwianRpIjoiTWw5K2ZkMWwvZVFnQUk4OXFIdXc5OXdidE9JPSIsImF1dGhvcml0aWVzIjpbIjc5Il0sImNsaWVudF9pZCI6IjE0NDI5NjM2ODBiMjM0YjA0YmRjZDVjMTZmODcyOWQ2In0.WRWzH-BktI4XRt5Msq8Q0LQm1Pv8rtWNHHHmxDYOLQQ
{
    "productNo":"3651E0529415",
    "productId":"12",
    "planOrServiceId":3049040650094403584
} 

Response example

{
    "code": "success",
    "detailMessage": "",
    "requestId": "657c31f7793a861d4ae9b5441c05643e",
    "result": true,
    "status": 200
}