# 获取达人橱窗商品列表

# 接口说明

通过该接口可获取达人橱窗的商品列表

# 注意事项

  1. 接口限制了 page_size × page_index ≤ 10000。命中限制时建议改用传last_buffer顺序翻页的请求方式。

# 接口调用请求说明

POST https://api.weixin.qq.com/channels/ec/talent/window/product/list/get?access_token=ACCESS_TOKEN

# 请求参数说明

参数 类型 是否必填 描述
page_size number 单页商品数(不超过500)
page_index number 页面下标,下标从1开始 (不可以与last_buffer一起填写)
last_buffer string 由上次请求返回,顺序翻页时需要传入, 会从上次返回的结果往后翻一页(不可以与last_buffer一起填写)

# 请求参数示例

// page_index 方式请求
{
    "page_size": 1,
    "page_index": 1
}

// last_buffer 方式请求
{
    "page_size": 1,
    "last_buffer": "abcdefg"
}

# 返回参数说明

参数 类型 描述
errcode number 错误码
errmsg string 错误信息
products[].product_id string(uint64) 橱窗商品id
products[].appid string 对于自营商品会返回,代表商品来源店铺的appid
products[].out_product_id string 对于带货商品会返回, 代表商品在货源小店中的商品id
products[].product_source number 商品来源,枚举值详情请参考ProductSource
last_buffer string 本次翻页的上下文,用于顺序翻页请求

# 返回参数示例

{
    "errcode": 0,
    "errmsg": "ok",
    "products": [
        { // 来自自营店铺的商品
            "product_id": "1000000000000",
            "appid": "wxee9f94a33abcdefg",
            "product_source": 1
        },
        { // 带货商品
            "product_id": "14000000000000",
            "out_product_id": "100000012356",
            "product_source": 2
        }
    ],
    "last_buffer": "EB4YAg="
}

# 错误码

错误码 错误描述
公共错误码 -
10200003 请求参数 page_size 超过限制
10200004 请求参数 page_index 与 last_buffer 同时存在
10200005 请求参数 page_size × page_index 超过限制

# 枚举值

ProductSource

# 商品来源

枚举值 描述
1 来源店铺的自营商品
2 来源选品中心的带货商品