> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wavecentric.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Document Operations

> Atomic update of a single field in a document. Handles server-side encryption for sensitive data.

Update or delete specific documents in the Data Lake.


## OpenAPI

````yaml PATCH /api/v1/datalake/{source}/databases/{db}/documents/{id}
openapi: 3.1.0
info:
  title: WaveCentric AI LooP API
  description: >-
    Comprehensive API for managing omnichannel logistics, inquiries, tasks, and
    data lake operations.
  version: 1.0.0
servers:
  - url: https://ai-loop.alpeadria.com
    description: Production server
security: []
paths:
  /api/v1/datalake/{source}/databases/{db}/documents/{id}:
    patch:
      tags:
        - Data Lake
      summary: Update document field
      description: >-
        Atomic update of a single field in a document. Handles server-side
        encryption for sensitive data.
      operationId: patch-datalake-document
      parameters:
        - name: source
          in: path
          required: true
          schema:
            type: string
        - name: db
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                field:
                  type: string
                  description: The field name to update
                value:
                  description: The new value for the field
              required:
                - field
                - value
      responses:
        '200':
          description: Field updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  changes:
                    type: object
                    properties:
                      field:
                        type: string
                      from: {}
                      to: {}
              examples:
                success:
                  value:
                    message: Update successful
                    changes:
                      field: title
                      from: Old Title
                      to: New Title
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````