Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/bentlyy/Clinica/llms.txt

Use this file to discover all available pages before exploring further.

Adds a recurring availability block to a doctor’s weekly schedule. The server rejects any window where start_time >= end_time or where the new window overlaps an existing block for the same doctor on the same day. Availability records are used by the booking engine to validate appointment requests and generate open slots.

Request

POST /api/availability — requires a doctor JWT.

Headers

Authorization
string
required
Bearer token for a doctor account. Format: Bearer <token>

Body

day_of_week
integer
required
Day of the week as an integer (0 = Sunday, 6 = Saturday). See table below.
start_time
string
required
Availability window start time in HH:MM format.
end_time
string
required
Availability window end time in HH:MM format. Must be after start_time.

Day of week reference

ValueDay
0Sunday
1Monday
2Tuesday
3Wednesday
4Thursday
5Friday
6Saturday

Response

Returns the created availability record.
id
integer
Unique ID of the availability record.
doctor_id
integer
ID of the doctor this record belongs to.
day_of_week
integer
Day of the week (0–6).
start_time
string
Window start time (HH:MM).
end_time
string
Window end time (HH:MM).
curl --request POST \
  --url https://your-clinica-host/api/availability \
  --header 'Authorization: Bearer <doctor-token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "day_of_week": 1,
    "start_time": "09:00",
    "end_time": "17:00"
  }'
{
  "id": 5,
  "doctor_id": 3,
  "day_of_week": 1,
  "start_time": "09:00:00",
  "end_time": "17:00:00"
}

Build docs developers (and LLMs) love