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

# Update Appointment

> 
### Overview

This API endpoint is used to update an existing appointment.



## OpenAPI

````yaml patch /dr/v1/appointment/{appointment_id}
openapi: 3.0.0
info:
  title: Ekacare API & Webhook Documentation
  contact: {}
  version: '1.0'
servers:
  - description: Production
    url: https://api.eka.care
  - description: Stage/Sandbox
    url: https://api.dev.eka.care
security: []
paths:
  /dr/v1/appointment/{appointment_id}:
    patch:
      tags:
        - Appointment API
      summary: Update Appointment
      description: |-

        ### Overview

        This API endpoint is used to update an existing appointment.
      operationId: UpdateAppointment
      parameters:
        - name: auth
          in: header
          description: ''
          required: true
          style: simple
          schema:
            type: string
            example: auth
        - name: appointment_id
          in: path
          description: ''
          required: true
          style: simple
          schema:
            type: string
        - name: partner_id
          in: query
          description: >-
            If set to 1 then appointment_id in path parameter should be
            partner_appointment_id else eka apppointment_id
          required: false
          style: form
          explode: true
          schema:
            type: string
            example: '1'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              type: object
              properties:
                custom_attributes:
                  type: object
                partner_meta:
                  type: object
                  description: >-
                    This field is a set of key-value pair very specific to our
                    partner and not visible in appointment queue. These
                    key-value pairs are just stored at our end and echoed back
                    in appointment related apis. We dont use it for any
                    computation. In case of update it will be completely
                    overridden.
                start_time:
                  type: integer
                  description: >-
                    Start time of new appointment in epoch. To be used in order
                    to reschedule appointment.
                end_time:
                  type: integer
                  description: >-
                    End time of new appointment in epoch. To be used in order to
                    reschedule appointment.
                token:
                  type: integer
                  description: >-
                    A unique number given to each patient to indicate their
                    position in the queue.
                video_connect:
                  type: object
                  properties:
                    vendor:
                      type: string
                      example: 100ms
                      description: Vendor identifier
                    url:
                      type: string
                      example: https://xyz.com/landing
                      description: url for connecting online
                    pt_joined:
                      type: integer
                      example: 1747311346
                      description: Epoch time
                patient_details:
                  type: object
                  properties:
                    designation:
                      type: string
                      enum:
                        - Mr.
                        - Ms.
                        - Mrs.
                        - Miss.
                        - Kumar.
                        - Shri.
                        - Smt.
                        - Dr.
                        - Master.
                        - Baby.
                        - Mohd.
                        - B/O
                      example: Mr.
                      description: Title or designation of the patient
                    first_name:
                      type: string
                      example: Test
                      description: First name of the patient
                    partner_patient_id:
                      type: string
                      example: '6742984'
                      description: Identifier for the partner’s patient.
                    middle_name:
                      type: string
                      example: ''
                      description: Middle name of the patient (if any)
                    last_name:
                      type: string
                      example: Patient
                      description: Last name of the patient
                    mobile:
                      type: string
                      example: '+919999999999'
                      description: Mobile number of the patient, including country code
                    gender:
                      type: string
                      example: M
                      description: >-
                        Gender of the patient (e.g., 'M' for male, 'F' for
                        female, 'O' for others)
                      enum:
                        - M
                        - F
                        - O
                    address:
                      type: object
                      properties:
                        city:
                          type: string
                          example: Bangalore
                        pincode:
                          type: integer
                          example: 560049
                      description: Address details of the patient
                  oneOf:
                    - title: DOB
                      properties:
                        dob:
                          type: string
                          format: date
                          example: '1987-01-06'
                          description: Date of birth of the patient (YYYY-MM-DD)
                      required:
                        - dob
                    - title: AGE
                      properties:
                        age:
                          type: integer
                          example: 24
                          description: Age in years
                      required:
                        - age
                display_meta:
                  type: object
                  description: >
                    - This field is a set of `key-value pair`.

                    - The value corresponding to a key must be string, int, or
                    float.

                    - Keys in `display_meta` must not exceed 30 characters.

                    - The value for a key must not exceed 50 characters.

                    - These key-value pairs will be shown on the appointment
                    card.

                    - For key names, it is recommended to use underscores (`_`)
                    instead of spaces. 
                      During display, underscores will be replaced with spaces, and the following 
                      letter will be capitalized automatically.
                    - Example:  
                      `"vendor_patient_id": "P41025551968206"` will be shown as 
                      `"Vendor Patient Id": "P41025551968206"`
            example:
              custom_attributes:
                label:
                  - vital_submitted
                tags:
                  - in_consult
                  - paid
              partner_meta: {}
              patient_details:
                designation: Mr.
                first_name: Test
                middle_name: ''
                last_name: Patient
                mobile: '+919999999999'
                gender: M
                dob: '1987-01-06'
                address:
                  city: Bangalore
                  pincode: 560049
                partner_patient_id: '6742984'
              token: 2
              video_connect:
                vendor: 100ms
                url: https://xyz.live/meeting/nfo-necy-cwg
                pt_joined: 1747311346
              display_meta:
                key1: value1
      responses:
        '204':
          description: OK
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                  example: Thu, 16 Apr 2020 08:47:12 GMT
            Transfer-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                  example: chunked
            Connection:
              content:
                text/plain:
                  schema:
                    type: string
                  example: keep-alive
            Server:
              content:
                text/plain:
                  schema:
                    type: string
                  example: nginx/1.10.3 (Ubuntu)
            Vary:
              content:
                text/plain:
                  schema:
                    type: string
                  example: Accept-Encoding
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                  example: max-age=15768000
            Content-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                  example: gzip
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
              example:
                error:
                  code: INVALID_REQUEST
                  message: The request is invalid or missing required parameters
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
              example:
                error:
                  code: APPOINTMENT_NOT_FOUND
                  message: The specified appointment ID does not exist
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
              example:
                error:
                  code: SERVER_ERROR
                  message: An unexpected error occurred on the server
      deprecated: false

````