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

> Get a single Variant by key.

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



## OpenAPI

````yaml /openapi/merchantops-public.json get /api/products/{product_key}/variants/{variant_key}
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/{variant_key}:
    get:
      tags:
        - Variants
      summary: Get Variant
      description: |-
        Get a single Variant by key.

        **Authentication Required**: Requires ``variant:read`` permission.
      operationId: get_variant
      parameters:
        - in: path
          name: product_key
          required: true
          schema:
            title: Product Key
            type: string
        - in: path
          name: variant_key
          required: true
          schema:
            title: Variant Key
            type: string
        - 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:
                $ref: '#/components/schemas/VariantResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    VariantResponse:
      description: Response model for a single Variant.
      properties:
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          description: Creation timestamp
          title: Createdat
        createdBy:
          anyOf:
            - type: string
            - type: 'null'
          description: User who created this
          title: Createdby
        id:
          description: MongoDB ObjectId as string
          title: Id
          type: string
        isPublished:
          default: false
          description: Published status
          title: Ispublished
          type: boolean
        key:
          description: Variant key, unique within a product
          title: Key
          type: string
        lastModifiedAt:
          anyOf:
            - type: string
            - type: 'null'
          description: Last modification timestamp
          title: Lastmodifiedat
        lastModifiedBy:
          anyOf:
            - type: string
            - type: 'null'
          description: User who last modified this
          title: Lastmodifiedby
        productType:
          additionalProperties: true
          description: Product type reference
          title: Producttype
          type: object
        product_key:
          description: Key of the parent Product
          title: Product Key
          type: string
        properties:
          additionalProperties: true
          description: Variant data keyed by PropertyDefinition key
          title: Properties
          type: object
        properties_metadata:
          additionalProperties:
            additionalProperties: true
            type: object
          description: Per-property metadata
          title: Properties Metadata
          type: object
        propertyCount:
          default: 0
          description: Number of properties with values
          title: Propertycount
          type: integer
      required:
        - id
        - key
        - product_key
        - productType
      title: VariantResponse
      type: object
    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

````