Polyv Help Center

Help Center

Query Lottery Activity List

Updated: 2025-05-07 09:00:51

API Description

1、查询抽奖活动列表
2、接口支持https协议

API URL

http://api.polyv.net/live/v4/channel/lottery-activity/list

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. Incorrect parameters will result in a 400 error response.

Request Parameters Description

Parameter Required Type Description
appId true String Account appId See Get Secret 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 never be saved or used directly on the client side. All APIs must be called through the customer's own server to relay requests to the POLYV server and obtain response data. See Signature Generation Rules
channelId true Integer Channel ID
pageNumber false Integer Page number for pagination
pageSize false Integer Page size for pagination

Example

http://api.polyv.net/live//v4/channel/lottery-activity/list?appId=frlr1zazn3&timestamp=1665629374000&sign=6CFA3141718E1AF0155889EEA2988206&channelId=2974342&pageNumber=1

Response Description

Parameter Type Description
code Integer Status code, same as HTTP status code, used to determine the 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. For debugging and troubleshooting only, should not be used for business logic
error Object Error information when status code is not 200 See Error Field Description
data Object Detailed response information See data Field Description

Error Response Description

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

data Response Description

Parameter Type Description
pageNumber String Page number
pageSize Integer Page size
totalPages String Total number of pages
totalItems String Total number of records
contents Array List of lottery activities See LotteryActivity Field Description

LotteryActivity Response Description

Parameter Type Description
id Long Lottery activity ID
activityName String Lottery activity name
lotteryCondition String Lottery type
status String Lottery activity status
amount Integer Number of winners
hiddenWinnerAmount String Whether to hide the number of winners
lotteryRange String User type for lottery participation: all: all users, customGroup: custom group
customGroup Array Custom group information See CustomGroup
customGroupLotteryType String Group drawing method, average: equal drawing, random: random drawing
customGroupLotteryAmount Integer Number of draws per group
hiddenAttendeeNumber String Whether to hide the number of participants
repeatWinEnabled String Allow repeated winning
receiveEnabled String Whether to fill in shipping information
receiveInfo Array List of shipping field information, filled in for unconditional draws See ReceiveInfo
prizeName String Prize name
thumbnail String Prize image
activityDuration String Activity duration (minutes)
activityDurationType String Activity duration unit (second, minute, hour), default is minute
inviteType String Invitation method
externalListLink String External list link
externalInviteNumLink String Link to get invitation count
inviteNum Integer Number of invitations
duration Integer Viewing duration
comment String Comment content
acceptType String Prize claim method, form: form, link: external link, qrCode: QR code
formInfo Array Form field information for prize claim method See ReceiveInfo
prizeUrl String Prize link for prize claim method
qrCode String QR code link for prize claim method
qrCodeTips String QR code prompt text for prize claim method
realPrice BigDecimal Discounted price
price BigDecimal Original prize price
prizeInfo Array Prize information See PrizeInfo
questionGroupId Long Quiz group template ID
perAnswerDuration Integer Duration per question for answering
lotteryOnlineEnabled String Whether viewers must be online during the draw, values: Y/N, default Y (effective for unconditional group draws)
answerType String Quiz draw method, pushQuestion: push and answer, autonomyAnswer: self-paced answering, default: pushQuestion

CustomGroup Response Description

Parameter Type Description
id Long Group ID
title String Group title
type String Group type
count String Number of people in the group

ReceiveInfo Response Description

Parameter Type Description
type String Type, userName: name, userPhone: phone number, custom: custom
field String Field name
tips String Prompt text
required Boolean Whether required, true/false

PrizeInfo Response Description

Parameter Type Description
prizeItem String Prize item name
correctAnswerCount Integer Number of correct answers
prizeName String Prize name
thumbnail String Prize image
realPrice BigDecimal Discounted price
price BigDecimal Original prize price
acceptType String Prize claim method, form: form, link: external link, qrCode: QR code
formInfo Array Form field information for prize claim method See ReceiveInfo
prizeUrl String Prize link for prize claim method
qrCode String QR code link for prize claim method
qrCodeTips String QR code prompt text for prize claim method
amount Integer Number of winners
hiddenWinnerAmount String Whether to hide the number of winners

Java Request Example

For quick integration of basic code, please download the relevant dependency source code. Click here to download the source code. After downloading, add it to your own source code 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 packaging and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.


Response Example

For global system error descriptions, see Global Error Description

Success Example

{
    "code": 200,
    "status": "success",
    "requestId": "723ed01861804e9aa3dc1cf1aced83d5.72.17097790901718347",
    "data": {
        "id": 20521,
        "activityName": "无条件抽奖",
        "lotteryCondition": "none",
        "amount": 1,
        "receiveEnabled": "Y",
        "receiveInfo": [
            {
                "type": "userName",
                "field": "姓名",
                "tips": "请输入您的名称",
                "required": true
            },
            {
                "type": "userPhone",
                "field": "手机",
                "tips": "请输入您的手机号码",
                "required": true
            }
        ],
        "prizeName": "键盘",
        "activityDuration": null,
        "inviteType": "poster",
        "inviteNum": null,
        "duration": null,
        "comment": null,
        "externalListLink": null,
        "externalInviteNumLink": null,
        "acceptType": null,
        "formInfo": null,
        "prizeUrl": null,
        "qrCode": null,
        "qrCodeTips": null,
        "thumbnail": null,
        "realPrice": null,
        "price": null,
        "status": null,
        "prizeInfo": null,
        "questionGroupId": null,
        "perAnswerDuration": null,
        "lotteryRange": "all",
        "repeatWinEnabled": "N",
        "customGroup": [],
        "hiddenWinnerAmount": "N",
        "hiddenAttendeeNumber": "N",
        "customGroupLotteryType": "random",
        "customGroupLotteryAmount": null
    },
    "success": true
}

Error Example

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