# 获取推客对某个商品的推广短链

接口应在服务器端调用,不可在前端(小程序、网页、APP等)直接调用,具体可参考接口调用指南

接口英文名:getproductpromotionlinkinfo

可通过该接口,可获取到推客对某个商品的推广短链

# 1. 调用方式

# HTTPS 调用

POST https://api.weixin.qq.com/channels/ec/promoter/get_product_promotion_link_info?access_token=ACCESS_TOKEN

# 云调用

  • 本接口不支持云调用

# 第三方调用

  • 本接口不支持第三方平台调用。

# 2. 请求参数

# 查询参数 Query String parameters

参数名类型必填示例说明
access_tokenstringACCESS_TOKEN接口调用凭证,可使用 access_token

# 请求体 Request Payload

参数名类型必填说明
sharer_appidstring推客 appid,和sharer_openid二选一
sharer_openidstring推客在小程序中的openid。 必须是机构绑定小程序的用户openid,而不能是其他小程序的用户openid。 和sharer_appid二选一
product_idnumber商品 id,如果使用该参数,需要传入shop_appid
shop_appidstring商品所属店铺 appid
product_short_linkstring商品短链,和 product_id 二选一
head_supplier_appidstring商品所属供货机构appid

# 3. 返回参数

# 返回体 Response Payload

参数名类型示例说明
errcodenumber0错误码
errmsgstringok错误信息
short_linkstring推广短链
http_short_linkstringhttps://store.weixin.qq.com/shop/a/xxxxxxxxhttp短链,外部点击可跳转微信

# 4. 注意事项

本接口无特殊注意事项

# 5. 代码示例

请求示例

{
    "sharer_appid": "appid",
    "product_id": 10,
    "shop_appid":"appid"
}

返回示例

{
  "errcode": "0",
  "errmsg": "ok",
  "short_link": "short_link",
   "http_short_link": "https://store.weixin.qq.com/shop/a/xxxxxxxx"
}

# 6. 错误码

以下是本接口的错误码列表,其他错误码可参考 通用错误码;调用接口遇到报错,可使用官方提供的 API 诊断工具 辅助定位和分析问题。

错误码错误描述
10024000参数错误
10071003参数错误
10071029推客和机构未绑定
10071030获取推客talentuin失败
10071048参数异常,请检查入参
10071053商品不在架
10071056请求参数(如sharer_openid)对应的小程序未绑定到当前机构

# 7. 适用范围

本接口支持「联盟带货机构」账号类型调用。其他账号类型如无特殊说明,均不可调用。

接口变更日志(1条)
2025 年 11 月 24 日
新增错误码:10071053,10071030等