appointments

Get appointments

Get appointments for the current patient, or for a specific patient if admin/supervisor/coordinator and patient_id is provided. Supervisor/coordinator: only patients in their supervised scope.

get/api/appointments

Query parameters

limitinteger

Number of appointments to return (default: 20, most recent)

Number of appointments to return (default: 20, most recent)

cursorstring nullable

Cursor for the next page.

Cursor for the next page.

appointment_typestring nullable

Filter by appointment type (CALL_CONOSCITIVA, CALL_GRATUITA, INCONTRO_PSICOLOGO, INCONTRO_NUTRIZIONISTA)

Filter by appointment type (CALL_CONOSCITIVA, CALL_GRATUITA, INCONTRO_PSICOLOGO, INCONTRO_NUTRIZIONISTA)

date_fromstring nullable

Filter by date range - start date (YYYY-MM-DD format, inclusive)

Filter by date range - start date (YYYY-MM-DD format, inclusive)

date_tostring nullable

Filter by date range - end date (YYYY-MM-DD format, inclusive)

Filter by date range - end date (YYYY-MM-DD format, inclusive)

patient_idstring uuid nullable

Patient ID. If provided, returns that patient's appointments. If omitted, returns current user's appointments.

Patient ID. If provided, returns that patient's appointments. If omitted, returns current user's appointments.

collapse_joint_appointmentsboolean

Return a joint appointment as a single item instead of one row per expert. Set to false to get each expert's own appointment, as per-profession sections need. Ignored when patient_id is set.

Return a joint appointment as a single item instead of one row per expert. Set to false to get each expert's own appointment, as per-profession sections need. Ignored when patient_id is set.

Response

Successful Response

totalinteger required

Total number of appointments

next_cursorstring nullable

Cursor for the next page.

has_moreboolean

Whether there are more results after this page

has_valid_appointmentsboolean required

True if patient has at least one valid appointment (not cancelled or refunded)

has_valid_call_conoscitivaboolean required

True if patient has a valid call conoscitiva (DA_FARE or FATTO, not cancelled/refunded)

has_valid_call_gratuitaboolean required

True if patient has a valid call informativa (DA_FARE, FATTO, or DA_RIPROGRAMMARE; not cancelled)

has_completed_call_conoscitivaboolean required

True if patient has completed a call conoscitiva (FATTO, not cancelled/refunded)

has_pending_call_conoscitivaboolean required

True if patient has a pending call conoscitiva (DA_FARE, not cancelled/refunded)

can_book_repeat_call_conoscitivaboolean

True if patient can book another call conoscitiva because both paths have been abandoned or concluded for the configured threshold

has_completed_call_gratuita_questionnaireboolean

True if patient has completed at least one call informativa questionnaire

has_valid_appointments_by_professionobject required

Dict with PSICOLOGO and NUTRIZIONISTA keys, True if has valid appointments for that profession

is_first_appointment_by_professionobject required

Dict with PSICOLOGO and NUTRIZIONISTA keys, True if this is the first appointment (no completed appointments)

has_pending_appointments_by_professionobject required

Dict with PSICOLOGO and NUTRIZIONISTA keys, True if has pending appointments (DA_FORE with payment not succeeded)

has_assigned_psychologistboolean required

True if patient has an assigned psychologist

has_assigned_nutritionistboolean required

True if patient has an assigned nutritionist

Example response

{
  "appointments": [
    {
      "appointment_datetime": "2025-11-20T10:00:00+00:00",
      "appointment_type_code": "CALL_CONOSCITIVA",
      "created_at": "2025-11-15T10:00:00+00:00",
      "duration_seconds": 3600,
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "location": "online",
      "meeting_link_status": "not_created",
      "operator_first_name": "Mario",
      "operator_id": "123e4567-e89b-12d3-a456-426614174001",
      "operator_last_name": "Rossi",
      "operator_profession": "PSICOLOGO",
      "paid_with_coupon": false,
      "patient_cost": 49,
      "payment_completed_at": "2025-11-15T10:30:00+00:00",
      "payment_status": "succeeded",
      "status": "DA_FARE"
    }
  ],
  "can_book_repeat_call_conoscitiva": false,
  "has_assigned_nutritionist": false,
  "has_assigned_psychologist": true,
  "has_completed_call_conoscitiva": false,
  "has_completed_call_gratuita_questionnaire": true,
  "has_more": false,
  "has_pending_appointments_by_profession": {
    "NUTRIZIONISTA": false,
    "PSICOLOGO": true
  },
  "has_pending_call_conoscitiva": true,
  "has_valid_appointments": true,
  "has_valid_appointments_by_profession": {
    "NUTRIZIONISTA": false,
    "PSICOLOGO": true
  },
  "has_valid_call_conoscitiva": true,
  "has_valid_call_gratuita": false,
  "is_first_appointment_by_profession": {
    "NUTRIZIONISTA": true,
    "PSICOLOGO": false
  },
  "total": 1
}

Changes