curl -X GET "https://app.medisync.me/api/appointments/doctors?from=2026-07-01T00:00:00Z&to=2026-08-01T00:00:00Z" \
-H "Authorization: Bearer <JWT>"
{
"success": true,
"data": [
{
"_id": "65f8a1b2c3d4e5f6789012ef",
"name": "Allgemeine Beratung",
"date": "2026-07-15T00:00:00.000Z",
"time": "14:30",
"recording_id": "rec_123",
"status": "recording",
"error_reason": null,
"doctor_id": "65f0a1b2c3d4e5f678901234",
"language": "de",
"notes_type": null,
"appointment_type": "in_person",
"room": null,
"duration_minutes": null,
"deletionDate": "2026-07-29T00:00:00.000Z",
"case_id": null,
"booking_status": "none",
"booking": null,
"createdAt": "2026-07-02T09:12:00.000Z",
"updatedAt": "2026-07-02T09:12:00.000Z",
"__v": 0
}
]
}
Appointments
List Doctor's Appointments
Retrieve the authenticated doctor’s appointments, optionally filtered by date range
GET
/
appointments
/
doctors
curl -X GET "https://app.medisync.me/api/appointments/doctors?from=2026-07-01T00:00:00Z&to=2026-08-01T00:00:00Z" \
-H "Authorization: Bearer <JWT>"
{
"success": true,
"data": [
{
"_id": "65f8a1b2c3d4e5f6789012ef",
"name": "Allgemeine Beratung",
"date": "2026-07-15T00:00:00.000Z",
"time": "14:30",
"recording_id": "rec_123",
"status": "recording",
"error_reason": null,
"doctor_id": "65f0a1b2c3d4e5f678901234",
"language": "de",
"notes_type": null,
"appointment_type": "in_person",
"room": null,
"duration_minutes": null,
"deletionDate": "2026-07-29T00:00:00.000Z",
"case_id": null,
"booking_status": "none",
"booking": null,
"createdAt": "2026-07-02T09:12:00.000Z",
"updatedAt": "2026-07-02T09:12:00.000Z",
"__v": 0
}
]
}
Overview
Returns every appointment owned by the authenticated doctor. The doctor is identified from the JWT — there is no user id parameter. Results are scoped to the caller: you only ever see your own appointments. An optional date range can be applied with thefrom and to query parameters
(used by the calendar view). Unparseable dates are silently ignored.
Authentication
string
required
Bearer token for authenticated access. The doctor id is taken from the token.
Authorization: Bearer <JWT>
Query Parameters
string
ISO datetime. Lower bound (inclusive) on the appointment
date. Ignored if it
cannot be parsed.string
ISO datetime. Upper bound (exclusive) on the appointment
date. Ignored if it
cannot be parsed.Response
boolean
Whether the request succeeded.
array
Array of appointment objects owned by the caller.
Show Appointment Object
Show Appointment Object
string
Unique appointment identifier (ObjectId).
string
Appointment title.
string
Appointment date, serialized as a full ISO datetime
(e.g.
2026-07-15T00:00:00.000Z).string
Wall-clock time,
HH:mm.string
Associated recording id, if any.
string
Recording lifecycle status. Common values:
planned, recording,
transcribing, processing, finished, error, error_transcription,
audio_upload_failed. Not strictly enforced — treat unknown values as
opaque.string | null
Human-readable reason when processing failed; otherwise
null.string
Owning doctor’s user id.
string
Language code used for note generation. Default
de.string | null
Notes template key. Default
null (the service selects a template).string
Free-form appointment type. Default
in_person.string | null
Room / location label, or
null when none is assigned.number | null
Appointment duration in minutes, or
null when unset.string
ISO datetime at which the appointment is scheduled for automatic deletion.
string | null
Case grouping id for follow-up linking, or
null.string
Booking lifecycle state (a separate axis from
status). Default none
for plain appointments; non-none values indicate an online or
externally-synced booking.object | null
Booking subdocument for appointments that carry booking metadata,
otherwise
null.string
ISO creation timestamp.
string
ISO last-update timestamp.
number
Internal document version.
Additional fields may appear on the appointment object depending on how it was
created (for example provenance fields on externally-synced appointments).
Treat any field not documented here as opaque.
Example Request
curl -X GET "https://app.medisync.me/api/appointments/doctors?from=2026-07-01T00:00:00Z&to=2026-08-01T00:00:00Z" \
-H "Authorization: Bearer <JWT>"
Example Response
{
"success": true,
"data": [
{
"_id": "65f8a1b2c3d4e5f6789012ef",
"name": "Allgemeine Beratung",
"date": "2026-07-15T00:00:00.000Z",
"time": "14:30",
"recording_id": "rec_123",
"status": "recording",
"error_reason": null,
"doctor_id": "65f0a1b2c3d4e5f678901234",
"language": "de",
"notes_type": null,
"appointment_type": "in_person",
"room": null,
"duration_minutes": null,
"deletionDate": "2026-07-29T00:00:00.000Z",
"case_id": null,
"booking_status": "none",
"booking": null,
"createdAt": "2026-07-02T09:12:00.000Z",
"updatedAt": "2026-07-02T09:12:00.000Z",
"__v": 0
}
]
}
Error Responses
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Session ended on this device because you signed in elsewhere.",
"code": "SESSION_REVOKED"
}
{
"success": false,
"error": "appointments query failed"
}
A missing or invalid Bearer token returns
401 with a message key (not
error). Only one active session per device set is allowed; signing in
elsewhere revokes the previous session and returns the SESSION_REVOKED code.
On a server-side failure the error field carries the raw error message.