Skip to main content
POST
/
registered_url_for_prescription_communication_events
Prescription Communication Event
curl --request POST \
  --url https://{partner_host}/registered_url_for_prescription_communication_events \
  --header 'Content-Type: application/json' \
  --data '
{
  "service": "prescription",
  "event": "prescription.communication",
  "event_time": 1782207271381,
  "transaction_id": "2f924bba-e055-4b45-8b7d-f8e1259ec01a",
  "business_id": "7177796085787388",
  "data": {
    "appointment_id": "d-149c99c8-9f02-4300-8528-d602da6311ad",
    "clinic_id": "c-603d3b6ed2d1496ca0fe6d82",
    "doctor_id": "do1777976297512",
    "patient_id": "178153131932085",
    "prescription_id": "P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9",
    "prescription_url": "https://prescription-store-s3.eka.care/P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9.pdf?v=1782207271381",
    "actor_oid": "177796085790372",
    "doc_name": {
      "salutation": "Dr.",
      "first_name": "Shreya",
      "last_name": "Gupta"
    },
    "patient_name": {
      "salutation": "",
      "first_name": "test",
      "last_name": ""
    }
  },
  "timestamp": 0,
  "client_id": ""
}
'
import requests

url = "https://{partner_host}/registered_url_for_prescription_communication_events"

payload = {
"service": "prescription",
"event": "prescription.communication",
"event_time": 1782207271381,
"transaction_id": "2f924bba-e055-4b45-8b7d-f8e1259ec01a",
"business_id": "7177796085787388",
"data": {
"appointment_id": "d-149c99c8-9f02-4300-8528-d602da6311ad",
"clinic_id": "c-603d3b6ed2d1496ca0fe6d82",
"doctor_id": "do1777976297512",
"patient_id": "178153131932085",
"prescription_id": "P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9",
"prescription_url": "https://prescription-store-s3.eka.care/P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9.pdf?v=1782207271381",
"actor_oid": "177796085790372",
"doc_name": {
"salutation": "Dr.",
"first_name": "Shreya",
"last_name": "Gupta"
},
"patient_name": {
"salutation": "",
"first_name": "test",
"last_name": ""
}
},
"timestamp": 0,
"client_id": ""
}
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({
service: 'prescription',
event: 'prescription.communication',
event_time: 1782207271381,
transaction_id: '2f924bba-e055-4b45-8b7d-f8e1259ec01a',
business_id: '7177796085787388',
data: {
appointment_id: 'd-149c99c8-9f02-4300-8528-d602da6311ad',
clinic_id: 'c-603d3b6ed2d1496ca0fe6d82',
doctor_id: 'do1777976297512',
patient_id: '178153131932085',
prescription_id: 'P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9',
prescription_url: 'https://prescription-store-s3.eka.care/P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9.pdf?v=1782207271381',
actor_oid: '177796085790372',
doc_name: {salutation: 'Dr.', first_name: 'Shreya', last_name: 'Gupta'},
patient_name: {salutation: '', first_name: 'test', last_name: ''}
},
timestamp: 0,
client_id: ''
})
};

fetch('https://{partner_host}/registered_url_for_prescription_communication_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_communication_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([
'service' => 'prescription',
'event' => 'prescription.communication',
'event_time' => 1782207271381,
'transaction_id' => '2f924bba-e055-4b45-8b7d-f8e1259ec01a',
'business_id' => '7177796085787388',
'data' => [
'appointment_id' => 'd-149c99c8-9f02-4300-8528-d602da6311ad',
'clinic_id' => 'c-603d3b6ed2d1496ca0fe6d82',
'doctor_id' => 'do1777976297512',
'patient_id' => '178153131932085',
'prescription_id' => 'P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9',
'prescription_url' => 'https://prescription-store-s3.eka.care/P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9.pdf?v=1782207271381',
'actor_oid' => '177796085790372',
'doc_name' => [
'salutation' => 'Dr.',
'first_name' => 'Shreya',
'last_name' => 'Gupta'
],
'patient_name' => [
'salutation' => '',
'first_name' => 'test',
'last_name' => ''
]
],
'timestamp' => 0,
'client_id' => ''
]),
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_communication_events"

