curl --request POST \
--url https://{partner_host}/registered_url_for_assessment_taken_events \
--header 'Content-Type: application/json' \
--data '
{
"event": "appointment.assessments.taken",
"event_time": 1749544696,
"timestamp": 1730189586,
"business_id": "75682005283056",
"client_id": "",
"data": {
"appointment_id": "api-abb67007-1e53-4f0f-b428-a4bc025468a4",
"clinic_id": "678faea412e547001db5c639",
"created_at": 1749544579,
"doctor_id": "171458899473447",
"modified_at": 1749544696,
"patient_id": "174436114490384",
"status": "CK",
"custom_attributes": {
"label": [
"vital_submitted"
],
"tags": [
"87"
]
},
"partner_appointment_id": "67ce9032abfba8001d17ddd2",
"partner_clinic_id": "CL04",
"partner_doctor_id": "1712660285igfewifwe",
"partner_meta": {
"key1": "value1"
},
"partner_patient_id": "77237637763817-17",
"sa_ids": [
"sa_25061014072610653"
],
"workflow_data": {
"sa_25061014072610653": "3970"
}
},
"service": "appointment",
"transaction_id": "d-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86"
}
'import requests
url = "https://{partner_host}/registered_url_for_assessment_taken_events"
payload = {
"event": "appointment.assessments.taken",
"event_time": 1749544696,
"timestamp": 1730189586,
"business_id": "75682005283056",
"client_id": "",
"data": {
"appointment_id": "api-abb67007-1e53-4f0f-b428-a4bc025468a4",
"clinic_id": "678faea412e547001db5c639",
"created_at": 1749544579,
"doctor_id": "171458899473447",
"modified_at": 1749544696,
"patient_id": "174436114490384",
"status": "CK",
"custom_attributes": {
"label": ["vital_submitted"],
"tags": ["87"]
},
"partner_appointment_id": "67ce9032abfba8001d17ddd2",
"partner_clinic_id": "CL04",
"partner_doctor_id": "1712660285igfewifwe",
"partner_meta": { "key1": "value1" },
"partner_patient_id": "77237637763817-17",
"sa_ids": ["sa_25061014072610653"],
"workflow_data": { "sa_25061014072610653": "3970" }
},
"service": "appointment",
"transaction_id": "d-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86"
}
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.assessments.taken',
event_time: 1749544696,
timestamp: 1730189586,
business_id: '75682005283056',
client_id: '',
data: {
appointment_id: 'api-abb67007-1e53-4f0f-b428-a4bc025468a4',
clinic_id: '678faea412e547001db5c639',
created_at: 1749544579,
doctor_id: '171458899473447',
modified_at: 1749544696,
patient_id: '174436114490384',
status: 'CK',
custom_attributes: {label: ['vital_submitted'], tags: ['87']},
partner_appointment_id: '67ce9032abfba8001d17ddd2',
partner_clinic_id: 'CL04',
partner_doctor_id: '1712660285igfewifwe',
partner_meta: {key1: 'value1'},
partner_patient_id: '77237637763817-17',
sa_ids: ['sa_25061014072610653'],
workflow_data: {sa_25061014072610653: '3970'}
},
service: 'appointment',
transaction_id: 'd-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86'
})
};
fetch('https://{partner_host}/registered_url_for_assessment_taken_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_assessment_taken_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.assessments.taken',
'event_time' => 1749544696,
'timestamp' => 1730189586,
'business_id' => '75682005283056',
'client_id' => '',
'data' => [
'appointment_id' => 'api-abb67007-1e53-4f0f-b428-a4bc025468a4',
'clinic_id' => '678faea412e547001db5c639',
'created_at' => 1749544579,
'doctor_id' => '171458899473447',
'modified_at' => 1749544696,
'patient_id' => '174436114490384',
'status' => 'CK',
'custom_attributes' => [
'label' => [
'vital_submitted'
],
'tags' => [
'87'
]
],
'partner_appointment_id' => '67ce9032abfba8001d17ddd2',
'partner_clinic_id' => 'CL04',
'partner_doctor_id' => '1712660285igfewifwe',
'partner_meta' => [
'key1' => 'value1'
],
'partner_patient_id' => '77237637763817-17',
'sa_ids' => [
'sa_25061014072610653'
],
'workflow_data' => [
'sa_25061014072610653' => '3970'
]
],
'service' => 'appointment',
'transaction_id' => 'd-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86'
]),
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_assessment_taken_events"
payload := strings.NewReader("{\n \"event\": \"appointment.assessments.taken\",\n \"event_time\": 1749544696,\n \"timestamp\": 1730189586,\n \"business_id\": \"75682005283056\",\n \"client_id\": \"\",\n \"data\": {\n \"appointment_id\": \"api-abb67007-1e53-4f0f-b428-a4bc025468a4\",\n \"clinic_id\": \"678faea412e547001db5c639\",\n \"created_at\": 1749544579,\n \"doctor_id\": \"171458899473447\",\n \"modified_at\": 1749544696,\n \"patient_id\": \"174436114490384\",\n \"status\": \"CK\",\n \"custom_attributes\": {\n \"label\": [\n \"vital_submitted\"\n ],\n \"tags\": [\n \"87\"\n ]\n },\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_doctor_id\": \"1712660285igfewifwe\",\n \"partner_meta\": {\n \"key1\": \"value1\"\n },\n \"partner_patient_id\": \"77237637763817-17\",\n \"sa_ids\": [\n \"sa_25061014072610653\"\n ],\n \"workflow_data\": {\n \"sa_25061014072610653\": \"3970\"\n }\n },\n \"service\": \"appointment\",\n \"transaction_id\": \"d-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86\"\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_assessment_taken_events")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"appointment.assessments.taken\",\n \"event_time\": 1749544696,\n \"timestamp\": 1730189586,\n \"business_id\": \"75682005283056\",\n \"client_id\": \"\",\n \"data\": {\n \"appointment_id\": \"api-abb67007-1e53-4f0f-b428-a4bc025468a4\",\n \"clinic_id\": \"678faea412e547001db5c639\",\n \"created_at\": 1749544579,\n \"doctor_id\": \"171458899473447\",\n \"modified_at\": 1749544696,\n \"patient_id\": \"174436114490384\",\n \"status\": \"CK\",\n \"custom_attributes\": {\n \"label\": [\n \"vital_submitted\"\n ],\n \"tags\": [\n \"87\"\n ]\n },\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_doctor_id\": \"1712660285igfewifwe\",\n \"partner_meta\": {\n \"key1\": \"value1\"\n },\n \"partner_patient_id\": \"77237637763817-17\",\n \"sa_ids\": [\n \"sa_25061014072610653\"\n ],\n \"workflow_data\": {\n \"sa_25061014072610653\": \"3970\"\n }\n },\n \"service\": \"appointment\",\n \"transaction_id\": \"d-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{partner_host}/registered_url_for_assessment_taken_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.assessments.taken\",\n \"event_time\": 1749544696,\n \"timestamp\": 1730189586,\n \"business_id\": \"75682005283056\",\n \"client_id\": \"\",\n \"data\": {\n \"appointment_id\": \"api-abb67007-1e53-4f0f-b428-a4bc025468a4\",\n \"clinic_id\": \"678faea412e547001db5c639\",\n \"created_at\": 1749544579,\n \"doctor_id\": \"171458899473447\",\n \"modified_at\": 1749544696,\n \"patient_id\": \"174436114490384\",\n \"status\": \"CK\",\n \"custom_attributes\": {\n \"label\": [\n \"vital_submitted\"\n ],\n \"tags\": [\n \"87\"\n ]\n },\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_doctor_id\": \"1712660285igfewifwe\",\n \"partner_meta\": {\n \"key1\": \"value1\"\n },\n \"partner_patient_id\": \"77237637763817-17\",\n \"sa_ids\": [\n \"sa_25061014072610653\"\n ],\n \"workflow_data\": {\n \"sa_25061014072610653\": \"3970\"\n }\n },\n \"service\": \"appointment\",\n \"transaction_id\": \"d-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86\"\n}"
response = http.request(request)
puts response.read_bodyAssessment Taken
When an assessment linked to the appointment is completed, 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.assessments.taken.
• 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.
• sa_ids: List of self assessment IDs.
• workflow_data: List of self assessment data.
Example Webhook Request
Endpoint: https://your-registered-webhook-url.com
Method: POST
curl --request POST \
--url https://{partner_host}/registered_url_for_assessment_taken_events \
--header 'Content-Type: application/json' \
--data '
{
"event": "appointment.assessments.taken",
"event_time": 1749544696,
"timestamp": 1730189586,
"business_id": "75682005283056",
"client_id": "",
"data": {
"appointment_id": "api-abb67007-1e53-4f0f-b428-a4bc025468a4",
"clinic_id": "678faea412e547001db5c639",
"created_at": 1749544579,
"doctor_id": "171458899473447",
"modified_at": 1749544696,
"patient_id": "174436114490384",
"status": "CK",
"custom_attributes": {
"label": [
"vital_submitted"
],
"tags": [
"87"
]
},
"partner_appointment_id": "67ce9032abfba8001d17ddd2",
"partner_clinic_id": "CL04",
"partner_doctor_id": "1712660285igfewifwe",
"partner_meta": {
"key1": "value1"
},
"partner_patient_id": "77237637763817-17",
"sa_ids": [
"sa_25061014072610653"
],
"workflow_data": {
"sa_25061014072610653": "3970"
}
},
"service": "appointment",
"transaction_id": "d-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86"
}
'import requests
url = "https://{partner_host}/registered_url_for_assessment_taken_events"
payload = {
"event": "appointment.assessments.taken",
"event_time": 1749544696,
"timestamp": 1730189586,
"business_id": "75682005283056",
"client_id": "",
"data": {
"appointment_id": "api-abb67007-1e53-4f0f-b428-a4bc025468a4",
"clinic_id": "678faea412e547001db5c639",
"created_at": 1749544579,
"doctor_id": "171458899473447",
"modified_at": 1749544696,
"patient_id": "174436114490384",
"status": "CK",
"custom_attributes": {
"label": ["vital_submitted"],
"tags": ["87"]
},
"partner_appointment_id": "67ce9032abfba8001d17ddd2",
"partner_clinic_id": "CL04",
"partner_doctor_id": "1712660285igfewifwe",
"partner_meta": { "key1": "value1" },
"partner_patient_id": "77237637763817-17",
"sa_ids": ["sa_25061014072610653"],
"workflow_data": { "sa_25061014072610653": "3970" }
},
"service": "appointment",
"transaction_id": "d-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86"
}
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.assessments.taken',
event_time: 1749544696,
timestamp: 1730189586,
business_id: '75682005283056',
client_id: '',
data: {
appointment_id: 'api-abb67007-1e53-4f0f-b428-a4bc025468a4',
clinic_id: '678faea412e547001db5c639',
created_at: 1749544579,
doctor_id: '171458899473447',
modified_at: 1749544696,
patient_id: '174436114490384',
status: 'CK',
custom_attributes: {label: ['vital_submitted'], tags: ['87']},
partner_appointment_id: '67ce9032abfba8001d17ddd2',
partner_clinic_id: 'CL04',
partner_doctor_id: '1712660285igfewifwe',
partner_meta: {key1: 'value1'},
partner_patient_id: '77237637763817-17',
sa_ids: ['sa_25061014072610653'],
workflow_data: {sa_25061014072610653: '3970'}
},
service: 'appointment',
transaction_id: 'd-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86'
})
};
fetch('https://{partner_host}/registered_url_for_assessment_taken_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_assessment_taken_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.assessments.taken',
'event_time' => 1749544696,
'timestamp' => 1730189586,
'business_id' => '75682005283056',
'client_id' => '',
'data' => [
'appointment_id' => 'api-abb67007-1e53-4f0f-b428-a4bc025468a4',
'clinic_id' => '678faea412e547001db5c639',
'created_at' => 1749544579,
'doctor_id' => '171458899473447',
'modified_at' => 1749544696,
'patient_id' => '174436114490384',
'status' => 'CK',
'custom_attributes' => [
'label' => [
'vital_submitted'
],
'tags' => [
'87'
]
],
'partner_appointment_id' => '67ce9032abfba8001d17ddd2',
'partner_clinic_id' => 'CL04',
'partner_doctor_id' => '1712660285igfewifwe',
'partner_meta' => [
'key1' => 'value1'
],
'partner_patient_id' => '77237637763817-17',
'sa_ids' => [
'sa_25061014072610653'
],
'workflow_data' => [
'sa_25061014072610653' => '3970'
]
],
'service' => 'appointment',
'transaction_id' => 'd-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86'
]),
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_assessment_taken_events"
payload := strings.NewReader("{\n \"event\": \"appointment.assessments.taken\",\n \"event_time\": 1749544696,\n \"timestamp\": 1730189586,\n \"business_id\": \"75682005283056\",\n \"client_id\": \"\",\n \"data\": {\n \"appointment_id\": \"api-abb67007-1e53-4f0f-b428-a4bc025468a4\",\n \"clinic_id\": \"678faea412e547001db5c639\",\n \"created_at\": 1749544579,\n \"doctor_id\": \"171458899473447\",\n \"modified_at\": 1749544696,\n \"patient_id\": \"174436114490384\",\n \"status\": \"CK\",\n \"custom_attributes\": {\n \"label\": [\n \"vital_submitted\"\n ],\n \"tags\": [\n \"87\"\n ]\n },\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_doctor_id\": \"1712660285igfewifwe\",\n \"partner_meta\": {\n \"key1\": \"value1\"\n },\n \"partner_patient_id\": \"77237637763817-17\",\n \"sa_ids\": [\n \"sa_25061014072610653\"\n ],\n \"workflow_data\": {\n \"sa_25061014072610653\": \"3970\"\n }\n },\n \"service\": \"appointment\",\n \"transaction_id\": \"d-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86\"\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_assessment_taken_events")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"appointment.assessments.taken\",\n \"event_time\": 1749544696,\n \"timestamp\": 1730189586,\n \"business_id\": \"75682005283056\",\n \"client_id\": \"\",\n \"data\": {\n \"appointment_id\": \"api-abb67007-1e53-4f0f-b428-a4bc025468a4\",\n \"clinic_id\": \"678faea412e547001db5c639\",\n \"created_at\": 1749544579,\n \"doctor_id\": \"171458899473447\",\n \"modified_at\": 1749544696,\n \"patient_id\": \"174436114490384\",\n \"status\": \"CK\",\n \"custom_attributes\": {\n \"label\": [\n \"vital_submitted\"\n ],\n \"tags\": [\n \"87\"\n ]\n },\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_doctor_id\": \"1712660285igfewifwe\",\n \"partner_meta\": {\n \"key1\": \"value1\"\n },\n \"partner_patient_id\": \"77237637763817-17\",\n \"sa_ids\": [\n \"sa_25061014072610653\"\n ],\n \"workflow_data\": {\n \"sa_25061014072610653\": \"3970\"\n }\n },\n \"service\": \"appointment\",\n \"transaction_id\": \"d-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{partner_host}/registered_url_for_assessment_taken_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.assessments.taken\",\n \"event_time\": 1749544696,\n \"timestamp\": 1730189586,\n \"business_id\": \"75682005283056\",\n \"client_id\": \"\",\n \"data\": {\n \"appointment_id\": \"api-abb67007-1e53-4f0f-b428-a4bc025468a4\",\n \"clinic_id\": \"678faea412e547001db5c639\",\n \"created_at\": 1749544579,\n \"doctor_id\": \"171458899473447\",\n \"modified_at\": 1749544696,\n \"patient_id\": \"174436114490384\",\n \"status\": \"CK\",\n \"custom_attributes\": {\n \"label\": [\n \"vital_submitted\"\n ],\n \"tags\": [\n \"87\"\n ]\n },\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_doctor_id\": \"1712660285igfewifwe\",\n \"partner_meta\": {\n \"key1\": \"value1\"\n },\n \"partner_patient_id\": \"77237637763817-17\",\n \"sa_ids\": [\n \"sa_25061014072610653\"\n ],\n \"workflow_data\": {\n \"sa_25061014072610653\": \"3970\"\n }\n },\n \"service\": \"appointment\",\n \"transaction_id\": \"d-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86\"\n}"
response = http.request(request)
puts response.read_bodyBody
Type of event
"appointment.assessments.taken"
Event occurred timestamp
1749544696
Timestamp of the event
1730189586
Business ID for the appointment
"75682005283056"
Client ID for the appointment
""
Show child attributes
Show child attributes
Service related to the event
"appointment"
Transaction ID for the event
"d-bcebe31d-5a73-4d05-bd4f-0fdef45dcb86"
Response
Was this page helpful?

