Skip to content

SearchProduct

Type: schema

Description

Payload for searching products.

TypeScript Definition

typescript
SearchProduct: {{
            /** @description String for searching products, considers the first ten words of any given search query. */
            query: string;
            /**
             * @description To request a specific page of results.
             * @default 1
             */
            page: number;
            /**
             * @description Maximum number of records returned for a page.
             * @default 25
             */
            limit: number;
            /**
             * @description provide list of attributes for specific facets or * for all facets.
             *     ```json
             *     For specific facets: ["size", "color", "brand"]
             *     ```
             *     ```json
             *     For all facets: ["*"]
             *     ```
             */
            facets?: string[];
        };
        /** Seo */
}

OpenAPI Schema

json
{
  "title": "SearchProduct",
  "description": "Payload for searching products.",
  "type": "object",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/schemas/SearchProduct",
    "description": "API reference for the SearchProduct schema"
  },
  "required": [
    "query"
  ],
  "properties": {
    "query": {
      "description": "String for searching products, considers the first ten words of any given search query.",
      "type": "string"
    },
    "page": {
      "description": "To request a specific page of results.",
      "type": "integer",
      "default": 1
    },
    "limit": {
      "description": "Maximum number of records returned for a page.",
      "type": "integer",
      "default": 25
    },
    "facets": {
      "description": "provide list of attributes for specific facets or * for all facets.\n```json\nFor specific facets: [\"size\", \"color\", \"brand\"]\n```\n```json\nFor all facets: [\"*\"]\n```",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: