curl --request POST \
--url https://api.eka.care/schedule \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"name": "Dr. Sharma - OPD",
"entity_id": "doc_12345",
"location_id": "c-98765",
"config": {
"overbooking_limit": 2,
"schedule_slot_config_enabled": true,
"slot_durations": [
15,
30
]
},
"timebounds": {
"weekly": {
"1": {
"is_enabled": true,
"bounds": [
{
"s": 900,
"e": 1300,
"conf_ids": [
"conf_abc123"
]
},
{
"s": 1400,
"e": 1800,
"conf_ids": [
"conf_abc123"
]
}
]
},
"2": {
"is_enabled": true,
"bounds": [
{
"s": 900,
"e": 1300,
"conf_ids": [
"conf_abc123"
]
}
]
}
},
"daily": {
"2026-10-15": {
"is_enabled": true,
"bounds": [
{
"s": 1000,
"e": 1200,
"conf_ids": [
"conf_abc123"
]
}
]
}
},
"repeat-weekly": [
{
"repeat_every": 2,
"anchor_date": "2026-09-21",
"start_date": "2026-09-21",
"end_date": "2027-03-21",
"phases": [
{
"3": {
"is_enabled": true,
"bounds": [
{
"s": 1600,
"e": 1900,
"conf_ids": [
"conf_abc123"
]
}
]
}
},
{
"3": {
"is_enabled": false,
"bounds": []
}
}
]
}
],
"repeat-daily": [
{
"phase_index": 0,
"repeat_every": 3,
"anchor_date": "2026-09-21",
"start_date": "2026-09-21",
"end_date": "2026-12-31",
"is_enabled": true,
"bounds": [
{
"s": 900,
"e": 1100,
"conf_ids": [
"conf_abc123"
]
}
]
}
],
"block": [
{
"start_date": "2026-10-20",
"end_date": "2026-10-22",
"start_time": "09:00",
"end_time": "18:00"
}
]
},
"bookable_by": {
"front_desk": true
}
}
'import requests
url = "https://api.eka.care/schedule"
payload = {
"name": "Dr. Sharma - OPD",
"entity_id": "doc_12345",
"location_id": "c-98765",
"config": {
"overbooking_limit": 2,
"schedule_slot_config_enabled": True,
"slot_durations": [15, 30]
},
"timebounds": {
"weekly": {
"1": {
"is_enabled": True,
"bounds": [
{
"s": 900,
"e": 1300,
"conf_ids": ["conf_abc123"]
},
{
"s": 1400,
"e": 1800,
"conf_ids": ["conf_abc123"]
}
]
},
"2": {
"is_enabled": True,
"bounds": [
{
"s": 900,
"e": 1300,
"conf_ids": ["conf_abc123"]
}
]
}
},
"daily": { "2026-10-15": {
"is_enabled": True,
"bounds": [
{
"s": 1000,
"e": 1200,
"conf_ids": ["conf_abc123"]
}
]
} },
"repeat-weekly": [
{
"repeat_every": 2,
"anchor_date": "2026-09-21",
"start_date": "2026-09-21",
"end_date": "2027-03-21",
"phases": [{ "3": {
"is_enabled": True,
"bounds": [
{
"s": 1600,
"e": 1900,
"conf_ids": ["conf_abc123"]
}
]
} }, { "3": {
"is_enabled": False,
"bounds": []
} }]
}
],
"repeat-daily": [
{
"phase_index": 0,
"repeat_every": 3,
"anchor_date": "2026-09-21",
"start_date": "2026-09-21",
"end_date": "2026-12-31",
"is_enabled": True,
"bounds": [
{
"s": 900,
"e": 1100,
"conf_ids": ["conf_abc123"]
}
]
}
],
"block": [
{
"start_date": "2026-10-20",
"end_date": "2026-10-22",
"start_time": "09:00",
"end_time": "18:00"
}
]
},
"bookable_by": { "front_desk": True }
}
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({
name: 'Dr. Sharma - OPD',
entity_id: 'doc_12345',
location_id: 'c-98765',
config: {
overbooking_limit: 2,
schedule_slot_config_enabled: true,
slot_durations: [15, 30]
},
timebounds: {
weekly: {
'1': {
is_enabled: true,
bounds: [
{s: 900, e: 1300, conf_ids: ['conf_abc123']},
{s: 1400, e: 1800, conf_ids: ['conf_abc123']}
]
},
'2': {is_enabled: true, bounds: [{s: 900, e: 1300, conf_ids: ['conf_abc123']}]}
},
daily: {
'2026-10-15': {is_enabled: true, bounds: [{s: 1000, e: 1200, conf_ids: ['conf_abc123']}]}
},
'repeat-weekly': [
{
repeat_every: 2,
anchor_date: '2026-09-21',
start_date: '2026-09-21',
end_date: '2027-03-21',
phases: [
{
'3': {is_enabled: true, bounds: [{s: 1600, e: 1900, conf_ids: ['conf_abc123']}]}
},
{'3': {is_enabled: false, bounds: []}}
]
}
],
'repeat-daily': [
{
phase_index: 0,
repeat_every: 3,
anchor_date: '2026-09-21',
start_date: '2026-09-21',
end_date: '2026-12-31',
is_enabled: true,
bounds: [{s: 900, e: 1100, conf_ids: ['conf_abc123']}]
}
],
block: [
{
start_date: '2026-10-20',
end_date: '2026-10-22',
start_time: '09:00',
end_time: '18:00'
}
]
},
bookable_by: {front_desk: true}
})
};
fetch('https://api.eka.care/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/schedule")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Dr. Sharma - OPD\",\n \"entity_id\": \"doc_12345\",\n \"location_id\": \"c-98765\",\n \"config\": {\n \"overbooking_limit\": 2,\n \"schedule_slot_config_enabled\": true,\n \"slot_durations\": [\n 15,\n 30\n ]\n },\n \"timebounds\": {\n \"weekly\": {\n \"1\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1300,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n },\n {\n \"s\": 1400,\n \"e\": 1800,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n },\n \"2\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1300,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n \"daily\": {\n \"2026-10-15\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 1000,\n \"e\": 1200,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n \"repeat-weekly\": [\n {\n \"repeat_every\": 2,\n \"anchor_date\": \"2026-09-21\",\n \"start_date\": \"2026-09-21\",\n \"end_date\": \"2027-03-21\",\n \"phases\": [\n {\n \"3\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 1600,\n \"e\": 1900,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n {\n \"3\": {\n \"is_enabled\": false,\n \"bounds\": []\n }\n }\n ]\n }\n ],\n \"repeat-daily\": [\n {\n \"phase_index\": 0,\n \"repeat_every\": 3,\n \"anchor_date\": \"2026-09-21\",\n \"start_date\": \"2026-09-21\",\n \"end_date\": \"2026-12-31\",\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1100,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n ],\n \"block\": [\n {\n \"start_date\": \"2026-10-20\",\n \"end_date\": \"2026-10-22\",\n \"start_time\": \"09:00\",\n \"end_time\": \"18:00\"\n }\n ]\n },\n \"bookable_by\": {\n \"front_desk\": true\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/schedule");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"name\": \"Dr. Sharma - OPD\",\n \"entity_id\": \"doc_12345\",\n \"location_id\": \"c-98765\",\n \"config\": {\n \"overbooking_limit\": 2,\n \"schedule_slot_config_enabled\": true,\n \"slot_durations\": [\n 15,\n 30\n ]\n },\n \"timebounds\": {\n \"weekly\": {\n \"1\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1300,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n },\n {\n \"s\": 1400,\n \"e\": 1800,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n },\n \"2\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1300,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n \"daily\": {\n \"2026-10-15\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 1000,\n \"e\": 1200,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n \"repeat-weekly\": [\n {\n \"repeat_every\": 2,\n \"anchor_date\": \"2026-09-21\",\n \"start_date\": \"2026-09-21\",\n \"end_date\": \"2027-03-21\",\n \"phases\": [\n {\n \"3\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 1600,\n \"e\": 1900,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n {\n \"3\": {\n \"is_enabled\": false,\n \"bounds\": []\n }\n }\n ]\n }\n ],\n \"repeat-daily\": [\n {\n \"phase_index\": 0,\n \"repeat_every\": 3,\n \"anchor_date\": \"2026-09-21\",\n \"start_date\": \"2026-09-21\",\n \"end_date\": \"2026-12-31\",\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1100,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n ],\n \"block\": [\n {\n \"start_date\": \"2026-10-20\",\n \"end_date\": \"2026-10-22\",\n \"start_time\": \"09:00\",\n \"end_time\": \"18:00\"\n }\n ]\n },\n \"bookable_by\": {\n \"front_desk\": true\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/schedule")
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 \"name\": \"Dr. Sharma - OPD\",\n \"entity_id\": \"doc_12345\",\n \"location_id\": \"c-98765\",\n \"config\": {\n \"overbooking_limit\": 2,\n \"schedule_slot_config_enabled\": true,\n \"slot_durations\": [\n 15,\n 30\n ]\n },\n \"timebounds\": {\n \"weekly\": {\n \"1\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1300,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n },\n {\n \"s\": 1400,\n \"e\": 1800,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n },\n \"2\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1300,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n \"daily\": {\n \"2026-10-15\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 1000,\n \"e\": 1200,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n \"repeat-weekly\": [\n {\n \"repeat_every\": 2,\n \"anchor_date\": \"2026-09-21\",\n \"start_date\": \"2026-09-21\",\n \"end_date\": \"2027-03-21\",\n \"phases\": [\n {\n \"3\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 1600,\n \"e\": 1900,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n {\n \"3\": {\n \"is_enabled\": false,\n \"bounds\": []\n }\n }\n ]\n }\n ],\n \"repeat-daily\": [\n {\n \"phase_index\": 0,\n \"repeat_every\": 3,\n \"anchor_date\": \"2026-09-21\",\n \"start_date\": \"2026-09-21\",\n \"end_date\": \"2026-12-31\",\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1100,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n ],\n \"block\": [\n {\n \"start_date\": \"2026-10-20\",\n \"end_date\": \"2026-10-22\",\n \"start_time\": \"09:00\",\n \"end_time\": \"18:00\"\n }\n ]\n },\n \"bookable_by\": {\n \"front_desk\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"schedule_id": "<string>",
"business_id": "<string>",
"name": "<string>",
"archive": true,
"default": true,
"userCreatedDefault": true,
"config": {
"overbooking_limit": 123,
"block_over_existing_bookings": true,
"schedule_slot_config_enabled": true,
"slot_durations": [
123
]
},
"createdAt": "<string>",
"updatedAt": "<string>",
"timebounds": {},
"assignment": {
"bookable_by": [
"patient"
],
"products": [
"<string>"
],
"error": "<string>"
},
"confs_created": [
"<string>"
]
}
}{
"success": false,
"error": "name is required"
}{
"success": false,
"error": "<string>"
}Create Schedule
Overview
Creates a schedule for a doctor at a clinic: entity_id is the doctor id, location_id is the clinic id. For a clinic schedule (no doctor), put the clinic id in both.
The same call can add the schedule’s time windows (timebounds: weekly, daily, repeat-weekly, repeat-daily, block) and set who can book on it (bookable_by).
Service schedules vs duration schedules
config.schedule_slot_config_enabled decides how slots are cut.
- Service schedule (
falseor left out): each window lists the services bookable in it (conf_ids). A slot is as long as its service’sduration, so two services in one window can give different slot lengths. Get the ids from List Services. - Duration schedule (
true): needs at least one length inconfig.slot_durations. Slots are cut at the length the caller asks for; a length not inslot_durationsgets the shortest one.conf_idsin its windows are ignored.
conf_ids are not checked when you save. An id that belongs to another doctor or clinic in your business is copied to this doctor (confs_created). A window with no valid conf_ids gives no slots.
Who can book
bookable_by takes patient (patients book by themselves: website, booking page, app), front_desk (anyone booking from the clinic side: your reception, front desk, doctor, clinic staff, or your own EMR) and ipd (bookings for admitted patients).
productMap is deprecated and will be removed soon; it still works. Send bookable_by instead, never both in one call (400).
- Only one schedule per doctor and clinic can be bookable by patients. A second one returns
409. - A duration schedule can’t be bookable by patients (
409).
Get slots for any schedule with Get Slots.
curl --request POST \
--url https://api.eka.care/schedule \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"name": "Dr. Sharma - OPD",
"entity_id": "doc_12345",
"location_id": "c-98765",
"config": {
"overbooking_limit": 2,
"schedule_slot_config_enabled": true,
"slot_durations": [
15,
30
]
},
"timebounds": {
"weekly": {
"1": {
"is_enabled": true,
"bounds": [
{
"s": 900,
"e": 1300,
"conf_ids": [
"conf_abc123"
]
},
{
"s": 1400,
"e": 1800,
"conf_ids": [
"conf_abc123"
]
}
]
},
"2": {
"is_enabled": true,
"bounds": [
{
"s": 900,
"e": 1300,
"conf_ids": [
"conf_abc123"
]
}
]
}
},
"daily": {
"2026-10-15": {
"is_enabled": true,
"bounds": [
{
"s": 1000,
"e": 1200,
"conf_ids": [
"conf_abc123"
]
}
]
}
},
"repeat-weekly": [
{
"repeat_every": 2,
"anchor_date": "2026-09-21",
"start_date": "2026-09-21",
"end_date": "2027-03-21",
"phases": [
{
"3": {
"is_enabled": true,
"bounds": [
{
"s": 1600,
"e": 1900,
"conf_ids": [
"conf_abc123"
]
}
]
}
},
{
"3": {
"is_enabled": false,
"bounds": []
}
}
]
}
],
"repeat-daily": [
{
"phase_index": 0,
"repeat_every": 3,
"anchor_date": "2026-09-21",
"start_date": "2026-09-21",
"end_date": "2026-12-31",
"is_enabled": true,
"bounds": [
{
"s": 900,
"e": 1100,
"conf_ids": [
"conf_abc123"
]
}
]
}
],
"block": [
{
"start_date": "2026-10-20",
"end_date": "2026-10-22",
"start_time": "09:00",
"end_time": "18:00"
}
]
},
"bookable_by": {
"front_desk": true
}
}
'import requests
url = "https://api.eka.care/schedule"
payload = {
"name": "Dr. Sharma - OPD",
"entity_id": "doc_12345",
"location_id": "c-98765",
"config": {
"overbooking_limit": 2,
"schedule_slot_config_enabled": True,
"slot_durations": [15, 30]
},
"timebounds": {
"weekly": {
"1": {
"is_enabled": True,
"bounds": [
{
"s": 900,
"e": 1300,
"conf_ids": ["conf_abc123"]
},
{
"s": 1400,
"e": 1800,
"conf_ids": ["conf_abc123"]
}
]
},
"2": {
"is_enabled": True,
"bounds": [
{
"s": 900,
"e": 1300,
"conf_ids": ["conf_abc123"]
}
]
}
},
"daily": { "2026-10-15": {
"is_enabled": True,
"bounds": [
{
"s": 1000,
"e": 1200,
"conf_ids": ["conf_abc123"]
}
]
} },
"repeat-weekly": [
{
"repeat_every": 2,
"anchor_date": "2026-09-21",
"start_date": "2026-09-21",
"end_date": "2027-03-21",
"phases": [{ "3": {
"is_enabled": True,
"bounds": [
{
"s": 1600,
"e": 1900,
"conf_ids": ["conf_abc123"]
}
]
} }, { "3": {
"is_enabled": False,
"bounds": []
} }]
}
],
"repeat-daily": [
{
"phase_index": 0,
"repeat_every": 3,
"anchor_date": "2026-09-21",
"start_date": "2026-09-21",
"end_date": "2026-12-31",
"is_enabled": True,
"bounds": [
{
"s": 900,
"e": 1100,
"conf_ids": ["conf_abc123"]
}
]
}
],
"block": [
{
"start_date": "2026-10-20",
"end_date": "2026-10-22",
"start_time": "09:00",
"end_time": "18:00"
}
]
},
"bookable_by": { "front_desk": True }
}
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({
name: 'Dr. Sharma - OPD',
entity_id: 'doc_12345',
location_id: 'c-98765',
config: {
overbooking_limit: 2,
schedule_slot_config_enabled: true,
slot_durations: [15, 30]
},
timebounds: {
weekly: {
'1': {
is_enabled: true,
bounds: [
{s: 900, e: 1300, conf_ids: ['conf_abc123']},
{s: 1400, e: 1800, conf_ids: ['conf_abc123']}
]
},
'2': {is_enabled: true, bounds: [{s: 900, e: 1300, conf_ids: ['conf_abc123']}]}
},
daily: {
'2026-10-15': {is_enabled: true, bounds: [{s: 1000, e: 1200, conf_ids: ['conf_abc123']}]}
},
'repeat-weekly': [
{
repeat_every: 2,
anchor_date: '2026-09-21',
start_date: '2026-09-21',
end_date: '2027-03-21',
phases: [
{
'3': {is_enabled: true, bounds: [{s: 1600, e: 1900, conf_ids: ['conf_abc123']}]}
},
{'3': {is_enabled: false, bounds: []}}
]
}
],
'repeat-daily': [
{
phase_index: 0,
repeat_every: 3,
anchor_date: '2026-09-21',
start_date: '2026-09-21',
end_date: '2026-12-31',
is_enabled: true,
bounds: [{s: 900, e: 1100, conf_ids: ['conf_abc123']}]
}
],
block: [
{
start_date: '2026-10-20',
end_date: '2026-10-22',
start_time: '09:00',
end_time: '18:00'
}
]
},
bookable_by: {front_desk: true}
})
};
fetch('https://api.eka.care/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/schedule")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Dr. Sharma - OPD\",\n \"entity_id\": \"doc_12345\",\n \"location_id\": \"c-98765\",\n \"config\": {\n \"overbooking_limit\": 2,\n \"schedule_slot_config_enabled\": true,\n \"slot_durations\": [\n 15,\n 30\n ]\n },\n \"timebounds\": {\n \"weekly\": {\n \"1\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1300,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n },\n {\n \"s\": 1400,\n \"e\": 1800,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n },\n \"2\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1300,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n \"daily\": {\n \"2026-10-15\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 1000,\n \"e\": 1200,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n \"repeat-weekly\": [\n {\n \"repeat_every\": 2,\n \"anchor_date\": \"2026-09-21\",\n \"start_date\": \"2026-09-21\",\n \"end_date\": \"2027-03-21\",\n \"phases\": [\n {\n \"3\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 1600,\n \"e\": 1900,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n {\n \"3\": {\n \"is_enabled\": false,\n \"bounds\": []\n }\n }\n ]\n }\n ],\n \"repeat-daily\": [\n {\n \"phase_index\": 0,\n \"repeat_every\": 3,\n \"anchor_date\": \"2026-09-21\",\n \"start_date\": \"2026-09-21\",\n \"end_date\": \"2026-12-31\",\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1100,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n ],\n \"block\": [\n {\n \"start_date\": \"2026-10-20\",\n \"end_date\": \"2026-10-22\",\n \"start_time\": \"09:00\",\n \"end_time\": \"18:00\"\n }\n ]\n },\n \"bookable_by\": {\n \"front_desk\": true\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/schedule");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"name\": \"Dr. Sharma - OPD\",\n \"entity_id\": \"doc_12345\",\n \"location_id\": \"c-98765\",\n \"config\": {\n \"overbooking_limit\": 2,\n \"schedule_slot_config_enabled\": true,\n \"slot_durations\": [\n 15,\n 30\n ]\n },\n \"timebounds\": {\n \"weekly\": {\n \"1\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1300,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n },\n {\n \"s\": 1400,\n \"e\": 1800,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n },\n \"2\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1300,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n \"daily\": {\n \"2026-10-15\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 1000,\n \"e\": 1200,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n \"repeat-weekly\": [\n {\n \"repeat_every\": 2,\n \"anchor_date\": \"2026-09-21\",\n \"start_date\": \"2026-09-21\",\n \"end_date\": \"2027-03-21\",\n \"phases\": [\n {\n \"3\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 1600,\n \"e\": 1900,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n {\n \"3\": {\n \"is_enabled\": false,\n \"bounds\": []\n }\n }\n ]\n }\n ],\n \"repeat-daily\": [\n {\n \"phase_index\": 0,\n \"repeat_every\": 3,\n \"anchor_date\": \"2026-09-21\",\n \"start_date\": \"2026-09-21\",\n \"end_date\": \"2026-12-31\",\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1100,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n ],\n \"block\": [\n {\n \"start_date\": \"2026-10-20\",\n \"end_date\": \"2026-10-22\",\n \"start_time\": \"09:00\",\n \"end_time\": \"18:00\"\n }\n ]\n },\n \"bookable_by\": {\n \"front_desk\": true\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/schedule")
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 \"name\": \"Dr. Sharma - OPD\",\n \"entity_id\": \"doc_12345\",\n \"location_id\": \"c-98765\",\n \"config\": {\n \"overbooking_limit\": 2,\n \"schedule_slot_config_enabled\": true,\n \"slot_durations\": [\n 15,\n 30\n ]\n },\n \"timebounds\": {\n \"weekly\": {\n \"1\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1300,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n },\n {\n \"s\": 1400,\n \"e\": 1800,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n },\n \"2\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1300,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n \"daily\": {\n \"2026-10-15\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 1000,\n \"e\": 1200,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n \"repeat-weekly\": [\n {\n \"repeat_every\": 2,\n \"anchor_date\": \"2026-09-21\",\n \"start_date\": \"2026-09-21\",\n \"end_date\": \"2027-03-21\",\n \"phases\": [\n {\n \"3\": {\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 1600,\n \"e\": 1900,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n },\n {\n \"3\": {\n \"is_enabled\": false,\n \"bounds\": []\n }\n }\n ]\n }\n ],\n \"repeat-daily\": [\n {\n \"phase_index\": 0,\n \"repeat_every\": 3,\n \"anchor_date\": \"2026-09-21\",\n \"start_date\": \"2026-09-21\",\n \"end_date\": \"2026-12-31\",\n \"is_enabled\": true,\n \"bounds\": [\n {\n \"s\": 900,\n \"e\": 1100,\n \"conf_ids\": [\n \"conf_abc123\"\n ]\n }\n ]\n }\n ],\n \"block\": [\n {\n \"start_date\": \"2026-10-20\",\n \"end_date\": \"2026-10-22\",\n \"start_time\": \"09:00\",\n \"end_time\": \"18:00\"\n }\n ]\n },\n \"bookable_by\": {\n \"front_desk\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"schedule_id": "<string>",
"business_id": "<string>",
"name": "<string>",
"archive": true,
"default": true,
"userCreatedDefault": true,
"config": {
"overbooking_limit": 123,
"block_over_existing_bookings": true,
"schedule_slot_config_enabled": true,
"slot_durations": [
123
]
},
"createdAt": "<string>",
"updatedAt": "<string>",
"timebounds": {},
"assignment": {
"bookable_by": [
"patient"
],
"products": [
"<string>"
],
"error": "<string>"
},
"confs_created": [
"<string>"
]
}
}{
"success": false,
"error": "name is required"
}{
"success": false,
"error": "<string>"
}Body
Was this page helpful?

