---
title: "查询单个主题"
description: "通过 ID 查询指定主题信息。"
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/online-store/theme/get-a-single-theme'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/online-store/theme/get-a-single-theme.md'
---
# 查询单个主题

通过 ID 查询指定主题信息。

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `read_content`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
GET /themes/:theme_id.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。

## Required Permissions

* `read_content`

## Request

### Path Parameters

* `theme_id`

  string (required)

  主题的唯一标识 ID。

### Request Headers

* `Content-Type`

  string (required)

  字段值固定为 `application/json; charset=utf-8`。

* `Authorization`

  string (required)

  资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。

## Response

### Status Codes

* `200`

  更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。

### Response Body

#### 200

* `theme`

  object

  被查询主题的信息。

  * `name`

    string

    主题的名称。

  * `original_theme_id`

    string

    若主题为默认安装主题或从主题商城下载的主题，返回对应官方主题的唯一标识 ID；否则返回 `null`。

  * `role`

    string

    主题的状态。有效枚举值包含:
    - `published`：已发布的主题  
    - `unpublished`：待发布的主题  
    - `development`：开发中的主题

  * `theme_type_version`

    string

    主题的版本标识。

  * `update_at`

    string

    主题的更新时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。

  * `create_at`

    string

    主题的添加时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。

  * `id`

    string

    主题的唯一标识 ID。


#### 401

* `errors`

  string

  错误描述。


#### 429

* `errors`

  string

  错误描述。


## OpenAPI Definition

```json
{
  "tags": [
    "查询单个主题"
  ],
  "description": "通过 ID 查询指定主题信息。",
  "externalDocs": {
    "description": "接口使用的权限点: `read_content` ，更多权限点使用信息，请参考:",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=zh-hans-cn",
    "errorTableDescription": ""
  },
  "operationId": "RyPtMkuy",
  "parameters": [
    {
      "name": "theme_id",
      "in": "path",
      "description": "主题的唯一标识 ID。",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "theme_id",
        "description": "主题的唯一标识 ID。",
        "type": "string",
        "example": "671f4c96d2682a1f5407536e"
      },
      "example": "671f4c96d2682a1f5407536e",
      "examples": {
        "查询单个主题详情": {
          "value": "63889af46841fe15da877e2b"
        }
      }
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "字段值固定为 `application/json; charset=utf-8`。",
      "required": true,
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "responses": {
    "200": {
      "description": "更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。",
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "name": "body",
            "type": "object",
            "properties": {
              "theme": {
                "name": "theme",
                "description": "被查询主题的信息。",
                "type": "object",
                "properties": {
                  "name": {
                    "name": "name",
                    "description": "主题的名称。",
                    "type": "string",
                    "example": "Modern1"
                  },
                  "original_theme_id": {
                    "name": "original_theme_id",
                    "description": "若主题为默认安装主题或从主题商城下载的主题，返回对应官方主题的唯一标识 ID；否则返回 `null`。",
                    "type": "string",
                    "example": "627d1003d4baa549bf5b83f9"
                  },
                  "role": {
                    "name": "role",
                    "description": "主题的状态。有效枚举值包含:\n- `published`：已发布的主题  \n- `unpublished`：待发布的主题  \n- `development`：开发中的主题",
                    "type": "string"
                  },
                  "theme_type_version": {
                    "name": "theme_type_version",
                    "description": "主题的版本标识。",
                    "type": "string",
                    "example": "2.1"
                  },
                  "update_at": {
                    "name": "update_at",
                    "description": "主题的更新时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
                    "type": "string",
                    "example": "2025-01-13T16:58:56+08:00"
                  },
                  "create_at": {
                    "name": "create_at",
                    "description": "主题的添加时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
                    "type": "string",
                    "example": "2024-10-28T16:34:30+08:00"
                  },
                  "id": {
                    "name": "id",
                    "description": "主题的唯一标识 ID。",
                    "type": "string",
                    "example": "671f4c96d2682a1f5407536e"
                  }
                },
                "example": {
                  "role": null,
                  "theme_type_version": "2.1",
                  "update_at": "2025-01-13T16:58:56+08:00",
                  "create_at": "2024-10-28T16:34:30+08:00",
                  "id": "671f4c96d2682a1f5407536e",
                  "name": "Modern1",
                  "original_theme_id": "627d1003d4baa549bf5b83f9"
                }
              }
            },
            "example": {
              "theme": {
                "role": null,
                "theme_type_version": "2.1",
                "update_at": "2025-01-13T16:58:56+08:00",
                "create_at": "2024-10-28T16:34:30+08:00",
                "id": "671f4c96d2682a1f5407536e",
                "name": "Modern1",
                "original_theme_id": "627d1003d4baa549bf5b83f9"
              }
            }
          },
          "examples": {
            "查询单个主题详情": {
              "description": "查询单个主题详情",
              "value": {
                "theme": {
                  "create_at": "2022-12-01T20:15:48+08:00",
                  "id": "63889af46841fe15da877e2b",
                  "name": "Arise21",
                  "original_theme_id": "62319e9585f4b048db79a50e",
                  "role": "published",
                  "update_at": "2022-12-21T15:40:47+08:00"
                }
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "get",
  "path": "/themes/:theme_id.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。"
        }
      }
    }
  ],
  "info": {
    "title": "查询单个主题",
    "version": "v20270301"
  },
  "authIndexes": [
    "read_content"
  ]
}
```