> ## 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.

# List Variant Keys

> Return up to ``VARIANT_KEYS_HARD_CAP`` variant keys matching the filter.

Backs "Select all N matching" on the variants page. Accepts the SAME
``q`` / ``property_filter`` as ``GET /`` — parsed by the same helper, so
the materialized set is exactly the visible rows — and deliberately NO
``sort_by`` / ``sort_dir``: order never changes the matching set.

Shape mirrors ``GET /api/products/keys``:
``{"keys": [...], "total": int, "truncated": bool}`` — ``total`` is the
true count, ``truncated`` is true when it exceeds the cap.

**Authentication Required**: Requires ``variant:read`` permission.



## OpenAPI

````yaml /openapi/merchantops-public.json get /api/products/{product_key}/variants/keys
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/{product_key}/variants/keys:
    get:
      tags:
        - Variants
      summary: List Variant Keys
      description: |-
        Return up to ``VARIANT_KEYS_HARD_CAP`` variant keys matching the filter.

        Backs "Select all N matching" on the variants page. Accepts the SAME
        ``q`` / ``property_filter`` as ``GET /`` — parsed by the same helper, so
        the materialized set is exactly the visible rows — and deliberately NO
        ``sort_by`` / ``sort_dir``: order never changes the matching set.

        Shape mirrors ``GET /api/products/keys``:
        ``{"keys": [...], "total": int, "truncated": bool}`` — ``total`` is the
        true count, ``truncated`` is true when it exceeds the cap.

        **Authentication Required**: Requires ``variant:read`` permission.
      operationId: list_variant_keys
      parameters:
        - in: path
          name: product_key
          required: true
          schema:
            title: Product Key
            type: string
        - description: 'Repeatable: key:value. Filters by properties.<key> = value.'
          in: query
          name: property_filter
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: 'Repeatable: key:value. Filters by properties.<key> = value.'
            title: Property Filter
        - description: >-
            Case-insensitive substring match on variant key, name, color, size,
            width, or vendor color code.
          in: query
          name: q
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Case-insensitive substring match on variant key, name, color,
              size, width, or vendor color code.
            title: Q
        - 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 List Variant Keys Api Products  Product Key  Variants
                  Keys 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

````