payload := strings.NewReader("{\n \"service\": \"prescription\",\n \"event\": \"prescription.communication\",\n \"event_time\": 1782207271381,\n \"transaction_id\": \"2f924bba-e055-4b45-8b7d-f8e1259ec01a\",\n \"business_id\": \"7177796085787388\",\n \"data\": {\n \"appointment_id\": \"d-149c99c8-9f02-4300-8528-d602da6311ad\",\n \"clinic_id\": \"c-603d3b6ed2d1496ca0fe6d82\",\n \"doctor_id\": \"do1777976297512\",\n \"patient_id\": \"178153131932085\",\n \"prescription_id\": \"P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9\",\n \"prescription_url\": \"https://prescription-store-s3.eka.care/P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9.pdf?v=1782207271381\",\n \"actor_oid\": \"177796085790372\",\n \"doc_name\": {\n \"salutation\": \"Dr.\",\n \"first_name\": \"Shreya\",\n \"last_name\": \"Gupta\"\n },\n \"patient_name\": {\n \"salutation\": \"\",\n \"first_name\": \"test\",\n \"last_name\": \"\"\n }\n },\n \"timestamp\": 0,\n \"client_id\": \"\"\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_communication_events")
.header("Content-Type", "application/json")
.body("{\n \"service\": \"prescription\",\n \"event\": \"prescription.communication\",\n \"event_time\": 1782207271381,\n \"transaction_id\": \"2f924bba-e055-4b45-8b7d-f8e1259ec01a\",\n \"business_id\": \"7177796085787388\",\n \"data\": {\n \"appointment_id\": \"d-149c99c8-9f02-4300-8528-d602da6311ad\",\n \"clinic_id\": \"c-603d3b6ed2d1496ca0fe6d82\",\n \"doctor_id\": \"do1777976297512\",\n \"patient_id\": \"178153131932085\",\n \"prescription_id\": \"P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9\",\n \"prescription_url\": \"https://prescription-store-s3.eka.care/P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9.pdf?v=1782207271381\",\n \"actor_oid\": \"177796085790372\",\n \"doc_name\": {\n \"salutation\": \"Dr.\",\n \"first_name\": \"Shreya\",\n \"last_name\": \"Gupta\"\n },\n \"patient_name\": {\n \"salutation\": \"\",\n \"first_name\": \"test\",\n \"last_name\": \"\"\n }\n },\n \"timestamp\": 0,\n \"client_id\": \"\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{partner_host}/registered_url_for_prescription_communication_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 \"service\": \"prescription\",\n \"event\": \"prescription.communication\",\n \"event_time\": 1782207271381,\n \"transaction_id\": \"2f924bba-e055-4b45-8b7d-f8e1259ec01a\",\n \"business_id\": \"7177796085787388\",\n \"data\": {\n \"appointment_id\": \"d-149c99c8-9f02-4300-8528-d602da6311ad\",\n \"clinic_id\": \"c-603d3b6ed2d1496ca0fe6d82\",\n \"doctor_id\": \"do1777976297512\",\n \"patient_id\": \"178153131932085\",\n \"prescription_id\": \"P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9\",\n \"prescription_url\": \"https://prescription-store-s3.eka.care/P-DW-198A8DA9-6B88-5A88-9C38-2407352F28E9.pdf?v=1782207271381\",\n \"actor_oid\": \"177796085790372\",\n \"doc_name\": {\n \"salutation\": \"Dr.\",\n \"first_name\": \"Shreya\",\n \"last_name\": \"Gupta\"\n },\n \"patient_name\": {\n \"salutation\": \"\",\n \"first_name\": \"test\",\n \"last_name\": \"\"\n }\n },\n \"timestamp\": 0,\n \"client_id\": \"\"\n}"

response = http.request(request)
puts response.read_body

Body

application/json
service
string
required

Service that emitted the event

Example:

"prescription"

event
enum<string>
required

Type of event

Available options:
prescription.communication
event_time
integer
required

Event occurred timestamp in milliseconds

Example:

1782207271381

transaction_id
string
required

Unique transaction identifier for the event

Example:

"2f924bba-e055-4b45-8b7d-f8e1259ec01a"

business_id
string
required

Business ID for the prescription

Example:

"7177796085787388"

data
object
required
timestamp
integer

Timestamp of the event

Example:

0

client_id
string

Client ID for the prescription

Example:

""

Response

200 - undefined