> ## Documentation Index
> Fetch the complete documentation index at: https://ekacare-quickstart-cleanup.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Document

> This API is used to update the document.



## OpenAPI

````yaml patch /mr/api/v1/docs/{id}
openapi: 3.0.0
info:
  title: Document Upload API
  description: API to pre-sign the URL for uploading documents.
  version: 1.0.0
  license:
    name: Proprietary License
    url: https://developer.eka.care/license
servers:
  - url: https://api.eka.care
    description: Production server
  - url: https://api.dev.eka.care
    description: Development server
security: []
tags:
  - name: Records
    description: API related to records document management.
paths:
  /mr/api/v1/docs/{id}:
    patch:
      summary: Update Document
      description: This API is used to update the document.
      parameters:
        - name: id
          in: path
          required: true
          description: Document ID to update the document details.
          schema:
            type: string
            example: 2df9e795-d368-4ceb-be9d-b44281703827
        - name: X-Pt-Id
          in: header
          required: true
          schema:
            type: string
          description: eka user id (OID)
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                dt:
                  type: string
                  nullable: true
                  example: lr
                ndhm:
                  type: boolean
                  nullable: true
                  description: If true, the record will be linked.
                  example: true
                oid:
                  type: string
                  nullable: true
                  description: OID associated with the document.
                  example: '161847797963700'
                dd_e:
                  type: integer
                  nullable: true
                  format: int64
                  description: Format should be in epoch seconds.
                  example: 1614556800
                tg:
                  type: array
                  uniqueItems: true
                  nullable: true
                  description: >-
                    Tags associated with the uploaded documents. The rules for
                    tags are the same as the upload API.
                  example:
                    - covid
                  items:
                    type: string
                cases:
                  type: array
                  uniqueItems: true
                  nullable: true
                  items:
                    type: string
                  description: List of cases linked with Medical Record.
                metadata:
                  type: string
                  description: Metadata associated with document (FHIR Bundle Format).
              anyOf:
                - required:
                    - dt
                - required:
                    - ndhm
                - required:
                    - oid
                - required:
                    - dd_e
                - required:
                    - tg
      responses:
        '200':
          description: Document linked successfully.
        '404':
          description: No such document.
        5XX:
          description: Unexpected error.
      security:
        - auth: []
components:
  securitySchemes:
    auth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````