Appearance
编辑直播任务
| 拥有此API的权限集 |
|---|
| 直播管理-增删改 |
请求方式及url
- 请求方式:
POST - 请求头:
Content-Type:application/json - 接口地址:
https://api.xiaoe-tech.com/xe.alive.marketing.task.update/1.0.0 - 频率限制:
10秒3000次
接口调试
请求参数
响应结果
暂无响应数据
请求参数
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| access_token | 是 | string | 专属token |
| alive_id | 是 | string | 直播ID |
| live_task_id | 是 | int | 任务ID |
| start_at | 是 | string | 开始时间 |
| end_at | 是 | string | 结束时间 |
| task_module | 是 | int | 任务模块:0-单项任务,1-组合任务 |
| task_is_major | 是 | int | 是否主任务:0-是,1-否 |
| level_member_rank | 否 | array | 等级会员条件 |
| reward_type | 是 | int | 奖励类型:1=积分,2=优惠券,3=红包,4=课程/商品,5=自定义奖品 |
| reward_value | 是 | string | 奖励值:积分数值、优惠券码、红包、自定义奖品(JSON字符串) |
| reward_frequency | 否 | string | 奖励发放频率 |
| rule_type | 否 | int | 规则类型 |
| rule_config | 否 | array | 规则配置 |
| is_order | 否 | int | 是否按顺序完成:0-否,1-是 |
| task_title | 否 | string | 任务标题,组合任务(task_module=1)需传 |
| child_tasks | 否 | string | 子任务,组合任务(task_module=1)需传(JSON字符串) |
单项任务/子任务参数说明:
task_type- 任务类型:1=观看任务,2=互动任务,3=消费任务,4=活跃任务,仅单项任务或子任务需传task_condition- 任务条件,仅单项任务或子任务需传:
- 观看任务:填写具体分钟值(如 "3" 表示观看3分钟)
- 互动任务:1-评论,2-分享(21分享拉人,22分享拉新),3-点赞
- 消费任务:4-下单笔数,5-消费金额
- 活跃任务:6-打赏,7-投票,8-问卷,9-签到,10-答题
组合任务主任务说明:
- 组合任务的主任务(task_is_major=0)无需传 task_type、task_condition
- 无序组合(is_order=0):主任务设置统一奖励(reward_type、reward_value),子任务无奖励
- 有序组合(is_order=1):主任务可设置奖励(reward_type、reward_value),每个子任务也可单独设置奖励
请求示例
单项任务示例
json
{
"access_token": "xe_xxxxx",
"alive_id": "l_xxxxx",
"start_at": "2026-03-01 00:00:00",
"end_at": "2026-03-03 00:00:00",
"task_module": 0,
"task_is_major": 0,
"live_task_id": 1384403,
"task_type": 1,
"task_condition": "3",
"reward_type": 5,
"reward_value": "{\"defaultImg\":1,\"prizeCusTomTitle\":\"\",\"prizeHint\":\"恭喜您,获得奖品\",\"prizeImg\":\"https://example.com/image/prize.png\",\"prizeName\":\"自定义奖品名称\",\"prizeNum\":1,\"qrcode\":\"1\",\"qrcodeImg\":\"https://example.com/image/qrcode.png\",\"wechat\":\"0\",\"wechatNum\":\"\"}",
"rule_type": 0,
"rule_config": []
}组合任务示例
json
{
"access_token": "xe_xxxxx",
"alive_id": "l_xxxxx",
"start_at": "2026-03-01 00:00:00",
"end_at": "2026-03-07 00:00:00",
"task_module": 1,
"task_is_major": 0,
"live_task_id": 1384410,
"reward_type": 1,
"reward_value": "1",
"is_order": 0,
"task_title": "任务包",
"child_tasks": "[{\"alive_id\":\"l_xxxxx\",\"start_at\":\"2026-03-01 00:00:00\",\"end_at\":\"2026-03-07 00:00:00\",\"task_module\":1,\"task_is_major\":1,\"live_task_id\":1384411,\"is_order\":0,\"task_type\":1,\"task_condition\":\"10\",\"rule_type\":0,\"rule_config\":[]},{\"alive_id\":\"l_xxxxx\",\"start_at\":\"2026-03-01 00:00:00\",\"end_at\":\"2026-03-07 00:00:00\",\"task_module\":1,\"task_is_major\":1,\"live_task_id\":1384412,\"is_order\":0,\"reward_frequency\":\"1\",\"task_type\":4,\"task_condition\":\"9\",\"rule_type\":0,\"rule_config\":[]}]",
"rule_type": 0,
"rule_config": []
}
### 返回参数
|参数名|必选|类型|说明|备注
|:----|:----|:-----|:-----|---- |
|code |是|int |返回码 |0-成功,其他失败|
|msg |是 |string | 返回信息 |`...`|
|data |是 |json对象 | 返回值 |`...`|
#### data 对象
|参数名|类型|说明|
|:----|:-----|----- |
|task_id |int |主任务ID|
|alive_id |string |直播ID|
##### 备注
- `code=0`时,`msg`: 操作成功
- `code!=0`时,`msg`: 编辑直播任务失败
### 返回示例
```json
{
"code": 0,
"msg": "操作成功",
"data": {
"task_id": 1384403,
"alive_id": "l_xxxxx"
}
}