# Collection

> Ajax API endpoints for collections: page through the products of a collection, filter those products, and list the filters a collection offers to the storefront.

The Collection API can be used to get collection products or filters for a given collection's id.

All Ajax API requests should use [locale-aware URLs](/docs/theme/references/ajax-api/#locale-aware-urls) to give visitors a consistent experience.

## List the products of a collection

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

Get the products of a collection, page by page.

### Example request

**Example request**

```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...
  });
```

### Request parameters

- `collection_id` string

  The id of the collection.
- `page` number

  The page of products to return.
- `limit` number

  The number of products per page.

### Response

**Schema | Example**

- `data` object

  The response payload.

  - `products` object[]

    List of products.

    *   Array [

    - `id` string

      ID of the product.
    - `title` string

      Title of the product.
    - `brief` string

      Short description of the product.
    - `vendor` string

      Vendor of the product.
    - `vendor_url` string

      URL of the product vendor.
    - `has_only_default_variant` boolean

      Whether the product has only the default variant.
    - `requires_shipping` boolean

      Whether shipping is required.
    - `taxable` boolean

      Whether tax is charged.
    - `inventory_policy` string

      Whether the product keeps selling when it is out of stock.
    - `inventory_quantity` number

      Inventory quantity.
    - `inventory_tracking` boolean

      Whether inventory tracking is enabled.
    - `published` boolean

      Whether the resource is published.
    - `handle` string

      URL-friendly handle used in the resource URL.
    - `spu` string

      SPU of the product.
    - `note` string

      Note attached to the object.
    - `need_variant_image` boolean

      Whether each variant must have its own image.
    - `fake_sales` number

      Virtual sales figure of the product.
    - `display_fake_sales` boolean

      Whether the virtual sales figure is shown on the storefront.
    - `independent_seo` boolean

      Whether SEO settings are managed independently.
    - `created_at` string

      Creation time, in ISO-8601 format.
    - `updated_at` string

      Last update time, in ISO-8601 format.
    - `tags` string

      Tags attached to the object.
    - `available` boolean

      Whether the item can be purchased.
    - `price_min` string

      Lowest variant price, in the store's main currency unit.
    - `price_max` string

      Highest variant price, in the store's main currency unit.
    - `price` string

      Price of the product, in the store's main currency unit.
    - `compare_at_price` string

      Compare-at price of the item.
    - `compare_at_price_min` string

      Lowest compare-at price among the variants.
    - `compare_at_price_max` string

      Highest compare-at price among the variants.
    - `url` string

      Relative URL of the product page.
    - `published_at` string

      Publication time, in ISO-8601 format.
    - `sales` number

      Number of units sold.
    - `image` object

      First image of the product.

      - `src` string

        URL of the image.
      - `width` number

        Width of the image, in pixels.
      - `height` number

        Height of the image, in pixels.
      - `alt` string

        Alt text of the image.
      - `path` string

        Path of the image file on the image server.
      - `aspect_ratio` number

        Width of the image divided by its height.
    - `meta_title` string

      SEO title used in the page metadata.
    - `meta_description` string

      SEO description used in the page metadata.
    - `meta_keyword` string

      SEO keywords used in the page metadata.
    - `options` object[]

      Options of the product, such as colour or size.

      *   Array [

      - `id` string

        ID of the product option.
      - `name` string

        Name of the product option, for example `Color`.
      - `position` number

        Sort position of the option.
      - `values` string[]

        Values available for the product option.
      *   ]
    - `variants` object[]

      List of the product variants.

      *   Array [

      - `id` string

        ID of the variant.
      - `title` string

        Title of the variant, made of its option values joined by `-`.
      - `weight_unit` string

        Unit of the weight, for example `kg`.
      - `inventory_quantity` number

        Inventory quantity.
      - `sku` string

        SKU of the variant, used for inventory tracking.
      - `barcode` string

        Barcode of the variant.
      - `position` number

        Sort position in the list.
      - `option1` string

        Value of the first product option for this variant.
      - `option2` string

        Value of the second product option for this variant.
      - `option3` string

        Value of the third product option for this variant.
      - `note` string

        Note attached to the object.
      - `image` object

        Image attached to the variant.

        - `src` string

          URL of the image.
        - `width` number

          Width of the image, in pixels.
        - `height` number

          Height of the image, in pixels.
        - `alt` string

          Alt text of the image.
        - `path` string

          Path of the image file on the image server.
        - `aspect_ratio` number

          Width of the image divided by its height.
      - `weight` string

        Weight of the variant.
      - `compare_at_price` string

        Compare-at price of the item.
      - `price` string

        Price of the variant, in the store's main currency unit.
      - `available` boolean

        Whether the item can be purchased.
      - `available_quantity` number

        Quantity still available for purchase.
      - `options` object[]

        Values of the variant for each product option.

        *   Array [

        - `name` string

          Name of the product option, for example `Color`.
        - `value` string

          Value selected for this product option.
        *   ]
      - `url` string

        Relative URL of the product page with this variant selected.
      - `off_ratio` number

        Discount ratio currently applied.
      - `flashsale_info` undefined[]

        Flash sale information for the item.
      - `sales` number

        Number of units sold.
      - `wholesale_price` object[]

        Wholesale price tiers.

        *   Array [

        - `price` string

          Unit price of this wholesale tier.
        - `min_quantity` number

          Minimum quantity required for this wholesale tier.
        *   ]
      - `retail_price` string

        Retail price in the store's main currency unit.
      *   ]
    - `variants_count` number
    - `images` object[]

      List of product images.

      *   Array [

      - `src` string

        URL of the image.
      - `width` number

        Width of the image, in pixels.
      - `height` number

        Height of the image, in pixels.
      - `alt` string

        Alt text of the image.
      - `path` string

        Path of the image file on the image server.
      - `aspect_ratio` number

        Width of the image divided by its height.
      *   ]
    - `flashsale_info` undefined[]

      Flash sale information for the item.
    - `off_ratio` number

      Discount ratio currently applied.
    - `price_varies` boolean

      Whether the variants of the product have different prices.
    - `ifb` string
    - `cfb` string
    - `ssp` string
    - `scm` string
    - `mixed_wholesale` boolean

      Whether mixed wholesale is supported.
    - `retail_price` string

      Retail price in the store's main currency unit.
    - `retail_price_min` string

      Lowest retail price among the variants.
    - `retail_price_max` string

      Highest retail price among the variants.
    - `min_price_variant` object

      The variant with the lowest price.

      - `id` string

        ID of the variant.
      - `title` string

        Title of the variant, made of its option values joined by `-`.
      - `weight_unit` string

        Unit of the weight, for example `kg`.
      - `inventory_quantity` number

        Inventory quantity.
      - `sku` string

        SKU of the variant, used for inventory tracking.
      - `barcode` string

        Barcode of the variant.
      - `position` number

        Sort position in the list.
      - `option1` string

        Value of the first product option for this variant.
      - `option2` string

        Value of the second product option for this variant.
      - `option3` string

        Value of the third product option for this variant.
      - `note` string

        Note attached to the object.
      - `image` string

        Image attached to the variant.
      - `weight` string

        Weight of the variant.
      - `compare_at_price` string

        Compare-at price of the item.
      - `price` string

        Price of the variant, in the store's main currency unit.
      - `available` boolean

        Whether the item can be purchased.
      - `available_quantity` number

        Quantity still available for purchase.
      - `options` object[]

        Values of the variant for each product option.

        *   Array [

        - `name` string

          Name of the product option, for example `Color`.
        - `value` string

          Value selected for this product option.
        *   ]
      - `url` string

        Relative URL of the product page with this variant selected.
      - `off_ratio` number

        Discount ratio currently applied.
      - `flashsale_info` undefined[]

        Flash sale information for the item.
      - `sales` number

        Number of units sold.
      - `wholesale_price` object[]

        Wholesale price tiers.

        *   Array [

        - `price` string

          Unit price of this wholesale tier.
        - `min_quantity` number

          Minimum quantity required for this wholesale tier.
        *   ]
      - `retail_price` string

        Retail price in the store's main currency unit.
    - `product_type` string

      Product type.
    - `description` string

      Description of the product.
    - `comment_avg_star` number

      Average review rating of the product.
    - `comment_count` number

      Number of customer reviews for the product.
    *   ]
  - `has_more` number

    Whether more records are available.
  - `page` number

    Current page number.
  - `limit` number

    Maximum number of records returned per page.
  - `products_count` number

    Total number of products matched.
  - `count` number

    Number of products returned.
  - `comment_enabled` boolean

    Whether customer reviews are enabled.
- `msg` string

  Result message returned with the response.
- `state` number

  Request result flag; `success` or `0` means the request succeeded.

```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
}
```

## Filter the products of a collection

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

The following example requests the products for a specific collection:

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

### Example request

**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...
  });
