> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getscale.ng/llms.txt
> Use this file to discover all available pages before exploring further.

# List Storefront Products

Retrieves a paginated list of all active products inside the shop catalog. Supports keyword search queries against names/descriptions, category ID filtering, curated collection filtering, and custom sorting options.

You can use this endpoint to render search bars, filter sidebars, product grids, and pagination lists on product index pages.

### Authorizations

<ParamField header="X-Shop-API-Key" type="string" required>
  Your Publishable Key (`pk_live_...` or `pk_test_...`) generated from the Developer settings in your dashboard.
</ParamField>

### Path Parameters

<ParamField path="shopId" type="string" required>
  The unique UUID of the shop.
</ParamField>

### Query Parameters

<ParamField query="limit" type="number" default="20">
  Number of items to return. Must be a positive integer.
</ParamField>

<ParamField query="offset" type="number" default="0">
  Number of items to skip for paging. Must be non-negative.
</ParamField>

<ParamField query="search" type="string">
  A keyword search query to filter products by title or description matching.
</ParamField>

<ParamField query="categoryId" type="number">
  Filter products belonging to a specific category ID.
</ParamField>

<ParamField query="collectionId" type="number">
  Filter products mapped to a specific curated collection ID.
</ParamField>

<ParamField query="sortBy" type="string" default="newest">
  Results sorting field. Options: `newest`, `oldest`, `name`, `price_low` (ascending), `price_high` (descending).
</ParamField>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "status": "success",
    "data": {
      "products": [
        {
          "id": 1,
          "productName": "Air Max Sneaker",
          "productSlug": "air-max-sneaker",
          "productDescription": "Running athletic shoes",
          "productPrice": 12000,
          "currencySymbol": "₦",
          "media": [
            {
              "mediaUrl": "https://cdn.getscale.ng/products/sneaker1.jpg",
              "mediaType": "image",
              "mediaIndex": 0
            }
          ]
        }
      ],
      "totalCount": 42,
      "limit": 10,
      "offset": 0
    }
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "message": "FORM_VALIDATION_ERROR",
    "code": 400,
    "validationErrors": [
      {
        "path": [
          "sortBy"
        ],
        "message": "Invalid enum value. Expected 'newest' | 'oldest' | 'name' | 'price_low' | 'price_high', received 'invalid_sort'"
      }
    ]
  }
  ```
</ResponseExample>
