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

# Validate Column Mapping

> One-shot LLM validation of a proposed column mapping.

Takes the proposed mapping and sample rows from the document's file_analysis,
returns advisory warnings. Non-blocking — user can still confirm.

Requires: map_pricing:read permission



## OpenAPI

````yaml /openapi/merchantops-public.json post /api/lakehouse/documents/{document_id}/mapping/validate
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/lakehouse/documents/{document_id}/mapping/validate:
    post:
      tags:
        - Product Lakehouse
      summary: Validate Column Mapping
      description: >-
        One-shot LLM validation of a proposed column mapping.


        Takes the proposed mapping and sample rows from the document's
        file_analysis,

        returns advisory warnings. Non-blocking — user can still confirm.


        Requires: map_pricing:read permission
      operationId: validate_column_mapping
      parameters:
        - in: path
          name: document_id
          required: true
          schema:
            title: Document Id
            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/MappingValidateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingValidateResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    MappingValidateRequest:
      description: Request body for one-shot LLM validation.
      properties:
        column_mapping:
          additionalProperties:
            anyOf:
              - type: string
              - type: 'null'
          title: Column Mapping
          type: object
      required:
        - column_mapping
      title: MappingValidateRequest
      type: object
    MappingValidateResponse:
      description: Response with advisory warnings.
      properties:
        warnings:
          default: []
          items:
            type: string
          title: Warnings
          type: array
      title: MappingValidateResponse
      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

````