{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shepherd-vet/json-schema/shepherd-vet-open-api-appointment-controller-appointment-filter-model-schema.json",
  "title": "OpenApiAppointmentController.AppointmentFilterModel",
  "description": "Appointment Filter model.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/shepherd-vet-appointment-api-openapi.yml#/components/schemas/OpenApiAppointmentController.AppointmentFilterModel",
  "type": "object",
  "properties": {
    "appointmentStatusIds": {
      "description": "Comma-separated string of AppointmentStatus identifiers. Defaults to null (fetches appointments by all statuses, if appointment status ID is provided, only appointments with those statuses are shown.",
      "type": "string"
    },
    "cancellationReasonIds": {
      "description": "Comma-separated string of Cancellation reason identifiers. Defaults to null (fetches appointments that aren't cancelled, if cancellation reason ID is provided, only appointments which are cancelled are shown.",
      "type": "string"
    },
    "clientIds": {
      "description": "Comma-separated string of Client identifiers. Defaults to null (fetches appointments for all clients, if client IDs are provided, only appointments for those clients are shown).",
      "type": "string"
    },
    "clinicIds": {
      "description": "Comma-separated list of Clinic identifiers. Defaults to null. The filter is applicable only if the group to which the clinic belongs shares clients and patients.",
      "type": "string"
    },
    "dateFrom": {
      "format": "date-time",
      "description": "Filters appointments whose time overlaps with DateFrom - DateTo range.",
      "type": "string"
    },
    "dateTo": {
      "format": "date-time",
      "description": "Filters appointments whose time overlaps with DateFrom - DateTo range.",
      "type": "string"
    },
    "includePatientHomeClinic": {
      "description": "Used to support multi-site practices that share patients and clients.\nDetermines whether to include Appointment patients from a patient's home clinic\nwhen filtering by clinic.\n            \nBehavior:\n- If true:\n  - Includes Appointment patients from the specified clinic (default)\n  - Also includes appointment patients from other clinics where the patient's home clinic\n    matches the specified clinic\n- If false (default):\n  - Only includes Appointment patients directly from the specified clinic\n            \nNote: The patient's home clinic is only considered if ClinicIds are provided\nin the filter; otherwise, all data from the group is returned.",
      "type": "boolean"
    },
    "isBlockedOff": {
      "description": "Filters by whether appointment is blocked off. Defaults to null (fetches both blocked off and non-blocked off appointments).",
      "type": "boolean"
    },
    "isDeleted": {
      "description": "Filters by deleted status. Defaults to null (fetches both deleted and non-deleted entities).",
      "type": "boolean"
    },
    "patientIds": {
      "description": "Comma-separated string of Patient identifiers. Defaults to null (fetches appointments for all patients, if patient IDs are provided, only appointments for those patients are shown).",
      "type": "string"
    },
    "providerIds": {
      "description": "Comma-separated string of Provider identifiers. Defaults to null. If provided, fetches all appointments for specified provider(s).",
      "type": "string"
    },
    "searchQuery": {
      "description": "Filters by visit reason, patient names and client name.",
      "type": "string"
    },
    "dateCreatedFrom": {
      "format": "date-time",
      "description": "Sets the start of the date range filter on the entity creation date. Must not be later than DateCreatedTo, or\nthe request returns 400. Defaults to null.",
      "type": "string"
    },
    "dateCreatedTo": {
      "format": "date-time",
      "description": "The end of the date range filter on the entity creation date. Defaults to null.",
      "type": "string"
    },
    "dateUpdatedFrom": {
      "format": "date-time",
      "description": "The start of the date range filter on the entity last update date. Must not be later than DateUpdatedTo, or the\nrequest returns 400. Defaults to null.",
      "type": "string"
    },
    "dateUpdatedTo": {
      "format": "date-time",
      "description": "The end of the date range filter on the entity last update date. Defaults to null.",
      "type": "string"
    },
    "embed": {
      "description": "Comma-separated list of embedded properties to fetch. Nested fetches can be specified using dot notation (e.g., \"client.clientPhones\"). Defaults to null.",
      "type": "string"
    },
    "excludeIds": {
      "description": "Comma-separated list of IDs representing entities that you wish to exclude from your search. Defaults to null.",
      "type": "string"
    },
    "ids": {
      "description": "Comma-separated list of IDs representing entities that you wish to include in your search. Defaults to null.",
      "type": "string"
    },
    "page": {
      "format": "int32",
      "description": "The page number. Defaults to 1.",
      "type": "integer"
    },
    "rpp": {
      "format": "int32",
      "description": "The number of items to return per page. The max is 1000. Defaults to 10.",
      "type": "integer"
    },
    "sort": {
      "description": "Which field to sort by. Needs to be in \"field|order\" format, where order is either \"asc\" or \"desc\". The default sort field depends on the endpoint, typically \"id|asc\"",
      "type": "string"
    }
  }
}