**版本：202701**

# 查询主题文件

**GET** `/openapi/2027-01/themes/:theme_id/doc`

获取指定主题中特定文件的详情。

## 请求

**Path参数**

- `theme_id` string (required)

  主题 ID

**Query参数**

- `type` string

  文件类型：`layout`、`templates`、`sections`、`snippets`、`assets`、`config`、`locales`、`blocks`。默认 `layout`
- `location` string

  文件的位置。默认为 theme.liquid

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `theme_file` object

    主题文件

    - `id` string

      主题文件的 ID
    - `theme_id` string

      文件所属主题的 ID
    - `type` string

      文件类型
    - `location` string

      文件的位置路径
    - `remote_url` string

      文件的远程 URL
    - `content` string

      文件的完整内容

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "theme_file": {
      "id": "string",
      "theme_id": "string",
      "type": "string",
      "location": "string",
      "remote_url": "string",
      "content": "string"
    }
  }
}
```
