> ## 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 Publish History

> Per-version publish history for a product, derived from
``catalog_publish_records`` (each record pins ``product_version`` and
carries ``publish_outcomes[target_key][env]``).

Returns the latest SUCCESSFUL publish per (version, target_key, env) as
``{key, history: [{version, target_key, target_env, target_name,
published_at}]}`` — drives the per-version "where published" badges on
the product detail page. Single-product query, indexed by
``(organization_id, product_key)``.



## OpenAPI

````yaml /openapi/merchantops-public.json get /api/products/{key}/publish-history
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}/publish-history:
    get:
      tags:
        - Products
      summary: Get Publish History
      description: |-
        Per-version publish history for a product, derived from
        ``catalog_publish_records`` (each record pins ``product_version`` and
        carries ``publish_outcomes[target_key][env]``).

        Returns the latest SUCCESSFUL publish per (version, target_key, env) as
        ``{key, history: [{version, target_key, target_env, target_name,
        published_at}]}`` — drives the per-version "where published" badges on
        the product detail page. Single-product query, indexed by
        ``(organization_id, product_key)``.
      operationId: get_publish_history
      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:
                additionalProperties: true
                title: >-
                  Response Get Publish History Api Products  Key  Publish
                  History 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

````