```

### Request parameters

- `page` number

  The base-0 page number of results.
- `limit` number

  Limits the number of results.
- `[filter.filter_scope.attribute]` string

  Refer to [Storefront filtering](/docs/theme/theme-features/site-navigation-and-search/filtering/storefront-filtering#url-parameter-structure). The `[filter.filter_scope.attribute.attribute_scope]` form is also accepted.

### Response

**Schema | Example**

- `data` object

  The response payload.

  - `products` object[]

    List of products.

    *   Array [

    - `id` string

      ID of the product.
    - `title` string

      Title of the product.
    - `brief` string

      Short description of the product.
    - `vendor` string

      Vendor of the product.
    - `vendor_url` string

      URL of the product vendor.
    - `has_only_default_variant` boolean

      Whether the product has only the default variant.
    - `requires_shipping` boolean

      Whether shipping is required.
    - `taxable` boolean

      Whether tax is charged.
    - `inventory_policy` string

      Whether the product keeps selling when it is out of stock.
    - `inventory_quantity` number

      Inventory quantity.
    - `inventory_tracking` boolean

      Whether inventory tracking is enabled.
    - `published` boolean

      Whether the resource is published.
    - `handle` string

      URL-friendly handle used in the resource URL.
    - `spu` string

      SPU of the product.
    - `note` string

      Note attached to the object.
    - `need_variant_image` boolean

      Whether each variant must have its own image.
    - `fake_sales` number

      Virtual sales figure of the product.
    - `display_fake_sales` boolean

      Whether the virtual sales figure is shown on the storefront.
    - `independent_seo` boolean

      Whether SEO settings are managed independently.
    - `created_at` string

      Creation time, in ISO-8601 format.
    - `updated_at` string

      Last update time, in ISO-8601 format.
    - `tags` string

      Tags attached to the object.
    - `available` boolean

      Whether the item can be purchased.
    - `price_min` string

      Lowest variant price, in the store's main currency unit.
    - `price_max` string

      Highest variant price, in the store's main currency unit.
    - `price` string

      Price of the product, in the store's main currency unit.
    - `compare_at_price` string

      Compare-at price of the item.
    - `compare_at_price_min` string

      Lowest compare-at price among the variants.
    - `compare_at_price_max` string

      Highest compare-at price among the variants.
    - `url` string

      Relative URL of the product page.
    - `published_at` string

      Publication time, in ISO-8601 format.
    - `sales` number

      Number of units sold.
    - `image` object

      First image of the product.

      - `src` string

        URL of the image.
      - `width` number

        Width of the image, in pixels.
      - `height` number

        Height of the image, in pixels.
      - `alt` string

        Alt text of the image.
      - `path` string

        Path of the image file on the image server.
      - `aspect_ratio` number

        Width of the image divided by its height.
    - `meta_title` string

      SEO title used in the page metadata.
    - `meta_description` string

      SEO description used in the page metadata.
    - `meta_keyword` string

      SEO keywords used in the page metadata.
    - `options` object[]

      Options of the product, such as colour or size.

      *   Array [

      - `id` string

        ID of the product option.
      - `name` string

        Name of the product option, for example `Color`.
      - `position` number

        Sort position of the option.
      - `values` string[]

        Values available for the product option.
      *   ]
    - `variants` object[]

      List of the product variants.

      *   Array [

      - `id` string

        ID of the variant.
      - `title` string

        Title of the variant, made of its option values joined by `-`.
      - `weight_unit` string

        Unit of the weight, for example `kg`.
      - `inventory_quantity` number

        Inventory quantity.
      - `sku` string

        SKU of the variant, used for inventory tracking.
      - `barcode` string

        Barcode of the variant.
      - `position` number

        Sort position in the list.
      - `option1` string

        Value of the first product option for this variant.
      - `option2` string

        Value of the second product option for this variant.
      - `option3` string

        Value of the third product option for this variant.
      - `note` string

        Note attached to the object.
      - `image` object

        Image attached to the variant.

        - `src` string

          URL of the image.
        - `width` number

          Width of the image, in pixels.
        - `height` number

          Height of the image, in pixels.
        - `alt` string

          Alt text of the image.
        - `path` string

          Path of the image file on the image server.
        - `aspect_ratio` number

          Width of the image divided by its height.
      - `weight` string

        Weight of the variant.
      - `compare_at_price` string

        Compare-at price of the item.
      - `price` string

        Price of the variant, in the store's main currency unit.
      - `available` boolean

        Whether the item can be purchased.
      - `available_quantity` number

        Quantity still available for purchase.
      - `options` object[]

        Values of the variant for each product option.

        *   Array [

        - `name` string

          Name of the product option, for example `Color`.
        - `value` string

          Value selected for this product option.
        *   ]
      - `url` string

        Relative URL of the product page with this variant selected.
      - `off_ratio` number

        Discount ratio currently applied.
      - `flashsale_info` undefined[]

        Flash sale information for the item.
      - `sales` number

        Number of units sold.
      - `wholesale_price` object[]

        Wholesale price tiers.

        *   Array [

        - `price` string

          Unit price of this wholesale tier.
        - `min_quantity` number

          Minimum quantity required for this wholesale tier.
        *   ]
      - `retail_price` string

        Retail price in the store's main currency unit.
      *   ]
    - `variants_count` number
    - `images` object[]

      List of product images.

      *   Array [

      - `src` string

        URL of the image.
      - `width` number

        Width of the image, in pixels.
      - `height` number

        Height of the image, in pixels.
      - `alt` string

        Alt text of the image.
      - `path` string

        Path of the image file on the image server.
      - `aspect_ratio` number

        Width of the image divided by its height.
      *   ]
    - `flashsale_info` undefined[]

      Flash sale information for the item.
    - `off_ratio` number

      Discount ratio currently applied.
    - `price_varies` boolean

      Whether the variants of the product have different prices.
    - `ifb` string
    - `cfb` string
    - `ssp` string
    - `scm` string
    - `mixed_wholesale` boolean

      Whether mixed wholesale is supported.
    - `retail_price` string

      Retail price in the store's main currency unit.
    - `retail_price_min` string

      Lowest retail price among the variants.
    - `retail_price_max` string

      Highest retail price among the variants.
    - `min_price_variant` object

      The variant with the lowest price.

      - `id` string

        ID of the variant.
      - `title` string

        Title of the variant, made of its option values joined by `-`.
      - `weight_unit` string

        Unit of the weight, for example `kg`.
      - `inventory_quantity` number

        Inventory quantity.
      - `sku` string

        SKU of the variant, used for inventory tracking.
      - `barcode` string

        Barcode of the variant.
      - `position` number

        Sort position in the list.
      - `option1` string

        Value of the first product option for this variant.
      - `option2` string

        Value of the second product option for this variant.
      - `option3` string

        Value of the third product option for this variant.
      - `note` string

        Note attached to the object.
      - `image` string

        Image attached to the variant.
      - `weight` string

        Weight of the variant.
      - `compare_at_price` string

        Compare-at price of the item.
      - `price` string

        Price of the variant, in the store's main currency unit.
      - `available` boolean

        Whether the item can be purchased.
      - `available_quantity` number

        Quantity still available for purchase.
      - `options` object[]

        Values of the variant for each product option.

        *   Array [

        - `name` string

          Name of the product option, for example `Color`.
        - `value` string

          Value selected for this product option.
        *   ]
      - `url` string

        Relative URL of the product page with this variant selected.
      - `off_ratio` number

        Discount ratio currently applied.
      - `flashsale_info` undefined[]

        Flash sale information for the item.
      - `sales` number

        Number of units sold.
      - `wholesale_price` object[]

        Wholesale price tiers.

        *   Array [

        - `price` string

          Unit price of this wholesale tier.
        - `min_quantity` number

          Minimum quantity required for this wholesale tier.
        *   ]
      - `retail_price` string

        Retail price in the store's main currency unit.
    - `product_type` string

      Product type.
    - `description` string

      Description of the product.
    - `comment_avg_star` number

      Average review rating of the product.
    - `comment_count` number

      Number of customer reviews for the product.
    *   ]
  - `has_more` number

    Whether more records are available.
  - `page` number

    Current page number.
  - `limit` number

    Maximum number of records returned per page.
  - `products_count` number

    Total number of products matched.
  - `count` number

    Number of products returned.
  - `comment_enabled` boolean

    Whether customer reviews are enabled.
- `msg` string

  Result message returned with the response.
- `state` number

  Request result flag; `success` or `0` means the request succeeded.

```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
}
```

## List the filters of a collection

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

### Example request

The following example requests the filters for a specific collection:

**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...
  });
```

