Cancel Dawakhana Order
curl --request POST \
--url https://api.eka.care/ipd/v1/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/v1/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/v1/service/dawakhana/orders/{order_id}/cancel', 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/dawakhana/orders/{order_id}/cancel",
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([
'reason' => 'Medicine discontinued by doctor'
]),
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/dawakhana/orders/{order_id}/cancel"
payload := strings.NewReader("{\n \"reason\": \"Medicine discontinued by doctor\"\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/dawakhana/orders/{order_id}/cancel")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Medicine discontinued by doctor\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/v1/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"
}Dawakhana
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
/
v1
/
service
/
dawakhana
/
orders
/
{order_id}
/
cancel
Cancel Dawakhana Order
curl --request POST \
--url https://api.eka.care/ipd/v1/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/v1/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/v1/service/dawakhana/orders/{order_id}/cancel', 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/dawakhana/orders/{order_id}/cancel",
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([
'reason' => 'Medicine discontinued by doctor'
]),
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/dawakhana/orders/{order_id}/cancel"
payload := strings.NewReader("{\n \"reason\": \"Medicine discontinued by doctor\"\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/dawakhana/orders/{order_id}/cancel")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Medicine discontinued by doctor\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/v1/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?

