Doctor Events
curl --request POST \
--url https://{partner_host}/registered_url_for_doctor_events \
--header 'Content-Type: application/json' \
--data '
{
"event": "schedule.start_practice",
"event_time": 1730189586,
"timestamp": 1730189586,
"client_id": "67978400352a61001d64e9fb",
"business_id": "174159057718553",
"data": {
"doctor_id": "174159057723920",
"partner_doctor_id": "test-doc-123",
"created_at": 1730189586,
"modified_at": 1730189586,
"clinic_id": "67978400352a61001d64e9fb",
"partner_clinic_id": "CL04",
"partner_meta": {
"key1": "value1"
}
}
}
'import requests
url = "https://{partner_host}/registered_url_for_doctor_events"
payload = {
"event": "schedule.start_practice",
"event_time": 1730189586,
"timestamp": 1730189586,
"client_id": "67978400352a61001d64e9fb",
"business_id": "174159057718553",
"data": {
"doctor_id": "174159057723920",
"partner_doctor_id": "test-doc-123",
"created_at": 1730189586,
"modified_at": 1730189586,
"clinic_id": "67978400352a61001d64e9fb",
"partner_clinic_id": "CL04",
"partner_meta": { "key1": "value1" }
}
}
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: 'schedule.start_practice',
event_time: 1730189586,
timestamp: 1730189586,
client_id: '67978400352a61001d64e9fb',
business_id: '174159057718553',
data: {
doctor_id: '174159057723920',
partner_doctor_id: 'test-doc-123',
created_at: 1730189586,
modified_at: 1730189586,
clinic_id: '67978400352a61001d64e9fb',
partner_clinic_id: 'CL04',
partner_meta: {key1: 'value1'}
}
})
};
fetch('https://{partner_host}/registered_url_for_doctor_events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://{partner_host}/registered_url_for_doctor_events")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"schedule.start_practice\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"doctor_id\": \"174159057723920\",\n \"partner_doctor_id\": \"test-doc-123\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_meta\": {\n \"key1\": \"value1\"\n }\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://{partner_host}/registered_url_for_doctor_events");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"event\": \"schedule.start_practice\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"doctor_id\": \"174159057723920\",\n \"partner_doctor_id\": \"test-doc-123\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_meta\": {\n \"key1\": \"value1\"\n }\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://{partner_host}/registered_url_for_doctor_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\": \"schedule.start_practice\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"doctor_id\": \"174159057723920\",\n \"partner_doctor_id\": \"test-doc-123\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_meta\": {\n \"key1\": \"value1\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyWebhooks
Doctor Events
When a Doctor event occurs (such as the start of a practice), a webhook event is sent to registered webhooks with details about the schedule, including the doctor ID, partner doctor ID, and event time. The receiver can use the details from the webhook event to update or manage schedules in the system.
POST
/
registered_url_for_doctor_events
Doctor Events
curl --request POST \
--url https://{partner_host}/registered_url_for_doctor_events \
--header 'Content-Type: application/json' \
--data '
{
"event": "schedule.start_practice",
"event_time": 1730189586,
"timestamp": 1730189586,
"client_id": "67978400352a61001d64e9fb",
"business_id": "174159057718553",
"data": {
"doctor_id": "174159057723920",
"partner_doctor_id": "test-doc-123",
"created_at": 1730189586,
"modified_at": 1730189586,
"clinic_id": "67978400352a61001d64e9fb",
"partner_clinic_id": "CL04",
"partner_meta": {
"key1": "value1"
}
}
}
'import requests
url = "https://{partner_host}/registered_url_for_doctor_events"
payload = {
"event": "schedule.start_practice",
"event_time": 1730189586,
"timestamp": 1730189586,
"client_id": "67978400352a61001d64e9fb",
"business_id": "174159057718553",
"data": {
"doctor_id": "174159057723920",
"partner_doctor_id": "test-doc-123",
"created_at": 1730189586,
"modified_at": 1730189586,
"clinic_id": "67978400352a61001d64e9fb",
"partner_clinic_id": "CL04",
"partner_meta": { "key1": "value1" }
}
}
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: 'schedule.start_practice',
event_time: 1730189586,
timestamp: 1730189586,
client_id: '67978400352a61001d64e9fb',
business_id: '174159057718553',
data: {
doctor_id: '174159057723920',
partner_doctor_id: 'test-doc-123',
created_at: 1730189586,
modified_at: 1730189586,
clinic_id: '67978400352a61001d64e9fb',
partner_clinic_id: 'CL04',
partner_meta: {key1: 'value1'}
}
})
};
fetch('https://{partner_host}/registered_url_for_doctor_events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://{partner_host}/registered_url_for_doctor_events")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"schedule.start_practice\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"doctor_id\": \"174159057723920\",\n \"partner_doctor_id\": \"test-doc-123\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_meta\": {\n \"key1\": \"value1\"\n }\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://{partner_host}/registered_url_for_doctor_events");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"event\": \"schedule.start_practice\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"doctor_id\": \"174159057723920\",\n \"partner_doctor_id\": \"test-doc-123\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_meta\": {\n \"key1\": \"value1\"\n }\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://{partner_host}/registered_url_for_doctor_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\": \"schedule.start_practice\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"doctor_id\": \"174159057723920\",\n \"partner_doctor_id\": \"test-doc-123\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_meta\": {\n \"key1\": \"value1\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Response
200
Successfully received the schedule event
Was this page helpful?

