---
title: "根据 ID 查询手动分类"
description: "查询指定手动分类信息。"
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/product/collection/query-manual-collection-attributes-by-id'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/product/collection/query-manual-collection-attributes-by-id.md'
---
# 根据 ID 查询手动分类属性

查询指定手动分类信息。

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

## Endpoint

```http
GET /products/custom_collections/:custom_collection_id.json
```

## Base URL

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

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

## Required Permissions

* `read_products`

## Request

### Path Parameters

* `custom_collection_id`

  string (required)

  手动分类的唯一标识 ID。<br/>
  最大长度限制：64 

### Query Parameters

* `fields`

  string (optional)

  指明需要返回的字段，多个字段用英文逗号分隔。可指定的字段范围参考响应体中 `custom_collection` 对象下的一级子字段。

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

* `custom_collection`

  object

  手动分类信息。

  * `handle`

    string

    分类的语义化的唯一标识，默认基于 `title` 生成。

  * `published_at`

    string

    分类发布到在线商店的时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。

  * `title`

    string

    分类的标题。

  * `id`

    string

    分类的唯一标识 ID。

  * `image`

    object

    分类的图片。

    * `alt`

      string

      分类图的替代文本描述，通常是具有图片特征或内容的单词或短语。

    * `src`

      string

      分类图的链接，以 URL 形式展示。

  * `path`

    string

    分类的相对路径。

  * `published_scope`

    string

    分类的销售渠道发布范围。有效值固定为 `web`，代表在线商城。

  * `sort_order`

    string

    表明分类页商品列表默认排序值的排序方式。
    
    - `alpha-asc`：按产品名称从 A 到 Z 排序
    - `alpha-desc`：按产品名称从 Z 到 A 排序
    - `updated-desc`：按更新时间从新到旧排序
    - `updated-asc`：按更新时间从旧到新排序
    - `manual`：按自定义排序
    - `created-desc`：按创建时间从新到旧排序
    - `created-asc`：按创建时间从旧到新排序
    - `price-asc`：按商品款式最低售价升序排序
    - `price-desc`：按商品款式最低售价降序排序
    - `best-selling-last3days`：按近 3 天销量降序排序
    - `best-selling-last7days`：按近 7 天销量降序排序
    - `best-selling-last15days`：按近 15 天销量降序排序
    - `best-selling-last30days`：按近 30 天销量降序排序
    - `best-selling-last60days`：按近 60 天销量降序排序
    - `best-selling`：按近 90 天销量降序排序
    - `additional-purchase-rate-last3days`：按近 3 天加购率降序排序
    - `additional-purchase-rate-last7days`：按近 7 天加购率降序排序
    - `additional-purchase-rate-last15days`：按近 15 天加购率降序排序
    - `additional-purchase-rate-last30days`：按近 30 天加购率降序排序
    - `additional-purchase-rate-last60days`：按近 60 天加购率降序排序
    - `additional-purchase-rate-last90days`：按近 90 天加购率降序排序
    - `conversion-rate-last3days`：按近 3 天转化率降序排序
    - `conversion-rate-last7days`：按近 7 天转化率降序排序
    - `conversion-rate-last15days`：按近 15 天转化率降序排序
    - `conversion-rate-desc`：按近 30 天转化率降序排序
    - `conversion-rate-last60days`：按近 60 天转化率降序排序
    - `conversion-rate-last90days`：按近 90 天转化率降序排序
    - `additional-purchases-num-last3days`：按近 3 天加购量降序排序
    - `additional-purchases-num-last7days`：按近 7 天加购量降序排序
    - `additional-purchases-num-last15days`：按近 15 天加购量降序排序
    - `additional-purchases-num-last30days`：按近 30 天加购量降序排序
    - `additional-purchases-num-last60days`：按近 60 天加购量降序排序
    - `add-to-cart-desc`：按近 90 天加购量降序排序
    - `views-pv-last3days`：按近 3 天浏览量降序排序
    - `views-pv-last7days`：按近 7 天浏览量降序排序
    - `views-pv-last15days`：按近 15 天浏览量降序排序
    - `views-pv-last30days`：按近 30 天浏览量降序排序
    - `views-pv-last60days`：按近 60 天浏览量降序排序
    - `view-desc`：按近 90 天浏览量降序排序

  * `template_path`

    string

    分类的主题模板。

  * `updated_at`

    string

    分类最近一次更新的时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。

  * `banner`

    object

    分类的封面图。

    * `src`

      string

      图片的链接，以 URL 形式展示。

    * `alt`

      string

      图片的替代文本描述，通常是具有图片特征或内容的单词或短语。

  * `body_html`

    string

    分类的描述。

  * `created_at`

    string

    分类的创建时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。


#### 401

* `errors`

  string

  错误描述。


#### 429

* `errors`

  string

  错误描述。


## OpenAPI Definition

