curl --request POST \
--url https://api.eka.care/ipd/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/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/service/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/ipd/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();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/ipd/service/orders");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\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}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/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/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/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/service/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/ipd/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();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/ipd/service/orders");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\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}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/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>"
}Body
The order to place.
Was this page helpful?

