{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/casafari/json-schema/casafari-api-alerts-search-filter-v1-schema.json",
  "title": "ApiAlertsSearchFilterV1",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/casafari-api-alerts-api-openapi.yml#/components/schemas/ApiAlertsSearchFilterV1",
  "properties": {
    "operation": {
      "type": "string",
      "enum": [
        "sale",
        "rent"
      ],
      "description": "Operation type."
    },
    "location_ids": {
      "items": {
        "type": "integer",
        "maximum": 2147483647.0,
        "minimum": 1.0
      },
      "type": "array",
      "maxItems": 100,
      "description": "List of location IDs, as returned by the [POST /api/v1/references/locations](/#operation/api__post__v1__references__locations) endpoint."
    },
    "custom_location": {
      "items": {
        "properties": {
          "latitude": {
            "type": "number",
            "maximum": 90.0,
            "minimum": -90.0,
            "description": "Latitude."
          },
          "longitude": {
            "type": "number",
            "maximum": 180.0,
            "minimum": -180.0,
            "description": "Longitude."
          }
        },
        "type": "object",
        "required": [
          "latitude",
          "longitude"
        ]
      },
      "type": "array",
      "minItems": 4,
      "description": "Closed polygon of geo-points to search within. First and last points must match.<br/><strong>This field is deprecated and will be removed in the next major update.</strong><br/><strong>Please, use `custom_locations` field instead.</strong>"
    },
    "custom_locations": {
      "items": {
        "items": {
          "properties": {
            "latitude": {
              "type": "number",
              "maximum": 90.0,
              "minimum": -90.0,
              "description": "Latitude."
            },
            "longitude": {
              "type": "number",
              "maximum": 180.0,
              "minimum": -180.0,
              "description": "Longitude."
            }
          },
          "type": "object",
          "required": [
            "latitude",
            "longitude"
          ]
        },
        "type": "array"
      },
      "type": "array",
      "maxItems": 4,
      "description": "List of closed polygons of geo-points to search within. Each polygon must contain at least 4 points. First and last points must match in each polygon. Maximum 4 polygons allowed."
    },
    "types": {
      "items": {
        "type": "string",
        "enum": [
          "apartment",
          "studio",
          "duplex",
          "penthouse",
          "dachgeschosswohnung",
          "etagenwohnung",
          "erdgeschosswohnung",
          "country_house",
          "house",
          "palace",
          "townhouse",
          "villa",
          "country_estate",
          "chalet",
          "bungalow",
          "family_house",
          "reihenhaus",
          "reihenendhaus",
          "reihenmittelhaus",
          "einfamilienhaus",
          "zweifamilienhaus",
          "landwirtschaftliche_betriebe",
          "retail",
          "office",
          "industrial",
          "warehouse",
          "hotel",
          "other_commercial",
          "restaurant",
          "werkstatt",
          "plot",
          "urban_plot",
          "rural_plot",
          "room",
          "other",
          "garage",
          "parking",
          "apartment_building",
          "office_building",
          "mix_use_building"
        ]
      },
      "type": "array",
      "description": "<br>Country availability per type is available at the [GET /api/v1/references/types](/#operation/api__get__v1__references__types) endpoint.<br><br>Property types by type groups:<br/><strong>apartment:</strong> erdgeschosswohnung, penthouse, duplex, etagenwohnung, apartment, dachgeschosswohnung, studio<br/><strong>house:</strong> zweifamilienhaus, palace, reihenmittelhaus, landwirtschaftliche_betriebe, chalet, house, reihenendhaus, townhouse, einfamilienhaus, bungalow, villa, reihenhaus, family_house (<span style=\"color:red\">DEPRECATED</span>), country_estate, country_house<br/><strong>room:</strong> room<br/><strong>building:</strong> office_building, mix_use_building, apartment_building<br/><strong>investment:</strong> other_commercial, warehouse, industrial, office, hotel, restaurant, werkstatt, retail<br/><strong>plot:</strong> urban_plot, rural_plot, plot (<span style=\"color:red\">DEPRECATED</span>)<br/><strong>other:</strong> other, garage, parking"
    },
    "conditions": {
      "items": {
        "type": "string",
        "enum": [
          "used",
          "ruin",
          "very-good",
          "new",
          "other"
        ]
      },
      "type": "array",
      "description": "Property conditions, as returned by the [GET /api/v1/references/conditions](/#operation/api__get__v1__references__conditions) endpoint."
    },
    "alert_date_from": {
      "type": "string",
      "format": "date",
      "description": "Start date (in the format `YYYY-MM-DD`) of the period for alerts of interest."
    },
    "alert_date_to": {
      "type": "string",
      "format": "date",
      "description": "End date (in the format `YYYY-MM-DD`) of the period for alerts of interest."
    },
    "created_at_from": {
      "type": "string",
      "format": "date-time",
      "description": "Start date and time (in the format `YYYY-MM-DDTHH:mm:ss`) to filter alerts by their creation in the database (UTC). Useful for incremental sync to avoid fetching already fetched data."
    },
    "created_at_to": {
      "type": "string",
      "format": "date-time",
      "description": "End date and time (in the format `YYYY-MM-DDTHH:mm:ss`) to filter alerts by their creation in the database (UTC). Useful for incremental sync to avoid fetching already fetched data."
    },
    "created_at_with_photos_from": {
      "type": "string",
      "format": "date-time",
      "description": "Start date and time (in the format YYYY-MM-DDTHH:mm:ss) to filter alerts by their creation in the database (UTC), only including alerts for which photo processing has been completed. Use it to fetch alerts with already assigned photos.\nNote: Some alerts may still not have photos if the original listing did not include any."
    },
    "created_at_with_photos_to": {
      "type": "string",
      "format": "date-time",
      "description": "End date and time (in the format YYYY-MM-DDTHH:mm:ss) to filter alerts by their creation in the database (UTC), only including alerts for which photo processing has been completed. Use it to fetch alerts with already assigned photos.\nNote: Some alerts may still not have photos if the original listing did not include any."
    },
    "statuses": {
      "items": {
        "type": "string",
        "enum": [
          "active",
          "reserved",
          "hold",
          "sold",
          "rented"
        ]
      },
      "type": "array",
      "description": "Current status of the listing."
    },
    "price_from": {
      "type": "integer",
      "maximum": 2147483647.0,
      "minimum": 1.0,
      "description": "Minimum price value."
    },
    "price_to": {
      "type": "integer",
      "maximum": 2147483647.0,
      "minimum": 1.0,
      "description": "Maximum price value."
    },
    "price_per_sqm_from": {
      "type": "integer",
      "maximum": 2147483647.0,
      "minimum": 1.0,
      "description": "Minimum value for price per square meter."
    },
    "price_per_sqm_to": {
      "type": "integer",
      "maximum": 2147483647.0,
      "minimum": 1.0,
      "description": "Maximum value for price per square meter."
    },
    "bedrooms_from": {
      "type": "integer",
      "maximum": 15000.0,
      "minimum": 0.0,
      "description": "Minimum number of bedrooms."
    },
    "bedrooms_to": {
      "type": "integer",
      "maximum": 15000.0,
      "minimum": 0.0,
      "description": "Maximum number of bedrooms."
    },
    "bathrooms_from": {
      "type": "integer",
      "maximum": 15000.0,
      "minimum": 1.0,
      "description": "Minimum number of bathrooms."
    },
    "bathrooms_to": {
      "type": "integer",
      "maximum": 15000.0,
      "minimum": 1.0,
      "description": "Maximum number of bathrooms."
    },
    "total_area_from": {
      "type": "integer",
      "maximum": 10000000.0,
      "minimum": 1.0,
      "description": "Minimum total area."
    },
    "total_area_to": {
      "type": "integer",
      "maximum": 10000000.0,
      "minimum": 1.0,
      "description": "Maximum total area."
    },
    "plot_area_from": {
      "type": "integer",
      "maximum": 10000000.0,
      "minimum": 1.0,
      "description": "Minimum plot area."
    },
    "plot_area_to": {
      "type": "integer",
      "maximum": 10000000.0,
      "minimum": 1.0,
      "description": "Maximum plot area."
    },
    "construction_year_from": {
      "type": "integer",
      "maximum": 3000.0,
      "minimum": 1.0,
      "description": "Minimum construction year."
    },
    "construction_year_to": {
      "type": "integer",
      "maximum": 3000.0,
      "minimum": 1.0,
      "description": "Maximum construction year."
    },
    "floor": {
      "type": "string",
      "enum": [
        "no_floor",
        "ground",
        "middle",
        "top"
      ],
      "description": "Floor type. <br/><strong>This field is deprecated and will be removed in the next major update.</strong><br/><strong>Please, use `floors` field instead.</strong>"
    },
    "floors": {
      "items": {
        "type": "string",
        "enum": [
          "no_floor",
          "ground",
          "middle",
          "top"
        ]
      },
      "type": "array",
      "description": "List of floor types."
    },
    "orientation": {
      "type": "string",
      "enum": [
        "exterior",
        "interior"
      ],
      "description": "Property view orientation."
    },
    "view": {
      "type": "string",
      "enum": [
        "water",
        "landscape",
        "city",
        "golf",
        "park"
      ],
      "description": "View from the property. \"<br/><strong>This field is deprecated and will be removed in the next major update.</strong><br/><strong>Please, use `views` field instead.</strong>\""
    },
    "views": {
      "items": {
        "type": "string",
        "enum": [
          "water",
          "landscape",
          "city",
          "golf",
          "park"
        ]
      },
      "type": "array",
      "description": "List of views from the property."
    },
    "direction": {
      "type": "string",
      "enum": [
        "north",
        "south",
        "east",
        "west"
      ],
      "description": "Cardinal direction the property faces. \"<br/><strong>This field is deprecated and will be removed in the next major update.</strong><br/><strong>Please, use `directions` field instead.</strong>"
    },
    "directions": {
      "items": {
        "type": "string",
        "enum": [
          "north",
          "south",
          "east",
          "west"
        ]
      },
      "type": "array",
      "description": "List of cardinal directions the property faces."
    },
    "characteristics": {
      "items": {
        "type": "string",
        "enum": [
          "balcony",
          "elevator",
          "no_elevator",
          "garage",
          "garden",
          "parking",
          "storage",
          "swimming_pool",
          "terrace",
          "rental_license",
          "furniture",
          "rented_out",
          "life_annuity"
        ]
      },
      "type": "array",
      "description": "Property characteristics."
    },
    "alert_subtypes": {
      "items": {
        "type": "string",
        "enum": [
          "new",
          "price_up",
          "price_down",
          "reserved",
          "delisted",
          "sold"
        ]
      },
      "type": "array",
      "description": "Alert subtypes."
    },
    "private": {
      "type": "boolean",
      "description": "Whether to return alerts only from properties listed by a private individual, as opposed to an agent or a professional."
    },
    "auction": {
      "type": "boolean",
      "description": "Whether to return alerts from auction property listings."
    },
    "bank": {
      "type": "boolean",
      "description": "Whether to return alerts from bank property listings."
    },
    "new_development": {
      "type": "boolean",
      "description": "Whether to return alerts from new development property listings."
    },
    "listing_agents": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "description": "Return alerts only for properties from specified agents. To find allowed agent names use the [GET /api/v1/references/agents](/#operation/api__get__v1__references__agents) endpoint."
    },
    "with_agencies": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "description": "Return alerts only for properties from specified agencies, companies or sources. To find allowed agency names use the [GET /api/v1/references/agencies](/#operation/api__get__v1__references__agencies) endpoint."
    },
    "without_agencies": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "description": "Exclude alerts for properties from specified agencies, companies or sources. To find allowed agency names use the [GET /api/v1/references/agencies](/#operation/api__get__v1__references__agencies) endpoint."
    },
    "exclusive": {
      "type": "boolean",
      "description": "Whether to return alerts exclusively from specific listings rather than from all related to the property listings.<br/>Can be passed only along with at least one of the fields: `private`, `with_agencies`, `without_agencies`."
    },
    "ref_numbers": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "description": "List of reference numbers from listings."
    },
    "has_phone": {
      "type": "boolean",
      "description": "Whether to return alerts only from listings with or without `phone` number."
    },
    "has_email": {
      "type": "boolean",
      "description": "Whether to return alerts only from listings with or without email."
    },
    "has_agency_name": {
      "type": "boolean",
      "description": "Whether to return alerts only from listings with or without agency name."
    },
    "property_ids": {
      "items": {
        "type": "integer",
        "minimum": 1.0
      },
      "type": "array",
      "maxItems": 100,
      "description": "List of property IDs."
    },
    "listing_ids": {
      "items": {
        "type": "integer",
        "minimum": 1.0
      },
      "type": "array",
      "maxItems": 100,
      "description": "List of listing IDs."
    }
  },
  "type": "object",
  "required": [
    "operation"
  ]
}