Consent Form Events
curl --request POST \
--url https://{partner_host}/registered_url_for_consent_form \
--header 'Content-Type: application/json' \
--data '
{
"event": "mcert.created",
"event_time": 1730189586,
"timestamp": 1730189586,
"client_id": "67978400352a61001d64e9fb",
"business_id": "174159057718553",
"data": {
"docid": "174159057723920",
"id": "eaaf7c24-ebcd-4340-975a-851d6e31478f",
"owner": "174159057723925",
"patientid": "175465638609726",
"sendurlpdf": "https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf",
"url": "https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf",
"type": "mcert"
}
}
'import requests
url = "https://{partner_host}/registered_url_for_consent_form"
payload = {
"event": "mcert.created",
"event_time": 1730189586,
"timestamp": 1730189586,
"client_id": "67978400352a61001d64e9fb",
"business_id": "174159057718553",
"data": {
"docid": "174159057723920",
"id": "eaaf7c24-ebcd-4340-975a-851d6e31478f",
"owner": "174159057723925",
"patientid": "175465638609726",
"sendurlpdf": "https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf",
"url": "https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf",
"type": "mcert"
}
}
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: 'mcert.created',
event_time: 1730189586,
timestamp: 1730189586,
client_id: '67978400352a61001d64e9fb',
business_id: '174159057718553',
data: {
docid: '174159057723920',
id: 'eaaf7c24-ebcd-4340-975a-851d6e31478f',
owner: '174159057723925',
patientid: '175465638609726',
sendurlpdf: 'https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf',
url: 'https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf',
type: 'mcert'
}
})
};
fetch('https://{partner_host}/registered_url_for_consent_form', 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_consent_form")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"mcert.created\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"docid\": \"174159057723920\",\n \"id\": \"eaaf7c24-ebcd-4340-975a-851d6e31478f\",\n \"owner\": \"174159057723925\",\n \"patientid\": \"175465638609726\",\n \"sendurlpdf\": \"https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf\",\n \"url\": \"https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf\",\n \"type\": \"mcert\"\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://{partner_host}/registered_url_for_consent_form");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"event\": \"mcert.created\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"docid\": \"174159057723920\",\n \"id\": \"eaaf7c24-ebcd-4340-975a-851d6e31478f\",\n \"owner\": \"174159057723925\",\n \"patientid\": \"175465638609726\",\n \"sendurlpdf\": \"https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf\",\n \"url\": \"https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf\",\n \"type\": \"mcert\"\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_consent_form")
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\": \"mcert.created\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"docid\": \"174159057723920\",\n \"id\": \"eaaf7c24-ebcd-4340-975a-851d6e31478f\",\n \"owner\": \"174159057723925\",\n \"patientid\": \"175465638609726\",\n \"sendurlpdf\": \"https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf\",\n \"url\": \"https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf\",\n \"type\": \"mcert\"\n }\n}"
response = http.request(request)
puts response.read_bodyWebhooks
Consent Form Events
When a consent form or medical certificate is created or updated, a webhook is sent to the registered endpoint containing the Doctor Id, Patient Id, Consent form url, type(represents whether it is a medical certificate or consent form) etc. The receiving system can use these details as per their need.
POST
/
registered_url_for_consent_form
Consent Form Events
curl --request POST \
--url https://{partner_host}/registered_url_for_consent_form \
--header 'Content-Type: application/json' \
--data '
{
"event": "mcert.created",
"event_time": 1730189586,
"timestamp": 1730189586,
"client_id": "67978400352a61001d64e9fb",
"business_id": "174159057718553",
"data": {
"docid": "174159057723920",
"id": "eaaf7c24-ebcd-4340-975a-851d6e31478f",
"owner": "174159057723925",
"patientid": "175465638609726",
"sendurlpdf": "https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf",
"url": "https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf",
"type": "mcert"
}
}
'import requests
url = "https://{partner_host}/registered_url_for_consent_form"
payload = {
"event": "mcert.created",
"event_time": 1730189586,
"timestamp": 1730189586,
"client_id": "67978400352a61001d64e9fb",
"business_id": "174159057718553",
"data": {
"docid": "174159057723920",
"id": "eaaf7c24-ebcd-4340-975a-851d6e31478f",
"owner": "174159057723925",
"patientid": "175465638609726",
"sendurlpdf": "https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf",
"url": "https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf",
"type": "mcert"
}
}
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: 'mcert.created',
event_time: 1730189586,
timestamp: 1730189586,
client_id: '67978400352a61001d64e9fb',
business_id: '174159057718553',
data: {
docid: '174159057723920',
id: 'eaaf7c24-ebcd-4340-975a-851d6e31478f',
owner: '174159057723925',
patientid: '175465638609726',
sendurlpdf: 'https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf',
url: 'https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf',
type: 'mcert'
}
})
};
fetch('https://{partner_host}/registered_url_for_consent_form', 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_consent_form")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"mcert.created\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"docid\": \"174159057723920\",\n \"id\": \"eaaf7c24-ebcd-4340-975a-851d6e31478f\",\n \"owner\": \"174159057723925\",\n \"patientid\": \"175465638609726\",\n \"sendurlpdf\": \"https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf\",\n \"url\": \"https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf\",\n \"type\": \"mcert\"\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://{partner_host}/registered_url_for_consent_form");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"event\": \"mcert.created\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"docid\": \"174159057723920\",\n \"id\": \"eaaf7c24-ebcd-4340-975a-851d6e31478f\",\n \"owner\": \"174159057723925\",\n \"patientid\": \"175465638609726\",\n \"sendurlpdf\": \"https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf\",\n \"url\": \"https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf\",\n \"type\": \"mcert\"\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_consent_form")
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\": \"mcert.created\",\n \"event_time\": 1730189586,\n \"timestamp\": 1730189586,\n \"client_id\": \"67978400352a61001d64e9fb\",\n \"business_id\": \"174159057718553\",\n \"data\": {\n \"docid\": \"174159057723920\",\n \"id\": \"eaaf7c24-ebcd-4340-975a-851d6e31478f\",\n \"owner\": \"174159057723925\",\n \"patientid\": \"175465638609726\",\n \"sendurlpdf\": \"https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf\",\n \"url\": \"https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf\",\n \"type\": \"mcert\"\n }\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Was this page helpful?

