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

> This endpoint allows updating details of an existing medical case using the case ID.



## OpenAPI

````yaml patch /mr/api/v1/cases/{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/cases/{id}:
    patch:
      tags:
        - Cases
      summary: Update Case
      description: >-
        This endpoint allows updating details of an existing medical case using
        the case ID.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: Unique case ID
        - in: header
          name: X-Pt-Id
          required: true
          schema:
            type: string
          description: Patient ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                display_name:
                  type: string
                  description: Human-readable name for the case
                  example: Leg Injury
                hi_type:
                  type: string
                  enum:
                    - OPConsultation
                    - Prescription
                    - DischargeSummary
                    - DiagnosticReport
                    - ImmunizationRecord
                    - HealthDocumentRecord
                    - WellnessRecord
                  description: |
                    Type of case
                  example: OPConsultation
                type:
                  type: string
                  description: Type of the case
                  example: OP
                occurred_at:
                  type: integer
                  format: unixtime
                  description: Timestamp when the event occurred (Unix timestamp)
                  example: 1678886400
                partner_meta:
                  type: object
                  additionalProperties: true
                  description: |
                    metadata attached to the case.
                  example:
                    facility_id: GH
                    uhid: UHID_1234
      responses:
        '204':
          description: Case updated successfully (no content)
        '400':
          description: Bad request (missing/invalid fields)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Missing required field: type'
                  code:
                    type: string
                    example: BAD_REQUEST
        '401':
          description: Unauthorized - Invalid token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid or expired token
                  code:
                    type: string
                    example: UNAUTHORIZED
        '404':
          description: Case not found – the specified case ID does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Case not found for the given ID
                  code:
                    type: string
                    example: CASE_NOT_FOUND
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Something went wrong while processing the request
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
      security:
        - auth: []
components:
  securitySchemes:
    auth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````