Skip to main content
GET
/
dr
/
v1
/
doctor
/
{doctor_id}
/
clinic
/
{clinic_id}
/
appointment
/
slot
Get Appointment Slots
curl --request GET \
  --url https://api.eka.care/dr/v1/doctor/{doctor_id}/clinic/{clinic_id}/appointment/slot \
  --header 'auth: <auth>'
import requests

url = "https://api.eka.care/dr/v1/doctor/{doctor_id}/clinic/{clinic_id}/appointment/slot"

headers = {"auth": "<auth>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {auth: '<auth>'}};

fetch('https://api.eka.care/dr/v1/doctor/{doctor_id}/clinic/{clinic_id}/appointment/slot', 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/dr/v1/doctor/{doctor_id}/clinic/{clinic_id}/appointment/slot",
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/dr/v1/doctor/{doctor_id}/clinic/{clinic_id}/appointment/slot"

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/dr/v1/doctor/{doctor_id}/clinic/{clinic_id}/appointment/slot")
.header("auth", "<auth>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.eka.care/dr/v1/doctor/{doctor_id}/clinic/{clinic_id}/appointment/slot")

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
{
  "data": {
    "schedule": {
      "60532c7dcb46901ba3a3e462": [
        {
          "service_type": "consultation",
          "slots": [
            {
              "available": false,
              "conf_id": "30daff8bf9df0abd81ad041003b4690a436db2ad26016814bca037ce0ba22e3b",
              "e": "2024-09-05T09:30:00+05:30",
              "s": "2024-09-05T09:15:00+05:30"
            },
            {
              "available": true,
              "conf_id": "30daff8bf9df0abd81ad041003b4690a436db2ad26016814bca037ce0ba22e3b",
              "e": "2024-09-05T09:45:00+05:30",
              "s": "2024-09-05T09:30:00+05:30"
            },
            {
              "available": false,
              "conf_id": "30daff8bf9df0abd81ad041003b4690a436db2ad26016814bca037ce0ba22e3b",
              "e": "2024-09-05T10:00:00+05:30",
              "s": "2024-09-05T09:45:00+05:30"
            },
            {
              "available": true,
              "conf_id": "30daff8bf9df0abd81ad041003b4690a436db2ad26016814bca037ce0ba22e3b",
              "e": "2024-09-05T10:15:00+05:30",
              "s": "2024-09-05T10:00:00+05:30"
            },
            {
              "available": true,
              "conf_id": "30daff8bf9df0abd81ad041003b4690a436db2ad26016814bca037ce0ba22e3b",
              "e": "2024-09-05T10:30:00+05:30",
              "s": "2024-09-05T10:15:00+05:30"
            }
          ]
        }
      ]
    },
    "services": {
      "30daff8bf9df0abd81ad041003b4690a436db2ad26016814bca037ce0ba22e3b": {
        "allow_patient_booking": true,
        "appointment_type": "REGULAR",
        "conf_id": "30daff8bf9df0abd81ad041003b4690a436db2ad26016814bca037ce0ba22e3b",
        "conv_fee": 0,
        "currency": "INR",
        "discount": 0,
        "mode": [
          "in-clinic"
        ],
        "owner_id": "161419272566611",
        "post_pay": false,
        "pre_pay": true,
        "price": 500,
        "service_id": 1,
        "service_name": "consultation"
      }
    }
  },
  "success": "true",
  "status_code": 200
}
{
"success": "false",
"status_code": 400,
"message": "Invalid request parameters. Please check your input and try again."
}
{
"success": "false",
"status_code": 403,
"message": "Access denied. You do not have permission to view this doctor's schedule."
}
{
"success": "false",
"status_code": 404,
"message": "Doctor not found. Please check the provided doctor ID."
}
{
"success": "false",
"status_code": 500,
"message": "An unexpected error occurred while processing your request. Please try again later."
}

Headers

auth
string
required
Example:

"auth"

Path Parameters

doctor_id
string
required
clinic_id
string
required

Query Parameters

start_date
string
required
Example:

"{{start_date}}"

end_date
string
required
Example:

"{{end_date}}"

Response

OK

data
object