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

# Get Product Facets

> Return facet values for product filters.

Shape: ``{builtin: {brands, sources, product_types, enrichment_statuses,
users}, properties: {<key>: {label, values}, ...}}``.

Property facets are included when the PropertyDefinition is
``isFacetable=true``, ``level='product'``, and the distinct non-empty
value count is between ``PROPERTY_FACET_MIN_CARDINALITY`` and
``PROPERTY_FACET_MAX_CARDINALITY``.

When ``product_type`` is supplied, the property facets are intersected
with the ProductType's property list — so "Bra Type" stops appearing
when the user is browsing shoes.



## OpenAPI

````yaml /openapi/merchantops-public.json get /api/products/facets
openapi: 3.1.0
info:
  description: >-
    Public API for the MerchantOps product catalog, pricing, and publishing
    surface.
  title: MerchantOps API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.merchantops.ai
security: []
paths:
  /api/products/facets:
    get:
      tags:
        - Products
      summary: Get Product Facets
      description: |-
        Return facet values for product filters.

        Shape: ``{builtin: {brands, sources, product_types, enrichment_statuses,
        users}, properties: {<key>: {label, values}, ...}}``.

        Property facets are included when the PropertyDefinition is
        ``isFacetable=true``, ``level='product'``, and the distinct non-empty
        value count is between ``PROPERTY_FACET_MIN_CARDINALITY`` and
        ``PROPERTY_FACET_MAX_CARDINALITY``.

        When ``product_type`` is supplied, the property facets are intersected
        with the ProductType's property list — so "Bra Type" stops appearing
        when the user is browsing shoes.
      operationId: get_product_facets
      parameters:
        - description: >-
            When supplied, restrict property facets to keys referenced by the
            given ProductType. Built-in facets (brands, types, statuses, users)
            are unchanged. Distinct-value counts are also computed only over
            products of this type, so cardinality reflects the filtered list.
          in: query
          name: product_type
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              When supplied, restrict property facets to keys referenced by the
              given ProductType. Built-in facets (brands, types, statuses,
              users) are unchanged. Distinct-value counts are also computed only
              over products of this type, so cardinality reflects the filtered
              list.
            title: Product Type
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: X-Organization-ID
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Organization-Id
        - in: cookie
          name: stytch_session
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Stytch Session
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Get Product Facets Api Products Facets Get
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````