添加直播抽奖
拥有此API的权限集 |
---|
直播管理-增删改 |
请求方式及url
- 请求方式:
POST
- 请求头:
Content-Type:application/json
- 接口地址:
https://api.xiaoe-tech.com/xe.alive.marketing.prize.create/1.0.0
- 频率限制:
10秒3000次
在线调试工具
请求
响应
请求参数
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
access_token | 是 | string | 专属token |
alive_id | 是 | string | 直播ID |
prize_name | 是 | string | 抽奖名称 |
participant_condition. alive_id | 是 | string | 直播ID |
participant_condition. type | 是 | int | 2-在线,3-任意评论,4-指定评论,5-分享直播间,6-使用积分,7-下单任意金额,8-下单指定商品,9-指定等级会员 |
participant_condition. is_show_participant | 是 | int | 0-不展示参与任务,1-展示 |
participant_condition. ext.content | 否 | string | type对应的补充条件 |
bind_resources. resource_id | 否 | string | 课程/商品: 资源ID |
bind_resources. resource_type | 否 | int | 课程/商品:资源类型 |
bind_resources. prize_custom_title | 否 | string | 课程/商品:奖项名称 |
bind_resources. sort | 否 | int | 课程/商品:序号 |
bind_resources. prize_num | 否 | int | 课程/商品:奖品数量 |
bind_resources. prize_product_id | 否 | string | 课程/商品:产品ID |
bind_resources. sku_id | 否 | string | 课程/商品:SKU |
bind_promo_codes. batch_id | 否 | string | 营销码券:批号ID |
bind_promo_codes. resource_type | 否 | int | 营销码券:资源类型 |
bind_promo_codes. prize_custom_title | 否 | string | 营销码券:奖项名称 |
bind_promo_codes. sort | 否 | int | 营销码券:序号 |
bind_promo_codes. prize_num | 否 | int | 营销码券:奖品数量 |
bind_promo_codes. prize_product_id | 否 | string | 营销码券:产品ID |
bind_points. points | 否 | int | 积分:积分数值 |
bind_points. prize_custom_title | 否 | string | 积分:奖项名称 |
bind_points. sort | 否 | int | 积分:序号 |
bind_points. prize_num | 否 | int | 积分:奖品数量 |
bind_points. prize_product_id | 否 | string | 积分:产品ID |
bind_customs. prize_custom_title | 否 | string | 自定义奖品:奖项名称 |
bind_customs. sort | 否 | int | 自定义奖品:序号 |
bind_customs. prize_num | 否 | int | 自定义奖品:奖品数量 |
bind_customs. prize_product_id | 否 | string | 自定义奖品:产品ID |
请求示例
{
"access_token":"xe_xxxxx",
"alive_id": "l_67da4e45e4b0694ca07ecc49",
"prize_name": "测试抽奖",
"participant_condition": {
"alive_id": "l_67da4e45e4b0694ca07ecc49",
"type": 2,
"is_show_participant": 0,
"ext" : {"content" : ""}
},
"bind_resources" : [
{
"resource_id" : "i_66b0770de4b0d84dbbf518a2",
"resource_type" : 1,
"prize_custom_title" : "三等奖-课程/商品",
"sort" : 3,
"prize_num" : 5,
"prize_product_id" : "",
"sku_id" : "SKU_ITX_7228408451510v6bav38"
}
],
"bind_promo_codes" : [
{
"batch_id" : "pc_mr382401_1b11QETuxUYs0HJSio1oPF",
"resource_type" : 105,
"prize_custom_title" : "二等奖-营销码券",
"sort" : 3,
"prize_num" : 5,
"prize_product_id" : "prize_prd_3L0ZPjide1tD61BLceRX7OIjcB",
}
],
"bind_points": [
{
"points": 2,
"prize_custom_title": "四等奖-积分",
"sort": 4,
"prize_num": 10,
"prize_product_id": ""
}
],
"bind_customs": [
{
"prize_custom_title" : "一等奖-自定义",
"sort": 1,
"prize_num": 1,
"prize_product_id": "prize_prd_UVX4vtqwRCVSRzjDkunjeMBmP9",
"prize_value" : {
"prize_title" : "自定义奖品",
"prize_image" : {
"is_default" : 1,
"image" : "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lr4jie720frq.png"
},
"contact_information" : {
"is_wx_number" : 1,
"wx_number" : "wx_123",
"is_qrcode" : 0,
"qrcode" : ""
}
}
}
],
"exclude_winners": 1
}
返回参数
参数名 | 必选 | 类型 | 说明 | 备注 |
---|---|---|---|---|
code | 是 | int | 返回码 | 0-成功,其他失败 |
msg | 是 | string | 返回信息 | ... |
data | 是 | json对象 | 返回值 | ... |
data.created_at | 是 | string | 创建时间 | 2025-03-21 10:30:29 |
data.id | 是 | int | 抽奖主键id | 123 |
data.prize_count | 是 | int | 奖品数量 | 18 |
data.prize_id | 是 | string | 抽奖id | prize_a51fef195800ed6sjVf8Isx8PV |
data.prize_name | 是 | string | 抽奖名称 | 测试抽奖1 |
data.prize_product_list | 是 | json对象 | 设置的奖品 | ... |
备注
code=0
时,msg
:code!=0
时,msg
:创建直播任务失败
返回示例
{
"code": 0,
"msg": "success",
"data": {
"id": 1975339,
"prize_id": "prize_a51fef195800ed6sjVf8Isx8PV",
"prize_name": "测试抽奖1",
"created_at": "2025-03-21 10:30:29",
"prize_product_list": [
{
"app_id": "applccyjmr38240",
"prize_id": "prize_a51fef195800ed6sjVf8Isx8PV",
"prize_product_id": "prize_prd_3L0ZPjide1tD61BLceRX7OIjcB",
"prize_custom_title": "二等奖-营销码券",
"prize_type": 4,
"resource_id": null,
"resource_type": null,
"prize_num": 3,
"sku_id": null,
"prize_value": "pc_mr382401_1b11QETuxUYs0HJSio1oPF",
"sort": 1
},
{
"app_id": "applccyjmr38240",
"prize_id": "prize_a51fef195800ed6sjVf8Isx8PV",
"prize_product_id": "prize_prd_j7fA124LEBJkB6ATXxDxGXs2Yn",
"prize_custom_title": "三等奖-课程/商品",
"prize_type": 2,
"resource_id": "i_66b0770de4b0d84dbbf518a2",
"resource_type": 1,
"prize_num": 5,
"sku_id": "SKU_ITX_7228408451510v6bav38",
"prize_value": null,
"sort": 2
},
{
"app_id": "applccyjmr38240",
"prize_id": "prize_a51fef195800ed6sjVf8Isx8PV",
"prize_product_id": "prize_prd_c9ubIvEl7DMsO6jOYwSK0VEQqx",
"prize_custom_title": "四等奖-积分",
"prize_type": 5,
"resource_id": null,
"resource_type": null,
"prize_num": 10,
"sku_id": null,
"prize_value": "1",
"sort": 3
}
],
"prize_count": 18
}
}