Skip to main content
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 the from and to query parameters (used by the calendar view). Unparseable dates are silently ignored.

Authentication

Authorization
string
required
Bearer token for authenticated access. The doctor id is taken from the token.
Authorization: Bearer <JWT>

Query Parameters

from
string
ISO datetime. Lower bound (inclusive) on the appointment date. Ignored if it cannot be parsed.
to
string
ISO datetime. Upper bound (exclusive) on the appointment date. Ignored if it cannot be parsed.

Response

success
boolean
Whether the request succeeded.
data
array
Array of appointment objects owned by the caller.
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.