> ## Documentation Index
> Fetch the complete documentation index at: https://ekacare-fix-ts-sdk-github-npm-links.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Status changed

> 
When status of an appointment changes, a webhook event is sent to registered webhooks with details about the appointment, including the appointment ID, status, doctor ID, patient ID, and event type.

**Field Definitions**

• **event**: string - The type of resource for which event is generated. Here, it will be `appointment.statuschange`.

• **service**: string - The type of service. For appointments, this will be `appointment`.

• **data**: object - Contains detailed information about the appointment event.

• **appointment_id**: string - Unique identifier for the appointment.

• **doctor_id**: string - Unique identifier for the doctor.

• **patient_id**: string - Unique identifier for the patient.

• **status**: string - Status of the appointment. Possible values can be 

  - "BK" (Booked),

  - "OG" (Ongoing),

  - "CM" (Completed with Prescription),

  - "CMNP" (Completed without Prescription),

  - "CN" (Cancelled).


• **action**: string - Current action for the appointment. Possible values can be 

    - created

    - modified

    - completed

• **partner_meta**: key value pair specified by `partner` while creating appointment.  

• **timestamp**: string (ISO 8601) - The date and time when the event occurred.

• **custom_attibutes**: complete set of custom attributes(inclusing tags and labels) defined against this appointment. occurred.

**Example Webhook Request**

**Endpoint:** [https://your-registered-webhook-url.com](https://your-registered-webhook-url.com)

**Method:** POST



## OpenAPI

````yaml post /registered_url_for_status_change_events
openapi: 3.1.0
info:
  title: Transaction Status API
  version: 1.0.0
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://{partner_host}
    variables:
      partner_host:
        default: api.example.com
        description: Partner API host
security: []
paths:
  /registered_url_for_status_change_events:
    post:
      tags:
        - Appointment Webhooks
      summary: Status changed
      description: >-

        When status of an appointment changes, a webhook event is sent to
        registered webhooks with details about the appointment, including the
        appointment ID, status, doctor ID, patient ID, and event type.


        **Field Definitions**


        • **event**: string - The type of resource for which event is generated.
        Here, it will be `appointment.statuschange`.


        • **service**: string - The type of service. For appointments, this will
        be `appointment`.


        • **data**: object - Contains detailed information about the appointment
        event.


        • **appointment_id**: string - Unique identifier for the appointment.


        • **doctor_id**: string - Unique identifier for the doctor.


        • **patient_id**: string - Unique identifier for the patient.


        • **status**: string - Status of the appointment. Possible values can
        be 

          - "BK" (Booked),

          - "OG" (Ongoing),

          - "CM" (Completed with Prescription),

          - "CMNP" (Completed without Prescription),

          - "CN" (Cancelled).


        • **action**: string - Current action for the appointment. Possible
        values can be 

            - created

            - modified

            - completed

        • **partner_meta**: key value pair specified by `partner` while creating
        appointment.  


        • **timestamp**: string (ISO 8601) - The date and time when the event
        occurred.


        • **custom_attibutes**: complete set of custom attributes(inclusing tags
        and labels) defined against this appointment. occurred.


        **Example Webhook Request**


        **Endpoint:**
        [https://your-registered-webhook-url.com](https://your-registered-webhook-url.com)


        **Method:** POST
      operationId: StatusChangeAppointmentWebhook
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              type: object
              required:
                - event
                - event_time
                - timestamp
                - client_id
                - business_id
                - data
              properties:
                business_id:
                  type: string
                  example: '77133577914507'
                  description: Business ID for the appointment
                client_id:
                  type: string
                  example: ''
                  description: Client ID for the appointment
                event:
                  type: string
                  example: appointment.statuschange
                  description: Type of event
                event_time:
                  type: integer
                  example: 1749544752
                  description: Event occurred timestamp
                service:
                  type: string
                  example: appointment
                  description: Service related to the event
                timestamp:
                  type: integer
                  example: 1730189586
                  description: Timestamp of the event
                transaction_id:
                  type: string
                  example: api-53423-GH_228766880001
                  description: Transaction ID for the event
                data:
                  type: object
                  required:
                    - appointment_id
                    - clinic_id
                    - doctor_id
                    - patient_id
                    - status
                    - created_at
                    - modified_at
                  properties:
                    appointment_id:
                      type: string
                      example: api-53423-GH_228766880001
                      description: Unique appointment ID
                    clinic_id:
                      type: string
                      example: 678f4fcd4ce758001d3624ee
                      description: Identifier for the clinic
                    created_at:
                      type: integer
                      example: 1749532041
                      description: Creation timestamp
                    custom_attributes:
                      type: object
                      properties:
                        label:
                          type: array
                          items:
                            type: string
                          example:
                            - vitals_submitted
                        tags:
                          type: array
                          items:
                            type: string
                          example:
                            - paid
                            - in_consult
                      description: Custom attributes for the appointment
                    doctor_id:
                      type: string
                      example: '173744358327115'
                      description: Identifier for the doctor
                    modified_at:
                      type: integer
                      example: 1749544752
                      description: Modification timestamp
                    partner_appointment_id:
                      type: string
                      example: GH_228766880001
                      description: Partner's appointment ID
                    partner_clinic_id:
                      type: string
                      example: CL04
                      description: Partner’s clinic identifier
                    partner_doctor_id:
                      type: string
                      example: sheilly
                      description: Partner’s doctor identifier
                    partner_meta:
                      type: object
                      properties:
                        appointment_id:
                          type: string
                          example: api-abb67007-1e53-4f0f-b428-a4bc025468a4
                        encounter_id:
                          type: string
                          example: '228766880001'
                        facility_id:
                          type: string
                          example: GH
                      description: Partner-specific metadata
                    partner_patient_id:
                      type: string
                      example: MM01156831
                      description: Partner’s patient identifier
                    patient_id:
                      type: string
                      example: '173986493567406'
                      description: Identifier for the patient
                    status:
                      type: string
                      example: CM
                      description: Status of the appointment
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false

````