{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/casaintelligence-com-au/json-schema/casaintelligence-com-au-saved-search-create-schema.json",
  "title": "SavedSearchCreate",
  "description": "Request to save a DA search configuration.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/casaintelligence-com-au-da-search-api-openapi.yml#/components/schemas/SavedSearchCreate",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1,
      "title": "Name"
    },
    "filters": {
      "$ref": "#/$defs/DASearchRequest"
    }
  },
  "type": "object",
  "required": [
    "name",
    "filters"
  ],
  "$defs": {
    "DASearchRequest": {
      "properties": {
        "address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Address"
        },
        "lat": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Lat"
        },
        "lng": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Lng"
        },
        "radius_m": {
          "type": "integer",
          "maximum": 50000.0,
          "minimum": 100.0,
          "title": "Radius M",
          "default": 2000
        },
        "lga": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Lga"
        },
        "suburb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Suburb"
        },
        "zone_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Zone Code"
        },
        "decision": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Decision"
        },
        "date_from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Date From"
        },
        "date_to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Date To"
        },
        "lots_min": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Lots Min"
        },
        "lots_max": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Lots Max"
        },
        "area_m2_min": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Area M2 Min"
        },
        "area_m2_max": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Area M2 Max"
        },
        "da_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Da Type"
        },
        "description_search": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description Search"
        },
        "sort": {
          "type": "string",
          "pattern": "^(relevance|distance|date|days)$",
          "title": "Sort",
          "default": "relevance"
        },
        "page": {
          "type": "integer",
          "minimum": 1.0,
          "title": "Page",
          "default": 1
        },
        "per_page": {
          "type": "integer",
          "maximum": 100.0,
          "minimum": 1.0,
          "title": "Per Page",
          "default": 20
        }
      },
      "type": "object",
      "title": "DASearchRequest",
      "description": "DA search filter parameters."
    }
  }
}