# 专辑

> 专辑相关的 Ajax API 接口：分页获取专辑下的商品、按条件筛选专辑商品，以及获取专辑可用的筛选项。

Collection API 可用于获取指定 collection id 的 collection 商品或 filters。

所有 Ajax API 请求应使用[多语言 URL](/zh-CN/docs/theme/references/ajax-api/#locale-aware-urls)，以便为访客提供一致的体验。

## 获取专辑商品列表

```text
GET /{locale}/api/collections/{collection_id}/products
```

分页获取专辑下的商品。

### 请求示例

**请求示例**

```javascript
fetch(window.SHOPLAZZA.routes.root + '/api/collections/8bc2047d-bf57-4c91-b207-e3480f79800d/products?page=0&limit=5')
  .then((response) => response.json())
  .then((data) => {
    // do something...
  });
```

### 请求参数

- `collection_id` string

  专辑的 id。
- `page` number

  返回第几页商品。
- `limit` number

  每页返回的商品数。

### 响应

**数据结构 | 示例**

- `data` object

  响应数据主体。

  - `products` object[]

    商品列表。

    *   Array [

    - `id` string

      商品 ID。
    - `title` string

      商品名称。
    - `brief` string

      商品的简要描述。
    - `vendor` string

      商品的供应商。
    - `vendor_url` string

      商品供应商的链接。
    - `has_only_default_variant` boolean

      商品是否只有默认款式。
    - `requires_shipping` boolean

      是否需要物流配送。
    - `taxable` boolean

      是否需要计税。
    - `inventory_policy` string

      商品缺货时是否继续销售。
    - `inventory_quantity` number

      库存数量。
    - `inventory_tracking` boolean

      是否启用库存追踪。
    - `published` boolean

      资源是否已发布。
    - `handle` string

      用于资源链接的 handle（URL 友好别名）。
    - `spu` string

      商品的 SPU（标准产品单元）。
    - `note` string

      对象上的备注。
    - `need_variant_image` boolean

      款式是否必须单独配图。
    - `fake_sales` number

      商品的虚拟销量。
    - `display_fake_sales` boolean

      是否在前台展示虚拟销量。
    - `independent_seo` boolean

      是否独立管理 SEO 设置。
    - `created_at` string

      创建时间（ISO-8601 格式）。
    - `updated_at` string

      最后更新时间（ISO-8601 格式）。
    - `tags` string

      对象上的标签。
    - `available` boolean

      是否可购买。
    - `price_min` string

      款式中的最低价格，以店铺主货币单位表示。
    - `price_max` string

      款式中的最高价格，以店铺主货币单位表示。
    - `price` string

      商品价格，以店铺主货币单位表示。
    - `compare_at_price` string

      划线价。
    - `compare_at_price_min` string

      款式中的最低划线价。
    - `compare_at_price_max` string

      款式中的最高划线价。
    - `url` string

      商品页的相对地址。
    - `published_at` string

      发布时间（ISO-8601 格式）。
    - `sales` number

      销量。
    - `image` object

      商品的第一张图片。

      - `src` string

        图片的地址。
      - `width` number

        图片宽度（像素）。
      - `height` number

        图片高度（像素）。
      - `alt` string

        图片的替代文本。
      - `path` string

        图片文件在图床上的路径。
      - `aspect_ratio` number

        图片宽度除以高度得到的宽高比。
    - `meta_title` string

      页面元信息中的 SEO 标题。
    - `meta_description` string

      页面元信息中的 SEO 描述。
    - `meta_keyword` string

      页面元信息中的 SEO 关键词。
    - `options` object[]

      商品的属性，例如颜色、尺码。

      *   Array [

      - `id` string

        商品属性的 ID。
      - `name` string

        商品属性名称，例如 `Color`。
      - `position` number

        属性的排序位置。
      - `values` string[]

        商品属性的可选值列表。
      *   ]
    - `variants` object[]

      商品的款式列表。

      *   Array [

      - `id` string

        款式 ID。
      - `title` string

        款式标题，由各属性取值用 `-` 连接而成。
      - `weight_unit` string

        重量单位，例如 `kg`。
      - `inventory_quantity` number

        库存数量。
      - `sku` string

        款式的 SKU，用于库存管理。
      - `barcode` string

        款式的条形码。
      - `position` number

        在列表中的排序位置。
      - `option1` string

        该款式在第一个商品属性上的取值。
      - `option2` string

        该款式在第二个商品属性上的取值。
      - `option3` string

        该款式在第三个商品属性上的取值。
      - `note` string

        对象上的备注。
      - `image` object

        款式关联的图片。

        - `src` string

          图片的地址。
        - `width` number

          图片宽度（像素）。
        - `height` number

          图片高度（像素）。
        - `alt` string

          图片的替代文本。
        - `path` string

          图片文件在图床上的路径。
        - `aspect_ratio` number

          图片宽度除以高度得到的宽高比。
      - `weight` string

        款式的重量。
      - `compare_at_price` string

        划线价。
      - `price` string

        款式价格，以店铺主货币单位表示。
      - `available` boolean

        是否可购买。
      - `available_quantity` number

        仍可购买的数量。
      - `options` object[]

        该款式在各商品属性上的取值。

        *   Array [

        - `name` string

          商品属性名称，例如 `Color`。
        - `value` string

          该商品属性被选中的取值。
        *   ]
      - `url` string

        选中该款式的商品页相对地址。
      - `off_ratio` number

        当前适用的折扣比率。
      - `flashsale_info` undefined[]

        商品的闪购活动信息。
      - `sales` number

        销量。
      - `wholesale_price` object[]

        批发价梯度列表。

        *   Array [

        - `price` string

          该批发价梯度的单价。
        - `min_quantity` number

          该批发价梯度要求的最小数量。
        *   ]
      - `retail_price` string

        以店铺主货币单位表示的零售价。
      *   ]
    - `variants_count` number
    - `images` object[]

      商品图片列表。

      *   Array [

      - `src` string

        图片的地址。
      - `width` number

        图片宽度（像素）。
      - `height` number

        图片高度（像素）。
      - `alt` string

        图片的替代文本。
      - `path` string

        图片文件在图床上的路径。
      - `aspect_ratio` number

        图片宽度除以高度得到的宽高比。
      *   ]
    - `flashsale_info` undefined[]

      商品的闪购活动信息。
    - `off_ratio` number

      当前适用的折扣比率。
    - `price_varies` boolean

      商品的各款式价格是否不同。
    - `ifb` string
    - `cfb` string
    - `ssp` string
    - `scm` string
    - `mixed_wholesale` boolean

      是否支持混批。
    - `retail_price` string

      以店铺主货币单位表示的零售价。
    - `retail_price_min` string

      款式中的最低零售价。
    - `retail_price_max` string

      款式中的最高零售价。
    - `min_price_variant` object

      价格最低的款式。

      - `id` string

        款式 ID。
      - `title` string

        款式标题，由各属性取值用 `-` 连接而成。
      - `weight_unit` string

        重量单位，例如 `kg`。
      - `inventory_quantity` number

        库存数量。
      - `sku` string

        款式的 SKU，用于库存管理。
      - `barcode` string

        款式的条形码。
      - `position` number

        在列表中的排序位置。
      - `option1` string

        该款式在第一个商品属性上的取值。
      - `option2` string

        该款式在第二个商品属性上的取值。
      - `option3` string

        该款式在第三个商品属性上的取值。
      - `note` string

        对象上的备注。
      - `image` string

        款式关联的图片。
      - `weight` string

        款式的重量。
      - `compare_at_price` string

        划线价。
      - `price` string

        款式价格，以店铺主货币单位表示。
      - `available` boolean

        是否可购买。
      - `available_quantity` number

        仍可购买的数量。
      - `options` object[]

        该款式在各商品属性上的取值。

        *   Array [

        - `name` string

          商品属性名称，例如 `Color`。
        - `value` string

          该商品属性被选中的取值。
        *   ]
      - `url` string

        选中该款式的商品页相对地址。
      - `off_ratio` number

        当前适用的折扣比率。
      - `flashsale_info` undefined[]

        商品的闪购活动信息。
      - `sales` number

        销量。
      - `wholesale_price` object[]

        批发价梯度列表。

        *   Array [

        - `price` string

          该批发价梯度的单价。
        - `min_quantity` number

          该批发价梯度要求的最小数量。
        *   ]
      - `retail_price` string

        以店铺主货币单位表示的零售价。
    - `product_type` string

      商品类型。
    - `description` string

      商品描述。
    - `comment_avg_star` number

      商品评价的平均星级。
    - `comment_count` number

      商品的顾客评价数量。
    *   ]
  - `has_more` number

    是否还有更多记录。
  - `page` number

    当前页码。
  - `limit` number

    每页最多返回的记录数。
  - `products_count` number

    匹配到的商品总数。
  - `count` number

    返回的商品数量。
  - `comment_enabled` boolean

    是否开启了顾客评价。
- `msg` string

  响应返回的结果说明。
- `state` number

  请求结果标识，`success` 或 `0` 表示请求成功。

```json
{
  "data": {
    "products": [
      {
        "id": "b3b656ae-504f-4f01-a054-879a610925e3",
        "title": "Sample product",
        "brief": "Sample product",
        "vendor": "",
        "vendor_url": "",
        "has_only_default_variant": false,
        "requires_shipping": true,
        "taxable": false,
        "inventory_policy": "deny",
        "inventory_quantity": 217,
        "inventory_tracking": true,
        "published": true,
        "handle": "Sample product",
        "spu": "1111",
        "note": "",
        "need_variant_image": false,
        "fake_sales": 0,
        "display_fake_sales": false,
        "independent_seo": false,
        "created_at": "2026-06-08T08:12:08Z",
        "updated_at": "2026-08-10T06:53:57Z",
        "tags": "",
        "available": true,
        "price_min": "10",
        "price_max": "90",
        "price": "10",
        "compare_at_price": "20.00",
        "compare_at_price_min": "0.00",
        "compare_at_price_max": "20.00",
        "url": "/products/Sample product",
        "published_at": "2026-07-30T02:28:23Z",
        "sales": 0,
        "image": {
          "src": "//img.staticdj.com/50fa9b8c054f4d11b0d765de5f35dd4e.png",
          "width": 1254,
          "height": 1254,
          "alt": "",
          "path": "50fa9b8c054f4d11b0d765de5f35dd4e.png",
          "aspect_ratio": 1
        },
        "meta_title": "",
        "meta_description": "",
        "meta_keyword": "",
        "options": [
          {
            "id": "5d6c5366-5c4b-4d3b-8ecd-a83d6d5b1abf",
            "name": "Color",
            "position": 1,
            "values": [
              "Black",
              "Red",
              "White"
            ]
          },
          {
            "id": "af2cadff-8ef3-4b10-a9ec-fd92a30cb18c",
            "name": "Size",
            "position": 2,
            "values": [
              "S",
              "M",
              "L"
            ]
          }
        ],
        "variants": [
          {
            "id": "0699bc80-19ae-41bb-87c4-dbcbe5ed90a0",
            "title": "Black-S",
            "weight_unit": "kg",
            "inventory_quantity": 48,
            "sku": "1111-BLACK-S-A001001",
            "barcode": "",
            "position": 1,
            "option1": "Black",
            "option2": "S",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "20",
            "price": "10",
            "available": true,
            "available_quantity": 48,
            "options": [
              {
                "name": "Color",
                "value": "Black"
              },
              {
                "name": "Size",
                "value": "S"
              }
            ],
            "url": "/products/Sample product?variant=0699bc80-19ae-41bb-87c4-dbcbe5ed90a0",
            "off_ratio": 50,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "10",
                "min_quantity": 1
              }
            ],
            "retail_price": "20"
          },
          {
            "id": "e48af6fb-dbec-4efa-9db2-94ad8f8853e4",
            "title": "Black-M",
            "weight_unit": "kg",
            "inventory_quantity": 7,
            "sku": "1111-Black-M-A001002",
            "barcode": "",
            "position": 2,
            "option1": "Black",
            "option2": "M",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "0",
            "price": "20",
            "available": true,
            "available_quantity": 7,
            "options": [
              {
                "name": "Color",
                "value": "Black"
              },
              {
                "name": "Size",
                "value": "M"
              }
            ],
            "url": "/products/Sample product?variant=e48af6fb-dbec-4efa-9db2-94ad8f8853e4",
            "off_ratio": 0,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "20",
                "min_quantity": 1
              }
            ],
            "retail_price": "0"
          },
          {
            "id": "f9a60813-bbec-49db-88d0-3d851a42d696",
            "title": "White-L",
            "weight_unit": "kg",
            "inventory_quantity": 44,
            "sku": "1111-White-L-A001009",
            "barcode": "",
            "position": 9,
            "option1": "White",
            "option2": "L",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "0",
            "price": "90",
            "available": true,
            "available_quantity": 44,
            "options": [
              {
                "name": "Color",
                "value": "White"
              },
              {
                "name": "Size",
                "value": "L"
              }
            ],
            "url": "/products/Sample product?variant=f9a60813-bbec-49db-88d0-3d851a42d696",
            "off_ratio": 0,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "90",
                "min_quantity": 1
              }
            ],
            "retail_price": "0"
          }
        ],
        "variants_count": 9,
        "images": [
          {
            "src": "//img.staticdj.com/50fa9b8c054f4d11b0d765de5f35dd4e.png",
            "width": 1254,
            "height": 1254,
            "alt": "",
            "path": "50fa9b8c054f4d11b0d765de5f35dd4e.png",
            "aspect_ratio": 1
          }
        ],
        "flashsale_info": [],
        "off_ratio": 50,
        "price_varies": true,
        "ifb": "",
        "cfb": "",
        "ssp": "",
        "scm": "",
        "mixed_wholesale": false,
        "retail_price": "20.00",
        "retail_price_min": "0.00",
        "retail_price_max": "20.00",
        "min_price_variant": {
          "id": "0699bc80-19ae-41bb-87c4-dbcbe5ed90a0",
          "title": "Black-S",
          "weight_unit": "kg",
          "inventory_quantity": 48,
          "sku": "1111-BLACK-S-A001001",
          "barcode": "",
          "position": 1,
          "option1": "Black",
          "option2": "S",
          "option3": "",
          "note": "",
          "image": null,
          "weight": "0",
          "compare_at_price": "20",
          "price": "10",
          "available": true,
          "available_quantity": 48,
          "options": [
            {
              "name": "Color",
              "value": "Black"
            },
            {
              "name": "Size",
              "value": "S"
            }
          ],
          "url": "/products/Sample product?variant=0699bc80-19ae-41bb-87c4-dbcbe5ed90a0",
          "off_ratio": 50,
          "flashsale_info": [],
          "sales": 0,
          "wholesale_price": [
            {
              "price": "10",
              "min_quantity": 1
            }
          ],
          "retail_price": "20"
        },
        "product_type": "",
        "description": "",
        "comment_avg_star": 0,
        "comment_count": 0
      },
      {
        "id": "79f46343-605c-4100-a9d5-d8a11dae3fef",
        "title": "Cozy Knit Tee",
        "brief": "",
        "vendor": "",
        "vendor_url": "",
        "has_only_default_variant": true,
        "requires_shipping": true,
        "taxable": false,
        "inventory_policy": "deny",
        "inventory_quantity": 109,
        "inventory_tracking": true,
        "published": true,
        "handle": "cozy-knit-tee",
        "spu": "",
        "note": "",
        "need_variant_image": false,
        "fake_sales": 0,
        "display_fake_sales": false,
        "independent_seo": false,
        "created_at": "2026-06-24T06:17:25Z",
        "updated_at": "2026-08-04T06:58:45Z",
        "tags": "",
        "available": true,
        "price_min": "105",
        "price_max": "105",
        "price": "105",
        "compare_at_price": "0.00",
        "compare_at_price_min": "0.00",
        "compare_at_price_max": "0.00",
        "url": "/products/cozy-knit-tee",
        "published_at": "2026-07-30T02:17:25Z",
        "sales": 0,
        "image": {
          "src": "//img.staticdj.com/66dde64782015ee2e4f31a1e08781d92.svg",
          "width": 1,
          "height": 1,
          "alt": "",
          "path": "66dde64782015ee2e4f31a1e08781d92.svg",
          "aspect_ratio": 1
        },
        "meta_title": "",
        "meta_description": "",
        "meta_keyword": "",
        "options": [],
        "variants": [
          {
            "id": "e660a2bc-c8ec-44ef-a3ab-028d317eedd9",
            "title": "",
            "weight_unit": "kg",
            "inventory_quantity": 109,
            "sku": "",
            "barcode": "",
            "position": 1,
            "option1": "",
            "option2": "",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "0",
            "price": "105",
            "available": true,
            "available_quantity": 109,
            "options": [],
            "url": "/products/cozy-knit-tee?variant=e660a2bc-c8ec-44ef-a3ab-028d317eedd9",
            "off_ratio": 0,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "105",
                "min_quantity": 1
              }
            ],
            "retail_price": "0"
          }
        ],
        "variants_count": 1,
        "images": [
          {
            "src": "//img.staticdj.com/66dde64782015ee2e4f31a1e08781d92.svg",
            "width": 1,
            "height": 1,
            "alt": "",
            "path": "66dde64782015ee2e4f31a1e08781d92.svg",
            "aspect_ratio": 1
          }
        ],
        "flashsale_info": [],
        "off_ratio": 0,
        "price_varies": false,
        "ifb": "",
        "cfb": "",
        "ssp": "",
        "scm": "",
        "mixed_wholesale": false,
        "retail_price": "0.00",
        "retail_price_min": "0.00",
        "retail_price_max": "0.00",
        "min_price_variant": {
          "id": "e660a2bc-c8ec-44ef-a3ab-028d317eedd9",
          "title": "",
          "weight_unit": "kg",
          "inventory_quantity": 109,
          "sku": "",
          "barcode": "",
          "position": 1,
          "option1": "",
          "option2": "",
          "option3": "",
          "note": "",
          "image": null,
          "weight": "0",
          "compare_at_price": "0",
          "price": "105",
          "available": true,
          "available_quantity": 109,
          "options": [],
          "url": "/products/cozy-knit-tee?variant=e660a2bc-c8ec-44ef-a3ab-028d317eedd9",
          "off_ratio": 0,
          "flashsale_info": [],
          "sales": 0,
          "wholesale_price": [
            {
              "price": "105",
              "min_quantity": 1
            }
          ],
          "retail_price": "0"
        },
        "product_type": "",
        "description": "",
        "comment_avg_star": 0,
        "comment_count": 0
      },
      {
        "id": "14a309ec-b966-4cf9-a9bb-33baa821fdbc",
        "title": "sample-product",
        "brief": "",
        "vendor": "",
        "vendor_url": "",
        "has_only_default_variant": false,
        "requires_shipping": true,
        "taxable": false,
        "inventory_policy": "",
        "inventory_quantity": 0,
        "inventory_tracking": false,
        "published": true,
        "handle": "sample-product",
        "spu": "",
        "note": "",
        "need_variant_image": false,
        "fake_sales": 0,
        "display_fake_sales": false,
        "independent_seo": false,
        "created_at": "2026-08-10T07:28:24Z",
        "updated_at": "2026-08-25T07:04:00Z",
        "tags": "",
        "available": true,
        "price_min": "1",
        "price_max": "1",
        "price": "1",
        "compare_at_price": "1.00",
        "compare_at_price_min": "1.00",
        "compare_at_price_max": "1.00",
        "url": "/products/sample-product",
        "published_at": "2026-08-10T07:28:24Z",
        "sales": 0,
        "image": {
          "src": "//img.staticdj.com/free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
          "width": 3000,
          "height": 1500,
          "alt": "",
          "path": "free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
          "aspect_ratio": 2
        },
        "meta_title": "",
        "meta_description": "",
        "meta_keyword": "",
        "options": [
          {
            "id": "32da111a-8237-48a7-9779-6bfa6b77f1e7",
            "name": "Size",
            "position": 1,
            "values": [
              "01",
              "02",
              "16"
            ]
          }
        ],
        "variants": [
          {
            "id": "fff360dd-6457-466a-98b3-16878bacef5b",
            "title": "01",
            "weight_unit": "kg",
            "inventory_quantity": 0,
            "sku": "",
            "barcode": "",
            "position": 1,
            "option1": "01",
            "option2": "",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "1",
            "price": "1",
            "available": true,
            "available_quantity": 999999999,
            "options": [
              {
                "name": "Size",
                "value": "01"
              }
            ],
            "url": "/products/sample-product?variant=fff360dd-6457-466a-98b3-16878bacef5b",
            "off_ratio": 0,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "1",
                "min_quantity": 1
              }
            ],
            "retail_price": "1"
          },
          {
            "id": "9063e68e-0f3a-4453-82cd-115727cce51e",
            "title": "02",
            "weight_unit": "kg",
            "inventory_quantity": 0,
            "sku": "",
            "barcode": "",
            "position": 2,
            "option1": "02",
            "option2": "",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "1",
            "price": "1",
            "available": true,
            "available_quantity": 999999999,
            "options": [
              {
                "name": "Size",
                "value": "02"
              }
            ],
            "url": "/products/sample-product?variant=9063e68e-0f3a-4453-82cd-115727cce51e",
            "off_ratio": 0,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "1",
                "min_quantity": 1
              }
            ],
            "retail_price": "1"
          },
          {
            "id": "7d4f540d-31b5-4a59-a406-eb3a981cdee5",
            "title": "16",
            "weight_unit": "kg",
            "inventory_quantity": 0,
            "sku": "",
            "barcode": "",
            "position": 16,
            "option1": "16",
            "option2": "",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "1",
            "price": "1",
            "available": true,
            "available_quantity": 999999999,
            "options": [
              {
                "name": "Size",
                "value": "16"
              }
            ],
            "url": "/products/sample-product?variant=7d4f540d-31b5-4a59-a406-eb3a981cdee5",
            "off_ratio": 0,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "1",
                "min_quantity": 1
              }
            ],
            "retail_price": "1"
          }
        ],
        "variants_count": 16,
        "images": [
          {
            "src": "//img.staticdj.com/free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
            "width": 3000,
            "height": 1500,
            "alt": "",
            "path": "free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
            "aspect_ratio": 2
          },
          {
            "src": "//img.staticdj.com/free/b7addf0790dc3eee7b65c693ba2140df.jpg",
            "width": 2616,
            "height": 1743,
            "alt": "",
            "path": "free/b7addf0790dc3eee7b65c693ba2140df.jpg",
            "aspect_ratio": 1.5008605851979346
          }
        ],
        "flashsale_info": [],
        "off_ratio": 0,
        "price_varies": false,
        "ifb": "",
        "cfb": "",
        "ssp": "",
        "scm": "",
        "mixed_wholesale": false,
        "retail_price": "1.00",
        "retail_price_min": "1.00",
        "retail_price_max": "1.00",
        "min_price_variant": {
          "id": "fff360dd-6457-466a-98b3-16878bacef5b",
          "title": "01",
          "weight_unit": "kg",
          "inventory_quantity": 0,
          "sku": "",
          "barcode": "",
          "position": 1,
          "option1": "01",
          "option2": "",
          "option3": "",
          "note": "",
          "image": null,
          "weight": "0",
          "compare_at_price": "1",
          "price": "1",
          "available": true,
          "available_quantity": 999999999,
          "options": [
            {
              "name": "Size",
              "value": "01"
            }
          ],
          "url": "/products/sample-product?variant=fff360dd-6457-466a-98b3-16878bacef5b",
          "off_ratio": 0,
          "flashsale_info": [],
          "sales": 0,
          "wholesale_price": [
            {
              "price": "1",
              "min_quantity": 1
            }
          ],
          "retail_price": "1"
        },
        "product_type": "",
        "description": "",
        "comment_avg_star": 0,
        "comment_count": 0
      }
    ],
    "has_more": 0,
    "page": 1,
    "limit": 5,
    "products_count": 3,
    "count": 3,
    "comment_enabled": false
  },
  "msg": "请求成功",
  "state": 0
}
```

## 筛选专辑商品

```text
GET /{locale}/api/collections/{collection_id}/cps
```

以下示例请求特定 collection 的商品：

```curl
GET /{locale}/api/collections/{collection_id}/cps?page=0&limit=8
```

### 请求示例

**Example request using Fetch**

```javascript
fetch(window.SHOPLAZZA.routes.root + '/api/collections/8bc2047d-bf57-4c91-b207-e3480f79800d/cps?page=0&limit=8')
  .then((response) => response.json())
  .then((data) => {
    // do something...
  });
```

### 请求参数

- `page` number

  结果的基于 0 的页码。
- `limit` number

  限制结果数量。
- `[filter.filter_scope.attribute]` string

  请参阅[店面筛选](/docs/theme/theme-features/site-navigation-and-search/filtering/storefront-filtering#url-%E5%8F%82%E6%95%B0%E7%BB%93%E6%9E%84)。也接受 `[filter.filter_scope.attribute.attribute_scope]` 写法。

### 响应

**数据结构 | 示例**

- `data` object

  响应数据主体。

  - `products` object[]

    商品列表。

    *   Array [

    - `id` string

      商品 ID。
    - `title` string

      商品名称。
    - `brief` string

      商品的简要描述。
    - `vendor` string

      商品的供应商。
    - `vendor_url` string

      商品供应商的链接。
    - `has_only_default_variant` boolean

      商品是否只有默认款式。
    - `requires_shipping` boolean

      是否需要物流配送。
    - `taxable` boolean

      是否需要计税。
    - `inventory_policy` string

      商品缺货时是否继续销售。
    - `inventory_quantity` number

      库存数量。
    - `inventory_tracking` boolean

      是否启用库存追踪。
    - `published` boolean

      资源是否已发布。
    - `handle` string

      用于资源链接的 handle（URL 友好别名）。
    - `spu` string

      商品的 SPU（标准产品单元）。
    - `note` string

      对象上的备注。
    - `need_variant_image` boolean

      款式是否必须单独配图。
    - `fake_sales` number

      商品的虚拟销量。
    - `display_fake_sales` boolean

      是否在前台展示虚拟销量。
    - `independent_seo` boolean

      是否独立管理 SEO 设置。
    - `created_at` string

      创建时间（ISO-8601 格式）。
    - `updated_at` string

      最后更新时间（ISO-8601 格式）。
    - `tags` string

      对象上的标签。
    - `available` boolean

      是否可购买。
    - `price_min` string

      款式中的最低价格，以店铺主货币单位表示。
    - `price_max` string

      款式中的最高价格，以店铺主货币单位表示。
    - `price` string

      商品价格，以店铺主货币单位表示。
    - `compare_at_price` string

      划线价。
    - `compare_at_price_min` string

      款式中的最低划线价。
    - `compare_at_price_max` string

      款式中的最高划线价。
    - `url` string

      商品页的相对地址。
    - `published_at` string

      发布时间（ISO-8601 格式）。
    - `sales` number

      销量。
    - `image` object

      商品的第一张图片。

      - `src` string

        图片的地址。
      - `width` number

        图片宽度（像素）。
      - `height` number

        图片高度（像素）。
      - `alt` string

        图片的替代文本。
      - `path` string

        图片文件在图床上的路径。
      - `aspect_ratio` number

        图片宽度除以高度得到的宽高比。
    - `meta_title` string

      页面元信息中的 SEO 标题。
    - `meta_description` string

      页面元信息中的 SEO 描述。
    - `meta_keyword` string

      页面元信息中的 SEO 关键词。
    - `options` object[]

      商品的属性，例如颜色、尺码。

      *   Array [

      - `id` string

        商品属性的 ID。
      - `name` string

        商品属性名称，例如 `Color`。
      - `position` number

        属性的排序位置。
      - `values` string[]

        商品属性的可选值列表。
      *   ]
    - `variants` object[]

      商品的款式列表。

      *   Array [

      - `id` string

        款式 ID。
      - `title` string

        款式标题，由各属性取值用 `-` 连接而成。
      - `weight_unit` string

        重量单位，例如 `kg`。
      - `inventory_quantity` number

        库存数量。
      - `sku` string

        款式的 SKU，用于库存管理。
      - `barcode` string

        款式的条形码。
      - `position` number

        在列表中的排序位置。
      - `option1` string

        该款式在第一个商品属性上的取值。
      - `option2` string

        该款式在第二个商品属性上的取值。
      - `option3` string

        该款式在第三个商品属性上的取值。
      - `note` string

        对象上的备注。
      - `image` object

        款式关联的图片。

        - `src` string

          图片的地址。
        - `width` number

          图片宽度（像素）。
        - `height` number

          图片高度（像素）。
        - `alt` string

          图片的替代文本。
        - `path` string

          图片文件在图床上的路径。
        - `aspect_ratio` number

          图片宽度除以高度得到的宽高比。
      - `weight` string

        款式的重量。
      - `compare_at_price` string

        划线价。
      - `price` string

        款式价格，以店铺主货币单位表示。
      - `available` boolean

        是否可购买。
      - `available_quantity` number

        仍可购买的数量。
      - `options` object[]

        该款式在各商品属性上的取值。

        *   Array [

        - `name` string

          商品属性名称，例如 `Color`。
        - `value` string

          该商品属性被选中的取值。
        *   ]
      - `url` string

        选中该款式的商品页相对地址。
      - `off_ratio` number

        当前适用的折扣比率。
      - `flashsale_info` undefined[]

        商品的闪购活动信息。
      - `sales` number

        销量。
      - `wholesale_price` object[]

        批发价梯度列表。

        *   Array [

        - `price` string

          该批发价梯度的单价。
        - `min_quantity` number

          该批发价梯度要求的最小数量。
        *   ]
      - `retail_price` string

        以店铺主货币单位表示的零售价。
      *   ]
    - `variants_count` number
    - `images` object[]

      商品图片列表。

      *   Array [

      - `src` string

        图片的地址。
      - `width` number

        图片宽度（像素）。
      - `height` number

        图片高度（像素）。
      - `alt` string

        图片的替代文本。
      - `path` string

        图片文件在图床上的路径。
      - `aspect_ratio` number

        图片宽度除以高度得到的宽高比。
      *   ]
    - `flashsale_info` undefined[]

      商品的闪购活动信息。
    - `off_ratio` number

      当前适用的折扣比率。
    - `price_varies` boolean

      商品的各款式价格是否不同。
    - `ifb` string
    - `cfb` string
    - `ssp` string
    - `scm` string
    - `mixed_wholesale` boolean

      是否支持混批。
    - `retail_price` string

      以店铺主货币单位表示的零售价。
    - `retail_price_min` string

      款式中的最低零售价。
    - `retail_price_max` string

      款式中的最高零售价。
    - `min_price_variant` object

      价格最低的款式。

      - `id` string

        款式 ID。
      - `title` string

        款式标题，由各属性取值用 `-` 连接而成。
      - `weight_unit` string

        重量单位，例如 `kg`。
      - `inventory_quantity` number

        库存数量。
      - `sku` string

        款式的 SKU，用于库存管理。
      - `barcode` string

        款式的条形码。
      - `position` number

        在列表中的排序位置。
      - `option1` string

        该款式在第一个商品属性上的取值。
      - `option2` string

        该款式在第二个商品属性上的取值。
      - `option3` string

        该款式在第三个商品属性上的取值。
      - `note` string

        对象上的备注。
      - `image` string

        款式关联的图片。
      - `weight` string

        款式的重量。
      - `compare_at_price` string

        划线价。
      - `price` string

        款式价格，以店铺主货币单位表示。
      - `available` boolean

        是否可购买。
      - `available_quantity` number

        仍可购买的数量。
      - `options` object[]

        该款式在各商品属性上的取值。

        *   Array [

        - `name` string

          商品属性名称，例如 `Color`。
        - `value` string

          该商品属性被选中的取值。
        *   ]
      - `url` string

        选中该款式的商品页相对地址。
      - `off_ratio` number

        当前适用的折扣比率。
      - `flashsale_info` undefined[]

        商品的闪购活动信息。
      - `sales` number

        销量。
      - `wholesale_price` object[]

        批发价梯度列表。

        *   Array [

        - `price` string

          该批发价梯度的单价。
        - `min_quantity` number

          该批发价梯度要求的最小数量。
        *   ]
      - `retail_price` string

        以店铺主货币单位表示的零售价。
    - `product_type` string

      商品类型。
    - `description` string

      商品描述。
    - `comment_avg_star` number

      商品评价的平均星级。
    - `comment_count` number

      商品的顾客评价数量。
    *   ]
  - `has_more` number

    是否还有更多记录。
  - `page` number

    当前页码。
  - `limit` number

    每页最多返回的记录数。
  - `products_count` number

    匹配到的商品总数。
  - `count` number

    返回的商品数量。
  - `comment_enabled` boolean

    是否开启了顾客评价。
- `msg` string

  响应返回的结果说明。
- `state` number

  请求结果标识，`success` 或 `0` 表示请求成功。

```json
{
  "data": {
    "products": [
      {
        "id": "b3b656ae-504f-4f01-a054-879a610925e3",
        "title": "Sample product",
        "brief": "Sample product",
        "vendor": "",
        "vendor_url": "",
        "has_only_default_variant": false,
        "requires_shipping": true,
        "taxable": false,
        "inventory_policy": "deny",
        "inventory_quantity": 217,
        "inventory_tracking": true,
        "published": true,
        "handle": "Sample product",
        "spu": "1111",
        "note": "",
        "need_variant_image": false,
        "fake_sales": 0,
        "display_fake_sales": false,
        "independent_seo": false,
        "created_at": "2026-06-08T08:12:08Z",
        "updated_at": "2026-08-10T06:53:57Z",
        "tags": "",
        "available": true,
        "price_min": "10",
        "price_max": "90",
        "price": "10",
        "compare_at_price": "20.00",
        "compare_at_price_min": "0.00",
        "compare_at_price_max": "20.00",
        "url": "/products/Sample product",
        "published_at": "2026-07-30T02:28:23Z",
        "sales": 0,
        "image": {
          "src": "//img.staticdj.com/50fa9b8c054f4d11b0d765de5f35dd4e.png",
          "width": 1254,
          "height": 1254,
          "alt": "",
          "path": "50fa9b8c054f4d11b0d765de5f35dd4e.png",
          "aspect_ratio": 1
        },
        "meta_title": "",
        "meta_description": "",
        "meta_keyword": "",
        "options": [
          {
            "id": "5d6c5366-5c4b-4d3b-8ecd-a83d6d5b1abf",
            "name": "Color",
            "position": 1,
            "values": [
              "Black",
              "Red",
              "White"
            ]
          },
          {
            "id": "af2cadff-8ef3-4b10-a9ec-fd92a30cb18c",
            "name": "Size",
            "position": 2,
            "values": [
              "S",
              "M",
              "L"
            ]
          }
        ],
        "variants": [
          {
            "id": "0699bc80-19ae-41bb-87c4-dbcbe5ed90a0",
            "title": "Black-S",
            "weight_unit": "kg",
            "inventory_quantity": 48,
            "sku": "1111-BLACK-S-A001001",
            "barcode": "",
            "position": 1,
            "option1": "Black",
            "option2": "S",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "20",
            "price": "10",
            "available": true,
            "available_quantity": 48,
            "options": [
              {
                "name": "Color",
                "value": "Black"
              },
              {
                "name": "Size",
                "value": "S"
              }
            ],
            "url": "/products/Sample product?variant=0699bc80-19ae-41bb-87c4-dbcbe5ed90a0",
            "off_ratio": 50,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "10",
                "min_quantity": 1
              }
            ],
            "retail_price": "20"
          },
          {
            "id": "e48af6fb-dbec-4efa-9db2-94ad8f8853e4",
            "title": "Black-M",
            "weight_unit": "kg",
            "inventory_quantity": 7,
            "sku": "1111-Black-M-A001002",
            "barcode": "",
            "position": 2,
            "option1": "Black",
            "option2": "M",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "0",
            "price": "20",
            "available": true,
            "available_quantity": 7,
            "options": [
              {
                "name": "Color",
                "value": "Black"
              },
              {
                "name": "Size",
                "value": "M"
              }
            ],
            "url": "/products/Sample product?variant=e48af6fb-dbec-4efa-9db2-94ad8f8853e4",
            "off_ratio": 0,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "20",
                "min_quantity": 1
              }
            ],
            "retail_price": "0"
          },
          {
            "id": "f9a60813-bbec-49db-88d0-3d851a42d696",
            "title": "White-L",
            "weight_unit": "kg",
            "inventory_quantity": 44,
            "sku": "1111-White-L-A001009",
            "barcode": "",
            "position": 9,
            "option1": "White",
            "option2": "L",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "0",
            "price": "90",
            "available": true,
            "available_quantity": 44,
            "options": [
              {
                "name": "Color",
                "value": "White"
              },
              {
                "name": "Size",
                "value": "L"
              }
            ],
            "url": "/products/Sample product?variant=f9a60813-bbec-49db-88d0-3d851a42d696",
            "off_ratio": 0,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "90",
                "min_quantity": 1
              }
            ],
            "retail_price": "0"
          }
        ],
        "variants_count": 9,
        "images": [
          {
            "src": "//img.staticdj.com/50fa9b8c054f4d11b0d765de5f35dd4e.png",
            "width": 1254,
            "height": 1254,
            "alt": "",
            "path": "50fa9b8c054f4d11b0d765de5f35dd4e.png",
            "aspect_ratio": 1
          }
        ],
        "flashsale_info": [],
        "off_ratio": 50,
        "price_varies": true,
        "ifb": "",
        "cfb": "",
        "ssp": "",
        "scm": "",
        "mixed_wholesale": false,
        "retail_price": "20.00",
        "retail_price_min": "0.00",
        "retail_price_max": "20.00",
        "min_price_variant": {
          "id": "0699bc80-19ae-41bb-87c4-dbcbe5ed90a0",
          "title": "Black-S",
          "weight_unit": "kg",
          "inventory_quantity": 48,
          "sku": "1111-BLACK-S-A001001",
          "barcode": "",
          "position": 1,
          "option1": "Black",
          "option2": "S",
          "option3": "",
          "note": "",
          "image": null,
          "weight": "0",
          "compare_at_price": "20",
          "price": "10",
          "available": true,
          "available_quantity": 48,
          "options": [
            {
              "name": "Color",
              "value": "Black"
            },
            {
              "name": "Size",
              "value": "S"
            }
          ],
          "url": "/products/Sample product?variant=0699bc80-19ae-41bb-87c4-dbcbe5ed90a0",
          "off_ratio": 50,
          "flashsale_info": [],
          "sales": 0,
          "wholesale_price": [
            {
              "price": "10",
              "min_quantity": 1
            }
          ],
          "retail_price": "20"
        },
        "product_type": "",
        "description": "",
        "comment_avg_star": 0,
        "comment_count": 0
      },
      {
        "id": "79f46343-605c-4100-a9d5-d8a11dae3fef",
        "title": "Cozy Knit Tee",
        "brief": "",
        "vendor": "",
        "vendor_url": "",
        "has_only_default_variant": true,
        "requires_shipping": true,
        "taxable": false,
        "inventory_policy": "deny",
        "inventory_quantity": 109,
        "inventory_tracking": true,
        "published": true,
        "handle": "cozy-knit-tee",
        "spu": "",
        "note": "",
        "need_variant_image": false,
        "fake_sales": 0,
        "display_fake_sales": false,
        "independent_seo": false,
        "created_at": "2026-06-24T06:17:25Z",
        "updated_at": "2026-08-04T06:58:45Z",
        "tags": "",
        "available": true,
        "price_min": "105",
        "price_max": "105",
        "price": "105",
        "compare_at_price": "0.00",
        "compare_at_price_min": "0.00",
        "compare_at_price_max": "0.00",
        "url": "/products/cozy-knit-tee",
        "published_at": "2026-07-30T02:17:25Z",
        "sales": 0,
        "image": {
          "src": "//img.staticdj.com/66dde64782015ee2e4f31a1e08781d92.svg",
          "width": 1,
          "height": 1,
          "alt": "",
          "path": "66dde64782015ee2e4f31a1e08781d92.svg",
          "aspect_ratio": 1
        },
        "meta_title": "",
        "meta_description": "",
        "meta_keyword": "",
        "options": [],
        "variants": [
          {
            "id": "e660a2bc-c8ec-44ef-a3ab-028d317eedd9",
            "title": "",
            "weight_unit": "kg",
            "inventory_quantity": 109,
            "sku": "",
            "barcode": "",
            "position": 1,
            "option1": "",
            "option2": "",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "0",
            "price": "105",
            "available": true,
            "available_quantity": 109,
            "options": [],
            "url": "/products/cozy-knit-tee?variant=e660a2bc-c8ec-44ef-a3ab-028d317eedd9",
            "off_ratio": 0,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "105",
                "min_quantity": 1
              }
            ],
            "retail_price": "0"
          }
        ],
        "variants_count": 1,
        "images": [
          {
            "src": "//img.staticdj.com/66dde64782015ee2e4f31a1e08781d92.svg",
            "width": 1,
            "height": 1,
            "alt": "",
            "path": "66dde64782015ee2e4f31a1e08781d92.svg",
            "aspect_ratio": 1
          }
        ],
        "flashsale_info": [],
        "off_ratio": 0,
        "price_varies": false,
        "ifb": "",
        "cfb": "",
        "ssp": "",
        "scm": "",
        "mixed_wholesale": false,
        "retail_price": "0.00",
        "retail_price_min": "0.00",
        "retail_price_max": "0.00",
        "min_price_variant": {
          "id": "e660a2bc-c8ec-44ef-a3ab-028d317eedd9",
          "title": "",
          "weight_unit": "kg",
          "inventory_quantity": 109,
          "sku": "",
          "barcode": "",
          "position": 1,
          "option1": "",
          "option2": "",
          "option3": "",
          "note": "",
          "image": null,
          "weight": "0",
          "compare_at_price": "0",
          "price": "105",
          "available": true,
          "available_quantity": 109,
          "options": [],
          "url": "/products/cozy-knit-tee?variant=e660a2bc-c8ec-44ef-a3ab-028d317eedd9",
          "off_ratio": 0,
          "flashsale_info": [],
          "sales": 0,
          "wholesale_price": [
            {
              "price": "105",
              "min_quantity": 1
            }
          ],
          "retail_price": "0"
        },
        "product_type": "",
        "description": "",
        "comment_avg_star": 0,
        "comment_count": 0
      },
      {
        "id": "14a309ec-b966-4cf9-a9bb-33baa821fdbc",
        "title": "sample-product",
        "brief": "",
        "vendor": "",
        "vendor_url": "",
        "has_only_default_variant": false,
        "requires_shipping": true,
        "taxable": false,
        "inventory_policy": "",
        "inventory_quantity": 0,
        "inventory_tracking": false,
        "published": true,
        "handle": "sample-product",
        "spu": "",
        "note": "",
        "need_variant_image": false,
        "fake_sales": 0,
        "display_fake_sales": false,
        "independent_seo": false,
        "created_at": "2026-08-10T07:28:24Z",
        "updated_at": "2026-08-25T07:04:00Z",
        "tags": "",
        "available": true,
        "price_min": "1",
        "price_max": "1",
        "price": "1",
        "compare_at_price": "1.00",
        "compare_at_price_min": "1.00",
        "compare_at_price_max": "1.00",
        "url": "/products/sample-product",
        "published_at": "2026-08-10T07:28:24Z",
        "sales": 0,
        "image": {
          "src": "//img.staticdj.com/free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
          "width": 3000,
          "height": 1500,
          "alt": "",
          "path": "free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
          "aspect_ratio": 2
        },
        "meta_title": "",
        "meta_description": "",
        "meta_keyword": "",
        "options": [
          {
            "id": "32da111a-8237-48a7-9779-6bfa6b77f1e7",
            "name": "Size",
            "position": 1,
            "values": [
              "01",
              "02",
              "16"
            ]
          }
        ],
        "variants": [
          {
            "id": "fff360dd-6457-466a-98b3-16878bacef5b",
            "title": "01",
            "weight_unit": "kg",
            "inventory_quantity": 0,
            "sku": "",
            "barcode": "",
            "position": 1,
            "option1": "01",
            "option2": "",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "1",
            "price": "1",
            "available": true,
            "available_quantity": 999999999,
            "options": [
              {
                "name": "Size",
                "value": "01"
              }
            ],
            "url": "/products/sample-product?variant=fff360dd-6457-466a-98b3-16878bacef5b",
            "off_ratio": 0,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "1",
                "min_quantity": 1
              }
            ],
            "retail_price": "1"
          },
          {
            "id": "9063e68e-0f3a-4453-82cd-115727cce51e",
            "title": "02",
            "weight_unit": "kg",
            "inventory_quantity": 0,
            "sku": "",
            "barcode": "",
            "position": 2,
            "option1": "02",
            "option2": "",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "1",
            "price": "1",
            "available": true,
            "available_quantity": 999999999,
            "options": [
              {
                "name": "Size",
                "value": "02"
              }
            ],
            "url": "/products/sample-product?variant=9063e68e-0f3a-4453-82cd-115727cce51e",
            "off_ratio": 0,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "1",
                "min_quantity": 1
              }
            ],
            "retail_price": "1"
          },
          {
            "id": "7d4f540d-31b5-4a59-a406-eb3a981cdee5",
            "title": "16",
            "weight_unit": "kg",
            "inventory_quantity": 0,
            "sku": "",
            "barcode": "",
            "position": 16,
            "option1": "16",
            "option2": "",
            "option3": "",
            "note": "",
            "image": {
              "src": "",
              "width": 0,
              "height": 0,
              "alt": "",
              "path": "",
              "aspect_ratio": 0
            },
            "weight": "0",
            "compare_at_price": "1",
            "price": "1",
            "available": true,
            "available_quantity": 999999999,
            "options": [
              {
                "name": "Size",
                "value": "16"
              }
            ],
            "url": "/products/sample-product?variant=7d4f540d-31b5-4a59-a406-eb3a981cdee5",
            "off_ratio": 0,
            "flashsale_info": [],
            "sales": 0,
            "wholesale_price": [
              {
                "price": "1",
                "min_quantity": 1
              }
            ],
            "retail_price": "1"
          }
        ],
        "variants_count": 16,
        "images": [
          {
            "src": "//img.staticdj.com/free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
            "width": 3000,
            "height": 1500,
            "alt": "",
            "path": "free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
            "aspect_ratio": 2
          },
          {
            "src": "//img.staticdj.com/free/b7addf0790dc3eee7b65c693ba2140df.jpg",
            "width": 2616,
            "height": 1743,
            "alt": "",
            "path": "free/b7addf0790dc3eee7b65c693ba2140df.jpg",
            "aspect_ratio": 1.5008605851979346
          }
        ],
        "flashsale_info": [],
        "off_ratio": 0,
        "price_varies": false,
        "ifb": "",
        "cfb": "",
        "ssp": "",
        "scm": "",
        "mixed_wholesale": false,
        "retail_price": "1.00",
        "retail_price_min": "1.00",
        "retail_price_max": "1.00",
        "min_price_variant": {
          "id": "fff360dd-6457-466a-98b3-16878bacef5b",
          "title": "01",
          "weight_unit": "kg",
          "inventory_quantity": 0,
          "sku": "",
          "barcode": "",
          "position": 1,
          "option1": "01",
          "option2": "",
          "option3": "",
          "note": "",
          "image": null,
          "weight": "0",
          "compare_at_price": "1",
          "price": "1",
          "available": true,
          "available_quantity": 999999999,
          "options": [
            {
              "name": "Size",
              "value": "01"
            }
          ],
          "url": "/products/sample-product?variant=fff360dd-6457-466a-98b3-16878bacef5b",
          "off_ratio": 0,
          "flashsale_info": [],
          "sales": 0,
          "wholesale_price": [
            {
              "price": "1",
              "min_quantity": 1
            }
          ],
          "retail_price": "1"
        },
        "product_type": "",
        "description": "",
        "comment_avg_star": 0,
        "comment_count": 0
      }
    ],
    "has_more": 0,
    "page": 1,
    "limit": 8,
    "products_count": 3,
    "count": 3,
    "comment_enabled": false
  },
  "msg": "请求成功",
  "state": 0
}
```

## 获取专辑的筛选项

```text
GET /{locale}/api/collections/{collection_id}/filters
```

### 请求示例

以下示例请求特定 collection 的 filters：

**Example request using Fetch**

```javascript
fetch(window.SHOPLAZZA.routes.root + '/api/collections/8bc2047d-bf57-4c91-b207-e3480f79800d/filters')
  .then((response) => response.json())
  .then((data) => {
    // do something...
  });
```

### 请求参数

- `collection_id` string

  专辑 ID。

### 响应

**数据结构 | 示例**

- `data` object[]

  响应数据主体。

  *   Array [

  - `label` string

    筛选项的名称，例如 `price`、`vendor`。
  - `param_name` string

    该筛选项使用的 URL 参数。
  - `type` string

    筛选项类型，例如 `list`、`price_range`。
  - `range_min` number

    `price_range` 类型筛选项的最小可选值。
  - `range_max` number

    `price_range` 类型筛选项的最大可选值。
  - `values` object[]

    筛选项的可选值列表。

    *   Array [

    - `param_name` string

      该筛选项使用的 URL 参数。
    - `label` string

      展示给顾客的筛选值标签。
    - `value` string

      筛选值。
    - `active` boolean

      该筛选值当前是否已应用。
    - `count` number

      符合该筛选值的商品数量。
    *   ]
  - `active_values` string

    当前已应用的筛选值。
  - `inactive_values` object[]

    当前未应用的筛选值。

    *   Array [

    - `param_name` string

      该筛选项使用的 URL 参数。
    - `label` string

      展示给顾客的筛选值标签。
    - `value` string

      筛选值。
    - `active` boolean

      该筛选值当前是否已应用。
    - `count` number

      符合该筛选值的商品数量。
    *   ]
  - `max_value` string

    `price_range` 类型筛选项的上界。
  - `min_value` string

    `price_range` 类型筛选项的下界。
  *   ]
- `msg` string

  响应返回的结果说明。
- `state` number

  请求结果标识，`success` 或 `0` 表示请求成功。

```json
{
  "data": [
    {
      "label": "availability",
      "param_name": "filter.v.availability",
      "type": "list",
      "range_min": 0,
      "range_max": 0,
      "values": [
        {
          "param_name": "filter.v.availability",
          "label": "1",
          "value": "1",
          "active": false,
          "count": 3
        },
        {
          "param_name": "filter.v.availability",
          "label": "0",
          "value": "0",
          "active": false,
          "count": 0
        }
      ],
      "active_values": null,
      "inactive_values": [
        {
          "param_name": "filter.v.availability",
          "label": "1",
          "value": "1",
          "active": false,
          "count": 3
        },
        {
          "param_name": "filter.v.availability",
          "label": "0",
          "value": "0",
          "active": false,
          "count": 0
        }
      ],
      "max_value": null,
      "min_value": null
    },
    {
      "label": "price",
      "param_name": "filter.v.price",
      "type": "price_range",
      "range_min": 1,
      "range_max": 105,
      "values": null,
      "active_values": null,
      "inactive_values": null,
      "max_value": {
        "param_name": "filter.v.price.lte",
        "label": "To",
        "value": "",
        "active": true,
        "count": 0
      },
      "min_value": {
        "param_name": "filter.v.price.gte",
        "label": "From",
        "value": "",
        "active": true,
        "count": 0
      }
    },
    {
      "label": "vendor",
      "param_name": "filter.p.vendor",
      "type": "list",
      "range_min": 0,
      "range_max": 0,
      "values": null,
      "active_values": null,
      "inactive_values": null,
      "max_value": null,
      "min_value": null
    }
  ],
  "msg": "请求成功",
  "state": 0
}
```
