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

> Get all versions of a product.

**Authentication Required**: Requires `product:read` permission.
Returns all versions sorted by version number DESC (newest first).



## OpenAPI

````yaml /openapi/merchantops-public.json get /api/products/{key}/versions
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/{key}/versions:
    get:
      tags:
        - Products
      summary: Get Product Versions
      description: |-
        Get all versions of a product.

        **Authentication Required**: Requires `product:read` permission.
        Returns all versions sorted by version number DESC (newest first).
      operationId: get_product_versions
      parameters:
        - in: path
          name: key
          required: true
          schema:
            title: 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/ProductVersionsResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    ProductVersionsResponse:
      description: Response containing all versions of a product.
      properties:
        key:
          description: Product key
          title: Key
          type: string
        productionVersion:
          anyOf:
            - type: integer
            - type: 'null'
          description: Version number with 'Production' label
          title: Productionversion
        totalVersions:
          description: Total number of versions
          title: Totalversions
          type: integer
        versions:
          description: All versions, sorted DESC
          items:
            $ref: '#/components/schemas/ProductVersionResponse'
          title: Versions
          type: array
      required:
        - key
        - versions
        - totalVersions
      title: ProductVersionsResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ProductVersionResponse:
      description: Response model for a single product version.
      properties:
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          description: Confidence score (0-1)
          title: Confidence
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          description: Creation timestamp
          title: Createdat
        createdBy:
          anyOf:
            - type: string
            - type: 'null'
          description: User who created this version
          title: Createdby
        enrichmentScore:
          anyOf:
            - type: number
            - type: 'null'
          description: Quality score (0-1)
          title: Enrichmentscore
        enrichmentSources:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Buckets that contributed to merged product
          title: Enrichmentsources
        id:
          description: MongoDB ObjectId as string
          title: Id
          type: string
        isPublished:
          default: false
          description: Published status
          title: Ispublished
          type: boolean
        key:
          description: Internal unique identifier (shared across versions)
          title: Key
          type: string
        labels:
          description: Version labels
          items:
            type: string
          title: Labels
          type: array
        lakehouseMatched:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Did lakehouse_search contribute any property?
          title: Lakehousematched
        lakehousePropertiesCount:
          anyOf:
            - type: integer
            - type: 'null'
          description: Properties sourced from lakehouse
          title: Lakehousepropertiescount
        langfuseTraceId:
          anyOf:
            - type: string
            - type: 'null'
          description: Langfuse trace ID for this enrichment run
          title: Langfusetraceid
        productType:
          additionalProperties: true
          description: Product type reference
          title: Producttype
          type: object
        properties:
          additionalProperties: true
          description: Product data
          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
        scrapeWarnings:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: >-
            Scrape-quality warnings if the brand-site scrape returned suspect
            content
          title: Scrapewarnings
        source:
          description: Source of product data
          title: Source
          type: string
        status:
          anyOf:
            - type: string
            - type: 'null'
          description: 'Status: complete, failed, partial'
          title: Status
        version:
          description: Version number
          title: Version
          type: integer
        version_commit_message:
          anyOf:
            - type: string
            - type: 'null'
          description: Commit message for this version
          title: Version Commit Message
        version_created_from:
          anyOf:
            - type: integer
            - type: 'null'
          description: Version this was cloned from
          title: Version Created From
      required:
        - id
        - key
        - version
        - source
        - productType
      title: ProductVersionResponse
      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

````