curl --request POST \
--url https://{partner_host}/registered_url_for_update_appointment_events \
--header 'Content-Type: application/json' \
--data '
{
"event": "appointment.updated",
"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": "77237637763817-17",
"clinic_id": "67978400352a61001d64e9fb",
"partner_clinic_id": "CL04",
"status": "BK",
"action": "created",
"created_at": 1730189586,
"modified_at": 1730189586,
"partner_meta": {
"key1": "value1"
},
"sa_ids": [
"sa_25061014072610653"
],
"custom_attributes": {
"label": [
"vital_submitted"
]
}
},
"service": "appointment",
"transaction_id": "8y3458734657"
}
'import requests
url = "https://{partner_host}/registered_url_for_update_appointment_events"
payload = {
"event": "appointment.updated",
"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": "77237637763817-17",
"clinic_id": "67978400352a61001d64e9fb",
"partner_clinic_id": "CL04",
"status": "BK",
"action": "created",
"created_at": 1730189586,
"modified_at": 1730189586,
"partner_meta": { "key1": "value1" },
"sa_ids": ["sa_25061014072610653"],
"custom_attributes": { "label": ["vital_submitted"] }
},
"service": "appointment",
"transaction_id": "8y3458734657"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
event: 'appointment.updated',
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: '77237637763817-17',
clinic_id: '67978400352a61001d64e9fb',
partner_clinic_id: 'CL04',
status: 'BK',
action: 'created',
created_at: 1730189586,
modified_at: 1730189586,
partner_meta: {key1: 'value1'},
sa_ids: ['sa_25061014072610653'],
custom_attributes: {label: ['vital_submitted']}
},
service: 'appointment',
transaction_id: '8y3458734657'
})
};
fetch('https://{partner_host}/registered_url_for_update_appointment_events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{partner_host}/registered_url_for_update_appointment_events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event' => 'appointment.updated',
'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' => '77237637763817-17',
'clinic_id' => '67978400352a61001d64e9fb',
'partner_clinic_id' => 'CL04',
'status' => 'BK',
'action' => 'created',
'created_at' => 1730189586,
'modified_at' => 1730189586,
'partner_meta' => [
'key1' => 'value1'
],
'sa_ids' => [
'sa_25061014072610653'
],
'custom_attributes' => [
'label' => [
'vital_submitted'
]
]
],
'service' => 'appointment',
'transaction_id' => '8y3458734657'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{partner_host}/registered_url_for_update_appointment_events"
payload := strings.NewReader("{\n \"event\": \"appointment.updated\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"appointment_id\": \"api-abb67007-1e53-4f0f-b428-a4bc025468a4\",\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"doctor_id\": \"174159057723920\",\n \"partner_doctor_id\": \"test-doc-123\",\n \"patient_id\": \"174678912588458\",\n \"partner_patient_id\": \"77237637763817-17\",\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"partner_clinic_id\": \"CL04\",\n \"status\": \"BK\",\n \"action\": \"created\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"partner_meta\": {\n \"key1\": \"value1\"\n },\n \"sa_ids\": [\n \"sa_25061014072610653\"\n ],\n \"custom_attributes\": {\n \"label\": [\n \"vital_submitted\"\n ]\n }\n },\n \"service\": \"appointment\",\n \"transaction_id\": \"8y3458734657\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{partner_host}/registered_url_for_update_appointment_events")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"appointment.updated\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"appointment_id\": \"api-abb67007-1e53-4f0f-b428-a4bc025468a4\",\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"doctor_id\": \"174159057723920\",\n \"partner_doctor_id\": \"test-doc-123\",\n \"patient_id\": \"174678912588458\",\n \"partner_patient_id\": \"77237637763817-17\",\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"partner_clinic_id\": \"CL04\",\n \"status\": \"BK\",\n \"action\": \"created\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"partner_meta\": {\n \"key1\": \"value1\"\n },\n \"sa_ids\": [\n \"sa_25061014072610653\"\n ],\n \"custom_attributes\": {\n \"label\": [\n \"vital_submitted\"\n ]\n }\n },\n \"service\": \"appointment\",\n \"transaction_id\": \"8y3458734657\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{partner_host}/registered_url_for_update_appointment_events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": \"appointment.updated\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"appointment_id\": \"api-abb67007-1e53-4f0f-b428-a4bc025468a4\",\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"doctor_id\": \"174159057723920\",\n \"partner_doctor_id\": \"test-doc-123\",\n \"patient_id\": \"174678912588458\",\n \"partner_patient_id\": \"77237637763817-17\",\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"partner_clinic_id\": \"CL04\",\n \"status\": \"BK\",\n \"action\": \"created\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"partner_meta\": {\n \"key1\": \"value1\"\n },\n \"sa_ids\": [\n \"sa_25061014072610653\"\n ],\n \"custom_attributes\": {\n \"label\": [\n \"vital_submitted\"\n ]\n }\n },\n \"service\": \"appointment\",\n \"transaction_id\": \"8y3458734657\"\n}"
response = http.request(request)
puts response.read_bodyUpdate appointment
When an appointment is updated, 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 updated, this will be appointment.updated.
• 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
curl --request POST \
--url https://{partner_host}/registered_url_for_update_appointment_events \
--header 'Content-Type: application/json' \
--data '
{
"event": "appointment.updated",
"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": "77237637763817-17",
"clinic_id": "67978400352a61001d64e9fb",
"partner_clinic_id": "CL04",
"status": "BK",
"action": "created",
"created_at": 1730189586,
"modified_at": 1730189586,
"partner_meta": {
"key1": "value1"
},
"sa_ids": [
"sa_25061014072610653"
],
"custom_attributes": {
"label": [
"vital_submitted"
]
}
},
"service": "appointment",
"transaction_id": "8y3458734657"
}
'import requests
url = "https://{partner_host}/registered_url_for_update_appointment_events"
payload = {
"event": "appointment.updated",
"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": "77237637763817-17",
"clinic_id": "67978400352a61001d64e9fb",
"partner_clinic_id": "CL04",
"status": "BK",
"action": "created",
"created_at": 1730189586,
"modified_at": 1730189586,
"partner_meta": { "key1": "value1" },
"sa_ids": ["sa_25061014072610653"],
"custom_attributes": { "label": ["vital_submitted"] }
},
"service": "appointment",
"transaction_id": "8y3458734657"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
event: 'appointment.updated',
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: '77237637763817-17',
clinic_id: '67978400352a61001d64e9fb',
partner_clinic_id: 'CL04',
status: 'BK',
action: 'created',
created_at: 1730189586,
modified_at: 1730189586,
partner_meta: {key1: 'value1'},
sa_ids: ['sa_25061014072610653'],
custom_attributes: {label: ['vital_submitted']}
},
service: 'appointment',
transaction_id: '8y3458734657'
})
};
fetch('https://{partner_host}/registered_url_for_update_appointment_events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{partner_host}/registered_url_for_update_appointment_events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event' => 'appointment.updated',
'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' => '77237637763817-17',
'clinic_id' => '67978400352a61001d64e9fb',
'partner_clinic_id' => 'CL04',
'status' => 'BK',
'action' => 'created',
'created_at' => 1730189586,
'modified_at' => 1730189586,
'partner_meta' => [
'key1' => 'value1'
],
'sa_ids' => [
'sa_25061014072610653'
],
'custom_attributes' => [
'label' => [
'vital_submitted'
]
]
],
'service' => 'appointment',
'transaction_id' => '8y3458734657'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{partner_host}/registered_url_for_update_appointment_events"
payload := strings.NewReader("{\n \"event\": \"appointment.updated\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"appointment_id\": \"api-abb67007-1e53-4f0f-b428-a4bc025468a4\",\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"doctor_id\": \"174159057723920\",\n \"partner_doctor_id\": \"test-doc-123\",\n \"patient_id\": \"174678912588458\",\n \"partner_patient_id\": \"77237637763817-17\",\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"partner_clinic_id\": \"CL04\",\n \"status\": \"BK\",\n \"action\": \"created\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"partner_meta\": {\n \"key1\": \"value1\"\n },\n \"sa_ids\": [\n \"sa_25061014072610653\"\n ],\n \"custom_attributes\": {\n \"label\": [\n \"vital_submitted\"\n ]\n }\n },\n \"service\": \"appointment\",\n \"transaction_id\": \"8y3458734657\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{partner_host}/registered_url_for_update_appointment_events")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"appointment.updated\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"appointment_id\": \"api-abb67007-1e53-4f0f-b428-a4bc025468a4\",\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"doctor_id\": \"174159057723920\",\n \"partner_doctor_id\": \"test-doc-123\",\n \"patient_id\": \"174678912588458\",\n \"partner_patient_id\": \"77237637763817-17\",\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"partner_clinic_id\": \"CL04\",\n \"status\": \"BK\",\n \"action\": \"created\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"partner_meta\": {\n \"key1\": \"value1\"\n },\n \"sa_ids\": [\n \"sa_25061014072610653\"\n ],\n \"custom_attributes\": {\n \"label\": [\n \"vital_submitted\"\n ]\n }\n },\n \"service\": \"appointment\",\n \"transaction_id\": \"8y3458734657\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{partner_host}/registered_url_for_update_appointment_events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": \"appointment.updated\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"appointment_id\": \"api-abb67007-1e53-4f0f-b428-a4bc025468a4\",\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"doctor_id\": \"174159057723920\",\n \"partner_doctor_id\": \"test-doc-123\",\n \"patient_id\": \"174678912588458\",\n \"partner_patient_id\": \"77237637763817-17\",\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"partner_clinic_id\": \"CL04\",\n \"status\": \"BK\",\n \"action\": \"created\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"partner_meta\": {\n \"key1\": \"value1\"\n },\n \"sa_ids\": [\n \"sa_25061014072610653\"\n ],\n \"custom_attributes\": {\n \"label\": [\n \"vital_submitted\"\n ]\n }\n },\n \"service\": \"appointment\",\n \"transaction_id\": \"8y3458734657\"\n}"
response = http.request(request)
puts response.read_bodyBody
Type of event
"appointment.updated"
Event occured timestamp
1730189586
Timestamp of the event
1730189586
Client ID for the appointment
"67978400352a61001d64e9fb"
Business ID for the appointment
"174159057718553"
Show child attributes
Show child attributes
Type of serivce
"appointment"
Transaction ID for the appointment
"8y3458734657"
Response
Was this page helpful?

