Prescription Created Event
curl --request POST \
--url https://{partner_host}/registered_url_for_prescription_events \
--header 'Content-Type: application/json' \
--data '
{
"event_time": 1730189586,
"timestamp": 1730189586,
"client_id": "67978400352a61001d64e9fb",
"business_id": "174159057718553",
"data": {
"prescription_id": "{{prescription_id}}",
"doctor_id": "174159057723920",
"patient_id": "174678912588458",
"clinic_id": "67978400352a61001d64e9fb",
"created_at": 1730189586,
"modified_at": 1730189586,
"partner_doctor_id": "test-doc-123",
"current_version": "2",
"previous_version": "1",
"prescription_url": "https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf",
"prescription_url_print": "https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf",
"partner_patient_id": "77237637763817-17",
"partner_clinic_id": "CL04",
"partner_appointment_id": "67ce9032abfba8001d17ddd2",
"partner_meta": {
"key1": "{{value1}}"
}
}
}
'import requests
url = "https://{partner_host}/registered_url_for_prescription_events"
payload = {
"event_time": 1730189586,
"timestamp": 1730189586,
"client_id": "67978400352a61001d64e9fb",
"business_id": "174159057718553",
"data": {
"prescription_id": "{{prescription_id}}",
"doctor_id": "174159057723920",
"patient_id": "174678912588458",
"clinic_id": "67978400352a61001d64e9fb",
"created_at": 1730189586,
"modified_at": 1730189586,
"partner_doctor_id": "test-doc-123",
"current_version": "2",
"previous_version": "1",
"prescription_url": "https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf",
"prescription_url_print": "https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf",
"partner_patient_id": "77237637763817-17",
"partner_clinic_id": "CL04",
"partner_appointment_id": "67ce9032abfba8001d17ddd2",
"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_time: 1730189586,
timestamp: 1730189586,
client_id: '67978400352a61001d64e9fb',
business_id: '174159057718553',
data: {
prescription_id: '{{prescription_id}}',
doctor_id: '174159057723920',
patient_id: '174678912588458',
clinic_id: '67978400352a61001d64e9fb',
created_at: 1730189586,
modified_at: 1730189586,
partner_doctor_id: 'test-doc-123',
current_version: '2',
previous_version: '1',
prescription_url: 'https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf',
prescription_url_print: 'https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf',
partner_patient_id: '77237637763817-17',
partner_clinic_id: 'CL04',
partner_appointment_id: '67ce9032abfba8001d17ddd2',
partner_meta: {key1: '{{value1}}'}
}
})
};
fetch('https://{partner_host}/registered_url_for_prescription_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_prescription_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_time' => 1730189586,
'timestamp' => 1730189586,
'client_id' => '67978400352a61001d64e9fb',
'business_id' => '174159057718553',
'data' => [
'prescription_id' => '{{prescription_id}}',
'doctor_id' => '174159057723920',
'patient_id' => '174678912588458',
'clinic_id' => '67978400352a61001d64e9fb',
'created_at' => 1730189586,
'modified_at' => 1730189586,
'partner_doctor_id' => 'test-doc-123',
'current_version' => '2',
'previous_version' => '1',
'prescription_url' => 'https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf',
'prescription_url_print' => 'https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf',
'partner_patient_id' => '77237637763817-17',
'partner_clinic_id' => 'CL04',
'partner_appointment_id' => '67ce9032abfba8001d17ddd2',
'partner_meta' => [
'key1' => '{{value1}}'
]
]
]),
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_prescription_events"
payload := strings.NewReader("{\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"prescription_id\": \"{{prescription_id}}\",\n \"doctor_id\": \"174159057723920\",\n \"patient_id\": \"174678912588458\",\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"partner_doctor_id\": \"test-doc-123\",\n \"current_version\": \"2\",\n \"previous_version\": \"1\",\n \"prescription_url\": \"https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf\",\n \"prescription_url_print\": \"https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf\",\n \"partner_patient_id\": \"77237637763817-17\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"partner_meta\": {\n \"key1\": \"{{value1}}\"\n }\n }\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_prescription_events")
.header("Content-Type", "application/json")
.body("{\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"prescription_id\": \"{{prescription_id}}\",\n \"doctor_id\": \"174159057723920\",\n \"patient_id\": \"174678912588458\",\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"partner_doctor_id\": \"test-doc-123\",\n \"current_version\": \"2\",\n \"previous_version\": \"1\",\n \"prescription_url\": \"https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf\",\n \"prescription_url_print\": \"https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf\",\n \"partner_patient_id\": \"77237637763817-17\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"partner_meta\": {\n \"key1\": \"{{value1}}\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{partner_host}/registered_url_for_prescription_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_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"prescription_id\": \"{{prescription_id}}\",\n \"doctor_id\": \"174159057723920\",\n \"patient_id\": \"174678912588458\",\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"partner_doctor_id\": \"test-doc-123\",\n \"current_version\": \"2\",\n \"previous_version\": \"1\",\n \"prescription_url\": \"https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf\",\n \"prescription_url_print\": \"https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf\",\n \"partner_patient_id\": \"77237637763817-17\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"partner_meta\": {\n \"key1\": \"{{value1}}\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyPrescription
Prescription Created Event
When a prescription is created or modified, a webhook event is sent to registered webhooks with details about the prescription, including the prescription ID, visit ID, doctor ID, patient ID, and event type.
The receiver can then use the prescription_id from webhook events to retrieve the details of a specific prescription by calling the prescription API.
POST
/
registered_url_for_prescription_events
Prescription Created Event
curl --request POST \
--url https://{partner_host}/registered_url_for_prescription_events \
--header 'Content-Type: application/json' \
--data '
{
"event_time": 1730189586,
"timestamp": 1730189586,
"client_id": "67978400352a61001d64e9fb",
"business_id": "174159057718553",
"data": {
"prescription_id": "{{prescription_id}}",
"doctor_id": "174159057723920",
"patient_id": "174678912588458",
"clinic_id": "67978400352a61001d64e9fb",
"created_at": 1730189586,
"modified_at": 1730189586,
"partner_doctor_id": "test-doc-123",
"current_version": "2",
"previous_version": "1",
"prescription_url": "https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf",
"prescription_url_print": "https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf",
"partner_patient_id": "77237637763817-17",
"partner_clinic_id": "CL04",
"partner_appointment_id": "67ce9032abfba8001d17ddd2",
"partner_meta": {
"key1": "{{value1}}"
}
}
}
'import requests
url = "https://{partner_host}/registered_url_for_prescription_events"
payload = {
"event_time": 1730189586,
"timestamp": 1730189586,
"client_id": "67978400352a61001d64e9fb",
"business_id": "174159057718553",
"data": {
"prescription_id": "{{prescription_id}}",
"doctor_id": "174159057723920",
"patient_id": "174678912588458",
"clinic_id": "67978400352a61001d64e9fb",
"created_at": 1730189586,
"modified_at": 1730189586,
"partner_doctor_id": "test-doc-123",
"current_version": "2",
"previous_version": "1",
"prescription_url": "https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf",
"prescription_url_print": "https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf",
"partner_patient_id": "77237637763817-17",
"partner_clinic_id": "CL04",
"partner_appointment_id": "67ce9032abfba8001d17ddd2",
"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_time: 1730189586,
timestamp: 1730189586,
client_id: '67978400352a61001d64e9fb',
business_id: '174159057718553',
data: {
prescription_id: '{{prescription_id}}',
doctor_id: '174159057723920',
patient_id: '174678912588458',
clinic_id: '67978400352a61001d64e9fb',
created_at: 1730189586,
modified_at: 1730189586,
partner_doctor_id: 'test-doc-123',
current_version: '2',
previous_version: '1',
prescription_url: 'https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf',
prescription_url_print: 'https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf',
partner_patient_id: '77237637763817-17',
partner_clinic_id: 'CL04',
partner_appointment_id: '67ce9032abfba8001d17ddd2',
partner_meta: {key1: '{{value1}}'}
}
})
};
fetch('https://{partner_host}/registered_url_for_prescription_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_prescription_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_time' => 1730189586,
'timestamp' => 1730189586,
'client_id' => '67978400352a61001d64e9fb',
'business_id' => '174159057718553',
'data' => [
'prescription_id' => '{{prescription_id}}',
'doctor_id' => '174159057723920',
'patient_id' => '174678912588458',
'clinic_id' => '67978400352a61001d64e9fb',
'created_at' => 1730189586,
'modified_at' => 1730189586,
'partner_doctor_id' => 'test-doc-123',
'current_version' => '2',
'previous_version' => '1',
'prescription_url' => 'https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf',
'prescription_url_print' => 'https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf',
'partner_patient_id' => '77237637763817-17',
'partner_clinic_id' => 'CL04',
'partner_appointment_id' => '67ce9032abfba8001d17ddd2',
'partner_meta' => [
'key1' => '{{value1}}'
]
]
]),
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_prescription_events"
payload := strings.NewReader("{\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"prescription_id\": \"{{prescription_id}}\",\n \"doctor_id\": \"174159057723920\",\n \"patient_id\": \"174678912588458\",\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"partner_doctor_id\": \"test-doc-123\",\n \"current_version\": \"2\",\n \"previous_version\": \"1\",\n \"prescription_url\": \"https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf\",\n \"prescription_url_print\": \"https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf\",\n \"partner_patient_id\": \"77237637763817-17\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"partner_meta\": {\n \"key1\": \"{{value1}}\"\n }\n }\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_prescription_events")
.header("Content-Type", "application/json")
.body("{\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"prescription_id\": \"{{prescription_id}}\",\n \"doctor_id\": \"174159057723920\",\n \"patient_id\": \"174678912588458\",\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"partner_doctor_id\": \"test-doc-123\",\n \"current_version\": \"2\",\n \"previous_version\": \"1\",\n \"prescription_url\": \"https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf\",\n \"prescription_url_print\": \"https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf\",\n \"partner_patient_id\": \"77237637763817-17\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"partner_meta\": {\n \"key1\": \"{{value1}}\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{partner_host}/registered_url_for_prescription_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_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"prescription_id\": \"{{prescription_id}}\",\n \"doctor_id\": \"174159057723920\",\n \"patient_id\": \"174678912588458\",\n \"clinic_id\": \"67978400352a61001d64e9fb\",\n \"created_at\": 1730189586,\n \"modified_at\": 1730189586,\n \"partner_doctor_id\": \"test-doc-123\",\n \"current_version\": \"2\",\n \"previous_version\": \"1\",\n \"prescription_url\": \"https://prescription-store-s3.eka.care/P-DW-sam123ple.pdf\",\n \"prescription_url_print\": \"https://prescription-store-s3.eka.care/P-DW-sam123ple-print.pdf\",\n \"partner_patient_id\": \"77237637763817-17\",\n \"partner_clinic_id\": \"CL04\",\n \"partner_appointment_id\": \"67ce9032abfba8001d17ddd2\",\n \"partner_meta\": {\n \"key1\": \"{{value1}}\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Available options:
prescription.created, prescription.updated Event occured timestamp
Example:
1730189586
Timestamp of the event
Example:
1730189586
Client ID for the appointment
Example:
"67978400352a61001d64e9fb"
Business ID for the appointment
Example:
"174159057718553"
Show child attributes
Show child attributes
Response
200 - undefined
Was this page helpful?
⌘I

