Query Activation Code for P-Series Software Edition

Query the activation code of a P-Series Software Edition.

Note: The activation code for P-Series Software Edition obtained using API is for Online Activation only, which means that the PBX MUST have access to the Internet.

Request URL

GET {base_url}/product/openapi/instance_product/v1/activation_code?{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
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 Integer The unique ID of P-Series Software Edition.

Valid value: 12

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<Code_Info> The detailed information of the activation code.
status Integer The HTTP status code of the API request.
Code_Info
Parameter Type Description
code String Activation code.
generateTime Long Activation code generation time.

Example

Request example

Query the activation code of a P-Series Software Edition (SN: 3651Exxxx415).

GET /product/openapi/instance_product/v1/activation_code?productNo=3651Exxxx415&productId=12 HTTP/1.1
Host: openapi.partner.yeastar.com
User-Agent: OpenAPI
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTEzNjQ0ODkwODMyODk2XCIsXCJ1c2VyQ29kZVwiOlwiRGlzdHJpYnV0b3JcIixcInVzZXJJZFwiOlwiMzA3NjkxMzY0NDkxNTk5ODcyMFwiLFwidXNlcm5hbWVcIjpcImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbVwifSIsInVzZXJfbmFtZSI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3MzkyODEzMTYsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwianRpIjoiZ29FQ3BpSkMzMXlOQ2tkcktQSWVvaFE1dEtZPSIsImF1dGhvcml0aWVzIjpbIjc3Il0sImNsaWVudF9pZCI6ImFjMGYyZTViZWU3NmI2ZDdmNDU0NTY5NmMyNGZjMWYzIn0.O2ubDUQIqZsMguPt9adKWD-pwCvS_2e5VMMTWIQCO4c

Response example

{
    "code": "success",
    "detailMessage": "",
    "requestId": "3390ad5230998289d07660b4745b9a89",
    "result": {
        "code": "su71kZxxxxxxx0dbctakLMtNcNjIsSBbb6V1EqpuYyVvBuL0hlaUcJ0wTmZU2EczUpcYA/XlGJOSN0d6bOZrU+AUlCYUsTkgfjEd=",
        "generateTime": 1701927971000
    },
    "status": 200
}