---
title: "批量查询主题"
description: "批量查询店铺下所有主题的信息。"
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-all-themes'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/online-store/theme/get-all-themes.md'
---
# 批量查询主题

批量查询店铺下所有主题的信息。

- **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.json
```

## Base URL

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

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

## Required Permissions

* `read_content`

## Request

### 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

* `themes`

  array<object>

  店铺下所有主题的信息。

  * `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。

  * `name`

    string

    主题的名称。

  * `original_theme_id`

    string

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

  * `role`

    string

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


#### 401

* `errors`

  string

  错误描述。


#### 429

* `errors`

  string

  错误描述。


## OpenAPI Definition

```json
{
  "tags": [
    "批量查询主题"
  ],
  "description": "批量查询店铺下所有主题的信息。",
  "externalDocs": {
    "description": "接口使用的权限点: `read_content` ，更多权限点使用信息，请参考:",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=zh-hans-cn",
    "errorTableDescription": ""
  },
  "operationId": "2OKbbDFr",
  "parameters": [
    {
      "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": {
              "themes": {
                "name": "themes",
                "description": "店铺下所有主题的信息。",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "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"
                    },
                    "name": {
                      "name": "name",
                      "description": "主题的名称。",
                      "type": "string",
                      "example": "Modern1"
                    },
                    "original_theme_id": {
                      "name": "original_theme_id",
                      "description": "若主题为默认安装主题和从主题商城下载的主题，返回对应官方主题的唯一标识 ID；否则返回 `null`。",
                      "type": "string",
                      "example": "6486f3eca26b90084144fa0b"
                    },
                    "role": {
                      "name": "role",
                      "description": "主题的状态。有效枚举值包含：\n- `published`：已发布的主题\n- `unpublished`：待发布的主题\n- `development`：开发中的主题",
                      "type": "string"
                    }
                  },
                  "example": {
                    "name": "Modern1",
                    "original_theme_id": "6486f3eca26b90084144fa0b",
                    "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"
                  }
                },
                "example": [
                  {
                    "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": "6486f3eca26b90084144fa0b",
                    "role": null
                  }
                ]
              }
            },
            "example": {
              "themes": [
                {
                  "create_at": "2024-10-28T16:34:30+08:00",
                  "id": "671f4c96d2682a1f5407536e",
                  "name": "Modern1",
                  "original_theme_id": "6486f3eca26b90084144fa0b",
                  "role": null,
                  "theme_type_version": "2.1",
                  "update_at": "2025-01-13T16:58:56+08:00"
                }
              ]
            }
          },
          "examples": {
            "查询所有主题": {
              "description": "查询所有主题",
              "value": {
                "themes": [
                  {
                    "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"
                  },
                  {
                    "create_at": "2022-12-01T18:31:13+08:00",
                    "id": "6388827102b701028efac460",
                    "name": "Arise20",
                    "original_theme_id": "62319e9585f4b048db79a50e",
                    "role": "unpublished",
                    "update_at": "2022-12-01T20:15:53+08:00"
                  },
                  {
                    "update_at": "2022-12-01T18:28:39+08:00",
                    "create_at": "2022-12-01T18:28:39+08:00",
                    "id": "638881d702b701028efac450",
                    "name": "Arise19",
                    "original_theme_id": "62319e9585f4b048db79a50e",
                    "role": "unpublished"
                  },
                  {
                    "create_at": "2022-11-30T12:49:40+08:00",
                    "id": "6386e0e4fef2186c87cced55",
                    "name": "Arise18",
                    "original_theme_id": "62319e9585f4b048db79a50e",
                    "role": "unpublished",
                    "update_at": "2022-12-01T18:31:51+08:00"
                  },
                  {
                    "id": "63803a82c57c9739b67227b6",
                    "name": "Arise17",
                    "original_theme_id": "62319e9585f4b048db79a50e",
                    "role": "unpublished",
                    "update_at": "2022-11-30T12:49:45+08:00",
                    "create_at": "2022-11-25T11:46:10+08:00"
                  },
                  {
                    "id": "6375a0ed16784d67dfd2a961",
                    "name": "Arise16",
                    "original_theme_id": "62319e9585f4b048db79a50e",
                    "role": "unpublished",
                    "update_at": "2022-11-25T11:46:15+08:00",
                    "create_at": "2022-11-17T10:48:13+08:00"
                  },
                  {
                    "create_at": "2022-10-09T20:04:07+08:00",
                    "id": "6342b8b7a60c7e485d6c7624",
                    "name": "Arise15",
                    "original_theme_id": "62319e9585f4b048db79a50e",
                    "role": "unpublished",
                    "update_at": "2022-11-17T10:48:21+08:00"
                  },
                  {
                    "create_at": "2022-09-27T11:05:00+08:00",
                    "id": "6332685c47284d43592614c8",
                    "name": "Arise14",
                    "original_theme_id": "62319e9585f4b048db79a50e",
                    "role": "unpublished",
                    "update_at": "2022-10-09T18:49:34+08:00"
                  },
                  {
                    "id": "6332660647284d4359260fd9",
                    "name": "Lite2",
                    "original_theme_id": "632837ffe9b6897c7b9070ae",
                    "role": "unpublished",
                    "update_at": "2022-10-10T16:43:21+08:00",
                    "create_at": "2022-09-27T10:55:02+08:00"
                  },
                  {
                    "create_at": "2022-09-19T18:02:43+08:00",
                    "id": "63283e43e9b6897c7b909000",
                    "name": "Wink10",
                    "original_theme_id": "62abf5c19669c849b47a0392",
                    "role": "unpublished",
                    "update_at": "2022-10-24T11:18:10+08:00"
                  },
                  {
                    "update_at": "2022-11-14T22:38:44+08:00",
                    "create_at": "2022-09-17T17:45:20+08:00",
                    "id": "63259730bb5415442b4d7dd9",
                    "name": "Wink9",
                    "original_theme_id": "62abf5c19669c849b47a0392",
                    "role": "unpublished"
                  },
                  {
                    "original_theme_id": "62abf5c19669c849b47a0392",
                    "role": "unpublished",
                    "update_at": "2022-11-09T18:45:40+08:00",
                    "create_at": "2022-09-17T17:43:32+08:00",
                    "id": "632596c4bb5415442b4d7dcc",
                    "name": "Wink8"
                  },
                  {
                    "create_at": "2022-09-17T17:42:53+08:00",
                    "id": "6325969dbb5415442b4d7dbf",
                    "name": "Arise13",
                    "original_theme_id": "62319e9585f4b048db79a50e",
                    "role": "unpublished",
                    "update_at": "2022-11-14T22:42:02+08:00"
                  },
                  {
                    "name": "Simple7",
                    "original_theme_id": "61a75c4e9f8c201e6e9473e0",
                    "role": "unpublished",
                    "update_at": "2022-09-17T17:34:59+08:00",
                    "create_at": "2022-09-17T17:34:59+08:00",
                    "id": "632594c342d1dc072ce3aae5"
                  },
                  {
                    "role": "unpublished",
                    "update_at": "2022-09-17T17:31:28+08:00",
                    "create_at": "2022-09-17T17:31:28+08:00",
                    "id": "632593f0bb5415442b4d7dbd",
                    "name": "Bobo-test1",
                    "original_theme_id": "6204ea278bd39024a3a05b88"
                  },
                  {
                    "create_at": "2022-09-15T15:05:50+08:00",
                    "id": "6322cece10cd57458a0ef102",
                    "name": "Arise12",
                    "original_theme_id": "62319e9585f4b048db79a50e",
                    "role": "unpublished",
                    "update_at": "2022-09-15T15:05:50+08:00"
                  },
                  {
                    "create_at": "2022-09-05T15:49:19+08:00",
                    "id": "6315a9ffb0d2627ebbe2b994",
                    "name": "Wink7",
                    "original_theme_id": "62abf5c19669c849b47a0392",
                    "role": "unpublished",
                    "update_at": "2022-09-17T17:50:56+08:00"
                  },
                  {
                    "name": "Brooklyn8",
                    "original_theme_id": "618238a6b9b5dc2d7e525436",
                    "role": "unpublished",
                    "update_at": "2022-09-13T18:14:12+08:00",
                    "create_at": "2022-08-24T10:32:14+08:00",
                    "id": "63058dae07ad5d6ec5b7d9e2"
                  },
                  {
                    "original_theme_id": "62abf5c19669c849b47a0392",
                    "role": "unpublished",
                    "update_at": "2022-09-13T19:49:59+08:00",
                    "create_at": "2022-08-23T17:29:14+08:00",
                    "id": "63049dea1aa5fa56b0c17cd3",
                    "name": "Wink6"
                  },
                  {
                    "create_at": "2022-08-22T17:08:09+08:00",
                    "id": "6303477927ed7c01fa62e9cf",
                    "name": "Wink5",
                    "original_theme_id": "62abf5c19669c849b47a0392",
                    "role": "unpublished",
                    "update_at": "2022-08-22T17:08:09+08:00"
                  },
                  {
                    "original_theme_id": "62319e9585f4b048db79a50e",
                    "role": "unpublished",
                    "update_at": "2022-08-23T17:29:18+08:00",
                    "create_at": "2022-08-22T10:13:54+08:00",
                    "id": "6302e66298bde308783329d0",
                    "name": "Arise11"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "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.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"
  ]
}
```