创建抽奖活动
接口描述
接口URL
请求方式
接口约束
1、接口同时支持HTTP 、HTTPS ,建议使用HTTPS 确保接口安全,接口调用有频率限制,详细请查看 2、若参数不正确则会响应400异常
请求参数描述
请求体参数描述
activityName
true
String
抽奖活动名称
lotteryCondition
true
String
抽奖活动类型, none:无条件, invite:邀请好友, duration:观看时长, comment:评论抽奖, question:答题抽奖
amount
true
Integer
中奖人数
hiddenWinnerAmount
false
String
是否隐藏中奖人数, 值:Y/N, 默认N
lotteryRange
false
String
参与抽奖用户类型: all:全部,customGroup:自定义分组
customGroupIds
false
Array
自定义分组ID, 抽奖用户类型为自定义时有效
customGroupLotteryType
false
String
分组抽取方式, average:等额抽奖, random:随机抽奖
customGroupLotteryAmount
false
Integer
每组抽取数量
hiddenAttendeeNumber
false
String
是否隐藏参与人数, 值:Y/N, 默认N
repeatWinEnabled
false
String
允许重复中奖, 值:Y/N, 默认N
receiveEnabled
false
String
是否填写收货信息, 值:Y/N, 默认N
prizeName
true
String
奖品名称
thumbnail
false
String
奖品图片
activityDuration
false
String
活动时长(分钟),非无条件抽奖时必填
inviteType
false
String
邀请方式,poster:邀请海报,external:外部邀请,邀请抽奖时必填
externalListLink
false
String
外部名单链接,邀请抽奖且邀请方式为外部邀请时必填
externalInviteNumLink
false
String
获取邀请人数链接,邀请抽奖且邀请方式为外部邀请时必填
inviteNum
false
Integer
邀请人数,邀请抽奖时必填
duration
false
Integer
观看时长,观看时长抽奖时必填
comment
false
String
评论内容,评论抽奖时必填
acceptType
false
String
领奖方式,form:表单,link:外链,qrCode:识别二维码, 非无条件和答题抽奖必填
prizeUrl
false
String
领奖方式奖品链接, 领奖方式为外链必填
qrCode
false
String
领奖方式二维码链接, 领奖方式为二维码必填
qrCodeTips
false
String
领奖方式二维码提示语, 领奖方式为二维码填写
realPrice
false
BigDecimal
优惠价格
price
false
BigDecimal
奖品原价
questionGroupId
false
Long
问答组模板ID, 答题抽奖必填
perAnswerDuration
false
Integer
每道题的答题时长, 答题抽奖必填
ReceiveInfo参数描述
type
false
String
类型, userName:姓名、userPhone:手机号、custom:自定义
field
true
String
字段名
tips
true
String
提示语
required
false
Boolean
是否必填,true/false
PrizeInfo参数描述
prizeItem
true
String
奖项名称
correctAnswerCount
true
Integer
答对题目数
prizeName
true
String
奖品名称
thumbnail
false
String
奖品图片
realPrice
false
BigDecimal
优惠价格
price
false
BigDecimal
奖品原价
acceptType
true
String
领奖方式,form:表单,link:外链,qrCode:识别二维码
prizeUrl
false
String
领奖方式奖品链接, 领奖方式为外链必填
qrCode
false
String
领奖方式二维码链接, 领奖方式为二维码必填
qrCodeTips
false
String
领奖方式二维码提示语, 领奖方式为二维码填写
amount
true
Integer
中奖人数
hiddenWinnerAmount
false
String
是否隐藏中奖人数, 值:Y/N, 默认N
示例
请求体json参数:
响应描述
Error响应描述
code
Integer
错误代码,用于确定具体的错误原因
desc
String
错误描述,与 error.code 对应
data响应描述
id
Long
抽奖活动ID
activityName
String
抽奖活动名称
lotteryCondition
String
抽奖类型
status
String
抽奖活动状态
amount
Integer
中奖人数
hiddenWinnerAmount
String
是否隐藏中奖人数
lotteryRange
String
参与抽奖用户类型: all:全部,customGroup:自定义分组
customGroupLotteryType
String
分组抽取方式, average:等额抽奖, random:随机抽奖
customGroupLotteryAmount
Integer
每组抽取数量
hiddenAttendeeNumber
String
是否隐藏参与人数
repeatWinEnabled
String
允许重复中奖
receiveEnabled
String
是否填写收货信息
prizeName
String
奖品名称
thumbnail
String
奖品图片
activityDuration
String
活动时长(分钟)
inviteType
String
邀请方式
externalListLink
String
外部名单链接
externalInviteNumLink
String
获取邀请人数链接
inviteNum
Integer
邀请人数
duration
Integer
观看时长
comment
String
评论内容
acceptType
String
领奖方式,form:表单,link:外链,qrCode:识别二维码,
prizeUrl
String
领奖方式奖品链接
qrCode
String
领奖方式二维码链接
qrCodeTips
String
领奖方式二维码提示语
realPrice
BigDecimal
优惠价格
price
BigDecimal
奖品原价
questionGroupId
Long
问答组模板ID
perAnswerDuration
Integer
每道题的答题时长
CustomGroup响应描述
id
Long
分组ID
title
String
分组标题
type
String
分组类型
count
String
分组人数
ReceiveInfo响应描述
type
String
类型, userName:姓名、userPhone:手机号、custom:自定义
field
String
字段名
tips
String
提示语
required
Boolean
是否必填,true/false
PrizeInfo响应描述
prizeItem
String
奖项名称
correctAnswerCount
Integer
答对题目数
prizeName
String
奖品名称
thumbnail
String
奖品图片
realPrice
BigDecimal
优惠价格
price
BigDecimal
奖品原价
acceptType
String
领奖方式,form:表单,link:外链,qrCode:识别二维码
prizeUrl
String
领奖方式奖品链接
qrCode
String
领奖方式二维码链接
qrCodeTips
String
领奖方式二维码提示语
amount
Integer
中奖人数
hiddenWinnerAmount
String
是否隐藏中奖人数
Java请求示例
快速接入基础代码请下载相关依赖源码, 点击下载源代码 ,下载后加入到自己的源码工程中即可。测试用例中的HttpUtil.java 和 LiveSignUtil.java 都包含在下载文件中。
强烈建议您使用直播Java SDK完成API的功能对接,直播Java SDK 对API调用逻辑、异常处理、数据签名、HTTP请求线程池进行了统一封装和优化。
响应示例
系统全局错误说明详见全局错误说明
成功示例
异常示例
Last updated
Was this helpful?