List Pharmacies
curl --request GET \
--url https://api.eka.care/ipd/v1/service/pharmacies \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/ipd/v1/service/pharmacies"
headers = {"auth": "<auth>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {auth: '<auth>'}};
fetch('https://api.eka.care/ipd/v1/service/pharmacies', 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/pharmacies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/ipd/v1/service/pharmacies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("auth", "<auth>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.eka.care/ipd/v1/service/pharmacies")
.header("auth", "<auth>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/v1/service/pharmacies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["auth"] = '<auth>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "dawakhana",
"name": "In-house Pharmacy",
"provider": "dawakhana",
"managesInventory": false
},
{
"id": "Q2hlbWlzdC0xMjM0",
"name": "City Medicals",
"provider": "evital",
"managesInventory": true,
"orderMode": "strip"
}
]
}{
"success": true,
"error": "<string>"
}{
"message": "<string>"
}Pharmacies
List Pharmacies
Overview
This API lists the pharmacies your workspace can order medicines from, across all pharmacy providers set up for it: eVital pharmacies (when eVital is set up) and the in-house pharmacy (id: dawakhana, when Dawakhana is enabled).
Use a pharmacy’s id as pharmacyId when placing an order. Check managesInventory before ordering: when true (eVital), check stock with Get Inventory Status and send each item’s quantity in the pharmacy’s orderMode unit; when false (in-house pharmacy), stock and prices are not tracked and the order is priced at dispatch.
If one provider cannot be reached, its pharmacies are left out and the rest are still returned.
GET
/
ipd
/
v1
/
service
/
pharmacies
List Pharmacies
curl --request GET \
--url https://api.eka.care/ipd/v1/service/pharmacies \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/ipd/v1/service/pharmacies"
headers = {"auth": "<auth>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {auth: '<auth>'}};
fetch('https://api.eka.care/ipd/v1/service/pharmacies', 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/pharmacies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/ipd/v1/service/pharmacies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("auth", "<auth>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.eka.care/ipd/v1/service/pharmacies")
.header("auth", "<auth>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/v1/service/pharmacies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["auth"] = '<auth>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "dawakhana",
"name": "In-house Pharmacy",
"provider": "dawakhana",
"managesInventory": false
},
{
"id": "Q2hlbWlzdC0xMjM0",
"name": "City Medicals",
"provider": "evital",
"managesInventory": true,
"orderMode": "strip"
}
]
}{
"success": true,
"error": "<string>"
}{
"message": "<string>"
}Was this page helpful?

