{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/casafari/json-schema/casafari-market-analytics-api-bedrooms-distribution-request-schema-schema.json",
  "title": "BedroomsDistributionRequestSchema",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/casafari-market-analytics-api-distributions-api-openapi.yml#/components/schemas/MarketAnalyticsApiBedroomsDistributionRequestSchema",
  "properties": {
    "types": {
      "items": {
        "$ref": "#/$defs/MarketAnalyticsApiExternalApartmentAndHouseEstateTypeEnum"
      },
      "type": "array",
      "minItems": 1,
      "title": "Types",
      "description": "The list of property types by type groups:<br/><strong>apartment: </strong>[\"apartment\", \"studio\", \"duplex\", \"penthouse\", \"dachgeschosswohnung\", \"etagenwohnung\", \"erdgeschosswohnung\"]<br/><strong>house: </strong>[\"country_house\", \"house\", \"palace\", \"townhouse\", \"villa\", \"country_estate\", \"chalet\", \"bungalow\", \"family_house\", \"reihenhaus\", \"reihenendhaus\", \"reihenmittelhaus\", \"einfamilienhaus\", \"zweifamilienhaus\", \"landwirtschaftliche_betriebe\"]<br/><strong>development: </strong>[\"apartment_development\", \"house_development\"]<br/><br/><i>Note that you can select multiple types only from one property type group.</i><br><br><span style=\"color:red\">The list of property types specific to certain countries</span>:<br/><strong>apartment:</strong><br/>&#9675; dachgeschosswohnung: <strong>Germany</strong><br/>&#9675; etagenwohnung: <strong>Germany</strong><br/>&#9675; erdgeschosswohnung: <strong>Germany</strong><br/><strong>house:</strong><br/>&#9675; family_house: <strong>Germany</strong><br/>&#9675; reihenhaus: <strong>Germany</strong><br/>&#9675; reihenendhaus: <strong>Germany</strong><br/>&#9675; reihenmittelhaus: <strong>Germany</strong><br/>&#9675; einfamilienhaus: <strong>Germany</strong><br/>&#9675; zweifamilienhaus: <strong>Germany</strong><br/>&#9675; landwirtschaftliche_betriebe: <strong>Germany</strong>"
    },
    "business_type": {
      "$ref": "#/$defs/MarketAnalyticsApiBusinessTypeEnum"
    },
    "price_range": {
      "anyOf": [
        {
          "$ref": "#/$defs/MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__8"
        },
        {
          "type": "null"
        }
      ]
    },
    "price_per_sqm_range": {
      "anyOf": [
        {
          "$ref": "#/$defs/MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__9"
        },
        {
          "type": "null"
        }
      ]
    },
    "rooms_range": {
      "anyOf": [
        {
          "$ref": "#/$defs/MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__10"
        },
        {
          "type": "null"
        }
      ]
    },
    "bedrooms_range": {
      "anyOf": [
        {
          "$ref": "#/$defs/MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__16"
        },
        {
          "type": "null"
        }
      ]
    },
    "bathrooms_range": {
      "anyOf": [
        {
          "$ref": "#/$defs/MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__12"
        },
        {
          "type": "null"
        }
      ]
    },
    "total_area_range": {
      "anyOf": [
        {
          "$ref": "#/$defs/MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__13"
        },
        {
          "type": "null"
        }
      ]
    },
    "plot_area_range": {
      "anyOf": [
        {
          "$ref": "#/$defs/MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__14"
        },
        {
          "type": "null"
        }
      ]
    },
    "construction_year_range": {
      "anyOf": [
        {
          "$ref": "#/$defs/MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__15"
        },
        {
          "type": "null"
        }
      ]
    },
    "characteristics": {
      "anyOf": [
        {
          "$ref": "#/$defs/MarketAnalyticsApiCharacteristicsRequestSchema"
        },
        {
          "type": "null"
        }
      ]
    },
    "conditions": {
      "items": {
        "$ref": "#/$defs/MarketAnalyticsApiExternalConditionEnum"
      },
      "type": "array",
      "minItems": 1,
      "title": "Conditions",
      "description": "Property conditions, as returned by the [GET /api/v1/references/conditions](/#operation/api__get__v1__references__conditions) endpoint."
    },
    "private": {
      "type": "boolean",
      "title": "Private",
      "description": "Whether the property is listed by a private individual, as opposed to an agent or a professional."
    },
    "bank": {
      "type": "boolean",
      "title": "Bank",
      "description": "Whether the property is owned by the bank."
    },
    "auction": {
      "type": "boolean",
      "title": "Auction",
      "description": "Whether the property is the subject of an auction.",
      "default": false
    },
    "exclude_outliers": {
      "type": "boolean",
      "title": "Exclude Outliers",
      "description": "Exclude properties that are significantly underpriced or overpriced compared to similar properties.",
      "default": false
    },
    "custom_location_boundary": {
      "$ref": "#/$defs/MarketAnalyticsApiLocationBoundarySchema"
    }
  },
  "type": "object",
  "required": [
    "types",
    "business_type",
    "custom_location_boundary"
  ],
  "$defs": {
    "MarketAnalyticsApiBusinessTypeEnum": {
      "type": "string",
      "enum": [
        "sale",
        "rent"
      ],
      "title": "BusinessTypeEnum"
    },
    "MarketAnalyticsApiCharacteristicsRequestSchema": {
      "properties": {
        "must_have": {
          "items": {
            "$ref": "#/$defs/MarketAnalyticsApiExternalCharacteristicEnum"
          },
          "type": "array",
          "title": "Must Have",
          "description": "Include only properties that have all these characteristics."
        },
        "exclude": {
          "items": {
            "$ref": "#/$defs/MarketAnalyticsApiExternalCharacteristicEnum"
          },
          "type": "array",
          "title": "Exclude",
          "description": "Exclude properties that contain any of these characteristics."
        }
      },
      "type": "object",
      "title": "CharacteristicsRequestSchema"
    },
    "MarketAnalyticsApiCircleBoundarySchema": {
      "properties": {
        "distance": {
          "type": "integer",
          "maximum": 50000.0,
          "minimum": 50.0,
          "title": "Distance",
          "description": "Maximum distance in meters from the requested `target_point` to the properties."
        },
        "target_point": {
          "$ref": "#/$defs/MarketAnalyticsApiGeoPoint",
          "description": "Target point coordinates to search around."
        }
      },
      "type": "object",
      "required": [
        "distance",
        "target_point"
      ],
      "title": "CircleBoundarySchema"
    },
    "MarketAnalyticsApiExternalApartmentAndHouseEstateTypeEnum": {
      "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",
        "apartment_development",
        "house_development"
      ],
      "title": "ExternalApartmentAndHouseEstateTypeEnum"
    },
    "MarketAnalyticsApiExternalCharacteristicEnum": {
      "type": "string",
      "enum": [
        "balcony",
        "elevator",
        "no_elevator",
        "garage",
        "garden",
        "parking",
        "storage",
        "swimming_pool",
        "terrace",
        "rental_license",
        "furniture",
        "rented_out",
        "life_annuity"
      ],
      "title": "ExternalCharacteristicEnum"
    },
    "MarketAnalyticsApiExternalConditionEnum": {
      "type": "string",
      "enum": [
        "used",
        "ruin",
        "very-good",
        "new",
        "other"
      ],
      "title": "ExternalConditionEnum"
    },
    "MarketAnalyticsApiGeoPoint": {
      "properties": {
        "latitude": {
          "type": "number",
          "maximum": 90.0,
          "minimum": -90.0,
          "title": "Latitude"
        },
        "longitude": {
          "type": "number",
          "maximum": 180.0,
          "minimum": -180.0,
          "title": "Longitude"
        }
      },
      "type": "object",
      "required": [
        "latitude",
        "longitude"
      ],
      "title": "GeoPoint"
    },
    "MarketAnalyticsApiLocationBoundarySchema": {
      "properties": {
        "location_ids": {
          "items": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": 1.0
          },
          "type": "array",
          "maxItems": 10,
          "minItems": 1,
          "title": "Location Ids",
          "description": "List of location IDs."
        },
        "polygon": {
          "items": {
            "$ref": "#/$defs/MarketAnalyticsApiGeoPoint"
          },
          "type": "array",
          "minItems": 4,
          "title": "Polygon",
          "description": "List of geo-points to search within. Polygon must contain at least 4 points. First and last points must match."
        },
        "circle": {
          "$ref": "#/$defs/MarketAnalyticsApiCircleBoundarySchema",
          "description": "Circle boundary to search within."
        }
      },
      "type": "object",
      "title": "LocationBoundarySchema"
    },
    "MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__10": {
      "properties": {
        "min": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 15000.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Min"
        },
        "max": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 15000.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Max"
        }
      },
      "type": "object",
      "title": "IntRangeSchema"
    },
    "MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__12": {
      "properties": {
        "min": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 15000.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Min"
        },
        "max": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 15000.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Max"
        }
      },
      "type": "object",
      "title": "IntRangeSchema"
    },
    "MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__13": {
      "properties": {
        "min": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 1000000.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Min"
        },
        "max": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 1000000.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Max"
        }
      },
      "type": "object",
      "title": "IntRangeSchema"
    },
    "MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__14": {
      "properties": {
        "min": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 1000000.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Min"
        },
        "max": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 1000000.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Max"
        }
      },
      "type": "object",
      "title": "IntRangeSchema"
    },
    "MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__15": {
      "properties": {
        "min": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 3000.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Min"
        },
        "max": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 3000.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Max"
        }
      },
      "type": "object",
      "title": "IntRangeSchema"
    },
    "MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__16": {
      "properties": {
        "min": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 10.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Min"
        },
        "max": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 10.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Max"
        }
      },
      "type": "object",
      "title": "IntRangeSchema"
    },
    "MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__8": {
      "properties": {
        "min": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 2147483647.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Min"
        },
        "max": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 2147483647.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Max"
        }
      },
      "type": "object",
      "title": "IntRangeSchema"
    },
    "MarketAnalyticsApiapi__schema__ranges__IntRangeSchema__9": {
      "properties": {
        "min": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 2147483647.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Min"
        },
        "max": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 2147483647.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Max"
        }
      },
      "type": "object",
      "title": "IntRangeSchema"
    }
  }
}