# 提交精选展示位申请

> 接口应在服务器端调用，不可在前端（小程序、网页、APP等）直接调用，具体可参考[接口调用指南](/doc/oplatform/developers/dev/guide.md)。

接口英文名：submitbannerapply

通过该接口提交精选展示位申请，审核通过后会展示在店铺主页。  

配置链接和描述信息，向用户展示你精选的商品或内容。

![](https://res.wx.qq.com/shop/public/2024-08-23/6b2fec40-38dc-425b-a413-10f166e38bf0.png)

[店铺管理开发指南](/doc/store/shop/guide/operation/shop)

## 1. 调用方式

### HTTPS 调用

```bash
POST https://api.weixin.qq.com/channels/ec/basics/homepage/banner/apply/submit?access_token=ACCESS_TOKEN
```

### 云调用

- 本接口不支持云调用。

### 第三方调用

- 本接口支持第三方平台代微信小店商家调用。[第三方服务商调用模式介绍](/doc/store/shop/dev_before/third_party_platforms)

- 该接口所属的权限集 id 为：129、131、192

- 服务商获得其中之一权限集授权后，可通过使用 [authorizer_access_token](/doc/oplatform/developers/dev/AuthorizerAccessToken.md) 代微信小店商家进行调用，具体可查看 [第三方调用](/doc/oplatform/Third-party_Platforms/2.0/Before_Develop/call_interface.md) 说明文档。

## 2. 请求参数

### 查询参数 `Query String Parameters`

```json
[
  {
    "参数名": "access_token",
    "类型": "string",
    "必填": "是",
    "示例": "ACCESS_TOKEN",
    "说明": "接口调用凭证，可使用 [access_token](/doc/store/shop/API/apimgnt/common/api_getaccesstoken)（微信小店商家）、[authorizer_access_token](/doc/oplatform/openApi/ticket-token/api_getauthorizeraccesstoken.md)（服务商代调用）"
  }
]
```

### 请求体 `Request Payload`

```json
[
  {
    "参数名": "banner",
    "类型": "object",
    "必填": "是",
    "说明": "精选展示位。"
  }
]
```

### Body.banner `Object Payload`

精选展示位。

```json
[
  {
    "参数名": "banner",
    "类型": "objarray",
    "必填": "是",
    "示例": "",
    "说明": "精选展示位。最多 5 个，小图模式最少 3 个"
  },
  {
    "参数名": "scale",
    "类型": "number",
    "必填": "是",
    "示例": "2",
    "说明": "展示位的展示样式。1=小图模式，2=大图模式"
  },
  {
    "参数名": "title",
    "类型": "string",
    "必填": "否",
    "示例": "示例标题",
    "说明": "模块标题。最多 32 字"
  }
]
```

">

### Body.banner.banner(Array) `Object Payload`

精选展示位。最多 5 个，小图模式最少 3 个

```json
[
  {
    "参数名": "banner",
    "类型": "object",
    "必填": "否",
    "示例": "",
    "说明": "精选展示位"
  },
  {
    "参数名": "type",
    "类型": "number",
    "必填": "是",
    "示例": "1",
    "说明": "展示位类型。1=商品，3=视频号，4=公众号"
  },
  {
    "参数名": "product",
    "类型": "object",
    "必填": "否",
    "示例": "",
    "说明": "-"
  },
  {
    "参数名": "finder",
    "类型": "object",
    "必填": "否",
    "示例": "",
    "说明": "-"
  },
  {
    "参数名": "official_account",
    "类型": "object",
    "必填": "否",
    "示例": "",
    "说明": "-"
  }
]
```

__banner">

### Body.banner.banner(Array).banner `Object Payload`

精选展示位

```json
[
  {
    "参数名": "img_url",
    "类型": "string",
    "必填": "是",
    "示例": "https://store.mp.video.tencent-cloud.com/abc",
    "说明": "图片 url。请务必使用 [上传图片](/doc/store/shop/API/apimgnt/resource/api_img_upload) 接口上传图片（参数 resp_type=1），并将返回的 img_url 填入此处，不接受其他任何格式的图片 url。若 url 曾经做过转换（url 前缀为 mmecimage.cn/p/），则可以直接提交"
  },
  {
    "参数名": "title",
    "类型": "string",
    "必填": "是",
    "示例": "测试商品精品展示位标题",
    "说明": "标题。当 scale 为 1（小图模式）时最多 12 字，为 2（大图模式）时最多 40 字"
  },
  {
    "参数名": "description",
    "类型": "string",
    "必填": "否",
    "示例": "测试商品精品展示位描述",
    "说明": "描述。当 scale 为 2（大图模式）时可设置，最多 100 个字。当 scale 为 1（小图模式）时不可设置"
  }
]
```

__product">

### Body.banner.banner(Array).product `Object Payload`

```json
[
  {
    "参数名": "product_id",
    "类型": "number",
    "必填": "否",
    "示例": "123",
    "说明": "商品 ID。可通过 [获取商品列表](/doc/store/shop/API/channels-shop-product/shop/api_getproductlist) 接口查询本店铺的商品 ID"
  }
]
```

__finder">

### Body.banner.banner(Array).finder `Object Payload`

```json
[
  {
    "参数名": "finder_user_name",
    "类型": "string",
    "必填": "否",
    "示例": "sphabc",
    "说明": "视频号 ID。可参考下文查询视频号 ID"
  },
  {
    "参数名": "feed_id",
    "类型": "string",
    "必填": "否",
    "示例": "export/abc",
    "说明": "视频 ID。视频号视频的唯一标识。可参考下文查询视频 ID"
  }
]
```

__official_account">

### Body.banner.banner(Array).official_account `Object Payload`

```json
[
  {
    "参数名": "url",
    "类型": "string",
    "必填": "否",
    "示例": "https://mp.weixin.qq.com/abc",
    "说明": "公众号文章链接。可参考下文查询公众号文章链接"
  }
]
```

## 3. 返回参数

### 返回体 `Response Payload`

```json
[
  {
    "参数名": "errcode",
    "类型": "number",
    "示例": "0",
    "说明": "错误码"
  },
  {
    "参数名": "errmsg",
    "类型": "string",
    "示例": "ok",
    "说明": "错误信息"
  },
  {
    "参数名": "apply_id",
    "类型": "number",
    "示例": "123",
    "说明": "申请编号"
  }
]
```

## 4. 注意事项

# 获取参数
## finder_user_name
代表视频号ID，获取视频号ID的需要登录[视频号助手](https://channels.weixin.qq.com/)，在首页可以查看自己的视频号ID。

![](https://res.wx.qq.com/wxdoc/dist/assets/img/channels-2.f52130cf.png)

## feed_id
代表视频号视频的唯一标识，获取视频ID需要登录[视频号助手](https://channels.weixin.qq.com/)，在「动态管理」模块可以复制自己发表的每个视频对应的视频ID。

![](https://res.wx.qq.com/wxdoc/dist/assets/img/channels-3.f3734918.png)

## official_account.url
公众号文章链接，可在微信客户端打开公众号文章获取分享链接。

![](https://res.wx.qq.com/op_res/5DOmlBCD6xEjdjsEPS3GeaKDV2Qpb7o0rni4TzbcWVmMNdVIJTNYISQzI1sfN9prGyWWUoGNCWgu7bpV12qr8A)

## 5. 代码示例

请求示例

```json
{
  "banner": {
    "scale": 2,
    "banner": [
      {
        "type": 1,
        "product": {
          "product_id": 123
        },
        "banner": {
          "description": "测试商品精品展示位描述",
          "img_url": "https://store.mp.video.tencent-cloud.com/abc",
          "title": "测试商品精品展示位标题"
        }
      },
      {
        "type": 3,
        "finder": {
          "feed_id": "export/abc",
          "finder_user_name": "sphabc"
        },
        "banner": {
          "description": "测试视频号视频精品展示位描述",
          "img_url": "https://store.mp.video.tencent-cloud.com/abc",
          "title": "测试视频号视频精品展示位标题"
        }
      },
      {
        "type": 4,
        "official_account": {
          "url": "https://mp.weixin.qq.com/abc"
        },
        "banner": {
          "description": "测试公众号文章精品展示位描述",
          "img_url": "https://store.mp.video.tencent-cloud.com/abc",
          "title": "测试公众号文章精品展示位标题"
        }
      }
    ]
  }
}
```

返回示例

```json
{
    "errcode": 0,
    "errmsg": "ok",
    "apply_id": 123
}
```

## 6. 错误码

以下是本接口的错误码列表，其他错误码可参考 [通用错误码](/doc/store/shop/dev_before/commErrCode)；调用接口遇到报错，可使用官方提供的 [API 诊断工具](https://developers.weixin.qq.com/console/devtools/debug?utm_source=api_errcode) 辅助定位和分析问题。

```json
[
  {
    "错误码": "268549841",
    "错误描述": "已有流程中的申请。"
  },
  {
    "错误码": "268549927",
    "错误描述": "参数错误。商品ID不能为空。"
  },
  {
    "错误码": "268549928",
    "错误描述": "参数错误。banner类型有误。"
  },
  {
    "错误码": "268552545",
    "错误描述": "参数错误。描述不能为空。"
  },
  {
    "错误码": "268552602",
    "错误描述": "参数错误。标题长度有误。"
  },
  {
    "错误码": "268552603",
    "错误描述": "参数错误。描述长度有误。"
  },
  {
    "错误码": "268552604",
    "错误描述": "参数错误。描述必须为空。"
  },
  {
    "错误码": "268552621",
    "错误描述": "参数错误。benner类型为视频号时，只能设置视频号相关参数。"
  },
  {
    "错误码": "268552622",
    "错误描述": "参数错误。benner类型为公众号时，只能设置公众号相关参数。"
  },
  {
    "错误码": "268552764",
    "错误描述": "参数错误。scale取值有误。"
  },
  {
    "错误码": "268552767",
    "错误描述": "参数错误。标题不能为空。"
  },
  {
    "错误码": "268553052",
    "错误描述": "参数错误。视频号ID不能为空。"
  },
  {
    "错误码": "268553053",
    "错误描述": "参数错误。视频ID不能为空。"
  },
  {
    "错误码": "268553233",
    "错误描述": "参数错误。benner类型为商品时，只能设置商品相关参数。"
  },
  {
    "错误码": "268553252",
    "错误描述": "参数错误。图片链接不能为空。"
  },
  {
    "错误码": "268553714",
    "错误描述": "参数错误。banner个数有误。"
  },
  {
    "错误码": "268555516",
    "错误描述": "无权限，仅供微信小店使用。"
  },
  {
    "错误码": "268555602",
    "错误描述": "参数错误。图片链接格式有误。"
  },
  {
    "错误码": "268555603",
    "错误描述": "参数错误。图片链接格式有误。"
  },
  {
    "错误码": "268555694",
    "错误描述": "参数错误。视频号ID与视频ID不匹配。"
  },
  {
    "错误码": "268555696",
    "错误描述": "参数错误。商品ID有误。"
  },
  {
    "错误码": "268555698",
    "错误描述": "参数错误。商品必须为上架状态。"
  },
  {
    "错误码": "268555705",
    "错误描述": "参数错误。视频号ID有误。"
  },
  {
    "错误码": "268555706",
    "错误描述": "参数错误。视频ID有误。"
  },
  {
    "错误码": "268555744",
    "错误描述": "转换img_url时发生错误。"
  },
  {
    "错误码": "268555796",
    "错误描述": "参数错误。公众号文章链接有误。"
  },
  {
    "错误码": "268555797",
    "错误描述": "转换img_url时发生错误。"
  }
]
```

## 7. 适用范围

本接口在不同账号类型下的可调用情况：

```json
[
  {
    "微信小店": "✔",
    "小店供货商": "✔"
  }
]
```

- ✔：该账号可调用此接口。
- 其他未明确声明的账号类型，如无特殊说明，均不可调用此接口。
