# 机构更新或删除已添加的推广计划
接口应在服务器端调用,不可在前端(小程序、网页、APP等)直接调用,具体可参考接口调用指南
接口英文名:update_secondheadsupplier_item
机构更新或删除已添加的推广计划,对应机构管理后台页面的“机构推广-普通计划/定向计划”里面的修改佣金率,或者结束推广
# 1. 调用方式
# HTTPS 调用
POST https://api.weixin.qq.com/channels/ec/league/headsupplier/secondheadsupplieritem/update?access_token=ACCESS_TOKEN
# 云调用
- 本接口不支持云调用
# 第三方调用
- 本接口不支持第三方平台调用。
# 2. 请求参数
# 查询参数 Query String parameters
| 参数名 | 类型 | 必填 | 示例 | 说明 |
|---|---|---|---|---|
| access_token | string | 是 | ACCESS_TOKEN | 接口调用凭证,可使用 access_token |
# 请求体 Request Payload
| 参数名 | 类型 | 必填 | 示例 | 说明 |
|---|---|---|---|---|
| plan_type | number | 是 | 1 | 要拉取的计划类型。1:定向计划 2:公开计划 |
| update_type | number | 是 | 1 | 1:更新佣金率 2:结束推广 |
| cooperative_item_id | number | 是 | 121323 | cooperative_item_id和head_supplier_item_link必填其一,cooperative_item_id填的情况下就忽略head_supplier_item_link 获取方式:机构获取已添加的推广计划 |
| head_supplier_item_link | string | 是 | wxstore/xxxxx | cooperative_item_id和head_supplier_item_link必填其一,cooperative_item_id填的情况下就忽略head_supplier_item_link 获取方式:机构获取已添加的推广计划 |
| service_ratio | number | 否 | - | 更新的情况必填,单位是百万分之N,如10000是1% |
| to_head_supplier_appid | string | 否 | wxadddfff | 定向计划的情况必填,定向到的机构appid |
# 3. 返回参数
# 返回体 Response Payload
| 参数名 | 类型 | 示例 | 说明 |
|---|---|---|---|
| errcode | number | 0 | 错误码 |
| errmsg | string | success | 错误信息 |
# 4. 注意事项
本接口无特殊注意事项
# 5. 代码示例
请求示例
{
"plan_type": 1,
"update_type": 1,
"cooperative_item_id": 121323,
"head_supplier_item_link": "wxstore/xxxxx",
"service_ratio": 0,
"to_head_supplier_appid": "wxadddfff"
}
返回示例
{
"errcode": 0,
"errmsg": "success"
}
# 6. 错误码
以下是本接口的错误码列表,其他错误码可参考 通用错误码;调用接口遇到报错,可使用官方提供的 API 诊断工具 辅助定位和分析问题。
| 错误码 | 错误描述 | 解决方案 |
|---|---|---|
| 10024000 | 参数错误 | 检查参数 |
# 7. 适用范围
本接口支持「联盟带货机构」账号类型调用。其他账号类型如无特殊说明,均不可调用。
2025 年 11 月 28 日
新增api 机构更新或删除已添加的推广计划