# 订阅商品计划信息变更通知

# 接口说明

通过该接口将订阅商品计划变更的消息通知给带货机构。

# 注意事项

  • 回调url设置和消息推送规则需参考消息推送文档 ,如果设置的回调url无法访问,机构将无法收到通知;

# 请求参数说明

参数 类型 描述
ToUserName string 带货机构UserName
FromUserName string 微信团队的 OpenID(固定值)
CreateTime number 事件时间,Unix时间戳。即格林威治时间1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)起至现在的总秒数
MsgType string 消息类型,固定为 event
Event string 事件类型,本接口固定为 head_supplier_subscribe_product_planinfo_update
item_info object ItemInfo 事件主体,结构体详情请参考ItemInfo

# 请求参数示例(解密后的明文JSON)

{
    "ToUserName": "gh_*",
    "FromUserName": "OpenID",
    "CreateTime": 1662480000,
    "MsgType": "event",
    "Event": "head_supplier_subscribe_product_planinfo_update",
    "item_info": {
        "event_type": 2,
        "appid": "wxc5b627dfd7c390f4",
        "product_id": "10000155286989",
        "plan_type": 3,
        "plan_id": "2000000002630025",
        "plan_status": 1,
        "head_supplier_item_link": "weixinstorehs/14016124036143",
        "version": "5",
        "service_ratio": 10000,
        "commission_ratio": 200000,
        "start_time": 1747293120,
        "end_time": 1748620800
    }
}

# 返回参数说明

只需直接返回字符串

success

# 返回参数示例

success

# 结构体

# ItemInfo

事件主体

# ItemInfo 消息结构

参数 类型 字段描述
event_type int32 事件类型:新增、变更
appid string 商品所属店铺
product_id string 商品 id
plan_type int32 计划类型
参考这里的定义:https://developers.weixin.qq.com/doc/store/leagueheadsupplier/API/promotion/product/getpromoteproductdetail.html
plan_id string 计划ID
plan_status int32 计划当前状态【是否在架】, 0:失效 1:生效
head_supplier_item_link string 计划短链
version string 数据版本号,用于最后判断
service_ratio uint32 服务费率
commission_ratio uint32 佣金率
start_time uint64 开始时间
end_time uint64 结束时间