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

# Upload Report

> Upload the image or PDF file

Upload the image or PDF file following the document specifications below. Ensure you define the document type and tasks you want to process in the query parameters.
**Document Specifications**

* **PDF Documents**: Ensure the file is complete and legible.
* **Images**:
  * Preferred DPI: **150+**
  * Images must be **non-blurred**
  * **Avoid** images with a high degree of **non-linear warping** or **rotation** for optimal processing accuracy.

**File Size Limit**

* Maximum allowed file size: **10 MB**
* **Files larger than 10 MB:** Use the [Request Upload](https://developer.eka.care/api-reference/user-app/records/create-overview) flow to upload larger files.


## OpenAPI

````yaml POST /mr/api/v2/docs
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/v2/docs:
    post:
      tags:
        - Records
      summary: Upload Record
      description: Upload the image or PDF file
      operationId: uploadDocument
      parameters:
        - in: query
          name: dt
          schema:
            $ref: '#/components/schemas/DocumentTypeQueryParamV2'
        - in: query
          name: task
          required: true
          schema:
            $ref: '#/components/schemas/UploadTaskQueryParam'
        - in: query
          name: batch
          description: >-
            if you are upload document in batch the pass this information as
            true
          schema:
            type: boolean
        - name: X-Pt-Id
          in: header
          schema:
            type: string
          description: eka user id (OID)
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: base64
                  title: file
                  description: The file to be uploaded.
              required:
                - file
      responses:
        '200':
          description: File uploaded successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  document_id:
                    type: string
                    format: uuid
                    description: The unique identifier for the uploaded document.
                    example: 8570e23d-ee57-4948-95a7-370f0f113db8
        '400':
          description: Bad request, typically due to missing or invalid fields.
          content:
            text/plain:
              schema:
                type: string
                example: Invalid form data.
        '403':
          description: Forbidden Access
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Forbidden
        '500':
          description: Internal Server Error. No response body is expected.
        '502':
          description: Bad Gateway. No response body is expected.
        '503':
          description: Service Unavailable. No response body is expected.
        '504':
          description: Gateway Timeout. No response body is expected.
      security:
        - auth: []
components:
  schemas:
    DocumentTypeQueryParamV2:
      type: string
      description: |
        Specifies the type of document being uploaded. 
        The following values are allowed:
        - `lr`: Lab Report
      enum:
        - lr
    UploadTaskQueryParam:
      type: string
      description: |
        Specifies the type of document being uploaded. 
        The following values are allowed:
        - `smart`: Parse the document to smart report
        - `pii`: Parse Personal Identification Information from the document
        - `classification`: Parse classification document
      enum:
        - smart
        - pii
        - classification
  securitySchemes:
    auth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````