Mark Order Collected
curl --request PATCH \
--url https://api.eka.care/ipd/v1/service/orders/{order_id} \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"isCollected": true
}
'import requests
url = "https://api.eka.care/ipd/v1/service/orders/{order_id}"
payload = { "isCollected": True }
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({isCollected: true})
};
fetch('https://api.eka.care/ipd/v1/service/orders/{order_id}', 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/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'isCollected' => true
]),
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/{order_id}"
payload := strings.NewReader("{\n \"isCollected\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.eka.care/ipd/v1/service/orders/{order_id}")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"isCollected\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/v1/service/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isCollected\": true\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": "DISPATCHED",
"createdBy": "161467756044203",
"isCollected": true,
"collectedBy": "161467756044205",
"collectedByName": "Sunil Rao",
"collectedAt": "2026-10-07T13:00:00.000Z",
"provider": "dawakhana",
"createdAt": "2026-10-07T12:10:00.000Z",
"updatedAt": "2026-10-07T13:00:00.000Z"
}
}{
"success": false,
"error": "A return order cannot be marked collected."
}{
"message": "<string>"
}{
"success": false,
"error": "Order not found"
}Orders
Mark Order Collected
Overview
This API marks a medicine order of your workspace as collected (or not collected) by the patient.
Sending isCollected: true also records the user making the request in collectedBy, collectedByName and collectedAt. Sending isCollected: false clears the flag but keeps the earlier collected details.
A return order (kind: return) cannot be marked collected and returns 400. Returns 404 with Order not found when the order_id does not exist or belongs to another workspace.
PATCH
/
ipd
/
v1
/
service
/
orders
/
{order_id}
Mark Order Collected
curl --request PATCH \
--url https://api.eka.care/ipd/v1/service/orders/{order_id} \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"isCollected": true
}
'import requests
url = "https://api.eka.care/ipd/v1/service/orders/{order_id}"
payload = { "isCollected": True }
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({isCollected: true})
};
fetch('https://api.eka.care/ipd/v1/service/orders/{order_id}', 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/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'isCollected' => true
]),
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/{order_id}"
payload := strings.NewReader("{\n \"isCollected\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.eka.care/ipd/v1/service/orders/{order_id}")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"isCollected\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/v1/service/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isCollected\": true\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": "DISPATCHED",
"createdBy": "161467756044203",
"isCollected": true,
"collectedBy": "161467756044205",
"collectedByName": "Sunil Rao",
"collectedAt": "2026-10-07T13:00:00.000Z",
"provider": "dawakhana",
"createdAt": "2026-10-07T12:10:00.000Z",
"updatedAt": "2026-10-07T13:00:00.000Z"
}
}{
"success": false,
"error": "A return order cannot be marked collected."
}{
"message": "<string>"
}{
"success": false,
"error": "Order not found"
}Was this page helpful?

