Cancel Dawakhana Order
curl --request POST \
--url https://api.eka.care/ipd/service/dawakhana/orders/{order_id}/cancel \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"reason": "Medicine discontinued by doctor"
}
'import requests
url = "https://api.eka.care/ipd/service/dawakhana/orders/{order_id}/cancel"
payload = { "reason": "Medicine discontinued by doctor" }
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({reason: 'Medicine discontinued by doctor'})
};
fetch('https://api.eka.care/ipd/service/dawakhana/orders/{order_id}/cancel', 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/dawakhana/orders/{order_id}/cancel")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Medicine discontinued by doctor\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/ipd/service/dawakhana/orders/{order_id}/cancel");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"reason\": \"Medicine discontinued by doctor\"\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/dawakhana/orders/{order_id}/cancel")
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 \"reason\": \"Medicine discontinued by doctor\"\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",
"status": "CANCELLED",
"createdBy": "161467756044203",
"isCollected": false,
"provider": "dawakhana",
"cancelledBy": "161467756044204",
"cancelledByName": "Meena Iyer",
"cancelledAt": "2026-10-07T12:30:00.000Z",
"cancelReason": "Medicine discontinued by doctor",
"createdAt": "2026-10-07T12:10:00.000Z",
"updatedAt": "2026-10-07T12:30:00.000Z",
"lines": [
{
"id": "66f1cd07e4b0a1b2c3d4ef0b",
"name": "Paracetamol 500mg Tablet",
"orderedQty": 10,
"lineStatus": "PENDING"
}
]
}
}{
"success": false,
"error": "Only a pending order can be cancelled"
}{
"message": "<string>"
}{
"success": false,
"error": "Order not found"
}Orders
Cancel Dawakhana Order
Overview
This API cancels a pending Dawakhana order of your workspace. Only an order in status CREATED can be cancelled; nothing is billed.
The order moves to CANCELLED, and the user making the request is recorded in cancelledBy, cancelledByName and cancelledAt.
POST
/
ipd
/
service
/
dawakhana
/
orders
/
{order_id}
/
cancel
Cancel Dawakhana Order
curl --request POST \
--url https://api.eka.care/ipd/service/dawakhana/orders/{order_id}/cancel \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"reason": "Medicine discontinued by doctor"
}
'import requests
url = "https://api.eka.care/ipd/service/dawakhana/orders/{order_id}/cancel"
payload = { "reason": "Medicine discontinued by doctor" }
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({reason: 'Medicine discontinued by doctor'})
};
fetch('https://api.eka.care/ipd/service/dawakhana/orders/{order_id}/cancel', 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/dawakhana/orders/{order_id}/cancel")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Medicine discontinued by doctor\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/ipd/service/dawakhana/orders/{order_id}/cancel");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"reason\": \"Medicine discontinued by doctor\"\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/dawakhana/orders/{order_id}/cancel")
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 \"reason\": \"Medicine discontinued by doctor\"\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",
"status": "CANCELLED",
"createdBy": "161467756044203",
"isCollected": false,
"provider": "dawakhana",
"cancelledBy": "161467756044204",
"cancelledByName": "Meena Iyer",
"cancelledAt": "2026-10-07T12:30:00.000Z",
"cancelReason": "Medicine discontinued by doctor",
"createdAt": "2026-10-07T12:10:00.000Z",
"updatedAt": "2026-10-07T12:30:00.000Z",
"lines": [
{
"id": "66f1cd07e4b0a1b2c3d4ef0b",
"name": "Paracetamol 500mg Tablet",
"orderedQty": 10,
"lineStatus": "PENDING"
}
]
}
}{
"success": false,
"error": "Only a pending order can be cancelled"
}{
"message": "<string>"
}{
"success": false,
"error": "Order not found"
}Headers
Path Parameters
Id of the Dawakhana order to cancel.
Body
application/json
Optional cancellation reason.
Reason for cancelling the order.
Was this page helpful?

