v1

latestOpenAPI 3.0.32026-07-26229361630.0 KB
Appointment Webhooks

Create appointment

When an appointment is created, 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. For appointments created, this will be appointment.created.

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_add_appointment_events

Request body

servicestring

Type of serivce

eventstring required

Type of event

transaction_idstring

Transaction ID for the appointment

event_timeinteger required

Event occured timestamp

timestampinteger required

Timestamp of the event

client_idstring required

Client ID for the appointment

business_idstring required

Business ID for the appointment

Example request

{
  "service": "appointment",
  "event": "appointment.created",
  "transaction_id": "8y3458734657",
  "event_time": 1730189586,
  "timestamp": 1730189586,
  "client_id": "67978400352a61001d64e9fb",
  "business_id": "174159057718553",
  "data": {
    "appointment_id": "api-abb67007-1e53-4f0f-b428-a4bc025468a4",
    "partner_appointment_id": "67ce9032abfba8001d17ddd2",
    "doctor_id": "174159057723920",
    "partner_doctor_id": "test-doc-123",
    "patient_id": "174678912588458",
    "partner_patient_id": "174678912588458",
    "clinic_id": "67978400352a61001d64e9fb",
    "partner_clinic_id": "CL04",
    "status": "BK",
    "action": "created",
    "created_at": 1730189586,
    "modified_at": 1730189586,
    "custom_attributes": {
      "label": [
        "vital_submitted"
      ]
    },
    "partner_meta": {
      "key1": "value1"
    },
    "sa_ids": [
      "sa_25061014072610653"
    ]
  }
}