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

# Update Appointment V2

> 
### Overview

This API endpoint is used to update an existing appointment.



## OpenAPI

````yaml patch /dr/v2/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/v2/appointment/{appointment_id}:
    patch:
      tags:
        - Appointment API
      summary: Update Appointment V2
      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:
                token:
                  type: integer
                  description: >-
                    A unique number given to each patient to indicate their
                    position in the queue.
                appointment_details:
                  type: object
                  properties:
                    start_time:
                      type: integer
                      description: Start time of the appointment in epoch
                      example: 1730189586
                    end_time:
                      type: integer
                      description: End time of the appointment in epoch
                      example: 1730189586
                    mode:
                      type: string
                      enum:
                        - INCLINIC
                        - PHONE
                        - VIDEO
                      example: VIDEO
                    custom_attributes:
                      type: object
                      description: >-
                        `Custom attributes` and `value` for each custom
                        attribute are a fixed set of enum defined by our partner
                        at the time of onboarding. `Labels` and `Tags` are
                        `special type` of custom attributes which exist by
                        default for every partner and are visible in appointment
                        queue. key-value pair within labels and tags can be
                        defined by each repective partner. Position of other
                        custom attributes in appointment queue need to
                        configured by partner.
                    video_connect:
                      type: object
                      description: >-
                        Configuration of video connect. To be used only when
                        mode is `VIDEO`
                      properties:
                        vendor:
                          type: string
                          enum:
                            - other
                        url:
                          type: string
                          example: https://meet.google.com/landing
                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.
                  properties:
                    key1:
                      type: string
                      example: value1
                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"`
              oneOf:
                - title: EkaIds
                  properties:
                    clinic_id:
                      type: string
                      description: Identifier for the clinic in Eka.
                      example: '6742984'
                    doctor_id:
                      type: string
                      description: Identifier for the doctor in Eka.
                      example: '6742984'
                    patient_id:
                      type: string
                      description: Identifier for the patient in Eka.
                      example: '6742984'
                  required:
                    - clinic_id
                    - doctor_id
                    - patient_id
                - title: PartnerIds
                  properties:
                    partner_clinic_id:
                      type: string
                      description: >-
                        Identifier for the partner’s clinic. Please ensure the
                        clinic is registered on the hub
                      example: '6742984'
                    partner_doctor_id:
                      type: string
                      description: >-
                        Identifier for the partner’s doctor. Please ensure the
                        doctor is registered on the hub
                      example: '6742984'
                    partner_patient_id:
                      type: string
                      description: >-
                        Identifier for the partner’s patient. Please ensure the
                        patient is registered beforehand using the "Add Patient"
                        API.
                      example: '6742984'
                  required:
                    - partner_clinic_id
                    - partner_doctor_id
                    - partner_patient_id
      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

````