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

# Create Batches From Preview

> Create actual batch documents from a preview configuration and assign proposals.



## OpenAPI

````yaml /openapi/merchantops-public.json post /api/pricing/batches/create-from-preview
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/pricing/batches/create-from-preview:
    post:
      tags:
        - Pricing
        - Pricing
        - Price Batches
      summary: Create Batches From Preview
      description: >-
        Create actual batch documents from a preview configuration and assign
        proposals.
      operationId: create_batches_from_preview
      parameters:
        - 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
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBatchesFromPreviewRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    CreateBatchesFromPreviewRequest:
      description: Request body for creating batches from a preview.
      properties:
        batches:
          items:
            $ref: '#/components/schemas/BatchFromPreviewItem'
          title: Batches
          type: array
        comparison_run_id:
          title: Comparison Run Id
          type: string
      required:
        - comparison_run_id
        - batches
      title: CreateBatchesFromPreviewRequest
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    BatchFromPreviewItem:
      description: A single batch to create from preview.
      properties:
        brand_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Brand Key
        effective_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Effective Date
        existing_batch_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Existing Batch Key
        name:
          title: Name
          type: string
        proposal_keys:
          items:
            type: string
          title: Proposal Keys
          type: array
      required:
        - name
        - proposal_keys
      title: BatchFromPreviewItem
      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

````