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

# Batch Delete Variants

> Batch hard delete Variants by keys.

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



## OpenAPI

````yaml /openapi/merchantops-public.json post /api/products/{product_key}/variants/batch-delete
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/batch-delete:
    post:
      tags:
        - Variants
      summary: Batch Delete Variants
      description: |-
        Batch hard delete Variants by keys.

        **Authentication Required**: Requires ``variant:delete`` permission.
      operationId: batch_delete_variants
      parameters:
        - in: path
          name: product_key
          required: true
          schema:
            title: Product 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
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VariantBatchDeleteRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariantBatchDeleteResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    VariantBatchDeleteRequest:
      description: Request model for batch deleting variants.
      properties:
        keys:
          description: List of variant keys to delete
          items:
            type: string
          title: Keys
          type: array
      required:
        - keys
      title: VariantBatchDeleteRequest
      type: object
    VariantBatchDeleteResponse:
      description: Response model for batch variant deletion.
      properties:
        deleted:
          description: Number of variants deleted
          title: Deleted
          type: integer
      required:
        - deleted
      title: VariantBatchDeleteResponse
      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

````