```json
{
  "tags": [
    "根据 ID 查询手动分类属性"
  ],
  "description": "查询指定手动分类信息。",
  "externalDocs": {
    "description": "接口使用的权限点: `read_products` ，更多权限点使用信息，请参考:",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=zh-hans-cn",
    "errorTableDescription": ""
  },
  "operationId": "6nf1FLgi",
  "parameters": [
    {
      "name": "custom_collection_id",
      "in": "path",
      "description": "手动分类的唯一标识 ID。<br/>\n最大长度限制：64 ",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "custom_collection_id",
        "description": "手动分类的唯一标识 ID。<br/>\n最大长度限制：64 ",
        "type": "string",
        "example": "12257170618007271602093384"
      },
      "example": "12257170618007271602093384",
      "examples": {
        "根据 ID 查询手动分类属性": {
          "value": "12259764246208273857373144"
        }
      }
    },
    {
      "name": "fields",
      "in": "query",
      "description": "指明需要返回的字段，多个字段用英文逗号分隔。可指定的字段范围参考响应体中 `custom_collection` 对象下的一级子字段。",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "fields",
        "description": "指明需要返回的字段，多个字段用英文逗号分隔。可指定的字段范围参考响应体中 `custom_collection` 对象下的一级子字段。",
        "type": "string",
        "example": "title,handle"
      },
      "example": "title,handle",
      "examples": {
        "根据 ID 查询手动分类属性": {
          "value": ""
        }
      }
    },
    {
      "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": {
              "custom_collection": {
                "name": "custom_collection",
                "description": "手动分类信息。",
                "type": "object",
                "properties": {
                  "handle": {
                    "name": "handle",
                    "description": "分类的语义化的唯一标识，默认基于 `title` 生成。",
                    "type": "string",
                    "example": "collection-handle"
                  },
                  "published_at": {
                    "name": "published_at",
                    "description": "分类发布到在线商店的时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
                    "type": "string",
                    "example": "2025-03-06T02:20:26+08:00"
                  },
                  "title": {
                    "name": "title",
                    "description": "分类的标题。",
                    "type": "string",
                    "example": "This is a collection title"
                  },
                  "id": {
                    "name": "id",
                    "description": "分类的唯一标识 ID。",
                    "type": "string",
                    "example": "12257170618007271602093384"
                  },
                  "image": {
                    "name": "image",
                    "description": "分类的图片。",
                    "type": "object",
                    "properties": {
                      "alt": {
                        "name": "alt",
                        "description": "分类图的替代文本描述，通常是具有图片特征或内容的单词或短语。",
                        "type": "string",
                        "example": "This is an image alt"
                      },
                      "src": {
                        "name": "src",
                        "description": "分类图的链接，以 URL 形式展示。",
                        "type": "string",
                        "example": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
                      }
                    },
                    "example": {
                      "alt": "This is an image alt",
                      "src": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
                    }
                  },
                  "path": {
                    "name": "path",
                    "description": "分类的相对路径。",
                    "type": "string",
                    "example": "/collections/spring"
                  },
                  "published_scope": {
                    "name": "published_scope",
                    "description": "分类的销售渠道发布范围。有效值固定为 `web`，代表在线商城。",
                    "type": "string"
                  },
                  "sort_order": {
                    "name": "sort_order",
                    "description": "表明分类页商品列表默认排序值的排序方式。\n\n- `alpha-asc`：按产品名称从 A 到 Z 排序\n- `alpha-desc`：按产品名称从 Z 到 A 排序\n- `updated-desc`：按更新时间从新到旧排序\n- `updated-asc`：按更新时间从旧到新排序\n- `manual`：按自定义排序\n- `created-desc`：按创建时间从新到旧排序\n- `created-asc`：按创建时间从旧到新排序\n- `price-asc`：按商品款式最低售价升序排序\n- `price-desc`：按商品款式最低售价降序排序\n- `best-selling-last3days`：按近 3 天销量降序排序\n- `best-selling-last7days`：按近 7 天销量降序排序\n- `best-selling-last15days`：按近 15 天销量降序排序\n- `best-selling-last30days`：按近 30 天销量降序排序\n- `best-selling-last60days`：按近 60 天销量降序排序\n- `best-selling`：按近 90 天销量降序排序\n- `additional-purchase-rate-last3days`：按近 3 天加购率降序排序\n- `additional-purchase-rate-last7days`：按近 7 天加购率降序排序\n- `additional-purchase-rate-last15days`：按近 15 天加购率降序排序\n- `additional-purchase-rate-last30days`：按近 30 天加购率降序排序\n- `additional-purchase-rate-last60days`：按近 60 天加购率降序排序\n- `additional-purchase-rate-last90days`：按近 90 天加购率降序排序\n- `conversion-rate-last3days`：按近 3 天转化率降序排序\n- `conversion-rate-last7days`：按近 7 天转化率降序排序\n- `conversion-rate-last15days`：按近 15 天转化率降序排序\n- `conversion-rate-desc`：按近 30 天转化率降序排序\n- `conversion-rate-last60days`：按近 60 天转化率降序排序\n- `conversion-rate-last90days`：按近 90 天转化率降序排序\n- `additional-purchases-num-last3days`：按近 3 天加购量降序排序\n- `additional-purchases-num-last7days`：按近 7 天加购量降序排序\n- `additional-purchases-num-last15days`：按近 15 天加购量降序排序\n- `additional-purchases-num-last30days`：按近 30 天加购量降序排序\n- `additional-purchases-num-last60days`：按近 60 天加购量降序排序\n- `add-to-cart-desc`：按近 90 天加购量降序排序\n- `views-pv-last3days`：按近 3 天浏览量降序排序\n- `views-pv-last7days`：按近 7 天浏览量降序排序\n- `views-pv-last15days`：按近 15 天浏览量降序排序\n- `views-pv-last30days`：按近 30 天浏览量降序排序\n- `views-pv-last60days`：按近 60 天浏览量降序排序\n- `view-desc`：按近 90 天浏览量降序排序",
                    "type": "string"
                  },
                  "template_path": {
                    "name": "template_path",
                    "description": "分类的主题模板。",
                    "type": "string",
                    "example": "templates/collection.collection_template_name.json"
                  },
                  "updated_at": {
                    "name": "updated_at",
                    "description": "分类最近一次更新的时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
                    "type": "string",
                    "example": "2025-03-06T02:20:26+08:00"
                  },
                  "banner": {
                    "name": "banner",
                    "description": "分类的封面图。",
                    "type": "object",
                    "properties": {
                      "src": {
                        "name": "src",
                        "description": "图片的链接，以 URL 形式展示。",
                        "type": "string",
                        "example": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
                      },
                      "alt": {
                        "name": "alt",
                        "description": "图片的替代文本描述，通常是具有图片特征或内容的单词或短语。",
                        "type": "string",
                        "example": "This is an image alt"
                      }
                    },
                    "example": {
                      "alt": "This is an image alt",
                      "src": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
                    }
                  },
                  "body_html": {
                    "name": "body_html",
                    "description": "分类的描述。",
                    "type": "string",
                    "example": "This is a description"
                  },
                  "created_at": {
                    "name": "created_at",
                    "description": "分类的创建时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
                    "type": "string",
                    "example": "2025-03-06T02:20:26+08:00"
                  }
                },
                "example": {
                  "title": "This is a collection title",
                  "created_at": "2025-03-06T02:20:26+08:00",
                  "handle": "collection-handle",
                  "published_at": "2025-03-06T02:20:26+08:00",
                  "template_path": "templates/collection.collection_template_name.json",
                  "updated_at": "2025-03-06T02:20:26+08:00",
                  "banner": {
                    "alt": "This is an image alt",
                    "src": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
                  },
                  "body_html": "This is a description",
                  "id": "12257170618007271602093384",
                  "image": {
                    "src": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png",
                    "alt": "This is an image alt"
                  },
                  "path": "/collections/spring",
                  "published_scope": null,
                  "sort_order": null
                }
              }
            },
            "example": {
              "custom_collection": {
                "title": "This is a collection title",
                "banner": {
                  "alt": "This is an image alt",
                  "src": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
                },
                "created_at": "2025-03-06T02:20:26+08:00",
                "image": {
                  "alt": "This is an image alt",
                  "src": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
                },
                "published_scope": null,
                "updated_at": "2025-03-06T02:20:26+08:00",
                "body_html": "This is a description",
                "handle": "collection-handle",
                "id": "12257170618007271602093384",
                "path": "/collections/spring",
                "published_at": "2025-03-06T02:20:26+08:00",
                "sort_order": null,
                "template_path": "templates/collection.collection_template_name.json"
              }
            }
          },
          "examples": {
            "根据 ID 查询手动分类属性": {
              "description": "根据 ID 查询手动分类属性。",
              "value": {
                "custom_collection": {
                  "updated_at": "2023-08-28T19:34:00+08:00",
                  "body_html": "<p>This is a desription</p>",
                  "handle": "first",
                  "id": "12259764246208273857373144",
                  "image": {
                    "alt": "This is an alt",
                    "src": "https://img-va.myshopline.com/image/store/2001026666/1653474941510/e46e6189dd5641a3b179444cacdcdd2a.png?w=1024&h=1024"
                  },
                  "published_at": "2023-06-12T14:19:35+08:00",
                  "sort_order": "manual",
                  "template_path": "templates/collection.html",
                  "title": "First Custom Collection",
                  "banner": {
                    "alt": "This is an alt",
                    "src": "https://img-va.myshopline.com/image/store/2001026666/1653474941510/e46e6189dd5641a3b179444cacdcdd2a.png?w=1024&h=1024"
                  },
                  "created_at": "2023-06-12T14:19:35+08:00",
                  "published_scope": "web"
                }
              }
            }
          }
        }
      }
    },
    "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": "/products/custom_collections/:custom_collection_id.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。"
        }
      }
    }
  ],
  "info": {
    "title": "根据 ID 查询手动分类属性",
    "version": "v20270301"
  },
  "authIndexes": [
    "read_products"
  ]
}
```