# 获取小店关联账号的文章列表
接口应在服务器端调用,不可在前端(小程序、网页、APP等)直接调用,具体可参考接口调用指南
接口英文名:getshopmparticlelist
可通过该接口,可获取某个小店关联账号的文章列表
# 1. 调用方式
# HTTPS 调用
POST https://api.weixin.qq.com/channels/ec/promoter/get_shop_mp_article_list?access_token=ACCESS_TOKEN
# 云调用
- 本接口不支持云调用
# 第三方调用
- 本接口不支持第三方平台调用。
# 2. 请求参数
# 查询参数 Query String parameters
参数名 | 类型 | 必填 | 示例 | 说明 |
---|---|---|---|---|
access_token | string | 是 | ACCESS_TOKEN | 接口调用凭证,可使用 access_token |
# 请求体 Request Payload
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
next_key | string | 是 | 分页参数,第一页为空,后面返回前面一页返回的数据 |
page_size | number | 是 | 一页获取多少个数据,最大 10 |
shop_appid | string | 是 | 小店的 appid |
promoter_id | string | 是 | 关联账号的id,可从获取合作小店的关联账号列表中获取 |
promoter_type | number | 是 | 关联账号类型【需要是公众号或服务号】 |
sharer_appid | string | 是 | 推客appid【为了生成某个推客推广的 link】 |
# 3. 返回参数
# 返回体 Response Payload
参数名 | 类型 | 说明 |
---|---|---|
errcode | number | 错误码 |
errmsg | string | 错误信息 |
next_key | string | 下一页的请求参数 |
has_more | boolean | 是否还有下一页 |
article_list | objarray | 文章列表 |
# Res.article_list(Array) Object Payload
文章列表
参数名 | 类型 | 说明 |
---|---|---|
article_info | object | 文章信息 |
product_list | objarray | 商品列表 |
create_time | number | 创建时间 |
update_time | number | 更新时间 |
# Res.article_list(Array).article_info Object Payload
文章信息
参数名 | 类型 | 说明 |
---|---|---|
article_title | string | 文章标题 |
cover_image | string | 文章封面图 |
promoter_share_link | string | 文章推广参数 |
article_url | string | 文章 url 内容 |
# Res.article_list(Array).product_listObject Payload
Object Payload
商品列表
参数名 | 类型 | 说明 |
---|---|---|
product_id | number | 商品 id |
product_name | string | 商品名称 |
product_img_url | string | 商品图片 |
predict_commission_amount | number | 机构预计可得佣金【单位:分】 |
commission_rate | number | 商品的佣金比例 |
# 4. 注意事项
# 小程序开发调用说明
// jsapi调用
wx.openOfficialAccountArticle({
"url": "${article_url}",
"promoterShareLink": "${promoter_share_link}"
})
# 5. 代码示例
请求示例
{
"next_key": "",
"page_size": 10,
"sharer_appid": "",
"shop_appid":"",
"promoter_id": "",
"promoter_type": 4
}
返回示例
{
"errcode": 0,
"errmsg": "ok",
"next_key": "",
"has_more": false,
"article_list": [
{
"product_list": [
{
"product_id": 123,
"product_name": "name",
"product_img_url": "imag_url",
"predict_commission_amount": 123,
"commission_rate": 400000
}
],
"article_info": {
"article_title": "title",
"cover_image": "image",
"article_url": "url",
"promoter_share_link": "promoter_share_link"
},
"create_time": 1736864136,
"update_time": 1736864136
}
]
}
# 6. 错误码
以下是本接口的错误码列表,其他错误码可参考 通用错误码
错误码 | 错误描述 | 解决方案 |
---|---|---|
10024000 | 参数错误 |
# 7. 适用范围
本接口暂未明确可调用账号类型,或在业务中根据调用传参自行确定是否可调用,请已实际调用情况为准。