接口参考 · 修改操作
批量删除绑定人群
taobao.universalbp.new.crowd.batchdelete
核对日期:2026-09-19。字段名称、类型与业务层级按淘宝文档整理;请求地址、鉴权和店铺选择按下方本站说明接入。
文档按上述日期核对;最新变更及详细场景规则请查看淘宝官方说明。
通过奇门云调用
- 签名地址:POST https://api.miandanni.com/api/wanxiang/sign;Content-Type: application/json。
- 客户购买的奇门云密钥用于申请签名;实际调用淘宝开放平台万相台官方 API。方法、字段、类型、层级、金额单位和场景以官方文档为准。奇门云校验客户服务、店铺归属与授权后签名,客户服务器直接请求淘宝并接收业务数据。
- 先下载 https://api.miandanni.com/examples/qimenyun_direct.py 放在业务脚本同目录,使用 Client.call。奇门云密钥不是淘宝 AppSecret;不要求客户自行计算平台签名。
- 签名申请头 Authorization: Bearer 你的奇门云密钥。JSON 为 {shopKey, method, params};shopKey 必须属于当前客户。客户 Bearer 密钥不能转发到淘宝。
- 业务参数放入 params,保留淘宝字段名、类型、层级及枚举。对象直接使用 JSON 对象;下表业务根字段不放在请求最外层。
- app_key、session、sign、timestamp、v、format 等公共字段由服务器生成。签发的本店铺 session 和签名只能用于客户服务器,不进入前端、日志或公共仓库;AppSecret 和 refresh_token 不提供给客户。
- 本站支持店铺直接登录:top_service_context.login_type 为 1,ext 为 {} 或字符串 "{}";不允许 member_id、其他账户身份或代理登录。官方表内此类字段用于说明差异,不能照抄传入。
- 业务根对象未填写的必填子项需按官方文档补全。ID 保持精度,金额单位、日期范围和枚举以具体方法官方说明为准。
- 签发成功为 {ok:true,data:{version:1,ticketId,service,method,issuedAt,request}},不表示业务已执行;客户端按合同执行 data.request。TOP fields 原样作为字符串表单发送,不改值。
- 淘宝业务响应直接返回客户程序,保留 error_response、top_result、逐项错误和 request_id;HTTP 200 仍检查 top_result.info.ok。签名阶段失败读取奇门云 error.code、message 和 details。
- 每次签名校验密钥、服务有效期、店铺归属、淘宝应用订购及授权。业务能力仍取决于淘宝资格与推广场景。签发限流不等于平台实际调用次数。
- 一次签名只生成一份请求,不自动翻页或重试。创建、调价、启停、删除会实际生效;超时或结果未知先查询实际状态。ticketId 不是平台幂等键。
- 签名不是一次性凭据,平台接受的时间窗口内可能重放;解绑、停用或到期阻止新签发,不能即时撤回已签发请求。老客户原程序继续可用。
- 每周一北京时间凌晨2:00检查官方更新,经核对验证后同步,不承诺实时同步。官方方法尚未同步时提供完整方法名和官方链接反馈,不误判为平台权限不足。
{
"shopKey": "填写你授权店铺的 shopKey",
"method": "taobao.universalbp.new.crowd.batchdelete",
"params": {
"top_service_context": {
"biz_code": "universalBP",
"login_type": 1,
"ext": "{}"
},
"crowd_ref_command_list_v_o": {}
}
}这是请求结构模板。空对象和占位内容需按下方字段表填写;修改接口未填入任何真实广告编号或预算。
请求业务参数
以下路径都位于请求体的 params 内。[] 表示数组元素;嵌套字段的必填标记只描述其父对象使用时的要求。
官方 top_service_context.member_id、代理登录和扩展身份不适用于本站。本站固定使用自己的已授权店铺,login_type=1、ext={}。
| 字段路径 | 类型 / 必填 | 字段含义 | 示例值 |
|---|---|---|---|
top_service_context | TopServiceContext必填含下级字段 | 推广业务上下文 | — |
top_service_context.biz_code | String必填 | 推广场景标识 | xxxxx |
top_service_context.login_type | Number可选 | 账户登录方式枚举:1、2=代理直投(叉乘账号) | 1 |
top_service_context.member_id | Number可选 | 广告账户标识代理直投(叉乘)时必填 | 12345 |
top_service_context.ext | String可选 | 扩展参数 | {} |
crowd_ref_command_list_v_o | CrowdRefCommandListVO必填含下级字段 | 人群操作列表对象 | — |
crowd_ref_command_list_v_o.crowd_list | CrowdRefCommandVO []必填含下级字段 | 人群列表 | — |
crowd_ref_command_list_v_o.crowd_list[].campaign_id | Number可选 | 推广计划编号计划已经存在场景必填 | 68799007001 |
crowd_ref_command_list_v_o.crowd_list[].adgroup_id | Number可选 | 推广单元编号单元已经存在场景必填 | 68796878061 |
crowd_ref_command_list_v_o.crowd_list[].crowd_id | Number可选 | 人群标识人群已经存在场景必填 | 5526396502 |
crowd_ref_command_list_v_o.crowd_list[].online_status | Number可选 | 投放上下线状态枚举:0、1=上线 | 1 |
crowd_ref_command_list_v_o.crowd_list[].crowd | CrowdCommandVO可选含下级字段 | 人群 | — |
crowd_ref_command_list_v_o.crowd_list[].crowd.crowd_id | Number可选 | 人群标识人群已经存在场景必填 | 5526396502 |
crowd_ref_command_list_v_o.crowd_list[].crowd.crowd_name | String可选 | 人群名称 | 目标人群扩展 |
crowd_ref_command_list_v_o.crowd_list[].crowd.crowd_value | String可选 | 人群值 | 2191820003 |
crowd_ref_command_list_v_o.crowd_list[].crowd.target_type | Number可选 | 目标类型 | 130 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label | LabelCommandVO可选含下级字段 | 定向标签 | — |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.target_type | Number可选 | 目标类型 | 131 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.label_id | Number可选 | 定向标签标识 | 3000494 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.label_name | String可选 | 定向标签名称 | 关键词 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.label_desc | String可选 | 业务字段 label_desc | 关键词 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.label_value | String可选 | 定向标签值 | 2000112 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.option_list | OptionCommandVO []可选含下级字段 | 列表集合 | — |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.option_list[].option_name | String可选 | 业务字段 option_name | 人群特征继承 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.option_list[].option_value | String可选 | 业务字段 option_value | 2000123 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.option_list[].tag_id | Number可选 | 业务对象标识 | 100000 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.option_list[].properties | String可选 | 扩展属性内容 | — |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.option_list[].label_option_properties | LabelOptionProperties可选含下级字段 | 定向标签对象 | — |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.option_list[].label_option_properties.dmp_option_group_id | String可选 | 业务对象标识 | 1001 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.option_list[].label_option_properties.cate_name | String可选 | 业务字段 cate_name | 714616513841 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.option_list[].label_option_properties.cate_id | String可选 | 业务对象标识 | 714616513841 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.properties | String可选 | 扩展属性内容 | — |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.label_option_properties | LabelOptionProperties可选含下级字段 | 定向标签对象 | — |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.label_option_properties.dmp_option_group_id | String可选 | 业务对象标识 | 1001 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.label_option_properties.cate_name | String可选 | 业务字段 cate_name | 714616513841 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.label_option_properties.cate_id | String可选 | 业务对象标识 | 714616513841 |
crowd_ref_command_list_v_o.crowd_list[].crowd.label.target_value | Number可选 | 目标值 | 11111 |
crowd_ref_command_list_v_o.crowd_list[].crowd.lookalike_multiple | String可选 | 业务字段 lookalike_multiple | 1 |
crowd_ref_command_list_v_o.crowd_list[].crowd.extend_seed_crowd_list | ExtendSeedCrowdRefCommandVO []可选含下级字段 | 人群列表集合 | — |
crowd_ref_command_list_v_o.crowd_list[].crowd.extend_seed_crowd_list[].crowd | ExtendSeedCrowdCommandVO可选含下级字段 | 人群 | — |
crowd_ref_command_list_v_o.crowd_list[].crowd.extend_seed_crowd_list[].crowd.crowd_id | Number可选 | 人群标识 | 5536708993 |
crowd_ref_command_list_v_o.crowd_list[].crowd.extend_seed_crowd_list[].crowd.crowd_name | String可选 | 人群名称 | 喜欢店铺新品的访客 |
crowd_ref_command_list_v_o.crowd_list[].crowd.extend_seed_crowd_list[].crowd.label | ExtendSeedLabelCommandVO可选含下级字段 | 定向标签 | — |
crowd_ref_command_list_v_o.crowd_list[].crowd.extend_seed_crowd_list[].crowd.label.label_id | Number可选 | 定向标签标识 | 3000494 |
crowd_ref_command_list_v_o.crowd_list[].crowd.extend_seed_crowd_list[].crowd.label.label_name | String可选 | 定向标签名称 | 关键词 |
crowd_ref_command_list_v_o.crowd_list[].crowd.extend_seed_crowd_list[].crowd.label.option_list | ExtendSeedOptionCommandVO []可选含下级字段 | 列表集合 | — |
crowd_ref_command_list_v_o.crowd_list[].crowd.extend_seed_crowd_list[].crowd.label.option_list[].option_name | String可选 | 业务字段 option_name | 人群特征继承 |
crowd_ref_command_list_v_o.crowd_list[].crowd.extend_seed_crowd_list[].crowd.label.option_list[].option_value | String可选 | 业务字段 option_value | 2000123 |
crowd_ref_command_list_v_o.crowd_list[].crowd.extend_seed_crowd_list[].crowd.label.option_list[].tag_id | Number可选 | 业务对象标识 | 100000 |
crowd_ref_command_list_v_o.crowd_list[].price | PriceCommandVO可选含下级字段 | 金额 | — |
crowd_ref_command_list_v_o.crowd_list[].price.bid_price | String可选 | 出价金额 | 30 |
crowd_ref_command_list_v_o.crowd_list[].price.discount | String可选 | 出价溢价 | 30 |
返回业务字段
响应外层为 universalbp_new_crowd_batchdelete_response。下面的逻辑字段路径从该外层内部开始;样例 JSON 路径额外标注 TOP 集合包装,解析时仍需以实际返回为准。
| 字段路径 | 类型 / 必填 | 字段含义 | 示例值 |
|---|---|---|---|
top_result样例 JSON:universalbp_new_crowd_batchdelete_response.top_result | TopResult官方未标注必填含下级字段 | 接口业务结果 | — |
top_result.info样例 JSON:universalbp_new_crowd_batchdelete_response.top_result.info | TopInfo官方未标注必填含下级字段 | 执行状态信息 | — |
top_result.info.ok样例 JSON:universalbp_new_crowd_batchdelete_response.top_result.info.ok | Boolean官方未标注必填 | 业务是否成功 | true |
top_result.info.message样例 JSON:universalbp_new_crowd_batchdelete_response.top_result.info.message | String官方未标注必填 | 业务结果提示 | 参数错误 |
top_result.info.error_code样例 JSON:universalbp_new_crowd_batchdelete_response.top_result.info.error_code | String官方未标注必填 | 业务错误标识 | xxxxx |
top_result.crowd_ref_delete_result_v_o_top_bulk_data样例 JSON:universalbp_new_crowd_batchdelete_response.top_result.crowd_ref_delete_result_v_o_top_bulk_data | TopBulkData官方未标注必填含下级字段 | 人群结果对象 | — |
top_result.crowd_ref_delete_result_v_o_top_bulk_data.count样例 JSON:universalbp_new_crowd_batchdelete_response.top_result.crowd_ref_delete_result_v_o_top_bulk_data.count | Number官方未标注必填 | 结果计数 | 10 |
top_result.crowd_ref_delete_result_v_o_top_bulk_data.crowd_ref_delete_result_v_o_list样例 JSON:universalbp_new_crowd_batchdelete_response.top_result.crowd_ref_delete_result_v_o_top_bulk_data.crowd_ref_delete_result_v_o_list | CrowdRefDeleteResultVO []官方未标注必填含下级字段 | 人群结果列表集合 | — |
top_result.crowd_ref_delete_result_v_o_top_bulk_data.crowd_ref_delete_result_v_o_list[].campaign_id样例 JSON:universalbp_new_crowd_batchdelete_response.top_result.crowd_ref_delete_result_v_o_top_bulk_data.crowd_ref_delete_result_v_o_list.crowd_ref_delete_result_v_o[].campaign_id | Number官方未标注必填 | 推广计划编号 | 68799007001 |
top_result.crowd_ref_delete_result_v_o_top_bulk_data.crowd_ref_delete_result_v_o_list[].adgroup_id样例 JSON:universalbp_new_crowd_batchdelete_response.top_result.crowd_ref_delete_result_v_o_top_bulk_data.crowd_ref_delete_result_v_o_list.crowd_ref_delete_result_v_o[].adgroup_id | Number官方未标注必填 | 推广单元编号 | 68796878061 |
top_result.crowd_ref_delete_result_v_o_top_bulk_data.crowd_ref_delete_result_v_o_list[].count样例 JSON:universalbp_new_crowd_batchdelete_response.top_result.crowd_ref_delete_result_v_o_top_bulk_data.crowd_ref_delete_result_v_o_list.crowd_ref_delete_result_v_o[].count | Number官方未标注必填 | 结果计数 | 2 |
Python 签名直连示例
下载 qimenyun_direct.py 与业务脚本放在同一目录,保留淘宝业务参数,使用奇门云密钥和 shopKey 申请签名,由客户服务器直接请求淘宝。运行前补全业务参数,无需自行计算平台签名。
# Python 3.9+,无需安装第三方依赖。
# 先下载 https://api.miandanni.com/examples/qimenyun_direct.py 放在本文件同一目录。
# 先申请签名,再由本程序直接请求淘宝;业务数据直接返回客户服务器。
import json
from getpass import getpass
from qimenyun_direct import Client, CallError, check_result
api_key = getpass("请输入奇门云密钥:").strip()
config = {"mode": "direct", "apiKey": api_key, "services": {"wanxiang": {"signEndpoint": "https://api.miandanni.com/api/wanxiang/sign"}}}
client = Client(config)
body = json.loads("{\"shopKey\":\"填写你授权店铺的 shopKey\",\"method\":\"taobao.universalbp.new.crowd.batchdelete\",\"params\":{\"top_service_context\":{\"biz_code\":\"universalBP\",\"login_type\":1,\"ext\":\"{}\"},\"crowd_ref_command_list_v_o\":{}}}")
body["shopKey"] = input("请输入自己的 shopKey:").strip()
# 此接口会修改业务数据,请核对店铺、目标对象及金额。
print("即将执行:", body["method"], "店铺:", body["shopKey"])
print(json.dumps(body["params"], ensure_ascii=False, indent=2))
if input("确认执行请键入 CONFIRM:").strip() != "CONFIRM":
raise SystemExit("已取消,未发送请求")
try:
result = client.call("wanxiang", body)
print(client.display(result))
check_result(result)
except CallError as exc:
print(client.display(exc.payload))
raise SystemExit(str(exc)) from None
# 不自动重试。写操作超时或结果未知时,先查询实际状态。
判断成功与失败
签名阶段先检查 HTTP 状态;本站鉴权、套餐或授权失败返回 {ok:false,error:{code,message}}。签名 HTTP 200 仅说明已签发;客户端执行官方请求后,还要检查淘宝响应的 error_response、逐项错误和 top_result.info.ok;失败不能当成空列表。
执行阶段的淘宝原始 error_response、业务 info 和 request_id 直接返回客户服务器,不由奇门云统一包装。签名和授权由本站管理,业务参数、日期、分页及平台资格按淘宝原始错误排查。
error_response:TOP 网关错误;应读取错误码及细分错误码,不能按空结果处理。top_result.info:HTTP 成功仍须核对业务 ok;false 表示业务未完成。
下载本页 MD 可交给开发人员或 AI,密钥只填在自己的私密配置中。