**版本：202601**

# 查询主题自定义模板列表

**GET** `/openapi/2026-01/themes/:theme_id/theme-templates`

返回绑定到商品、专辑、自定义页的自定义模板列表。

## 请求

**Path参数**

- `theme_id` string (required)

  主题 ID

**Query参数**

- `type` string

  可选，按模板类型过滤：`product`、`collection`、`product_coll`、`page`；为空返回全部类型
- `page` int32

  可选，分页页码（默认 1）
- `per_page` int32

  可选，每页数量（默认 100）

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `count` int32

    模板总数
  - `theme_templates` object[]

    主题模板列表

    *   Array \[

    - `id` string

      模板唯一 ID
    - `theme_id` string

      所属主题 ID
    - `store_id` string

      店铺 ID
    - `doc_id` string

      底层文档（模板文件）ID
    - `type` string

      模板类型：`product`（绑定商品的商品详情页）、`collection`（专辑详情页）、`product_coll`（绑定专辑的商品详情页）、`page`（自定义页，旧版兼容）
    - `title` string

      模板显示名称
    - `suffix` string

      模板路由后缀
    - `from` string

      模板创建来源（复制源模板的 suffix）
    - `obj_id` string

      **首个**绑定对象的 ID（商品 / 专辑 / 自定义页 id）；未绑定任何对象时为空。一个模板可绑定多个对象，总数见 `count` —— 该字段不会列出全部对象
    - `obj_title` string

      首个绑定对象的显示标题（与 `obj_id` 指向同一对象）
    - `source` string

      数据操作来源：该记录由哪个入口写入。只读；与 `from`（复制自哪个模板）不是一回事
    - `created_at` string

      创建时间
    - `updated_at` string

      更新时间
    - `icon` string

      模板图标 URL
    - `count` string

      绑定到该模板的对象数量，以十进制字符串返回（如 `12`），不是数字类型
    *   \]

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "count": 0,
    "theme_templates": [
      {
        "id": "string",
        "theme_id": "string",
        "store_id": "string",
        "doc_id": "string",
        "type": "string",
        "title": "string",
        "suffix": "string",
        "from": "string",
        "obj_id": "string",
        "obj_title": "string",
        "source": "string",
        "created_at": "string",
        "updated_at": "string",
        "icon": "string",
        "count": "string"
      }
    ]
  }
}
```
