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

# Mass Create Price Records

> Mass create price records for multiple variants of a product.



## OpenAPI

````yaml /openapi/merchantops-public.json post /api/pricing/records/mass-create
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/records/mass-create:
    post:
      tags:
        - Pricing
        - Pricing
        - Price Records
      summary: Mass Create Price Records
      description: Mass create price records for multiple variants of a product.
      operationId: mass_create_price_records
      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/MassCreatePriceRecordsRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    MassCreatePriceRecordsRequest:
      description: >-
        Request body for mass creating price records across variants.


        Batch strategy controls whether the created records are associated with
        a

        price batch on creation. Options:
          - "auto": find-or-create an open batch keyed on (org, effective_date, brand).
          - "existing": attach to the batch identified by batch_key (must be open).
          - "new": create a new batch using batch_name (effective_date + brand inferred).
          - "none": skip batch association entirely (legacy behavior).
      properties:
        amount:
          title: Amount
          type: number
        batch_key:
          anyOf:
            - type: string
            - type: 'null'
          description: Required when batch_strategy='existing'
          title: Batch Key
        batch_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Required when batch_strategy='new'
          title: Batch Name
        batch_strategy:
          default: auto
          description: '''auto'' | ''existing'' | ''new'' | ''none'''
          title: Batch Strategy
          type: string
        effective_from:
          title: Effective From
          type: string
        price_type:
          default: map
          title: Price Type
          type: string
        product_key:
          title: Product Key
          type: string
        variant_keys:
          items:
            type: string
          title: Variant Keys
          type: array
      required:
        - product_key
        - variant_keys
        - amount
        - effective_from
      title: MassCreatePriceRecordsRequest
      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

````