VTEX · Schema

Facets

Response body object.

CommerceE-CommerceRetailMarketplacePayments

Properties

Name Type Description
facets array List of facets.
sampling boolean Indicates whether there was sampling in the aggregation of facets or not. In search results that have many products, only the first 30000 will be aggregated to avoid performance issues.
breadcrumb array Generated breadcrumb for the given query.
queryArgs object Term and facets used in the query.
translated boolean Defines whether the facets were translated by Intelligent Search (`true`) or not (`false`).
View JSON Schema on GitHub

JSON Schema

vtex-facets-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Facets",
  "title": "Facets",
  "type": "object",
  "description": "Response body object.",
  "properties": {
    "facets": {
      "type": "array",
      "description": "List of facets.",
      "items": {
        "type": "object",
        "description": "Facet information.",
        "properties": {
          "values": {
            "type": "array",
            "description": "Possible values.",
            "items": {
              "type": "object",
              "description": "Value information.",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Value ID."
                },
                "quantity": {
                  "type": "number",
                  "description": "Number of resulting products."
                },
                "name": {
                  "type": "string",
                  "description": "Human-readable format of the facet value."
                },
                "key": {
                  "type": "string",
                  "description": "Facet key."
                },
                "value": {
                  "type": "string",
                  "description": "Facet value."
                },
                "selected": {
                  "type": "boolean",
                  "description": "Defines whether the value is selected (`true`) or not (`false`)."
                },
                "href": {
                  "type": "string",
                  "description": "Query URL."
                }
              }
            }
          },
          "type": {
            "type": "string",
            "description": "Facet type\n - `TEXT` - The value is a simple text.\n - `PRICERANGE` - The value contains the property `range` representing the minimum and the maximum price for the query.",
            "enum": [
              "TEXT",
              "PRICERANGE"
            ]
          },
          "name": {
            "type": "string",
            "description": "Human-readable format of the facet key."
          },
          "hidden": {
            "type": "boolean",
            "description": "Defines whether the client-side should hide the facet (`true`) or not (`false`)."
          },
          "key": {
            "type": "string",
            "description": "Facet key."
          },
          "quantity": {
            "type": "number",
            "description": "Number of possible values."
          }
        }
      }
    },
    "sampling": {
      "type": "boolean",
      "description": "Indicates whether there was sampling in the aggregation of facets or not. In search results that have many products, only the first 30000 will be aggregated to avoid performance issues."
    },
    "breadcrumb": {
      "type": "array",
      "description": "Generated breadcrumb for the given query.",
      "items": {
        "type": "object",
        "description": "Breadcrumb information.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Human-readable format of the facet key."
          },
          "href": {
            "type": "string",
            "description": "Query link."
          }
        }
      }
    },
    "queryArgs": {
      "type": "object",
      "description": "Term and facets used in the query.",
      "properties": {
        "query": {
          "type": "string",
          "description": "Search term used in the query."
        },
        "selectedFacets": {
          "type": "array",
          "description": "Facets used in the query.",
          "items": {
            "type": "object",
            "description": "Selected facet information.",
            "properties": {
              "key": {
                "type": "string",
                "description": "facet key."
              },
              "value": {
                "type": "string",
                "description": "facet value."
              }
            }
          }
        }
      }
    },
    "translated": {
      "type": "boolean",
      "description": "Defines whether the facets were translated by Intelligent Search (`true`) or not (`false`)."
    }
  }
}