### Request parameters

- `collection_id` string

  ID of the collection.

### Response

**Schema | Example**

- `data` object[]

  The response payload.

  *   Array [

  - `label` string

    Name of the filter, for example `price` or `vendor`.
  - `param_name` string

    URL parameter used by the filter.
  - `type` string

    Filter type, for example `list` or `price_range`.
  - `range_min` number

    Lowest value available for a `price_range` filter.
  - `range_max` number

    Highest value available for a `price_range` filter.
  - `values` object[]

    Values available for the filter.

    *   Array [

    - `param_name` string

      URL parameter used by the filter.
    - `label` string

      Label of the filter value shown to the customer.
    - `value` string

      The filter value.
    - `active` boolean

      Whether the filter value is currently applied.
    - `count` number

      Number of products matching this filter value.
    *   ]
  - `active_values` string

    Filter values that are currently applied.
  - `inactive_values` object[]

    Filter values that are not currently applied.

    *   Array [

    - `param_name` string

      URL parameter used by the filter.
    - `label` string

      Label of the filter value shown to the customer.
    - `value` string

      The filter value.
    - `active` boolean

      Whether the filter value is currently applied.
    - `count` number

      Number of products matching this filter value.
    *   ]
  - `max_value` string

    Upper bound of a `price_range` filter.
  - `min_value` string

    Lower bound of a `price_range` filter.
  *   ]
- `msg` string

  Result message returned with the response.
- `state` number

  Request result flag; `success` or `0` means the request succeeded.

```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
}
```
