Polyv Help Center

Help Center

Query Lucky Bag Winner Paginated List

Updated: 2026-06-05 11:45:14

API Description

1、查询指定福袋活动的中奖者分页列表
2、接口支持https协议

API URL

http://api.polyv.net/live/v4/channel/lucky-bag/winner-page

Online API Call

Request Method

GET

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls have frequency limits. See details

  2. If the activity ID does not exist or has not been initiated, a 400 error will be returned.

Request Parameters

Parameter Required Type Description
appId true String Account appId See details for obtaining key
timestamp true Long Current 13-digit millisecond timestamp, valid for 3 minutes
sign true String Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must not be stored directly on the client. All APIs must be called through your own server to relay requests to the POLYV server for response data. See signature generation rules
activityId true Long Lucky bag activity ID
sessionId false String Session ID. If not provided, all sessions are queried.
currentPage false Integer Page number, default is 1
pageSize false Integer Number of items per page, default is 10

Example

http://api.polyv.net/live/v4/channel/lucky-bag/winner-page?appId=frlr1zazn3&timestamp=1665629374000&sign=6CFA3141718E1AF0155889EEA2988206&activityId=100001&sessionId=abc123&currentPage=1&pageSize=10

Response Parameters

Parameter Type Description
code Integer Status code, same as HTTP status code, used to determine basic response status
status String Response result, determined by business logic. Returns "success" on success, "error" on failure.
success Boolean Whether the response was successful
requestId String Request ID, a unique UUID generated for each request. Only for troubleshooting and debugging, should not be tied to business logic.
error Object Error information when status code is not 200 See Error field description
data Object Paginated winner data See data field description

Error Parameters

Parameter Type Description
code Integer Error code, used to determine the specific error reason
desc String Error description, corresponding to error.code

data Parameters

Parameter Type Description
contents Array List of winner records See contents field description
totalItems Long Total number of records
totalPages Integer Total number of pages
pageNumber Integer Current page number
pageSize Integer Number of items per page

contents Parameters

Parameter Type Description
id Long Record ID
viewerId String Viewer ID
viewerNickName String Viewer nickname
prizeType String Prize type: cash - cash red envelope
custom - custom prize
prizeInfo String Prize information, JSON string. Structure described in prizeInfo field description
issueStatus Integer Issuance status: 0 - pending issuance
outTradeErrCode String Issuance error code
outTradeErrDesc String Issuance error description
createTime String Creation time

prizeInfo Parameters

prizeInfo is a JSON string. Depending on the prize type (prizeType), it contains the following fields:

Parameter Type Description
type String Prize type: cash - cash red envelope
custom - custom prize
amount BigDecimal Cash amount, unit: yuan (returned when type=cash)
name String Custom prize name (returned when type=custom)
image String Custom prize image URL (returned when type=custom)

Java Request Example

For quick integration of basic code, please download the relevant dependency source code. Click here to download source code. After downloading, add it to your own source project. The test cases include HttpUtil.java and LiveSignUtil.java in the downloaded file.

It is strongly recommended to use the Live Java SDK for API integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.

private static final Logger log = LoggerFactory.getLogger(ChannelLuckyBagTest.class);
/**
 * 查询福袋中奖者分页列表
 * @throws IOException
 * @throws NoSuchAlgorithmException
 */
@Test
public void testGetWinnerPage() throws IOException, NoSuchAlgorithmException {
    // 公共参数,填写自己的实际参数
    String appId = super.appId;
    String appSecret = super.appSecret;
    String timestamp = String.valueOf(System.currentTimeMillis());

    // 业务参数
    String url = "http://api.polyv.net/live/v4/channel/lucky-bag/winner-page";
    String activityId = "100001";
    String sessionId = "abc123";
    String currentPage = "1";
    String pageSize = "10";

    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("appId", appId);
    requestMap.put("timestamp", timestamp);
    requestMap.put("activityId", activityId);
    requestMap.put("sessionId", sessionId);
    requestMap.put("currentPage", currentPage);
    requestMap.put("pageSize", pageSize);
    requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));

    String response = HttpUtil.get(url, requestMap);

    log.info("测试查询福袋中奖者分页列表,返回值:{}", response);
    // do somethings
}

Response Example

For global error descriptions, see Global Error Description

Success Example

{
    "code": 200,
    "status": "success",
    "requestId": "fc0894ce-08df-4376-92e2-fd0531cbe8ba",
    "data": {
        "contents": [
            {
                "id": 1001,
                "viewerId": "viewer001",
                "viewerNickName": "张三",
                "prizeType": "cash",
                "prizeInfo": "{\"type\":\"cash\",\"amount\":1.00}",
                "issueStatus": 0,
                "outTradeErrCode": null,
                "outTradeErrDesc": null,
                "createTime": "2026-06-01T10:30:00"
            },
            {
                "id": 1002,
                "viewerId": "viewer002",
                "viewerNickName": "李四",
                "prizeType": "custom",
                "prizeInfo": "{\"type\":\"custom\",\"name\":\"精美礼品\",\"image\":\"https://example.com/gift.png\"}",
                "issueStatus": 0,
                "outTradeErrCode": null,
                "outTradeErrDesc": null,
                "createTime": "2026-06-01T10:30:00"
            }
        ],
        "totalItems": 2,
        "totalPages": 1,
        "pageNumber": 1,
        "pageSize": 10
    },
    "success": true
}

Error Example

{
    "code": 400,
    "status": "error",
    "requestId": "d310b70bc329403f87f77f9203d50f89.128.16360831552223589",
    "error": {
        "code": 20001,
        "desc": "application not found."
    },
    "success": false
}
联系客服,在线咨询