curl --request POST \
--url https://api.eka.care/ipd/v1/service/orders \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"admissionId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"ipd_id": "IPD-2026-0042",
"provider": "dawakhana",
"patient_id": "pid-321",
"patient_name": "Ravi Kumar",
"mobile": "9876543210",
"doctor_name": "Dr. Vivek Sharma",
"delivery_type": "pickup",
"items": [
{
"medicine_id": "med-paracetamol-500",
"name": "Paracetamol 500mg Tablet",
"generic_name": "Paracetamol",
"quantity": 10,
"directions": "1 tablet every 6 hours"
}
]
}
'import requests
url = "https://api.eka.care/ipd/v1/service/orders"
payload = {
"admissionId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"ipd_id": "IPD-2026-0042",
"provider": "dawakhana",
"patient_id": "pid-321",
"patient_name": "Ravi Kumar",
"mobile": "9876543210",
"doctor_name": "Dr. Vivek Sharma",
"delivery_type": "pickup",
"items": [
{
"medicine_id": "med-paracetamol-500",
"name": "Paracetamol 500mg Tablet",
"generic_name": "Paracetamol",
"quantity": 10,
"directions": "1 tablet every 6 hours"
}
]
}
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({
admissionId: 'a1b2c3d4-5678-90ab-cdef-1234567890ab',
ipd_id: 'IPD-2026-0042',
provider: 'dawakhana',
patient_id: 'pid-321',
patient_name: 'Ravi Kumar',
mobile: '9876543210',
doctor_name: 'Dr. Vivek Sharma',
delivery_type: 'pickup',
items: [
{
medicine_id: 'med-paracetamol-500',
name: 'Paracetamol 500mg Tablet',
generic_name: 'Paracetamol',
quantity: 10,
directions: '1 tablet every 6 hours'
}
]
})
};
fetch('https://api.eka.care/ipd/v1/service/orders', 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://api.eka.care/ipd/v1/service/orders",
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([
'admissionId' => 'a1b2c3d4-5678-90ab-cdef-1234567890ab',
'ipd_id' => 'IPD-2026-0042',
'provider' => 'dawakhana',
'patient_id' => 'pid-321',
'patient_name' => 'Ravi Kumar',
'mobile' => '9876543210',
'doctor_name' => 'Dr. Vivek Sharma',
'delivery_type' => 'pickup',
'items' => [
[
'medicine_id' => 'med-paracetamol-500',
'name' => 'Paracetamol 500mg Tablet',
'generic_name' => 'Paracetamol',
'quantity' => 10,
'directions' => '1 tablet every 6 hours'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"auth: <auth>"
],
]);
$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://api.eka.care/ipd/v1/service/orders"
payload := strings.NewReader("{\n \"admissionId\": \"a1b2c3d4-5678-90ab-cdef-1234567890ab\",\n \"ipd_id\": \"IPD-2026-0042\",\n \"provider\": \"dawakhana\",\n \"patient_id\": \"pid-321\",\n \"patient_name\": \"Ravi Kumar\",\n \"mobile\": \"9876543210\",\n \"doctor_name\": \"Dr. Vivek Sharma\",\n \"delivery_type\": \"pickup\",\n \"items\": [\n {\n \"medicine_id\": \"med-paracetamol-500\",\n \"name\": \"Paracetamol 500mg Tablet\",\n \"generic_name\": \"Paracetamol\",\n \"quantity\": 10,\n \"directions\": \"1 tablet every 6 hours\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("auth", "<auth>")
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://api.eka.care/ipd/v1/service/orders")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"admissionId\": \"a1b2c3d4-5678-90ab-cdef-1234567890ab\",\n \"ipd_id\": \"IPD-2026-0042\",\n \"provider\": \"dawakhana\",\n \"patient_id\": \"pid-321\",\n \"patient_name\": \"Ravi Kumar\",\n \"mobile\": \"9876543210\",\n \"doctor_name\": \"Dr. Vivek Sharma\",\n \"delivery_type\": \"pickup\",\n \"items\": [\n {\n \"medicine_id\": \"med-paracetamol-500\",\n \"name\": \"Paracetamol 500mg Tablet\",\n \"generic_name\": \"Paracetamol\",\n \"quantity\": 10,\n \"directions\": \"1 tablet every 6 hours\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/v1/service/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"admissionId\": \"a1b2c3d4-5678-90ab-cdef-1234567890ab\",\n \"ipd_id\": \"IPD-2026-0042\",\n \"provider\": \"dawakhana\",\n \"patient_id\": \"pid-321\",\n \"patient_name\": \"Ravi Kumar\",\n \"mobile\": \"9876543210\",\n \"doctor_name\": \"Dr. Vivek Sharma\",\n \"delivery_type\": \"pickup\",\n \"items\": [\n {\n \"medicine_id\": \"med-paracetamol-500\",\n \"name\": \"Paracetamol 500mg Tablet\",\n \"generic_name\": \"Paracetamol\",\n \"quantity\": 10,\n \"directions\": \"1 tablet every 6 hours\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "66f1cd07e4b0a1b2c3d4ef0a",
"admissionId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"kind": "order",
"orderNumber": "DW-7Q2K9F3M",
"ipdId": "IPD-2026-0042",
"status": "CREATED",
"createdBy": "161467756044203",
"createdByName": "Vivek Sharma",
"isCollected": false,
"provider": "dawakhana",
"patientName": "Ravi Kumar",
"mobile": "9876543210",
"patientId": "pid-321",
"doctorName": "Dr. Vivek Sharma",
"deliveryType": "pickup",
"createdAt": "2026-10-07T12:10:00.000Z",
"updatedAt": "2026-10-07T12:10:00.000Z"
}
}{
"success": false,
"error": "pharmacyId is required for eVital orders"
}{
"message": "<string>"
}Create Order
Overview
This API places a medicine order for an IPD admission of your workspace. The order is sent to a pharmacy provider: evital (an external pharmacy on eVital) or dawakhana (your in-house pharmacy).
Choosing the provider: pass provider to pick one. When it is omitted, the order goes to eVital if eVital is set up for your workspace, otherwise to Dawakhana; if neither is set up the request fails with 400.
eVital orders require pharmacyId (the id of a pharmacy from the pharmacies list). Each item’s quantity must already be in that pharmacy’s order unit (loose or strip), and items are matched by medicine_id.
Dawakhana orders get a server-generated orderNumber. An item’s name is used as the line name (falling back to medicine_id).
The order starts in status CREATED. The user making the request is recorded in createdBy and createdByName. Fields not listed in the request body are rejected.
curl --request POST \
--url https://api.eka.care/ipd/v1/service/orders \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"admissionId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"ipd_id": "IPD-2026-0042",
"provider": "dawakhana",
"patient_id": "pid-321",
"patient_name": "Ravi Kumar",
"mobile": "9876543210",
"doctor_name": "Dr. Vivek Sharma",
"delivery_type": "pickup",
"items": [
{
"medicine_id": "med-paracetamol-500",
"name": "Paracetamol 500mg Tablet",
"generic_name": "Paracetamol",
"quantity": 10,
"directions": "1 tablet every 6 hours"
}
]
}
'import requests
url = "https://api.eka.care/ipd/v1/service/orders"
payload = {
"admissionId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"ipd_id": "IPD-2026-0042",
"provider": "dawakhana",
"patient_id": "pid-321",
"patient_name": "Ravi Kumar",
"mobile": "9876543210",
"doctor_name": "Dr. Vivek Sharma",
"delivery_type": "pickup",
"items": [
{
"medicine_id": "med-paracetamol-500",
"name": "Paracetamol 500mg Tablet",
"generic_name": "Paracetamol",
"quantity": 10,
"directions": "1 tablet every 6 hours"
}
]
}
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({
admissionId: 'a1b2c3d4-5678-90ab-cdef-1234567890ab',
ipd_id: 'IPD-2026-0042',
provider: 'dawakhana',
patient_id: 'pid-321',
patient_name: 'Ravi Kumar',
mobile: '9876543210',
doctor_name: 'Dr. Vivek Sharma',
delivery_type: 'pickup',
items: [
{
medicine_id: 'med-paracetamol-500',
name: 'Paracetamol 500mg Tablet',
generic_name: 'Paracetamol',
quantity: 10,
directions: '1 tablet every 6 hours'
}
]
})
};
fetch('https://api.eka.care/ipd/v1/service/orders', 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://api.eka.care/ipd/v1/service/orders",
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([
'admissionId' => 'a1b2c3d4-5678-90ab-cdef-1234567890ab',
'ipd_id' => 'IPD-2026-0042',
'provider' => 'dawakhana',
'patient_id' => 'pid-321',
'patient_name' => 'Ravi Kumar',
'mobile' => '9876543210',
'doctor_name' => 'Dr. Vivek Sharma',
'delivery_type' => 'pickup',
'items' => [
[
'medicine_id' => 'med-paracetamol-500',
'name' => 'Paracetamol 500mg Tablet',
'generic_name' => 'Paracetamol',
'quantity' => 10,
'directions' => '1 tablet every 6 hours'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"auth: <auth>"
],
]);
$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://api.eka.care/ipd/v1/service/orders"
payload := strings.NewReader("{\n \"admissionId\": \"a1b2c3d4-5678-90ab-cdef-1234567890ab\",\n \"ipd_id\": \"IPD-2026-0042\",\n \"provider\": \"dawakhana\",\n \"patient_id\": \"pid-321\",\n \"patient_name\": \"Ravi Kumar\",\n \"mobile\": \"9876543210\",\n \"doctor_name\": \"Dr. Vivek Sharma\",\n \"delivery_type\": \"pickup\",\n \"items\": [\n {\n \"medicine_id\": \"med-paracetamol-500\",\n \"name\": \"Paracetamol 500mg Tablet\",\n \"generic_name\": \"Paracetamol\",\n \"quantity\": 10,\n \"directions\": \"1 tablet every 6 hours\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("auth", "<auth>")
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://api.eka.care/ipd/v1/service/orders")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"admissionId\": \"a1b2c3d4-5678-90ab-cdef-1234567890ab\",\n \"ipd_id\": \"IPD-2026-0042\",\n \"provider\": \"dawakhana\",\n \"patient_id\": \"pid-321\",\n \"patient_name\": \"Ravi Kumar\",\n \"mobile\": \"9876543210\",\n \"doctor_name\": \"Dr. Vivek Sharma\",\n \"delivery_type\": \"pickup\",\n \"items\": [\n {\n \"medicine_id\": \"med-paracetamol-500\",\n \"name\": \"Paracetamol 500mg Tablet\",\n \"generic_name\": \"Paracetamol\",\n \"quantity\": 10,\n \"directions\": \"1 tablet every 6 hours\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/v1/service/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"admissionId\": \"a1b2c3d4-5678-90ab-cdef-1234567890ab\",\n \"ipd_id\": \"IPD-2026-0042\",\n \"provider\": \"dawakhana\",\n \"patient_id\": \"pid-321\",\n \"patient_name\": \"Ravi Kumar\",\n \"mobile\": \"9876543210\",\n \"doctor_name\": \"Dr. Vivek Sharma\",\n \"delivery_type\": \"pickup\",\n \"items\": [\n {\n \"medicine_id\": \"med-paracetamol-500\",\n \"name\": \"Paracetamol 500mg Tablet\",\n \"generic_name\": \"Paracetamol\",\n \"quantity\": 10,\n \"directions\": \"1 tablet every 6 hours\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "66f1cd07e4b0a1b2c3d4ef0a",
"admissionId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"kind": "order",
"orderNumber": "DW-7Q2K9F3M",
"ipdId": "IPD-2026-0042",
"status": "CREATED",
"createdBy": "161467756044203",
"createdByName": "Vivek Sharma",
"isCollected": false,
"provider": "dawakhana",
"patientName": "Ravi Kumar",
"mobile": "9876543210",
"patientId": "pid-321",
"doctorName": "Dr. Vivek Sharma",
"deliveryType": "pickup",
"createdAt": "2026-10-07T12:10:00.000Z",
"updatedAt": "2026-10-07T12:10:00.000Z"
}
}{
"success": false,
"error": "pharmacyId is required for eVital orders"
}{
"message": "<string>"
}Headers
Body
The order to place.
Id of the IPD admission the order is for (a UUID or a 24-character hex id).
Medicines to order.
Show child attributes
Show child attributes
Patient IPD case number.
Id of the prescription the order is based on.
URL of the prescription PDF.
Pharmacy provider to send the order to. See the overview for the default.
evital, dawakhana Id of the pharmacy to fulfil the order. Required for evital orders.
Id of the patient.
Name of the patient.
Mobile number of the patient.
Name of the prescribing doctor.
How the medicines reach the patient.
pickup, delivery Order-level remarks.
Extra key-value fields passed to the provider (used by eVital).
Show child attributes
Show child attributes
Was this page helpful?

