v1

latestOpenAPI 3.0.32026-07-26229361630.0 KB
Appointment Webhooks

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

Method: POST

post/registered_url_for_status_change_events

Request body

business_idstring required

Business ID for the appointment

client_idstring required

Client ID for the appointment

eventstring required

Type of event

event_timeinteger required

Event occurred timestamp

servicestring

Service related to the event

timestampinteger required

Timestamp of the event

transaction_idstring

Transaction ID for the event

Example request

{
  "business_id": "77133577914507",
  "event": "appointment.statuschange",
  "event_time": 1749544752,
  "service": "appointment",
  "timestamp": 1730189586,
  "transaction_id": "api-53423-GH_228766880001",
  "data": {
    "appointment_id": "api-53423-GH_228766880001",
    "clinic_id": "678f4fcd4ce758001d3624ee",
    "created_at": 1749532041,
    "custom_attributes": {
      "label": [
        "vitals_submitted"
      ],
      "tags": [
        "paid",
        "in_consult"
      ]
    },
    "doctor_id": "173744358327115",
    "modified_at": 1749544752,
    "partner_appointment_id": "GH_228766880001",
    "partner_clinic_id": "CL04",
    "partner_doctor_id": "sheilly",
    "partner_meta": {
      "appointment_id": "api-abb67007-1e53-4f0f-b428-a4bc025468a4",
      "encounter_id": "228766880001",
      "facility_id": "GH"
    },
    "partner_patient_id": "MM01156831",
    "patient_id": "173986493567406",
    "status": "CM"
  }
}