{"openapi":"3.1.0","info":{"title":"Real Estate Investment Platform API","description":"REST API for real estate investment portfolio management","version":"1.0.0"},"paths":{"/health":{"get":{"tags":["Health"],"summary":"Health Check","description":"Liveness probe — process is up. Does not touch the database.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Check Health Get"}}}}}}},"/ready":{"get":{"tags":["Health"],"summary":"Readiness Check","description":"Readiness probe — database reachable and circuit breaker not open.\n\nSync ``def`` so FastAPI runs it in the threadpool (no event-loop blocking).\nFailure bodies are generic; exception text is logged server-side only.","operationId":"readiness_check_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/live":{"get":{"tags":["Health"],"summary":"Liveness Check","description":"Liveness probe — confirms process is alive.","operationId":"liveness_check_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Liveness Check Live Get"}}}}}}},"/metrics":{"get":{"tags":["Health"],"summary":"Metrics","description":"Metrics endpoint for monitoring and observability.\n\nReturns:\n    Database connection pool metrics and cache statistics","operationId":"metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Metrics Metrics Get"}}}}}}},"/metrics/prometheus":{"get":{"tags":["Health"],"summary":"Metrics Prometheus","description":"Metrics in Prometheus text exposition format for scraping.","operationId":"metrics_prometheus_metrics_prometheus_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"tags":["Root"],"summary":"Root","description":"Root endpoint.\n\nReturns:\n    API information including version and documentation URL","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Root  Get"}}}}}}},"/api/v1/admin/quota/dashboard":{"get":{"tags":["Admin"],"summary":"Proxy admin quota dashboard (agent)","description":"Proxies the admin quota dashboard endpoint to the agent service. Requires admin role.","operationId":"proxy_admin_quota_dashboard_api_v1_admin_quota_dashboard_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/vertex-search/status":{"get":{"tags":["Admin"],"summary":"Proxy admin vertex search status (agent)","description":"Proxies the admin vertex search status endpoint to the agent service. Requires admin role.","operationId":"proxy_admin_vertex_search_status_api_v1_admin_vertex_search_status_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/vertex-search":{"post":{"tags":["Admin"],"summary":"Proxy admin vertex search (agent)","description":"Proxies the admin vertex search endpoint to the agent service. Requires admin role.","operationId":"proxy_admin_vertex_search_api_v1_admin_vertex_search_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/cache/prefixes":{"get":{"tags":["Admin"],"summary":"List known cache prefixes with key counts","description":"Returns the curated list of cache key prefixes (matching the builders in app/core/cache_keys.py) with a live SCAN-based count for each. Lets the admin UI present a scoped 'clear by prefix' table without transferring the full key list. Requires admin role.","operationId":"list_cache_prefixes_api_v1_admin_cache_prefixes_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Cache Prefixes Api V1 Admin Cache Prefixes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/cache/keys":{"get":{"tags":["Admin"],"summary":"List cache keys matching a prefix","description":"SCAN MATCH for keys starting with the given prefix. Hard-capped at 1000 keys to bound payload size. Use only for debugging/inspection — for invalidation, prefer DELETE /cache/clear?prefix=. Requires admin role.","operationId":"list_cache_keys_api_v1_admin_cache_keys_get","parameters":[{"name":"prefix","in":"query","required":true,"schema":{"type":"string","title":"Prefix"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Max keys to return (hard-capped at 1000)","default":500,"title":"Limit"},"description":"Max keys to return (hard-capped at 1000)"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Cache Keys Api V1 Admin Cache Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/cache/clear":{"delete":{"tags":["Admin"],"summary":"Clear Redis cache (all or by prefix)","description":"Without ?prefix= : FLUSHDB — wipes the entire Redis db. With ?prefix= : SCAN MATCH {prefix}* + UNLINK in batches (non-blocking). Requires admin role.","operationId":"clear_redis_cache_api_v1_admin_cache_clear_delete","parameters":[{"name":"prefix","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Clear Redis Cache Api V1 Admin Cache Clear Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/cache/key":{"delete":{"tags":["Admin"],"summary":"Delete a single cache key","description":"UNLINK a single Redis key. Returns 1 if removed, 0 if absent. Requires admin role.","operationId":"delete_cache_key_api_v1_admin_cache_key_delete","parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","title":"Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Cache Key Api V1 Admin Cache Key Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/cache/stats":{"get":{"tags":["Admin"],"summary":"Get Redis cache statistics","description":"Get Redis cache statistics and info. Requires admin role.","operationId":"get_cache_stats_api_v1_admin_cache_stats_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Cache Stats Api V1 Admin Cache Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/cache/stats/reset":{"post":{"tags":["Admin"],"summary":"Reset in-process cache hit/miss counters","description":"Clears the per-process per-endpoint hit/miss tracker exposed under /cache/stats.endpoint_stats. Does NOT touch Redis. Per-replica; must be called on every replica for a full reset. Admin-only.","operationId":"reset_cache_endpoint_stats_api_v1_admin_cache_stats_reset_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Reset Cache Endpoint Stats Api V1 Admin Cache Stats Reset Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/health":{"get":{"tags":["Admin"],"summary":"Admin health check","description":"Health check endpoint for admin section. Requires admin role.","operationId":"admin_health_check_api_v1_admin_health_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Health Check Api V1 Admin Health Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/hud/lookup":{"post":{"tags":["Admin"],"summary":"HUD FMR lookup by address","description":"Look up HUD Fair Market Rent for an address. Returns normalized result and raw HUD API response. Requires admin role.","operationId":"admin_hud_lookup_api_v1_admin_hud_lookup_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HUDLookupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Hud Lookup Api V1 Admin Hud Lookup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/hud/income-limits/lookup":{"post":{"tags":["Admin"],"summary":"HUD Income Limits lookup by address","description":"Look up HUD Income Limits (Section 8 / affordable housing eligibility) for an address. Returns median income and 30%/50%/80% AMI limits by household size. Requires admin role.","operationId":"admin_hud_income_limits_lookup_api_v1_admin_hud_income_limits_lookup_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HUDAddressRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Hud Income Limits Lookup Api V1 Admin Hud Income Limits Lookup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/hud/chas/lookup":{"post":{"tags":["Admin"],"summary":"HUD CHAS lookup by address","description":"Look up CHAS (Comprehensive Housing Affordability Strategy) data at county level: demand, cost burden, housing problems. Requires admin role.","operationId":"admin_hud_chas_lookup_api_v1_admin_hud_chas_lookup_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HUDAddressRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Hud Chas Lookup Api V1 Admin Hud Chas Lookup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/hud/usps/lookup":{"post":{"tags":["Admin"],"summary":"HUD USPS Crosswalk lookup by ZIP","description":"Look up HUD USPS ZIP Code Crosswalk (zip-to-county or zip-to-tract) for address ZIP. Returns GEOIDs and address ratios. Requires admin role.","operationId":"admin_hud_usps_lookup_api_v1_admin_hud_usps_lookup_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HUDAddressRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Hud Usps Lookup Api V1 Admin Hud Usps Lookup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/hud/ncwm/lookup":{"post":{"tags":["Admin"],"summary":"HUD NCWM (USPS vacancy by tract) lookup by address","description":"Look up HUD NCWM USPS vacancy data (active, short-term vacant, long-term vacant, no-stat) at census tract level. Resolves address to tract via Census Geocoder. Requires admin role and NCWM dataset enabled on HUD token.","operationId":"admin_hud_ncwm_lookup_api_v1_admin_hud_ncwm_lookup_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HUDAddressRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Hud Ncwm Lookup Api V1 Admin Hud Ncwm Lookup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/circuit-breakers":{"get":{"tags":["Admin"],"summary":"Circuit breaker status for all external APIs","description":"Returns the current state (closed/open/half_open), failure counts, and config for every registered circuit breaker. Requires admin role.","operationId":"get_circuit_breaker_status_api_v1_admin_circuit_breakers_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Circuit Breaker Status Api V1 Admin Circuit Breakers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/circuit-breakers/reset":{"post":{"tags":["Admin"],"summary":"Reset all circuit breakers to closed","description":"Manually reset all circuit breakers to closed state. Use after resolving an external API issue. Requires admin role.","operationId":"reset_circuit_breakers_api_v1_admin_circuit_breakers_reset_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reset Circuit Breakers Api V1 Admin Circuit Breakers Reset Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/pipelines/status":{"get":{"tags":["Admin"],"summary":"Pipeline job status from BigQuery sync tables","description":"Returns the latest run status for each pipeline job across all categories (ingestion, distribution). Reads from BigQuery sync_state, zillow_file_sync_status, and zillow_dataset_load_status tables. Requires admin role.","operationId":"get_pipeline_status_api_v1_admin_pipelines_status_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Pipeline Status Api V1 Admin Pipelines Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/pipelines/schedulers":{"get":{"tags":["Admin"],"summary":"Cloud Scheduler jobs for data pipelines","description":"Lists all Cloud Scheduler jobs with the configured prefix. Returns job name, schedule, state, last attempt time and status. Gracefully returns empty list when Cloud Scheduler is unreachable. Requires admin role.","operationId":"get_pipeline_schedulers_api_v1_admin_pipelines_schedulers_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Pipeline Schedulers Api V1 Admin Pipelines Schedulers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/pipelines/jobs":{"get":{"tags":["Admin"],"summary":"List available Cloud Run jobs for manual execution","description":"Lists all Cloud Run jobs in the data project matching the configured prefix. Returns job name, labels, default env vars, and execution status. Requires admin role.","operationId":"list_pipeline_jobs_api_v1_admin_pipelines_jobs_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Pipeline Jobs Api V1 Admin Pipelines Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/pipelines/run":{"post":{"tags":["Admin"],"summary":"Trigger a Cloud Run job manually","description":"Triggers a Cloud Run job execution with optional environment variable overrides. Returns the execution name for tracking. Requires admin role.","operationId":"run_pipeline_job_api_v1_admin_pipelines_run_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunJobRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Pipeline Job Api V1 Admin Pipelines Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/pipelines/executions":{"get":{"tags":["Admin"],"summary":"List Cloud Run job executions","description":"Lists recent Cloud Run job executions across all jobs matching the configured prefix. Optionally filter to only running executions. Requires admin role.","operationId":"list_pipeline_executions_api_v1_admin_pipelines_executions_get","parameters":[{"name":"running_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Running Only"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Pipeline Executions Api V1 Admin Pipelines Executions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/pipelines/kg-watermarks":{"get":{"tags":["Admin"],"summary":"Knowledge Graph ETL watermarks (per-step last-run state)","description":"Returns the latest run timestamp and row count for every KG ETL step, sourced from real_estate.kg_etl_watermark. Use this to see what the next incremental run will pick up. Admin only.","operationId":"get_kg_etl_watermarks_api_v1_admin_pipelines_kg_watermarks_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Kg Etl Watermarks Api V1 Admin Pipelines Kg Watermarks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/pipelines/kg-watermarks/reset":{"post":{"tags":["Admin"],"summary":"Reset one or all KG ETL watermarks","description":"Deletes watermark rows so the next incremental run loads them in full. Pass step_name to reset a single step, or omit it to reset every step. Useful when a step's logic changed and the previously loaded data needs to be re-resolved. Admin only.","operationId":"reset_kg_etl_watermarks_api_v1_admin_pipelines_kg_watermarks_reset_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Forwarded-Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-Authorization"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KGWatermarkResetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reset Kg Etl Watermarks Api V1 Admin Pipelines Kg Watermarks Reset Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/content":{"get":{"tags":["Content"],"summary":"Search curated content (news, trends, research)","description":"Returns real-estate content from Discovery Engine. Pass `type` to filter by category and `q` for free-text search. Use `cursor` from a previous response to paginate.","operationId":"get_content_api_v1_content_get","parameters":[{"name":"type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ContentType","description":"Content category: news, trends, or research"},"description":"Content category: news, trends, or research"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional free-text search query","title":"Q"},"description":"Optional free-text search query"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Number of results to return","default":5,"title":"Limit"},"description":"Number of results to return"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor from previous response","title":"Cursor"},"description":"Pagination cursor from previous response"},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponse"}}}},"401":{"description":"Neither a valid user JWT nor a matching X-Internal-Key was provided.","content":{"application/json":{"schema":{"type":"object","title":"ProblemDetail","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"trace_id":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Per-user rate limit exceeded (RFC 7807 problem, Retry-After)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'what is happening in the real estate market' or 'any news I should know'","Agent needs curated articles, trends, or research to share with the investor","Investor wants to stay informed about market news, emerging trends, or research reports"],"description_override":"Search curated real estate content including news articles, market trends, and research reports. Filter by content type (news, trends, research) and optional free-text search.","category":"content"}}},"/api/v1/dashboard/summary":{"get":{"tags":["Dashboard"],"summary":"Get dashboard summary","description":"Get combined dashboard summary data in a single request.\n\n    This endpoint combines three separate API calls into one:\n    - Portfolio summary statistics\n    - Deal summary statistics\n    - Recent portfolio properties (limited to 5)\n\n    All queries are executed in parallel for optimal performance.\n    Implements graceful degradation: if one query fails, returns partial data.\n\n    **Performance Benefits:**\n    - Reduces 3 HTTP round trips to 1\n    - Parallel query execution reduces total latency\n    - Better user experience with faster page load","operationId":"get_dashboard_summary_api_v1_dashboard_summary_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'give me an overview' or 'how am I doing overall'","Agent needs a quick snapshot combining portfolio and deal stats","Investor opens their dashboard and wants everything at once"],"when_not_to_use":["Investor wants only portfolio stats — use portfolio summary","Investor wants only deal stats — use deal summary stats"],"description_override":"Get a combined dashboard snapshot in one call: portfolio summary (equity, cash flow, cap rate), deal summary (counts by status/type), and recent portfolio properties.","category":"dashboard"}}},"/api/v1/dashboard/brief":{"get":{"tags":["Dashboard"],"summary":"Dashboard brief","operationId":"get_dashboard_brief_api_v1_dashboard_brief_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardBriefResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":false,"category":"dashboard"}}},"/api/v1/dashboard/cash-flightpath":{"get":{"tags":["Dashboard"],"summary":"Cash flightpath","operationId":"get_dashboard_flightpath_api_v1_dashboard_cash_flightpath_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardFlightpathResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":false,"category":"dashboard"}}},"/api/v1/dashboard/risks":{"get":{"tags":["Dashboard"],"summary":"Risk signals","operationId":"get_dashboard_risks_api_v1_dashboard_risks_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardRiskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":false,"category":"dashboard"}}},"/api/v1/dashboard/market-pulse":{"get":{"tags":["Dashboard"],"summary":"Market pulse signals","operationId":"get_dashboard_market_pulse_api_v1_dashboard_market_pulse_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardMarketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":false,"category":"dashboard"}}},"/api/v1/dashboard/ops-feed":{"get":{"tags":["Dashboard"],"summary":"Ops/compliance feed","operationId":"get_dashboard_ops_feed_api_v1_dashboard_ops_feed_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardOpsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":false,"category":"dashboard"}}},"/api/v1/dashboard/playbooks":{"get":{"tags":["Dashboard"],"summary":"Agent playbooks","operationId":"get_dashboard_playbooks_api_v1_dashboard_playbooks_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardPlaybooksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":false,"category":"dashboard"}}},"/api/v1/dashboard/milestones":{"get":{"tags":["Dashboard"],"summary":"Milestones","operationId":"get_dashboard_milestones_api_v1_dashboard_milestones_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardMilestonesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":false,"category":"dashboard"}}},"/api/v1/dashboard/data-health":{"get":{"tags":["Dashboard"],"summary":"Data health","operationId":"get_dashboard_data_health_api_v1_dashboard_data_health_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardDataHealthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":false,"category":"dashboard"}}},"/api/v1/portfolio":{"get":{"tags":["Portfolio"],"summary":"Get investor's portfolio","description":"Get all properties in the investor's portfolio with optional filters","operationId":"get_portfolio_api_v1_portfolio_get","parameters":[{"name":"min_cash_flow","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum monthly cash flow","title":"Min Cash Flow"},"description":"Minimum monthly cash flow"},{"name":"min_cap_rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum cap rate","title":"Min Cap Rate"},"description":"Minimum cap rate"},{"name":"ownership_structure","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by ownership structure: individual, direct_co_ownership, or entity","title":"Ownership Structure"},"description":"Filter by ownership structure: individual, direct_co_ownership, or entity"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by property status","title":"Status"},"description":"Filter by property status"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of results","default":100,"title":"Limit"},"description":"Maximum number of results"},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of fields to include (e.g., 'id,address,monthly_cash_flow')","title":"Fields"},"description":"Comma-separated list of fields to include (e.g., 'id,address,monthly_cash_flow')"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PortfolioPropertyResponse"},"title":"Response Get Portfolio Api V1 Portfolio Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'show me my portfolio' or 'what properties do I own'","Agent needs to list portfolio properties for analysis or comparison","Investor wants to filter portfolio by cash flow, cap rate, or ownership structure"],"when_not_to_use":["Investor wants aggregate portfolio stats — use portfolio summary instead"],"description_override":"Get all properties in the investor's portfolio with optional filters on cash flow, cap rate, ownership structure, and status.","category":"portfolio"}},"post":{"tags":["Portfolio"],"summary":"Create portfolio property","description":"Add a new property to the investor's portfolio","operationId":"create_portfolio_property_api_v1_portfolio_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioPropertyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioPropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/portfolio/summary":{"get":{"tags":["Portfolio"],"summary":"Get portfolio summary","description":"Get summary statistics for the investor's portfolio","operationId":"get_portfolio_summary_api_v1_portfolio_summary_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'how is my portfolio doing' or 'give me a snapshot'","Agent needs total equity, total cash flow, or average cap rate across the portfolio","Investor wants a breakdown of properties by type or state"],"when_not_to_use":["Investor wants details on a specific property — use get portfolio property"],"description_override":"Get aggregated portfolio statistics: total properties, total equity, total cash flow, average cap rate, and breakdowns by property type and state.","category":"portfolio"}}},"/api/v1/portfolio/{portfolio_id}/exit-analysis":{"post":{"tags":["Portfolio"],"summary":"Calculate exit strategy analysis","description":"Calculate exit strategy metrics for a portfolio property based on user-provided inputs.","operationId":"calculate_exit_strategy_api_v1_portfolio__portfolio_id__exit_analysis_post","parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExitAnalysisRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExitAnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/portfolio/page":{"get":{"tags":["Portfolio"],"summary":"Get cursor-paginated portfolio","description":"Cursor-paginated alternative to GET /portfolio. Returns one page of properties plus an opaque `next_cursor` for the next page. Use this when an investor has more than 100 properties — the non-paginated endpoint caps the response at 1000 items by design.","operationId":"get_portfolio_page_api_v1_portfolio_page_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from a previous response's next_cursor. Omit for the first page.","title":"Cursor"},"description":"Opaque cursor from a previous response's next_cursor. Omit for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size (1-100).","default":50,"title":"Limit"},"description":"Page size (1-100)."},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioPropertyPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/portfolio/check-ownership":{"get":{"tags":["Portfolio"],"summary":"Check property ownership","description":"Check whether the current investor owns a specific property. Returns ownership status and portfolio_id if owned. RLS-enforced.","operationId":"check_ownership_api_v1_portfolio_check_ownership_get","parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"integer","description":"Property ID to check ownership for","title":"Property Id"},"description":"Property ID to check ownership for"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnershipCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Agent needs to verify if an investor owns a property before requesting PM data","A2A bridge ownership gate before routing to prop-cafe-pm-agent"],"when_not_to_use":["Investor wants full portfolio details — use get portfolio instead"],"description_override":"Lightweight ownership check: returns {owns: bool, portfolio_id: int|null}.","category":"portfolio"}}},"/api/v1/portfolio/internal/check-ownership":{"get":{"tags":["Portfolio"],"summary":"Check property ownership (internal)","description":"Service-to-service ownership check for the agent A2A gate. Requires X-Internal-Key and an explicit investor_id query param (audit-logged). Does not accept X-Investor-Id delegation.","operationId":"check_ownership_internal_api_v1_portfolio_internal_check_ownership_get","parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"integer","description":"Property ID to check ownership for","title":"Property Id"},"description":"Property ID to check ownership for"},{"name":"investor_id","in":"query","required":true,"schema":{"type":"integer","minimum":1,"description":"Investor to check ownership for","title":"Investor Id"},"description":"Investor to check ownership for"},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnershipCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/portfolio/{portfolio_id}":{"get":{"tags":["Portfolio"],"summary":"Get portfolio property","description":"Get details for a specific property in the portfolio.\n\n    **Field Selection:**\n    Use the `fields` parameter to request only specific fields:\n    - `?fields=id,address,monthly_cash_flow,cap_rate` - Returns only selected fields\n\n    Available fields: id, property_id, address, property_type, ownership_structure,\n    ownership_percentage, purchase_date, acquisition_price, current_market_value,\n    current_loan_balance, current_equity, monthly_cash_flow, cap_rate, status, and more.","operationId":"get_portfolio_property_api_v1_portfolio__portfolio_id__get","parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of fields to include (e.g., 'id,address,monthly_cash_flow')","title":"Fields"},"description":"Comma-separated list of fields to include (e.g., 'id,address,monthly_cash_flow')"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioPropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks about a specific property in their portfolio","Agent needs cash flow, equity, cap rate, or financials for a portfolio property","Investor wants to review acquisition details or exit strategy for a property they own"],"when_not_to_use":["Investor wants property physical details (bedrooms, sqft) — use get property details"],"description_override":"Get detailed financial and ownership information for a specific property in the investor's portfolio, including cash flow, equity, cap rate, and exit planning data.","category":"portfolio"}},"patch":{"tags":["Portfolio"],"summary":"Update portfolio property","description":"Update a property in the investor's portfolio. All fields are optional for partial updates.","operationId":"update_portfolio_property_api_v1_portfolio__portfolio_id__patch","parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioPropertyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioPropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Portfolio"],"summary":"Remove (archive) property from portfolio","description":"Soft-deletes a property from the investor's portfolio by setting status='archived'. Preserves tax basis, depreciation, loans and 1031 references for historical reporting. Only the owning individual or direct-co-owner investor may remove; grantees and entity-owned rows receive 404.","operationId":"delete_portfolio_property_api_v1_portfolio__portfolio_id__delete","parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/favourites/lists":{"get":{"tags":["Favourites"],"summary":"List watchlists","description":"Return all named watchlists for the authenticated investor, default list first.","operationId":"list_favourite_lists_api_v1_favourites_lists_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FavouriteListResponse"},"title":"Response List Favourite Lists Api V1 Favourites Lists Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Favourites"],"summary":"Create watchlist","description":"Create a new named watchlist. Each investor may have multiple lists (e.g. 'Austin Flips Q2', 'High Priority').","operationId":"create_favourite_list_api_v1_favourites_lists_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavouriteListCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavouriteListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/favourites/lists/{list_id}":{"get":{"tags":["Favourites"],"summary":"Get watchlist","operationId":"get_favourite_list_api_v1_favourites_lists__list_id__get","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavouriteListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Favourites"],"summary":"Rename watchlist","description":"Rename a watchlist. The default 'My Favorites' list can be renamed.","operationId":"update_favourite_list_api_v1_favourites_lists__list_id__patch","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavouriteListUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavouriteListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Favourites"],"summary":"Delete watchlist","description":"Delete a watchlist and all its saved properties. The default 'My Favorites' list cannot be deleted.","operationId":"delete_favourite_list_api_v1_favourites_lists__list_id__delete","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/favourites":{"get":{"tags":["Favourites"],"summary":"List saved properties","description":"Return saved properties across all lists, or filtered by list_id / status.","operationId":"list_favourites_api_v1_favourites_get","parameters":[{"name":"list_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Filter to a specific watchlist","title":"List Id"},"description":"Filter to a specific watchlist"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by pipeline status: saved, researching, offer_pending, passed","title":"Status"},"description":"Filter by pipeline status: saved, researching, offer_pending, passed"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of results","default":200,"title":"Limit"},"description":"Maximum number of results"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PropertyFavouriteResponse"},"title":"Response List Favourites Api V1 Favourites Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'show me my saved/favourited properties'","Investor wants to see properties they are tracking or researching"],"when_not_to_use":["Investor wants portfolio properties they already own — use /portfolio instead"],"description_override":"Return all properties saved by the investor across their watchlists.","category":"favourites"}},"post":{"tags":["Favourites"],"summary":"Save property","description":"Add a property to a watchlist with optional notes, tags, priority, and status.","operationId":"create_favourite_api_v1_favourites_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyFavouriteCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyFavouriteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/favourites/upcoming":{"get":{"tags":["Favourites"],"summary":"Upcoming follow-ups","description":"Return saved properties whose follow_up_at reminder is due (≤ now).","operationId":"list_upcoming_followups_api_v1_favourites_upcoming_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PropertyFavouriteResponse"},"title":"Response List Upcoming Followups Api V1 Favourites Upcoming Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/favourites/{favourite_id}":{"get":{"tags":["Favourites"],"summary":"Get saved property","operationId":"get_favourite_api_v1_favourites__favourite_id__get","parameters":[{"name":"favourite_id","in":"path","required":true,"schema":{"type":"integer","title":"Favourite Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyFavouriteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Favourites"],"summary":"Update saved property","description":"Update notes, tags, priority, status, follow_up_at, or move to another list.","operationId":"update_favourite_api_v1_favourites__favourite_id__patch","parameters":[{"name":"favourite_id","in":"path","required":true,"schema":{"type":"integer","title":"Favourite Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyFavouriteUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyFavouriteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Favourites"],"summary":"Remove saved property","operationId":"delete_favourite_api_v1_favourites__favourite_id__delete","parameters":[{"name":"favourite_id","in":"path","required":true,"schema":{"type":"integer","title":"Favourite Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/proforma/assumptions":{"get":{"tags":["Pro Forma","Pro Forma Calculations"],"summary":"Get Default Assumptions","description":"Get default pro forma assumptions (national averages)\n\nReturns all configurable parameters with their default values.\nClients can use these as a baseline and override specific values.","operationId":"get_default_assumptions_api_v1_proforma_assumptions_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssumptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Agent needs default pro forma assumptions (appreciation, inflation, maintenance rates) before running a projection","Investor asks 'what assumptions are you using for projections'"],"description_override":"Get default pro forma assumptions (national averages) for real estate projections, including appreciation rate, inflation rate, maintenance reserve, and management fee percentages.","category":"deals"}}},"/api/v1/proforma/calculate":{"post":{"tags":["Pro Forma","Pro Forma Calculations"],"summary":"Calculate Proforma","description":"Calculate pro forma financial projections for a property\n\n**Features:**\n- Year-by-year projections (1-30 years)\n- Configurable assumptions (or use national averages)\n- Complete investor metrics (IRR, CoC, Cap Rate, ROI)\n- Strategic milestone identification\n- Reusable across portfolio, deals, and analysis pages\n\n**Example Use Cases:**\n- Portfolio performance page: 10-year detailed projection\n- Deals list: 5, 7, 10 year summary metrics\n- Deal details: Executive summary with key milestones\n- What-if analysis: Change assumptions and re-calculate","operationId":"calculate_proforma_api_v1_proforma_calculate_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProFormaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Calculate Proforma Api V1 Proforma Calculate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'what will this property look like in 10 years'","Agent needs year-by-year projections including IRR, cash-on-cash, equity growth, and ROI","Investor wants to run a full pro forma analysis with custom assumptions","Agent is comparing long-term performance of different properties"],"when_not_to_use":["Investor only needs current-year deal metrics — use deal calculate endpoint","Investor wants summary metrics at specific years — use pro forma summary"],"description_override":"Calculate full pro forma financial projections (1-30 years) for a property. Returns year-by-year cash flow, equity, appreciation, IRR, cash-on-cash return, cap rate, and strategic milestones.","category":"deals"}}},"/api/v1/proforma/portfolio/{portfolio_id}":{"get":{"tags":["Pro Forma","Pro Forma Calculations"],"summary":"Calculate Portfolio Proforma","description":"Calculate pro forma for an existing portfolio property\n\nAutomatically fetches property data from the database and calculates projections.\nUses stored property financials with default assumptions (overridable).","operationId":"calculate_portfolio_proforma_api_v1_proforma_portfolio__portfolio_id__get","parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}},{"name":"projection_years","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":1,"description":"Years to project","default":10,"title":"Projection Years"},"description":"Years to project"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Calculate Portfolio Proforma Api V1 Proforma Portfolio  Portfolio Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'run a pro forma on my property' for a property already in their portfolio","Agent needs projected performance for an existing portfolio property","Investor wants to see how an owned property will perform over the next 10+ years"],"when_not_to_use":["Property is not yet in the portfolio — use the general pro forma calculate endpoint with manual inputs"],"description_override":"Calculate pro forma projections for a property already in the investor's portfolio. Automatically pulls property financials from the database and projects future performance.","category":"deals"}}},"/api/v1/proforma/summary":{"post":{"tags":["Pro Forma","Pro Forma Calculations"],"summary":"Calculate Summary Metrics","description":"Calculate summary metrics for specific years (e.g., 5, 7, 10)\n\nUseful for deals list, comparison tables, and executive summaries.\nReturns only the requested years instead of full year-by-year data.\n\n**Example Response:**\n```json\n{\n    \"year_5\": {\"cash_flow\": 4500, \"roi\": 45.2, \"equity\": 125000},\n    \"year_7\": {\"cash_flow\": 6200, \"roi\": 68.5, \"equity\": 158000},\n    \"year_10\": {\"cash_flow\": 8900, \"roi\": 102.3, \"equity\": 205000}\n}\n```","operationId":"calculate_summary_metrics_api_v1_proforma_summary_post","parameters":[{"name":"years","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"description":"Years to include in summary","default":[5,7,10],"title":"Years"},"description":"Years to include in summary"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProFormaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Calculate Summary Metrics Api V1 Proforma Summary Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'what will this property look like at years 5, 7, and 10'","Agent needs summary metrics at specific milestone years for comparison","Investor wants a quick comparison table rather than full year-by-year projections"],"when_not_to_use":["Investor wants full year-by-year detail — use pro forma calculate"],"description_override":"Calculate pro forma summary metrics at specific years (e.g., 5, 7, 10). Returns cash flow, ROI, equity, and cap rate at each requested year. Ideal for comparison tables and executive summaries.","category":"deals"}}},"/api/v1/deals":{"get":{"tags":["Deals"],"summary":"Get investor's deals","description":"Get all deals for the investor with optional filters.\n\n    **Field Selection:**\n    Use the `fields` parameter to request only specific fields for each deal:\n    - `?fields=id,property_address,deal_status,deal_score` - Returns only selected fields per deal\n\n    Available fields: id, investor_id, property_id, property_address, property_type,\n    property_city, property_state, deal_type, deal_status, deal_score, asking_price,\n    offer_price, accepted_price, discovered_date, and more.","operationId":"get_deals_api_v1_deals_get","parameters":[{"name":"property_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Filter by property ID","title":"Property Id"},"description":"Filter by property ID"},{"name":"deal_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by deal status: analyzing, under_contract, closed, passed, lost","title":"Deal Status"},"description":"Filter by deal status: analyzing, under_contract, closed, passed, lost"},{"name":"deal_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by deal type: purchase, wholesale, off_market, mls","title":"Deal Type"},"description":"Filter by deal type: purchase, wholesale, off_market, mls"},{"name":"min_deal_score","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"description":"Minimum deal score (0-100)","title":"Min Deal Score"},"description":"Minimum deal score (0-100)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of results","default":100,"title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"owner_only","in":"query","required":false,"schema":{"type":"boolean","description":"When true (default, v1-compatible), returns only deals the investor owns directly. When false, returns the full RLS v2 sharing-aware set: owned + partnered + individually-granted + entity-granted (Family Group). UIs that render ownership affordances (edit/delete buttons) should stay on the default until they audit their own rendering to key on deal.investor_id.","default":true,"title":"Owner Only"},"description":"When true (default, v1-compatible), returns only deals the investor owns directly. When false, returns the full RLS v2 sharing-aware set: owned + partnered + individually-granted + entity-granted (Family Group). UIs that render ownership affordances (edit/delete buttons) should stay on the default until they audit their own rendering to key on deal.investor_id."},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of fields to include for each deal (e.g., 'id,property_address,deal_status')","title":"Fields"},"description":"Comma-separated list of fields to include for each deal (e.g., 'id,property_address,deal_status')"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'show me my deals' or 'what deals am I analyzing'","Agent needs to list deals filtered by status (analyzing, under_contract, closed)","Investor wants to review their deal pipeline or find high-scoring deals"],"when_not_to_use":["Investor wants aggregate deal statistics — use deal summary stats"],"description_override":"Get all deals in the investor's pipeline with optional filters on status, type, and minimum deal score.","category":"deals","reasoning_hints":["If no status filter specified, default to 'analyzing' for active pipeline view","When investor asks about 'best deals', rank by deal_score_breakdown.band (BUY, then CONSIDER); never threshold the number yourself","Always mention total_count in response to set context"]}},"post":{"tags":["Deals"],"summary":"Create deal","description":"Create a new deal.\n\n    **Required fields:**\n    - property_id: Property ID\n    - deal_type: Deal type (purchase, wholesale, off_market, mls, auction, foreclosure)\n\n    **Optional fields:**\n    - deal_status: Deal status (defaults to 'analyzing')\n    - discovered_date: Date deal was discovered (defaults to today)\n    - deal_source: Source of the deal\n    - asking_price, offer_price, accepted_price: Price fields\n    - deal_score: Deal score (0-100)\n    - notes, analysis_notes: Text fields\n    - Dates: offer_date, contract_date, closing_date, passed_date\n\n    Returns the created deal with all fields.","operationId":"create_deal_api_v1_deals_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/deals/{deal_id}":{"get":{"tags":["Deals"],"summary":"Get deal details","description":"Get detailed information about a specific deal including calculations.\n\n    **Field Selection:**\n    Use the `fields` parameter to request only specific fields:\n    - `?fields=id,property_address,deal_status,deal_score` - Returns only selected fields\n\n    Available fields: id, investor_id, property_id, property_address, property_type,\n    deal_type, deal_status, deal_score, asking_price, offer_price, calculations, and more.","operationId":"get_deal_api_v1_deals__deal_id__get","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of fields to include (e.g., 'id,property_address,deal_status')","title":"Fields"},"description":"Comma-separated list of fields to include (e.g., 'id,property_address,deal_status')"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks about a specific deal by ID","Agent needs deal calculations, scores, pricing, or status for a deal","Investor wants to review offer price, asking price, or analysis notes on a deal"],"description_override":"Get full details for a specific deal including deal score, pricing, status, calculation scenarios, and analysis notes.","category":"deals","reasoning_hints":["Lead with deal_score and deal_status — these are the most important fields","If deal has calculations, compare cap_rate across scenarios"]}},"delete":{"tags":["Deals"],"summary":"Delete deal","description":"Delete a deal (soft delete).","operationId":"delete_deal_api_v1_deals__deal_id__delete","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"integer","title":"Deal Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/deals/import-from-scrape":{"post":{"tags":["Deals"],"summary":"Import deal from scraped data","description":"Atomically create or update property/listing and create a deal from scraped data.\n\n    This endpoint orchestrates:\n    1. Property lookup (by address) and create/update\n    2. Listing lookup (by property) and create/update\n    3. Deal creation\n    4. Initial calculation generation\n\n    Returns the created deal with property details.","operationId":"import_deal_from_scrape_api_v1_deals_import_from_scrape_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealImportRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/deals/summary/stats":{"get":{"tags":["Deals"],"summary":"Get deal statistics","description":"Get summary statistics for the investor's deals","operationId":"get_deal_summary_api_v1_deals_summary_stats_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Deal Summary Api V1 Deals Summary Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'how many deals do I have' or 'what does my deal pipeline look like'","Agent needs aggregate deal counts by status or type","Investor wants their average deal score across all deals"],"when_not_to_use":["Investor wants details on a specific deal — use get deal details"],"description_override":"Get aggregated deal statistics: total deals, deals by status, deals by type, and average deal score.","category":"deals","reasoning_hints":["Mention total_count to frame context for the investor","Highlight the count of 'analyzing' deals as the active pipeline size"]}}},"/api/v1/deals/calculation-defaults":{"get":{"tags":["Deals"],"summary":"Get calculation default preferences","description":"Get default calculation preferences used when fields are not provided","operationId":"get_calculation_defaults_api_v1_deals_calculation_defaults_get","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Calculation Defaults Api V1 Deals Calculation Defaults Get"}}}},"401":{"description":"Neither a valid user JWT nor a matching X-Internal-Key was provided.","content":{"application/json":{"schema":{"type":"object","title":"ProblemDetail","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"trace_id":{"type":"string"}},"required":["type","title","status","detail"]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Agent needs to know the default interest rate, down payment, or expense assumptions before running a deal calculation","Investor asks 'what assumptions are you using' for deal analysis"],"description_override":"Get default calculation assumptions (interest rate from FRED 30y, down payment %, tax rate, insurance rate, vacancy rate, etc.) used when running deal calculations.","category":"deals"}}},"/api/v1/deals/calculate":{"post":{"tags":["Deals"],"summary":"Calculate deal metrics (in-memory)","description":"Calculate all metrics from assumptions without saving to database. Use this for real-time calculations as user changes parameters.","operationId":"calculate_deal_metrics_api_v1_deals_calculate_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Assumptions: purchase_price, monthly_rent, and optional expense parameters","examples":{"example":{"summary":"Example deal assumptions","value":{"purchase_price":600000,"monthly_rent":3500,"monthly_expenses":800,"interest_rate":6.5,"down_payment_pct":20,"loan_term":30,"property_tax_rate":1.7,"insurance_rate":0.5,"hoa":0,"management_rate":10,"vacancy_rate":5,"other_expenses_rate":0}}},"title":"Assumptions Json"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Calculate Deal Metrics Api V1 Deals Calculate Post"}}}},"401":{"description":"Neither a valid user JWT nor a matching X-Internal-Key was provided.","content":{"application/json":{"schema":{"type":"object","title":"ProblemDetail","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"trace_id":{"type":"string"}},"required":["type","title","status","detail"]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'what would my cash flow be if I buy this property at $X'","Agent needs to calculate cap rate, cash-on-cash return, or monthly cash flow for a deal","Investor wants to run what-if scenarios with different purchase prices or rates","Agent is comparing deal economics across different assumptions"],"when_not_to_use":["Investor wants to save the deal — use create deal instead","Investor wants break-even scenarios — use pre-defined scenarios"],"description_override":"Calculate deal metrics (cash flow, cap rate, cash-on-cash, ROI, break-even price/rent, PITI) from assumptions without saving. Provide purchase_price, monthly_rent, and optional expense parameters.","category":"deals","reasoning_hints":["Compare cap_rate and cash_flow across different assumptions to show sensitivity","If monthly_cash_flow is negative, always flag it prominently"]}}},"/api/v1/deals/pre-defined-scenarios":{"post":{"tags":["Deals"],"summary":"Calculate pre-defined scenarios","description":"Calculate break-even scenarios using calculation defaults. Returns scenarios in an array: Scenario 1 finds purchase price given rent, Scenario 2 finds interest rate given rent and purchase price, Scenario 3 finds down payment percentage given rent and purchase price. Monthly rent can be calculated from purchase_price using defaults if not provided.","operationId":"calculate_predefined_scenarios_api_v1_deals_pre_defined_scenarios_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_calculate_predefined_scenarios_api_v1_deals_pre_defined_scenarios_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Calculate Predefined Scenarios Api V1 Deals Pre Defined Scenarios Post"}}}},"401":{"description":"Neither a valid user JWT nor a matching X-Internal-Key was provided.","content":{"application/json":{"schema":{"type":"object","title":"ProblemDetail","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"trace_id":{"type":"string"}},"required":["type","title","status","detail"]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'what is the max price I can pay for this property and still break even'","Agent needs to find the break-even interest rate or down payment percentage","Investor wants to understand deal sensitivity to price, rate, or down payment changes"],"when_not_to_use":["Investor wants full metrics for a specific set of assumptions — use /calculate"],"description_override":"Calculate break-even scenarios: (1) max offer price given rent, (2) break-even interest rate, (3) break-even down payment percentage. Provide monthly_rent and/or purchase_price.","category":"deals","reasoning_hints":["Flag any scenario where monthly_cash_flow is negative","Show how far current price is from break-even price as a percentage"]}}},"/api/v1/deals/deal-score":{"post":{"tags":["Deals"],"summary":"Compute deal score with breakeven analysis","description":"Computes a 0-100 deal score using sigmoid-normalized 3-pillar model (Yield Quality + Resilience + Value Signal) with Gordon Growth Model adjustment. Internally runs breakeven price scenario and returns score, verdict, and human-readable drivers. Requires one of: property_id, a full address (address_line1, city, state, zip_code), or both purchase_price and monthly_rent (pure hypothetical, no property identity).","operationId":"compute_deal_score_api_v1_deals_deal_score_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealScoreRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealScoreResponse"}}}},"401":{"description":"Neither a valid user JWT nor a matching X-Internal-Key was provided.","content":{"application/json":{"schema":{"type":"object","title":"ProblemDetail","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"trace_id":{"type":"string"}},"required":["type","title","status","detail"]}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealScoreInsufficientResponse"}}},"description":"Unprocessable Entity"}}}},"/api/v1/deals/screen":{"post":{"tags":["Deals"],"summary":"Screen a property set at one financing scenario","description":"Batch-underwrite a candidate property set (resolved from filters or an explicit property_id list) at ONE shared financing scenario, then flag which properties pass a generic set of metric criteria (ANDed). Reuses the optimized property search for filtering + rent/price, and the shared deal-math engine for underwriting — no per-property orchestrator calls. Answers questions like 'which of these VRM properties in San Antonio break even at 5% down'.","operationId":"screen_properties_api_v1_deals_screen_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenResponse"}}}},"401":{"description":"Neither a valid user JWT nor a matching X-Internal-Key was provided.","content":{"application/json":{"schema":{"type":"object","title":"ProblemDetail","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"trace_id":{"type":"string"}},"required":["type","title","status","detail"]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor wants to compare many properties on deal economics at once","Investor asks which properties cash-flow / break even at a given down payment","Agent needs to rank a filtered set by cap rate, cash flow, DSCR, etc."],"when_not_to_use":["Authoritative single-property deal score — use POST /deals/deal-score","Just listing properties without underwriting — use GET /properties"],"category":"deal"}}},"/api/v1/properties/internal/search":{"get":{"tags":["Properties (Internal)"],"summary":"Search properties (internal)","description":"Internal mirror of GET /properties for service-to-service callers. Filters come from the same shared `PropertySearchFilters` dependency as the public route, so the two accept an identical set. Differences: X-Internal-Key auth, a 500-row cap, and no per-user RLS context — caller must trust the response. Use ONLY from trusted backend services, never proxy to users.","operationId":"search_properties_internal_api_v1_properties_internal_search_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Max results","default":50,"title":"Limit"},"description":"Max results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"include_for_sale_count","in":"query","required":false,"schema":{"type":"boolean","description":"Also return for_sale_count: how many matched properties are for sale (the listing the search matched is an active sale listing with an asking price; see the field). Counted on the first page (offset=0) only, for a search narrowed by data_provider, city, zip_code, msa, q, include_property_ids whose exact total_count is at most 10,000; otherwise for_sale_count is null. Safe to send on every search.","default":false,"title":"Include For Sale Count"},"description":"Also return for_sale_count: how many matched properties are for sale (the listing the search matched is an active sale listing with an asking price; see the field). Counted on the first page (offset=0) only, for a search narrowed by data_provider, city, zip_code, msa, q, include_property_ids whose exact total_count is at most 10,000; otherwise for_sale_count is null. Safe to send on every search."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text search query (searches address, city, zip code)","title":"Q"},"description":"Text search query (searches address, city, zip code)"},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by city","title":"City"},"description":"Filter by city"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by state","title":"State"},"description":"Filter by state"},{"name":"zip_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by ZIP code","title":"Zip Code"},"description":"Filter by ZIP code"},{"name":"property_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by property type ID","title":"Property Type Id"},"description":"Filter by property type ID"},{"name":"listing_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by listing type (e.g., 'sale', 'lease')","title":"Listing Type"},"description":"Filter by listing type (e.g., 'sale', 'lease')"},{"name":"min_bedrooms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"description":"Minimum bedrooms","title":"Min Bedrooms"},"description":"Minimum bedrooms"},{"name":"max_bedrooms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"description":"Maximum bedrooms","title":"Max Bedrooms"},"description":"Maximum bedrooms"},{"name":"min_bathrooms","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":99,"minimum":0},{"type":"null"}],"description":"Minimum bathrooms (recorded to one decimal, e.g. 2.5)","title":"Min Bathrooms"},"description":"Minimum bathrooms (recorded to one decimal, e.g. 2.5)"},{"name":"max_bathrooms","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":99,"minimum":0},{"type":"null"}],"description":"Maximum bathrooms (recorded to one decimal, e.g. 2.5)","title":"Max Bathrooms"},"description":"Maximum bathrooms (recorded to one decimal, e.g. 2.5)"},{"name":"min_living_area","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000000,"minimum":0},{"type":"null"}],"description":"Minimum square feet","title":"Min Living Area"},"description":"Minimum square feet"},{"name":"max_living_area","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000000,"minimum":0},{"type":"null"}],"description":"Maximum square feet","title":"Max Living Area"},"description":"Maximum square feet"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Minimum listing price","title":"Min Price"},"description":"Minimum listing price"},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum listing price","title":"Max Price"},"description":"Maximum listing price"},{"name":"min_year_built","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":9999,"minimum":0},{"type":"null"}],"description":"Minimum year built","title":"Min Year Built"},"description":"Minimum year built"},{"name":"max_year_built","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":9999,"minimum":0},{"type":"null"}],"description":"Maximum year built","title":"Max Year Built"},"description":"Maximum year built"},{"name":"min_lot_size_sqft","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2000000000,"minimum":0},{"type":"null"}],"description":"Minimum lot size in square feet","title":"Min Lot Size Sqft"},"description":"Minimum lot size in square feet"},{"name":"max_lot_size_sqft","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2000000000,"minimum":0},{"type":"null"}],"description":"Maximum lot size in square feet","title":"Max Lot Size Sqft"},"description":"Maximum lot size in square feet"},{"name":"min_stories","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":99,"minimum":0},{"type":"null"}],"description":"Minimum stories (recorded to one decimal; 1.5 = one-and-a-half story)","title":"Min Stories"},"description":"Minimum stories (recorded to one decimal; 1.5 = one-and-a-half story)"},{"name":"max_stories","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":99,"minimum":0},{"type":"null"}],"description":"Maximum stories (recorded to one decimal; 1.5 = one-and-a-half story)","title":"Max Stories"},"description":"Maximum stories (recorded to one decimal; 1.5 = one-and-a-half story)"},{"name":"exclude_property_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"description":"Exclude properties with these IDs (e.g., already in portfolio)","title":"Exclude Property Ids"},"description":"Exclude properties with these IDs (e.g., already in portfolio)"},{"name":"include_property_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"description":"Return only properties whose ID is in this list (mirror of `exclude_property_ids`; e.g. enrich a known set of favourited properties with rent analytics). Capped at 1000 ids per request. When combined with `exclude_property_ids` the two are AND'd: `id IN include AND id NOT IN exclude`.","title":"Include Property Ids"},"description":"Return only properties whose ID is in this list (mirror of `exclude_property_ids`; e.g. enrich a known set of favourited properties with rent analytics). Capped at 1000 ids per request. When combined with `exclude_property_ids` the two are AND'd: `id IN include AND id NOT IN exclude`."},{"name":"property_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by property status (e.g., 'Active', 'Off Market')","title":"Property Status"},"description":"Filter by property status (e.g., 'Active', 'Off Market')"},{"name":"data_provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by data provider (crawl origin, e.g., 'VRM Properties', 'Lennar')","title":"Data Provider"},"description":"Filter by data provider (crawl origin, e.g., 'VRM Properties', 'Lennar')"},{"name":"msa","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by MSA (CBSA FIPS code, e.g. '12420'). Matches via zip_cbsa_crosswalk.","title":"Msa"},"description":"Filter by MSA (CBSA FIPS code, e.g. '12420'). Matches via zip_cbsa_crosswalk."},{"name":"min_cap_rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum cap rate % (NOI / listing_price × 100). Requires listing price + MV rent data.","title":"Min Cap Rate"},"description":"Minimum cap rate % (NOI / listing_price × 100). Requires listing price + MV rent data."},{"name":"cash_flow_positive","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, return only properties with estimated positive monthly cash flow.","title":"Cash Flow Positive"},"description":"If true, return only properties with estimated positive monthly cash flow."},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/internal/geography/fips":{"get":{"tags":["Properties (Internal)"],"summary":"Lookup geography and FIPS codes (internal)","description":"Internal mirror of GET /properties/geography/fips for service-to-service callers (market-service uses this for ZIP/address → FIPS resolution). Authenticated via X-Internal-Key.","operationId":"lookup_geography_internal_api_v1_properties_internal_geography_fips_get","parameters":[{"name":"zip_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"5-digit ZIP code","title":"Zip Code"},"description":"5-digit ZIP code"},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"City name","title":"City"},"description":"City name"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"2-letter state code","title":"State"},"description":"2-letter state code"},{"name":"county","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"County name","title":"County"},"description":"County name"},{"name":"geoid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Census GEOID","title":"Geoid"},"description":"Census GEOID"},{"name":"geo_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Entity type","title":"Geo Type"},"description":"Entity type"},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Full or partial address","title":"Address"},"description":"Full or partial address"},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeographyLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/internal/rent-estimate":{"post":{"tags":["Properties (Internal)"],"summary":"Get rent estimate for an address (internal)","description":"Internal mirror of POST /api/v1/rent-estimate for service-to-service callers (the chat agent uses this). Same request body, same response, same market-service call — only the guard differs: X-Internal-Key instead of a user JWT. The public route sits behind `Depends(get_current_user)`, and service-to-service callers send no Authorization bearer, so they could only ever reach it via the AUTH_TYPE-dependent API-key fallback — which is unset on dev and 401s. `rent_mean` is **null** when no source produced an estimate, including when the address is not a property we hold. Null means unknown, not $0. A market-service outage is a 503, not a null estimate.","operationId":"get_rent_estimate_by_address_internal_api_v1_properties_internal_rent_estimate_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentEstimateByAddressRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentEstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/internal/suggestions":{"get":{"tags":["Properties (Internal)"],"summary":"Address autocomplete (internal)","description":"Internal mirror of GET /properties/suggestions. Same service call, X-Internal-Key auth instead of a user JWT.","operationId":"get_search_suggestions_internal_api_v1_properties_internal_suggestions_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Search query (min 2 chars)","title":"Q"},"description":"Search query (min 2 chars)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Max number of suggestions","default":5,"title":"Limit"},"description":"Max number of suggestions"},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PropertySuggestion"},"title":"Response Get Search Suggestions Internal Api V1 Properties Internal Suggestions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/internal/search/radius":{"get":{"tags":["Properties (Internal)"],"summary":"Radius search (internal)","description":"Internal mirror of GET /properties/search/radius. Same PostGIS search, X-Internal-Key auth instead of a user JWT.","operationId":"search_properties_by_radius_internal_api_v1_properties_internal_search_radius_get","parameters":[{"name":"latitude","in":"query","required":true,"schema":{"type":"number","maximum":90,"minimum":-90,"description":"Center point latitude","title":"Latitude"},"description":"Center point latitude"},{"name":"longitude","in":"query","required":true,"schema":{"type":"number","maximum":180,"minimum":-180,"description":"Center point longitude","title":"Longitude"},"description":"Center point longitude"},{"name":"radius_miles","in":"query","required":true,"schema":{"type":"number","maximum":100,"exclusiveMinimum":0,"description":"Search radius in miles (max 100)","title":"Radius Miles"},"description":"Search radius in miles (max 100)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of results","default":100,"title":"Limit"},"description":"Maximum number of results"},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/internal/search/polygon":{"post":{"tags":["Properties (Internal)"],"summary":"Polygon search (internal)","description":"Internal mirror of POST /properties/search/polygon. Same PostGIS search, X-Internal-Key auth instead of a user JWT.","operationId":"search_properties_by_polygon_internal_api_v1_properties_internal_search_polygon_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpatialSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/internal/data-providers":{"get":{"tags":["Properties (Internal)"],"summary":"List data providers (internal)","description":"Internal mirror of GET /properties/data-providers. Same service call, X-Internal-Key auth instead of a user JWT.","operationId":"list_data_providers_internal_api_v1_properties_internal_data_providers_get","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response List Data Providers Internal Api V1 Properties Internal Data Providers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/internal/{property_id}/similar":{"get":{"tags":["Properties (Internal)"],"summary":"Similar properties (internal)","description":"Internal mirror of GET /properties/{property_id}/similar. Same vector/attribute matching, X-Internal-Key auth instead of a user JWT.","operationId":"get_similar_properties_internal_api_v1_properties_internal__property_id__similar_get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Number of similar properties to return","default":3,"title":"Limit"},"description":"Number of similar properties to return"},{"name":"listing_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["sale","rent"],"type":"string"},{"type":"null"}],"description":"Filter by listing type: 'sale' or 'rent'","title":"Listing Type"},"description":"Filter by listing type: 'sale' or 'rent'"},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PropertyResponse"},"title":"Response Get Similar Properties Internal Api V1 Properties Internal  Property Id  Similar Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/internal/{property_id}":{"get":{"tags":["Properties (Internal)"],"summary":"Get property by ID (internal)","description":"Internal mirror of GET /properties/{id} for service-to-service callers. Authenticated via X-Internal-Key — does NOT depend on AUTH_TYPE.","operationId":"get_property_internal_api_v1_properties_internal__property_id__get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/internal/{property_id}/coordinates":{"patch":{"tags":["Properties (Internal)"],"summary":"Update property coordinates (internal)","description":"Internal endpoint to patch only latitude/longitude on a property record. Authenticated via X-Internal-Key.","operationId":"update_property_coordinates_internal_api_v1_properties_internal__property_id__coordinates_patch","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyCoordinatesUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/suggestions/by-address":{"get":{"tags":["Properties"],"summary":"Get address-only property suggestions","description":"Autocomplete that matches **street address** only (``address_line1`` ILIKE), same rule as the\n    address branch of ``/suggestions`` but **without** city or ZIP suggestions.","operationId":"get_address_suggestions_api_v1_properties_suggestions_by_address_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Search query (min 2 chars)","title":"Q"},"description":"Search query (min 2 chars)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Max number of suggestions","default":5,"title":"Limit"},"description":"Max number of suggestions"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PropertySuggestion"},"title":"Response Get Address Suggestions Api V1 Properties Suggestions By Address Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/suggestions":{"get":{"tags":["Properties"],"summary":"Get search suggestions","description":"Get autocomplete suggestions for properties.\n    Searches across address, city, and zip code.","operationId":"get_search_suggestions_api_v1_properties_suggestions_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Search query (min 2 chars)","title":"Q"},"description":"Search query (min 2 chars)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Max number of suggestions","default":5,"title":"Limit"},"description":"Max number of suggestions"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PropertySuggestion"},"title":"Response Get Search Suggestions Api V1 Properties Suggestions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor starts typing an address or city to find a property","Agent needs to resolve a partial address into a known property","Autocomplete suggestions are needed for a property search field"],"when_not_to_use":["Full property search with filters is needed — use search_properties instead"],"description_override":"Get autocomplete suggestions as the investor types a property address, city, or ZIP code.","category":"property"}}},"/api/v1/properties/tax-estimate":{"get":{"tags":["Properties"],"summary":"Get property tax estimate for a ZIP code","description":"Returns a property tax rate estimate. Resolution order:\n    1. Exact property match by address → actual annual tax and effective rate.\n    2. ZIP-code average from properties in our database.\n    3. Default 2% rate.","operationId":"get_tax_estimate_api_v1_properties_tax_estimate_get","parameters":[{"name":"zip_code","in":"query","required":true,"schema":{"type":"string","minLength":5,"maxLength":10,"description":"ZIP code","title":"Zip Code"},"description":"ZIP code"},{"name":"address_line1","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Street address for exact match","title":"Address Line1"},"description":"Street address for exact match"},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"City for exact match","title":"City"},"description":"City for exact match"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"State for exact match","title":"State"},"description":"State for exact match"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Tax Estimate Api V1 Properties Tax Estimate Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/assessed-value-estimate":{"get":{"tags":["Properties"],"summary":"Get assessed value estimate from county assessor comps","description":"Returns an assessed value estimate using county assessor data (via RentCast).\n    Resolution order:\n    1. Exact property match by address.\n    2. Comp-based: same ZIP + bedrooms + property type + sqft ±10%.\n    3. ZIP + bedrooms median.","operationId":"get_assessed_value_estimate_api_v1_properties_assessed_value_estimate_get","parameters":[{"name":"zip_code","in":"query","required":true,"schema":{"type":"string","minLength":5,"maxLength":10,"description":"ZIP code","title":"Zip Code"},"description":"ZIP code"},{"name":"bedrooms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":10,"minimum":0},{"type":"null"}],"description":"Number of bedrooms","title":"Bedrooms"},"description":"Number of bedrooms"},{"name":"property_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Property type ID (1=SFH, 2=MF)","title":"Property Type Id"},"description":"Property type ID (1=SFH, 2=MF)"},{"name":"living_area","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Living area in sqft","title":"Living Area"},"description":"Living area in sqft"},{"name":"address_line1","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Street address for exact match","title":"Address Line1"},"description":"Street address for exact match"},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"City for exact match","title":"City"},"description":"City for exact match"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"State for exact match","title":"State"},"description":"State for exact match"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Assessed Value Estimate Api V1 Properties Assessed Value Estimate Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/geography/fips":{"get":{"tags":["Properties"],"summary":"Lookup geography and FIPS codes","description":"Lookup state/county FIPS codes and geography hierarchy based on inputs.\n    Resolves ZIP to County/City, then maps to Census FIPS.","operationId":"lookup_geography_api_v1_properties_geography_fips_get","parameters":[{"name":"zip_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"5-digit ZIP code","title":"Zip Code"},"description":"5-digit ZIP code"},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"City name","title":"City"},"description":"City name"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"2-letter state code","title":"State"},"description":"2-letter state code"},{"name":"county","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"County name","title":"County"},"description":"County name"},{"name":"geoid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Census GEOID (e.g. 48029)","title":"Geoid"},"description":"Census GEOID (e.g. 48029)"},{"name":"geo_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Entity type (state, county, place, school_district, msa)","title":"Geo Type"},"description":"Entity type (state, county, place, school_district, msa)"},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Full or partial address for exact matching","title":"Address"},"description":"Full or partial address for exact matching"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeographyLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Agent needs to resolve a ZIP code or address to state/county FIPS codes","Internal services need to bypass external geocoders for geographic data"],"category":"property"}}},"/api/v1/properties/search/radius":{"get":{"tags":["Properties"],"summary":"Search properties within radius","description":"Find properties within a specified radius using PostGIS spatial search.\n\n    **Example:**\n    - `/properties/search/radius?latitude=40.7128&longitude=-74.0060&radius_miles=5&limit=50`\n\n    Returns properties sorted by distance from the center point.","operationId":"search_properties_by_radius_api_v1_properties_search_radius_get","parameters":[{"name":"latitude","in":"query","required":true,"schema":{"type":"number","maximum":90,"minimum":-90,"description":"Center point latitude (e.g., 40.7128)","title":"Latitude"},"description":"Center point latitude (e.g., 40.7128)"},{"name":"longitude","in":"query","required":true,"schema":{"type":"number","maximum":180,"minimum":-180,"description":"Center point longitude (e.g., -74.0060)","title":"Longitude"},"description":"Center point longitude (e.g., -74.0060)"},{"name":"radius_miles","in":"query","required":true,"schema":{"type":"number","maximum":100,"exclusiveMinimum":0,"description":"Search radius in miles (max 100)","title":"Radius Miles"},"description":"Search radius in miles (max 100)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of results","default":100,"title":"Limit"},"description":"Maximum number of results"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor wants to find properties near a specific location or address","Investor asks 'what properties are within X miles of my property'","Agent needs to find nearby comps for a given lat/lng"],"when_not_to_use":["Investor wants to search by city or ZIP code — use search_properties instead","Investor wants to draw a custom area on a map — use search by polygon"],"description_override":"Find properties within a radius (in miles) from a latitude/longitude point. Results are sorted by distance.","category":"property"}}},"/api/v1/properties/search/polygon":{"post":{"tags":["Properties"],"summary":"Search properties within polygon","description":"Find properties within a custom polygon boundary using PostGIS spatial search.\n\n    **Example GeoJSON Polygon:**\n    ```json\n    {\n      \"geojson\": {\n        \"type\": \"Polygon\",\n        \"coordinates\": [\n          [\n            [-74.0060, 40.7128],\n            [-74.0060, 40.7500],\n            [-73.9500, 40.7500],\n            [-73.9500, 40.7128],\n            [-74.0060, 40.7128]\n          ]\n        ]\n      },\n      \"limit\": 100\n    }\n    ```\n\n    Coordinates must be in [longitude, latitude] format (GeoJSON standard).\n    The first and last coordinates must be identical (closed polygon).","operationId":"search_properties_by_polygon_api_v1_properties_search_polygon_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpatialSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor draws a custom boundary on a map to search for properties","Agent needs to find properties inside a specific neighborhood or zone polygon"],"when_not_to_use":["A simple radius search around a point is sufficient — use search by radius"],"description_override":"Find properties inside a custom GeoJSON polygon boundary. Use this for neighborhood or zone-based searches.","category":"property"}}},"/api/v1/properties":{"get":{"tags":["Properties"],"summary":"Search properties","description":"Search properties with optional filters.\n\n    **Field Selection:**\n    Use the `fields` parameter to request only specific fields for each property:\n    - `?fields=id,full_address,external_id,bedrooms` - Returns only selected fields per property\n\n    Available fields: id, property_type_id, external_id, address_line1, city, state, zip_code,\n    full_address, bedrooms, bathrooms, living_area, year_built, and more.\n\n    **For-sale count:** `total_count` counts every match, whatever its status (and `max_price`\n    keeps unpriced listings). `?include_for_sale_count=true` adds `for_sale_count`, the matches\n    whose listing is an active sale listing with an asking price: the number a listing site\n    shows as \"for sale\". First page of a narrowed search only (see the parameter); else null.\n\n    Note: Listings and valuations are now separate resources. Use /listings and /valuations endpoints.","operationId":"search_properties_api_v1_properties_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of results","default":100,"title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of results to skip","default":0,"title":"Offset"},"description":"Number of results to skip"},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of fields to include for each property (e.g., 'id,full_address,bedrooms')","title":"Fields"},"description":"Comma-separated list of fields to include for each property (e.g., 'id,full_address,bedrooms')"},{"name":"include_for_sale_count","in":"query","required":false,"schema":{"type":"boolean","description":"Also return for_sale_count: how many matched properties are for sale (the listing the search matched is an active sale listing with an asking price; see the field). Counted on the first page (offset=0) only, for a search narrowed by data_provider, city, zip_code, msa, q, include_property_ids whose exact total_count is at most 10,000; otherwise for_sale_count is null. Safe to send on every search.","default":false,"title":"Include For Sale Count"},"description":"Also return for_sale_count: how many matched properties are for sale (the listing the search matched is an active sale listing with an asking price; see the field). Counted on the first page (offset=0) only, for a search narrowed by data_provider, city, zip_code, msa, q, include_property_ids whose exact total_count is at most 10,000; otherwise for_sale_count is null. Safe to send on every search."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text search query (searches address, city, zip code)","title":"Q"},"description":"Text search query (searches address, city, zip code)"},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by city","title":"City"},"description":"Filter by city"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by state","title":"State"},"description":"Filter by state"},{"name":"zip_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by ZIP code","title":"Zip Code"},"description":"Filter by ZIP code"},{"name":"property_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by property type ID","title":"Property Type Id"},"description":"Filter by property type ID"},{"name":"listing_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by listing type (e.g., 'sale', 'lease')","title":"Listing Type"},"description":"Filter by listing type (e.g., 'sale', 'lease')"},{"name":"min_bedrooms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"description":"Minimum bedrooms","title":"Min Bedrooms"},"description":"Minimum bedrooms"},{"name":"max_bedrooms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"description":"Maximum bedrooms","title":"Max Bedrooms"},"description":"Maximum bedrooms"},{"name":"min_bathrooms","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":99,"minimum":0},{"type":"null"}],"description":"Minimum bathrooms (recorded to one decimal, e.g. 2.5)","title":"Min Bathrooms"},"description":"Minimum bathrooms (recorded to one decimal, e.g. 2.5)"},{"name":"max_bathrooms","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":99,"minimum":0},{"type":"null"}],"description":"Maximum bathrooms (recorded to one decimal, e.g. 2.5)","title":"Max Bathrooms"},"description":"Maximum bathrooms (recorded to one decimal, e.g. 2.5)"},{"name":"min_living_area","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000000,"minimum":0},{"type":"null"}],"description":"Minimum square feet","title":"Min Living Area"},"description":"Minimum square feet"},{"name":"max_living_area","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000000,"minimum":0},{"type":"null"}],"description":"Maximum square feet","title":"Max Living Area"},"description":"Maximum square feet"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Minimum listing price","title":"Min Price"},"description":"Minimum listing price"},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum listing price","title":"Max Price"},"description":"Maximum listing price"},{"name":"min_year_built","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":9999,"minimum":0},{"type":"null"}],"description":"Minimum year built","title":"Min Year Built"},"description":"Minimum year built"},{"name":"max_year_built","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":9999,"minimum":0},{"type":"null"}],"description":"Maximum year built","title":"Max Year Built"},"description":"Maximum year built"},{"name":"min_lot_size_sqft","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2000000000,"minimum":0},{"type":"null"}],"description":"Minimum lot size in square feet","title":"Min Lot Size Sqft"},"description":"Minimum lot size in square feet"},{"name":"max_lot_size_sqft","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2000000000,"minimum":0},{"type":"null"}],"description":"Maximum lot size in square feet","title":"Max Lot Size Sqft"},"description":"Maximum lot size in square feet"},{"name":"min_stories","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":99,"minimum":0},{"type":"null"}],"description":"Minimum stories (recorded to one decimal; 1.5 = one-and-a-half story)","title":"Min Stories"},"description":"Minimum stories (recorded to one decimal; 1.5 = one-and-a-half story)"},{"name":"max_stories","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":99,"minimum":0},{"type":"null"}],"description":"Maximum stories (recorded to one decimal; 1.5 = one-and-a-half story)","title":"Max Stories"},"description":"Maximum stories (recorded to one decimal; 1.5 = one-and-a-half story)"},{"name":"exclude_property_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"description":"Exclude properties with these IDs (e.g., already in portfolio)","title":"Exclude Property Ids"},"description":"Exclude properties with these IDs (e.g., already in portfolio)"},{"name":"include_property_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"description":"Return only properties whose ID is in this list (mirror of `exclude_property_ids`; e.g. enrich a known set of favourited properties with rent analytics). Capped at 1000 ids per request. When combined with `exclude_property_ids` the two are AND'd: `id IN include AND id NOT IN exclude`.","title":"Include Property Ids"},"description":"Return only properties whose ID is in this list (mirror of `exclude_property_ids`; e.g. enrich a known set of favourited properties with rent analytics). Capped at 1000 ids per request. When combined with `exclude_property_ids` the two are AND'd: `id IN include AND id NOT IN exclude`."},{"name":"property_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by property status (e.g., 'Active', 'Off Market')","title":"Property Status"},"description":"Filter by property status (e.g., 'Active', 'Off Market')"},{"name":"data_provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by data provider (crawl origin, e.g., 'VRM Properties', 'Lennar')","title":"Data Provider"},"description":"Filter by data provider (crawl origin, e.g., 'VRM Properties', 'Lennar')"},{"name":"msa","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by MSA (CBSA FIPS code, e.g. '12420'). Matches via zip_cbsa_crosswalk.","title":"Msa"},"description":"Filter by MSA (CBSA FIPS code, e.g. '12420'). Matches via zip_cbsa_crosswalk."},{"name":"min_cap_rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum cap rate % (NOI / listing_price × 100). Requires listing price + MV rent data.","title":"Min Cap Rate"},"description":"Minimum cap rate % (NOI / listing_price × 100). Requires listing price + MV rent data."},{"name":"cash_flow_positive","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, return only properties with estimated positive monthly cash flow.","title":"Cash Flow Positive"},"description":"If true, return only properties with estimated positive monthly cash flow."},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor wants to search for properties by city, state, ZIP, price range, or features","Investor asks 'show me 3-bedroom homes in Denver under $500K'","Agent needs a filtered list of properties matching specific criteria","Investor wants to exclude properties already in their portfolio"],"when_not_to_use":["Investor needs a spatial search by map — use radius or polygon search","Investor wants autocomplete suggestions — use /suggestions"],"description_override":"Search properties with filters including location, price range, bedrooms, bathrooms, square footage, lot size, year built, stories, and property status. Supports field selection to limit response size.","category":"property"}},"post":{"tags":["Properties"],"summary":"Create property","description":"Create a new property. Admin only — shared catalog write.\n\n    **Required fields:**\n    - property_type_id: Property type ID\n    - external_id: External identifier (e.g., RentCast ID)\n    - address_line1: Street address\n    - city: City name\n    - state: State (2-letter code)\n    - zip_code: ZIP code\n\n    All other fields are optional. Returns the created property with all fields.","operationId":"create_property_api_v1_properties_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/cities":{"get":{"tags":["Properties"],"summary":"List available cities","description":"Returns distinct city/state pairs from properties in the system.","operationId":"list_cities_api_v1_properties_cities_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}},"title":"Response List Cities Api V1 Properties Cities Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/msas":{"get":{"tags":["Properties"],"summary":"List available MSAs (Metropolitan Statistical Areas)","description":"Returns MSAs from census_fips_geography (geo_type='msa').\n    Each row: {cbsa_fips, name, state_code}. Name is Census-defined\n    (e.g. 'Austin-Round Rock-San Marcos').","operationId":"list_msas_api_v1_properties_msas_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by 2-letter state code","title":"State"},"description":"Filter by 2-letter state code"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]}},"title":"Response List Msas Api V1 Properties Msas Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/data-providers":{"get":{"tags":["Properties"],"summary":"List available data providers","description":"Returns distinct data_provider values from property listings (hydrated sources only).","operationId":"list_data_providers_api_v1_properties_data_providers_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response List Data Providers Api V1 Properties Data Providers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/{property_id}":{"get":{"tags":["Properties"],"summary":"Get property details","description":"Get detailed information about a specific property.\n\n    **Field Selection:**\n    Use the `fields` parameter to request only specific fields:\n    - `?fields=id,full_address,external_id,bedrooms,bathrooms` - Returns only selected fields\n\n    Available fields: id, property_type_id, external_id, address_line1, city, state, zip_code,\n    full_address, bedrooms, bathrooms, living_area, year_built, and more.\n\n    **Include Features:**\n    Use `include_features=true` to include property features (from property_features table).\n\n    NOTE: Listings and valuations are now separate resources. Use /listings and /valuations endpoints.\n    NOTE: Financials are portfolio-specific. Use portfolio endpoints to get property financials.","operationId":"get_property_api_v1_properties__property_id__get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"include_features","in":"query","required":false,"schema":{"type":"boolean","description":"Include property features","default":false,"title":"Include Features"},"description":"Include property features"},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of fields to include (e.g., 'id,full_address,bedrooms')","title":"Fields"},"description":"Comma-separated list of fields to include (e.g., 'id,full_address,bedrooms')"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks about a specific property by ID","Agent needs full property details (address, bedrooms, sqft, etc.) for analysis","Investor wants to see the features of a property they are evaluating"],"when_not_to_use":["Investor wants listing price or listing status — use the listings endpoint","Investor wants valuation data — use the valuations endpoint"],"description_override":"Get full details for a single property including address, bedrooms, bathrooms, square footage, year built, and optional features. Use listings and valuations endpoints for pricing data.","category":"property"}},"patch":{"tags":["Properties"],"summary":"Update property","description":"Update a property. All fields are optional for partial updates.","operationId":"update_property_api_v1_properties__property_id__patch","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Properties"],"summary":"Replace property","description":"Replace a property (full update). All required fields must be provided.","operationId":"replace_property_api_v1_properties__property_id__put","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyPut"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/{property_id}/similar":{"get":{"tags":["Properties"],"summary":"Get similar properties","description":"Get a list of properties similar to the specified property.\n    Uses vector similarity search (pgvector) if available, falling back to location and attribute matching.","operationId":"get_similar_properties_api_v1_properties__property_id__similar_get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Number of similar properties to return","default":3,"title":"Limit"},"description":"Number of similar properties to return"},{"name":"listing_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["sale","rent"],"type":"string"},{"type":"null"}],"description":"Filter by listing type: 'sale' or 'rent'","title":"Listing Type"},"description":"Filter by listing type: 'sale' or 'rent'"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PropertyResponse"},"title":"Response Get Similar Properties Api V1 Properties  Property Id  Similar Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'find me properties like this one'","Agent needs comparable properties for a comp analysis","Investor wants alternatives similar to a property they are reviewing"],"when_not_to_use":["Investor wants semantic/natural-language similarity — use semantic search"],"description_override":"Find properties similar to a given property using vector similarity or attribute matching. Useful for comps analysis and discovering alternatives.","category":"property"}}},"/api/v1/properties/{property_id}/rent-estimate":{"get":{"tags":["Properties"],"summary":"Get rent estimate","description":"Get the rent estimate for this property — the platform's single source of rent.\n\n    Proxies market-service `/rent-assessment`, which blends rental comps, the stored\n    Rentometer estimate, ZIP rental market stats, and HUD Fair Market Rent, weighting\n    the sources by Rentometer freshness. Cached in Redis for 3 days.\n\n    `rent_mean` is **null** when no source produced an estimate. Null means unknown,\n    not $0 — never render or underwrite it as zero.","operationId":"get_rent_estimate_api_v1_properties__property_id__rent_estimate_get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentEstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'how much rent can I get for this property'","Agent needs a rent estimate to run deal calculations or cash flow analysis","Investor wants to compare market rent against their current rental income"],"when_not_to_use":["Investor wants rental market trends for a ZIP/metro — use market-service rental analytics","You are tempted to quote an area median or a percentage of the listing price instead — never do that; this endpoint is the only rent for a property"],"description_override":"Get the estimated monthly rent for a property. Blends rental comps, Rentometer, ZIP rental market stats, and HUD Fair Market Rent.","category":"property"}},"post":{"tags":["Properties"],"summary":"Fetch and save rent estimate","description":"Fetch rent estimate from Rentometer QuickView for this property and append to history.\n    Requires RENTOMETER_API_KEY. Uses property address or lat/lng.\n    Returns the newly stored estimate. Each call adds a new row (history preserved).\n    Admin only: every call is a paid Rentometer pull.","operationId":"fetch_and_save_rent_estimate_api_v1_properties__property_id__rent_estimate_post","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"bedrooms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Bedrooms filter (default: property bedrooms or 2)","title":"Bedrooms"},"description":"Bedrooms filter (default: property bedrooms or 2)"},{"name":"baths","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Baths filter: 1, 1.5+","title":"Baths"},"description":"Baths filter: 1, 1.5+"},{"name":"building_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Building type: apartment, house","title":"Building Type"},"description":"Building type: apartment, house"},{"name":"look_back_days","in":"query","required":false,"schema":{"type":"integer","maximum":1460,"minimum":90,"description":"Look-back days (90-1460)","default":365,"title":"Look Back Days"},"description":"Look-back days (90-1460)"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentEstimateResponse"}}}},"503":{"description":"market-service did not answer; a retry may succeed"},"500":{"description":"market-service rejected the request or the row's shape"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rent-estimate":{"post":{"tags":["Properties"],"summary":"Get rent estimate for an address","description":"Estimate monthly rent for a full address of a property in our database.\n\n    The address is resolved to a property record, which is then assessed — so a\n    match returns exactly the same answer as\n    `GET /properties/{property_id}/rent-estimate`, down to the cached value.\n\n    `rent_mean` is **null** when no source produced an estimate, *including* when\n    the address is not a property we hold. Null means unknown, not $0 — never\n    render or underwrite it as zero.\n\n    A market-data outage returns **503**, not a null estimate, so a null answer\n    always means \"we asked every source and none had a rent\" — never \"the\n    upstream was down\".","operationId":"get_rent_estimate_by_address_api_v1_rent_estimate_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentEstimateByAddressRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentEstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks what a property would rent for and you have its address but not its ID","Agent needs a rent figure and only the address is available"],"when_not_to_use":["You already have the property ID — use GET /properties/{property_id}/rent-estimate","The address is not a property in our database — rent assessment does not support that; report the rent as unknown","Investor wants rental market trends for a ZIP/metro — use market-service rental analytics"],"description_override":"Estimate monthly rent for a property in our database, addressed by street address rather than ID. Blends comparable rentals, HUD Fair Market Rent, ZIP median rents, and Rentometer. Returns a null estimate for an address we do not hold.","category":"property"}}},"/api/v1/property-enricher":{"post":{"tags":["Property Enricher"],"summary":"Trigger Property Enricher","operationId":"trigger_property_enricher_api_v1_property_enricher_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyEnricherRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyEnricherResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/property-enricher/status":{"get":{"tags":["Property Enricher"],"summary":"Get Enrichment Status","operationId":"get_enrichment_status_api_v1_property_enricher_status_get","parameters":[{"name":"environment","in":"query","required":false,"schema":{"type":"string","default":"local","title":"Environment"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/listings":{"get":{"tags":["Listings"],"summary":"Search listings","description":"Search listings with optional filters. Supports field selection via `fields` parameter.","operationId":"search_listings_api_v1_listings_get","parameters":[{"name":"property_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Property ID (FK to properties.id)","title":"Property Id"},"description":"Property ID (FK to properties.id)"},{"name":"listing_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Listing type ID","title":"Listing Type Id"},"description":"Listing type ID"},{"name":"listing_status_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Listing status ID","title":"Listing Status Id"},"description":"Listing status ID"},{"name":"is_sale_listing","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True = sale, False = rental","title":"Is Sale Listing"},"description":"True = sale, False = rental"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum price","title":"Min Price"},"description":"Minimum price"},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum price","title":"Max Price"},"description":"Maximum price"},{"name":"exclude_listing_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"description":"List of listing IDs to exclude","title":"Exclude Listing Ids"},"description":"List of listing IDs to exclude"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of results","default":100,"title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for pagination","title":"Cursor"},"description":"Cursor for pagination"},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of fields to include (e.g., 'id,property_id,price')","title":"Fields"},"description":"Comma-separated list of fields to include (e.g., 'id,property_id,price')"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor wants to browse active listings for sale or rent","Agent needs to find listings by price range or listing type","Investor asks 'what is currently listed for sale in my target area'"],"when_not_to_use":["Investor wants property physical details — use property search","Investor wants listing history for a specific property — use listing history endpoint"],"description_override":"Search listings with filters for property, listing type, sale vs rental, price range, and pagination. Returns listing price, status, and associated property info.","category":"listings"}},"post":{"tags":["Listings"],"summary":"Create listing","description":"Create a new listing. Admin only — shared catalog write.","operationId":"create_listing_api_v1_listings_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/listings/{listing_id}":{"get":{"tags":["Listings"],"summary":"Get listing by ID","description":"Get a listing by internal ID.","operationId":"get_listing_by_id_api_v1_listings__listing_id__get","parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"integer","title":"Listing Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Agent needs to look up a specific listing by its ID","Investor asks about the price, status, or details of a known listing"],"description_override":"Get a single listing by its internal ID, including price, status, listing type, and associated property.","category":"listings"}},"patch":{"tags":["Listings"],"summary":"Update listing by ID","description":"Update a listing by internal ID. Admin only — shared catalog write.","operationId":"update_listing_by_id_api_v1_listings__listing_id__patch","parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"integer","title":"Listing Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Listings"],"summary":"Delete listing by ID","description":"Delete a listing by internal ID. Admin only — shared catalog write.","operationId":"delete_listing_by_id_api_v1_listings__listing_id__delete","parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"integer","title":"Listing Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/listings/by-property/{property_id}":{"get":{"tags":["Listings"],"summary":"Get listing by property_id","description":"Get the most recent active listing for a property.","operationId":"get_listing_by_property_id_api_v1_listings_by_property__property_id__get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"is_sale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by sale (True) or rental (False)","title":"Is Sale"},"description":"Filter by sale (True) or rental (False)"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Agent needs the current asking price or listing status for a property","Investor asks 'is this property currently listed' or 'what is the asking price'","Agent needs listing data to feed into deal calculations"],"description_override":"Get the most recent active listing for a property by property ID. Returns the current asking price, listing status, and listing type.","category":"listings"}}},"/api/v1/listings/by-property/{property_id}/media":{"get":{"tags":["Listings"],"summary":"Get listing media (photos) for a property","description":"Get photo URLs from the most recent listing for a property.","operationId":"get_listing_media_by_property_id_api_v1_listings_by_property__property_id__media_get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max photos to return","default":50,"title":"Limit"},"description":"Max photos to return"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingMediaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/listings/property/{property_id}/history":{"get":{"tags":["Listings"],"summary":"Get listing history for property","description":"Get all listings (historical and active) for a property.","operationId":"get_listings_for_property_api_v1_listings_property__property_id__history_get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of results","default":50,"title":"Limit"},"description":"Maximum number of results"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'how many times has this property been listed' or 'what is the listing history'","Agent needs to analyze price changes or days on market over time","Investor wants to see if a property has had price reductions"],"description_override":"Get full listing history (all active and historical listings) for a property. Useful for analyzing price trends, days on market, and listing frequency.","category":"listings"}}},"/api/v1/search":{"get":{"tags":["Search"],"summary":"Unified Search","description":"Enterprise-grade unified search across properties, listings, investors, and deals.","operationId":"unified_search_api_v1_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":200,"description":"Search query","title":"Q"},"description":"Search query"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search type filter: 'property', 'listing', 'investor', 'deal' (comma-separated for multiple)","title":"Type"},"description":"Search type filter: 'property', 'listing', 'investor', 'deal' (comma-separated for multiple)"},{"name":"price_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum price filter","title":"Price Min"},"description":"Minimum price filter"},{"name":"price_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum price filter","title":"Price Max"},"description":"Maximum price filter"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum price (repo key alias)","title":"Min Price"},"description":"Minimum price (repo key alias)"},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum price (repo key alias)","title":"Max Price"},"description":"Maximum price (repo key alias)"},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by city","title":"City"},"description":"Filter by city"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by state","title":"State"},"description":"Filter by state"},{"name":"bedrooms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":10,"minimum":1},{"type":"null"}],"description":"Minimum bedrooms","title":"Bedrooms"},"description":"Minimum bedrooms"},{"name":"min_bedrooms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":10,"minimum":1},{"type":"null"}],"description":"Minimum bedrooms (repo key)","title":"Min Bedrooms"},"description":"Minimum bedrooms (repo key)"},{"name":"property_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Property type ID filter","title":"Property Type Id"},"description":"Property type ID filter"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":10,"description":"Results per type","default":20,"title":"Limit"},"description":"Results per type"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks a broad question that could match properties, listings, deals, or investors","Agent needs to search across multiple entity types with a single query","Investor types a general search like 'Denver properties' or '3 bed homes under 500K'"],"when_not_to_use":["Investor needs property-specific filtered search — use property search","Investor wants natural language understanding — use semantic search"],"description_override":"Unified keyword search across properties, listings, investors, and deals. Supports filtering by type, price, location, bedrooms, and property_type_id. Results are ranked by relevance.","category":"search"}}},"/api/v1/search/autocomplete":{"get":{"tags":["Search"],"summary":"Search Autocomplete","description":"Get autocomplete suggestions for search queries.","operationId":"autocomplete_api_v1_search_autocomplete_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":100,"description":"Partial search query","title":"Q"},"description":"Partial search query"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Suggestion type: 'property', 'investor', 'deal', 'deal_type'","title":"Type"},"description":"Suggestion type: 'property', 'investor', 'deal', 'deal_type'"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":5,"description":"Max suggestions","default":10,"title":"Limit"},"description":"Max suggestions"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor is typing a search query and needs real-time suggestions","Agent wants to help the investor refine their search terms"],"when_not_to_use":["Investor needs property-specific autocomplete — use property suggestions endpoint"],"description_override":"Get autocomplete suggestions for search input across all entity types (properties, investors, deals). Returns ranked suggestions as the user types.","category":"search"}}},"/api/v1/search/trending":{"get":{"tags":["Search"],"summary":"Trending Searches","description":"Get trending/popular search terms.","operationId":"trending_searches_api_v1_search_trending_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":1,"description":"Number of trending terms","default":5,"title":"Limit"},"description":"Number of trending terms"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/search/semantic":{"get":{"tags":["Search"],"summary":"AI-Powered Semantic Search","description":"Enterprise-grade semantic search using pgvector embeddings and LLM intelligence.","operationId":"semantic_search_api_v1_search_semantic_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":200,"description":"Natural language search query","title":"Q"},"description":"Natural language search query"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search type filter: 'property', 'listing', 'investor', 'deal' (comma-separated)","title":"Type"},"description":"Search type filter: 'property', 'listing', 'investor', 'deal' (comma-separated)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":10,"description":"Results per type","default":20,"title":"Limit"},"description":"Results per type"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"semantic_weight","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"description":"Semantic vs keyword weight (0=pure keyword, 1=pure semantic)","default":0.6,"title":"Semantic Weight"},"description":"Semantic vs keyword weight (0=pure keyword, 1=pure semantic)"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks a natural language question like 'find me passive income properties in Texas with good cash flow'","Agent needs to interpret investor intent and find semantically relevant results","Investor uses conversational language rather than structured filters"],"when_not_to_use":["Investor has specific structured filters (city, price range, bedrooms) — use unified search or property search"],"description_override":"AI-powered semantic search that understands natural language intent. Combines vector embeddings with keyword relevance to find properties, deals, and investors matching conversational queries.","category":"search"}}},"/api/v1/search/similar/{property_id}":{"get":{"tags":["Search"],"summary":"Find Similar Properties","description":"Find properties similar to a given property using semantic embeddings.","operationId":"find_similar_properties_api_v1_search_similar__property_id__get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","description":"Property ID","title":"Property Id"},"description":"Property ID"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":5,"description":"Max similar properties","default":10,"title":"Limit"},"description":"Max similar properties"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'find properties like this one' using semantic/AI matching","Agent needs comparable properties for comps analysis using embeddings","Investor wants to discover investment opportunities similar to a property they like"],"when_not_to_use":["Simple attribute-based similarity is enough — use property similar endpoint"],"description_override":"Find semantically similar properties using AI embeddings (pgvector). Matches on location, features, investment metrics, and market dynamics. Ideal for comps analysis and opportunity discovery.","category":"search"}}},"/api/v1/migration/growth-index":{"get":{"tags":["Migration (Internal)"],"summary":"U-Haul Growth Index for a state (internal)","description":"Returns the U-Haul growth rank, inbound/outbound percentages, top growth cities/metros for a given state and year.","operationId":"get_growth_index_api_v1_migration_growth_index_get","parameters":[{"name":"state","in":"query","required":true,"schema":{"type":"string","description":"Two-letter state abbreviation (e.g. TX, FL)","title":"State"},"description":"Two-letter state abbreviation (e.g. TX, FL)"},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Year (default: latest available)","title":"Year"},"description":"Year (default: latest available)"},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Growth Index Api V1 Migration Growth Index Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/migration/top-growth-states":{"get":{"tags":["Migration (Internal)"],"summary":"Top growth states by year (internal)","description":"Returns ranked list of top inbound/outbound states for a given year.","operationId":"get_top_growth_states_api_v1_migration_top_growth_states_get","parameters":[{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Year (default: latest available)","title":"Year"},"description":"Year (default: latest available)"},{"name":"country","in":"query","required":false,"schema":{"type":"string","description":"Country code: US or CA","default":"US","title":"Country"},"description":"Country code: US or CA"},{"name":"direction","in":"query","required":false,"schema":{"type":"string","description":"'inbound' (top growth) or 'outbound' (top decline)","default":"inbound","title":"Direction"},"description":"'inbound' (top growth) or 'outbound' (top decline)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Number of states to return","default":10,"title":"Limit"},"description":"Number of states to return"},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Top Growth States Api V1 Migration Top Growth States Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/migration/state-trend":{"get":{"tags":["Migration (Internal)"],"summary":"Multi-year migration trend for a state (internal)","description":"Returns migration rank and flow data across multiple years for trend analysis.","operationId":"get_state_trend_api_v1_migration_state_trend_get","parameters":[{"name":"state","in":"query","required":true,"schema":{"type":"string","description":"Two-letter state abbreviation","title":"State"},"description":"Two-letter state abbreviation"},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get State Trend Api V1 Migration State Trend Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/valuations":{"get":{"tags":["Valuations"],"summary":"Search valuations","description":"Search valuations with optional filters.","operationId":"search_valuations_api_v1_valuations_get","parameters":[{"name":"property_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Property ID","title":"Property Id"},"description":"Property ID"},{"name":"valuation_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Valuation type: 'sale' or 'rent'","title":"Valuation Type"},"description":"Valuation type: 'sale' or 'rent'"},{"name":"min_estimate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum estimate amount","title":"Min Estimate"},"description":"Minimum estimate amount"},{"name":"max_estimate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum estimate amount","title":"Max Estimate"},"description":"Maximum estimate amount"},{"name":"min_confidence","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum confidence score (0-1)","title":"Min Confidence"},"description":"Minimum confidence score (0-1)"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"End date (YYYY-MM-DD)","title":"End Date"},"description":"End date (YYYY-MM-DD)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of results","default":100,"title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of fields to include","title":"Fields"},"description":"Comma-separated list of fields to include"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValuationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor wants to search valuations across properties","Agent needs to find valuations by type (sale or rent), confidence, or date range","Investor asks 'show me recent property valuations'"],"when_not_to_use":["Investor wants the latest valuation for one property — use latest valuation endpoint"],"description_override":"Search valuations with filters for property, valuation type (sale/rent), estimate range, confidence score, and date range.","category":"valuation"}},"post":{"tags":["Valuations"],"summary":"Create valuation","description":"Create a new valuation.","operationId":"create_valuation_api_v1_valuations_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValuationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValuationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/valuations/{valuation_id}":{"get":{"tags":["Valuations"],"summary":"Get valuation by ID","description":"Get a valuation by internal ID.","operationId":"get_valuation_by_id_api_v1_valuations__valuation_id__get","parameters":[{"name":"valuation_id","in":"path","required":true,"schema":{"type":"integer","title":"Valuation Id"}},{"name":"valuation_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Valuation date for partition pruning (optional)","title":"Valuation Date"},"description":"Valuation date for partition pruning (optional)"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValuationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Agent needs to look up a specific valuation by its ID","Investor asks about a particular valuation record"],"description_override":"Get a single valuation record by its internal ID. Returns the estimate, confidence score, source, and valuation date.","category":"valuation"}},"patch":{"tags":["Valuations"],"summary":"Update valuation","description":"Update a user-entered valuation by internal ID.","operationId":"update_valuation_by_id_api_v1_valuations__valuation_id__patch","parameters":[{"name":"valuation_id","in":"path","required":true,"schema":{"type":"integer","title":"Valuation Id"}},{"name":"valuation_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Valuation date (required for partition key)","title":"Valuation Date"},"description":"Valuation date (required for partition key)"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValuationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValuationResponse"}}}},"403":{"description":"Machine (AVM) valuations are read-only."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Valuations"],"summary":"Delete valuation","description":"Delete a user-entered valuation by internal ID.","operationId":"delete_valuation_by_id_api_v1_valuations__valuation_id__delete","parameters":[{"name":"valuation_id","in":"path","required":true,"schema":{"type":"integer","title":"Valuation Id"}},{"name":"valuation_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Valuation date (required for partition key)","title":"Valuation Date"},"description":"Valuation date (required for partition key)"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"403":{"description":"Machine (AVM) valuations are read-only."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/valuations/property/{property_id}":{"get":{"tags":["Valuations"],"summary":"Get valuations for property","description":"Get all valuations for a property (time series).","operationId":"get_valuations_for_property_api_v1_valuations_property__property_id__get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"valuation_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by 'sale' or 'rent'","title":"Valuation Type"},"description":"Filter by 'sale' or 'rent'"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of results","default":100,"title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValuationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'how has this property's value changed over time'","Agent needs a valuation time series for appreciation analysis","Investor wants to see all historical valuations for a property"],"when_not_to_use":["Investor only needs the current valuation — use latest valuation endpoint"],"description_override":"Get the full valuation history (time series) for a property. Supports filtering by valuation type (sale/rent). Useful for appreciation analysis and trend tracking.","category":"valuation"}}},"/api/v1/valuations/property/{property_id}/latest":{"get":{"tags":["Valuations"],"summary":"Get latest valuation for property","description":"Get the most recent valuation for a property.","operationId":"get_latest_valuation_for_property_api_v1_valuations_property__property_id__latest_get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"valuation_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by 'sale' or 'rent'","title":"Valuation Type"},"description":"Filter by 'sale' or 'rent'"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValuationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Investor asks 'what is this property worth now'","Agent needs the current estimated market value for deal analysis","Investor wants to compare asking price to estimated value"],"description_override":"Get the most recent valuation for a property. Returns the latest sale or rent estimate with confidence score and source.","category":"valuation"}}},"/api/v1/scoring/bands/{kind}":{"get":{"tags":["Scoring"],"summary":"Get the band table for a score kind","description":"Returns every band for a score kind ('deal', 'vibe', 'market', 'consensus', 'signal'), best first, with its score range. Renderers draw gauge segments and ticks from this instead of hard-coding cut points. An unknown kind returns 404. Cacheable: `Cache-Control: public, max-age=3600`.","operationId":"get_band_table_api_v1_scoring_bands__kind__get","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BandTableResponse"}}}},"404":{"description":"Unknown score kind"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scrape/property-details":{"post":{"tags":["Scraping"],"summary":"Scrape property details from URL","description":"Scrape property details from a given URL using Crawl4AI.\n\n    This endpoint crawls the provided URL and returns the scraped content including:\n    - Markdown representation of the page\n    - HTML content\n    - Metadata (title, description, etc.)\n    - Raw crawled data\n\n    **Example URLs:**\n    - VRM Properties: `https://vrmproperties.com/Property-For-Sale/23909/9914-copper-rise-converse-tx-78109`\n    - Zillow: `https://www.zillow.com/homedetails/...`\n\n    **Optional Configuration:**\n    - `browser_config`: Configure browser behavior (headless, stealth mode, etc.)\n    - `crawler_config`: Configure crawler behavior (timeouts, user simulation, etc.)","operationId":"scrape_property_details_api_v1_scrape_property_details_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapePropertyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapePropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Scraping"],"summary":"Scrape property details from URL (GET)","description":"Scrape property details from a given URL using Crawl4AI (GET version).\n\n    This is a convenience GET endpoint that accepts the URL as a query parameter.\n    For more control (browser_config, crawler_config), use the POST endpoint.","operationId":"scrape_property_details_get_api_v1_scrape_property_details_get","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri","minLength":1,"maxLength":2083,"description":"URL of the property page to scrape","title":"Url"},"description":"URL of the property page to scrape"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapePropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scrape/property-extract":{"post":{"tags":["Scraping"],"summary":"Extract structured property data from URL","description":"Extract structured JSON data from a property URL using Crawl4AI LLM extraction.\n\n    This endpoint uses LLM to extract structured property information including:\n    - Property address (street, city, state, zip)\n    - Price/listing price\n    - Property details (bedrooms, bathrooms, square feet, lot size)\n    - Property type and status\n    - MLS number (if available)\n    - Description\n    - And other relevant property information\n\n    **Example URLs:**\n    - VRM Properties: `https://vrmproperties.com/Property-For-Sale/23909/9914-copper-rise-converse-tx-78109`\n    - Zillow: `https://www.zillow.com/homedetails/...`\n\n    **Custom Extraction:**\n    You can provide a custom `extraction_instruction` to extract specific fields or format the data differently.\n    If not provided, uses a default property extraction schema.","operationId":"extract_property_data_api_v1_scrape_property_extract_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyExtractionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Scraping"],"summary":"Extract structured property data from URL (GET)","description":"Extract structured JSON data from a property URL using Crawl4AI LLM extraction (GET version).\n\n    This is a convenience GET endpoint that accepts the URL as a query parameter.\n    For custom extraction instructions, use the POST endpoint.","operationId":"extract_property_data_get_api_v1_scrape_property_extract_get","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri","minLength":1,"maxLength":2083,"description":"URL of the property page to extract data from","title":"Url"},"description":"URL of the property page to extract data from"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scrape/paginated-scrape":{"post":{"tags":["Scraping"],"summary":"Scrape multiple pages with pagination","description":"Scrape multiple pages using URL-based pagination.\n\n    This endpoint supports two modes:\n    1. **Traditional mode** (use_url_paging=false): Uses /crawl endpoint with CSS extraction\n    2. **LLM mode** (use_url_paging=true): Uses /crawl-listings/url-paging endpoint with property schema\n\n    **LLM Mode (use_url_paging=true):**\n    - Uses Crawl4AI /crawl-listings/url-paging endpoint\n    - Extracts properties using the same schema as /property-extract\n    - Combines results from all pages into a single JSON response\n    - Requires `extraction_query` parameter (e.g., \"Extract all property listings\")\n\n    **Traditional Mode (use_url_paging=false):**\n    - Generates paginated URLs based on the pagination configuration\n    - Scrapes all pages in a single API call\n    - Optionally applies extraction strategy for structured data extraction\n    - Returns results for each page\n\n    **Pagination Types:**\n    - `url_based`: URL-based pagination (e.g., ?page=1, ?page=2, etc.)\n\n    **Extraction Strategy (Traditional mode only):**\n    You can provide an extraction strategy using CSS selectors to extract structured data\n    from each page. The extraction uses JsonCssExtractionStrategy.\n\n    **Example:**\n    ```json\n    {\n      \"initial_url\": \"https://example.com/search\",\n      \"pagination\": {\n        \"type\": \"url_based\",\n        \"url_based\": {\n          \"page_param\": \"page\",\n          \"start_page\": 1,\n          \"end_page\": 5\n        }\n      },\n      \"extraction_strategy\": {\n        \"type\": \"JsonCssExtractionStrategy\",\n        \"schema\": {\n          \"name\": \"Product Extractor\",\n          \"baseSelector\": \".product-item\",\n          \"fields\": [\n            {\"name\": \"title\", \"selector\": \"h3\", \"type\": \"text\"},\n            {\"name\": \"price\", \"selector\": \".price\", \"type\": \"text\"},\n            {\"name\": \"link\", \"selector\": \"a\", \"type\": \"attribute\", \"attribute\": \"href\"}\n          ]\n        }\n      }\n    }\n    ```","operationId":"paginated_scrape_api_v1_scrape_paginated_scrape_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedScrapeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedScrapeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scrape/upsert-property":{"post":{"tags":["Scraping"],"summary":"Upsert property + listing from scrape without creating a deal","description":"Persist property + listing data (description, agent, office, media, etc.) from a scrape/analyze run. Does NOT create a deal. Called by the /analyze flow so data is captured even if the user never clicks Create Deal.","operationId":"upsert_property_from_scrape_api_v1_scrape_upsert_property_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealImportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListingUpsertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investors/me":{"get":{"tags":["Investors"],"summary":"Get the current caller's investor profile","description":"Return the authenticated user's own investor profile.","operationId":"get_my_investor_api_v1_investors_me_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Agent needs the caller's investor profile, strategy, or financial details","Investor asks 'what is my investment profile' or 'show me my account info'"],"when_not_to_use":["Looking up a different investor — not supported on this surface"],"description_override":"Get the authenticated caller's investor profile, including investment strategy, experience level, target markets, tax bracket, and available capital.","category":"portfolio"}}},"/api/v1/investors/by-email":{"get":{"tags":["Investors"],"summary":"Get investor by email (caller-scoped)","description":"Look up an investor by email under the caller's RLS context. Only returns a row if it is the caller's own investor profile.","operationId":"get_investor_by_email_api_v1_investors_by_email_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","description":"Investor email address","format":"email","title":"Email"},"description":"Investor email address"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Agent needs to confirm the caller's investor profile by email"],"when_not_to_use":["Prefer GET /investors/me when the caller identity is already known","Cross-user email lookup is not supported"],"description_override":"Look up the caller's investor profile by email. Returns 404 for any email that is not the caller's own registered investor.","category":"portfolio"}}},"/api/v1/investors/{investor_id}":{"get":{"tags":["Investors"],"summary":"Get investor by ID (self only)","description":"Get investor information by ID. Only the caller's own investor_id is visible; any other id returns 404.","operationId":"get_investor_by_id_api_v1_investors__investor_id__get","parameters":[{"name":"investor_id","in":"path","required":true,"schema":{"type":"integer","title":"Investor Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-agent":{"expose":true,"when_to_use":["Agent already has the caller's investor_id and needs the profile"],"when_not_to_use":["Prefer GET /investors/me when resolving the caller's profile"],"description_override":"Get the caller's investor profile by ID. Other investors' ids return 404.","category":"portfolio"}}},"/api/v1/users/me":{"get":{"tags":["Users"],"summary":"Get current user profile","description":"Return the profile of the currently authenticated user.","operationId":"get_me_api_v1_users_me_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Users"],"summary":"Update current user profile","description":"Update profile fields for the currently authenticated user.","operationId":"update_me_api_v1_users_me_patch","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users":{"get":{"tags":["Users"],"summary":"List users (admin only)","description":"List users (admin only).","operationId":"list_users_api_v1_users_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}":{"get":{"tags":["Users"],"summary":"Get user by ID (admin only)","description":"Get a user by ID (admin only).","operationId":"get_user_by_id_api_v1_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Users"],"summary":"Update user (admin only)","description":"Update a user (admin only).","operationId":"admin_update_user_api_v1_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/validate":{"post":{"tags":["Auth"],"summary":"Validate JWT token and return current user","description":"Validate JWT token from the Authorization header.\n\nThis endpoint is intended for the frontend (Next.js / NextAuth.js) to\nconfirm that a token is valid and to retrieve the current user's profile.","operationId":"validate_token_api_v1_auth_validate_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/session":{"get":{"tags":["Auth"],"summary":"Get current session user","description":"Get current authenticated user based on Authorization header.\n\nThis is a convenience endpoint for the frontend to fetch the session user.","operationId":"get_session_api_v1_auth_session_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/events":{"post":{"tags":["Auth"],"summary":"Record a login event (called by NextAuth callbacks)","description":"Record a sign-in or sign-out event for analytics / audit.\n\nCalled server-side by NextAuth event callbacks — no user auth required\nbecause the caller is the UI's own backend (server-to-server).","operationId":"record_login_event_api_v1_auth_events_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginEventRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Record Login Event Api V1 Auth Events Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/activity":{"post":{"tags":["Auth"],"summary":"Record user activity event (called by Next.js middleware)","description":"Record a single user activity event for analytics.\n\nCalled server-side by Next.js middleware — no user auth required\nbecause the caller is the UI's own backend (server-to-server).","operationId":"record_user_activity_api_v1_auth_activity_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserActivityRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Record User Activity Api V1 Auth Activity Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/activity/batch":{"post":{"tags":["Auth"],"summary":"Record multiple user activity events at once","description":"Record a batch of user activity events.\n\nThe UI batches events client-side and sends them periodically to reduce\nnetwork requests.","operationId":"record_user_activity_batch_api_v1_auth_activity_batch_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserActivityBatchRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Record User Activity Batch Api V1 Auth Activity Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/profiles/realtor":{"post":{"tags":["Profiles"],"summary":"Setup realtor profile","description":"Setup realtor profile for current user.\n\nAutomatically assigns 'realtor' role to the user.\nCreates profile if doesn't exist, updates if exists.","operationId":"setup_realtor_profile_api_v1_profiles_realtor_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtorProfileCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtorProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Profiles"],"summary":"Get realtor profile","description":"Get realtor profile for current user.\n\nReturns null if profile not set up.","operationId":"get_realtor_profile_api_v1_profiles_realtor_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RealtorProfileResponse"},{"type":"null"}],"title":"Response Get Realtor Profile Api V1 Profiles Realtor Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/profiles/property-manager":{"post":{"tags":["Profiles"],"summary":"Setup property manager profile","description":"Setup property manager profile for current user.\n\nAutomatically assigns 'property_manager' role to the user.\nCreates profile if doesn't exist, updates if exists.","operationId":"setup_property_manager_profile_api_v1_profiles_property_manager_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyManagerProfileCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyManagerProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Profiles"],"summary":"Get property manager profile","description":"Get property manager profile for current user.\n\nReturns null if profile not set up.","operationId":"get_property_manager_profile_api_v1_profiles_property_manager_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PropertyManagerProfileResponse"},{"type":"null"}],"title":"Response Get Property Manager Profile Api V1 Profiles Property Manager Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/profiles/investor":{"post":{"tags":["Profiles"],"summary":"Setup investor profile","description":"Setup investor profile for current user.\n\nAutomatically assigns 'investor' role to the user.\nCreates profile if doesn't exist, updates if exists.","operationId":"setup_investor_profile_api_v1_profiles_investor_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorProfileCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Profiles"],"summary":"Get investor profile","description":"Get investor profile for current user.\n\nReturns null if profile not set up.","operationId":"get_investor_profile_api_v1_profiles_investor_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvestorProfileResponse"},{"type":"null"}],"title":"Response Get Investor Profile Api V1 Profiles Investor Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/profiles/status":{"get":{"tags":["Profiles"],"summary":"Get all profile statuses","description":"Get status of all possible role profiles for current user.","operationId":"get_all_profiles_status_api_v1_profiles_status_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/roles":{"get":{"tags":["Roles"],"summary":"List all available roles","description":"List all available roles in the system.\n\nPublic endpoint - anyone can see available roles.","operationId":"list_roles_api_v1_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Roles Api V1 Roles Get"}}}}}}},"/api/v1/roles/me":{"get":{"tags":["Roles"],"summary":"Get current user's roles","description":"Get all roles assigned to the current user.","operationId":"get_my_roles_api_v1_roles_me_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get My Roles Api V1 Roles Me Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/roles/{role_name}/assign":{"post":{"tags":["Roles"],"summary":"Assign role to user (admin only)","description":"Assign a role to a user (admin only).\n\nArgs:\n    role_name: Role name to assign (e.g., 'investor', 'realtor')\n    user_id: UUID of user to assign role to","operationId":"assign_role_api_v1_roles__role_name__assign_post","parameters":[{"name":"role_name","in":"path","required":true,"schema":{"type":"string","title":"Role Name"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"string","description":"UUID of user to assign role to","title":"User Id"},"description":"UUID of user to assign role to"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Assign Role Api V1 Roles  Role Name  Assign Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/roles/{role_name}/remove":{"delete":{"tags":["Roles"],"summary":"Remove role from user (admin only)","description":"Remove a role from a user (admin only).\n\nArgs:\n    role_name: Role name to remove\n    user_id: UUID of user to remove role from","operationId":"remove_role_api_v1_roles__role_name__remove_delete","parameters":[{"name":"role_name","in":"path","required":true,"schema":{"type":"string","title":"Role Name"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"string","description":"UUID of user to remove role from","title":"User Id"},"description":"UUID of user to remove role from"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Role Api V1 Roles  Role Name  Remove Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups":{"get":{"tags":["Groups"],"summary":"List my groups","description":"List all groups (LLCs, partnerships, trusts) the investor belongs to","operationId":"list_groups_api_v1_groups_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupListItem"},"title":"Response List Groups Api V1 Groups Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Groups"],"summary":"Create a group","description":"Create a new group. You are automatically added as managing member with 100% ownership.","operationId":"create_group_api_v1_groups_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups/{group_id}":{"get":{"tags":["Groups"],"summary":"Get group detail","operationId":"get_group_api_v1_groups__group_id__get","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Groups"],"summary":"Update group","description":"Update group details. Requires management rights.","operationId":"update_group_api_v1_groups__group_id__patch","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups/{group_id}/members":{"get":{"tags":["Groups"],"summary":"List group members","operationId":"list_members_api_v1_groups__group_id__members_get","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupMemberResponse"},"title":"Response List Members Api V1 Groups  Group Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups/{group_id}/members/{member_id}":{"patch":{"tags":["Groups"],"summary":"Update a member","description":"Update member details. Requires management rights.","operationId":"update_member_api_v1_groups__group_id__members__member_id__patch","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"integer","title":"Member Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupMemberUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupMemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Groups"],"summary":"Remove a member","description":"Soft-delete a member. Requires management rights. Cannot remove last managing member.","operationId":"remove_member_api_v1_groups__group_id__members__member_id__delete","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"integer","title":"Member Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups/{group_id}/invitations":{"post":{"tags":["Groups"],"summary":"Invite a member","description":"Invite someone by email. Requires management rights. Invitee must accept.","operationId":"invite_member_api_v1_groups__group_id__invitations_post","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteMemberRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Groups"],"summary":"List group invitations","description":"List all invitations for a group. Requires management rights.","operationId":"list_invitations_api_v1_groups__group_id__invitations_get","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvitationResponse"},"title":"Response List Invitations Api V1 Groups  Group Id  Invitations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups/{group_id}/invitations/{invitation_id}/resend":{"post":{"tags":["Groups"],"summary":"Resend an invitation","description":"Reset expiry and generate a new token for a pending, expired, or declined invitation. Requires management rights.","operationId":"resend_invitation_api_v1_groups__group_id__invitations__invitation_id__resend_post","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"integer","title":"Invitation Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups/invitations/pending":{"get":{"tags":["Groups"],"summary":"My pending invitations","description":"List invitations waiting for the current investor to accept/decline.","operationId":"pending_invitations_api_v1_groups_invitations_pending_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvitationResponse"},"title":"Response Pending Invitations Api V1 Groups Invitations Pending Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups/invitations/{token}/accept":{"post":{"tags":["Groups"],"summary":"Accept an invitation","description":"Accept a pending invitation using the token. Creates group membership.","operationId":"accept_invitation_api_v1_groups_invitations__token__accept_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups/invitations/{token}/decline":{"post":{"tags":["Groups"],"summary":"Decline an invitation","operationId":"decline_invitation_api_v1_groups_invitations__token__decline_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/resource-grants":{"post":{"tags":["Resource Grants"],"summary":"Create a resource grant","description":"Share a deal or portfolio with another investor (individual grant) or with every active member of an entity / Family Group (entity grant). The caller must own the resource being shared.","operationId":"create_grant_api_v1_resource_grants_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceGrantCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceGrantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Resource Grants"],"summary":"List visible resource grants","description":"List every grant visible to the caller. Filter by ``resource_type`` + ``resource_id`` to scope to a specific deal or portfolio. ``include_revoked=true`` includes soft-revoked rows for audit.","operationId":"list_grants_api_v1_resource_grants_get","parameters":[{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(deal|portfolio)$"},{"type":"null"}],"description":"Filter: 'deal' or 'portfolio'.","title":"Resource Type"},"description":"Filter: 'deal' or 'portfolio'."},{"name":"resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Resource Id"}},{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Revoked"}},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(given|received)$"},{"type":"null"}],"description":"Narrow to one side of the share. 'given' returns grants the caller issued (shares I've made); 'received' returns grants shared TO the caller (individual + entity). Omit for both.","title":"Role"},"description":"Narrow to one side of the share. 'given' returns grants the caller issued (shares I've made); 'received' returns grants shared TO the caller (individual + entity). Omit for both."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceGrantListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/resource-grants/{grant_id}":{"get":{"tags":["Resource Grants"],"summary":"Get resource grant by ID","operationId":"get_grant_api_v1_resource_grants__grant_id__get","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"integer","title":"Grant Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceGrantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Resource Grants"],"summary":"Revoke a resource grant (soft-delete)","description":"Soft-revoke a grant. The row is retained for audit; the RLS helpers filter on ``revoked_at IS NULL``. Only the grantor can revoke.","operationId":"revoke_grant_api_v1_resource_grants__grant_id__delete","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"integer","title":"Grant Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResourceGrantRevoke"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceGrantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligentanalyzer":{"post":{"tags":["Intelligent Analyzer"],"summary":"Analyze property with intelligent AI and calculations","description":"Analyze a property using AI/LLM and calculate deal metrics.\n\n    **Input:**\n    - `property`: Property JSON data (should include purchase_price/listing_price, monthly_rent, etc.)\n    - `scenario_question`: User's question about the property scenario\n\n    **Output:**\n    Returns calculation metrics (same format as /deals/calculate) plus:\n    - `answer`: AI-generated analysis and answer from LLM\n\n    This endpoint:\n    1. Extracts assumptions from property data\n    2. Calculates deal metrics (cap_rate, cash_flow, ROI, etc.)\n    3. Gets LLM analysis based on property data and question\n    4. Returns both calculation metrics and LLM answer\n\n    This endpoint uses an OpenAI-compatible API (supports Ollama, OpenAI, etc.)\n    configured via environment variables:\n    - `OLLAMA_API_BASE`: API base URL (default: http://localhost:11434)\n    - `LLM_PROVIDER`: Model identifier (default: ollama/qwen3:8b)","operationId":"analyze_property_api_v1_intelligentanalyzer_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntelligentAnalyzerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Analyze Property Api V1 Intelligentanalyzer Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/{provider}":{"post":{"tags":["Webhooks"],"summary":"Webhook Handler","description":"Handle incoming webhooks from third-party providers.\n\nFlow:\n1. Get adapter for provider\n2. Validate signature\n3. Check idempotency (dedupe)\n4. Store raw event in integration_events table\n5. Return 200 OK immediately","operationId":"webhook_handler_api_v1_webhooks__provider__post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/providers":{"get":{"tags":["Webhooks"],"summary":"List Webhook Providers","description":"List all registered webhook providers.","operationId":"list_webhook_providers_api_v1_webhooks_providers_get","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Webhook Providers Api V1 Webhooks Providers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AdminUpdateUserRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"status":{"anyOf":[{"$ref":"#/components/schemas/UserStatus"},{"type":"null"}]}},"type":"object","title":"AdminUpdateUserRequest","description":"Fields an admin can update for any user."},"AssumptionsResponse":{"properties":{"assumptions":{"additionalProperties":true,"type":"object","title":"Assumptions"},"description":{"type":"string","title":"Description"}},"type":"object","required":["assumptions","description"],"title":"AssumptionsResponse","description":"Response model for default assumptions"},"AuthValidateResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserResponse"},"token_valid":{"type":"boolean","title":"Token Valid","default":true}},"type":"object","required":["user"],"title":"AuthValidateResponse","description":"Response for /auth/validate endpoint."},"BandBoundary":{"properties":{"code":{"type":"string","title":"Code","description":"Stable band code, unique across all kinds, e.g. 'BUY'"},"ordinal":{"type":"integer","title":"Ordinal","description":"Rank within the kind: 0 is the worst band, higher is better. Compare ordinals instead of parsing codes."},"kind":{"type":"string","enum":["deal","vibe","market","consensus","signal"],"title":"Kind","description":"Which band ladder the code belongs to"},"min_score":{"type":"number","title":"Min Score","description":"Inclusive lower bound of the band"},"max_score":{"type":"number","title":"Max Score","description":"Upper bound of the band; exclusive unless max_inclusive is true"},"max_inclusive":{"type":"boolean","title":"Max Inclusive","description":"Whether a score equal to max_score belongs to this band. True only for the best band, whose max_score is 100."}},"type":"object","required":["code","ordinal","kind","min_score","max_score","max_inclusive"],"title":"BandBoundary","description":"One band of a kind's band table: the score range the band covers.\n\nRows come best band first and tile 0-100 with no gaps or overlaps. A score\nbelongs to a band when min_score <= score < max_score, or when it equals\nmax_score and max_inclusive is true (only the best band, whose max_score is\n100). Finite scores are clamped to 0-100 before banding; a missing or\nnon-finite (NaN or infinite) score has no band. Use these rows to draw\ngauges, never to classify a score: the band comes with the score."},"BandTableResponse":{"properties":{"kind":{"type":"string","enum":["deal","vibe","market","consensus","signal"],"title":"Kind","description":"Score kind the table belongs to"},"bands":{"items":{"$ref":"#/components/schemas/BandBoundary"},"type":"array","title":"Bands","description":"Best band first (highest ordinal). Each band covers [min_score, max_score), or [min_score, max_score] when max_inclusive (only the best band, whose max_score is 100). Ranges tile 0-100."}},"type":"object","required":["kind","bands"],"title":"BandTableResponse","description":"A score kind's full band table, best band first."},"Body_calculate_predefined_scenarios_api_v1_deals_pre_defined_scenarios_post":{"properties":{"monthly_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Rent","description":"Monthly rent amount (optional, will be calculated from purchase_price or asking_price using rent_rate default if not provided)"},"purchase_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Price","description":"Purchase price (required for scenarios 2 and 3, optional for scenario 1 if monthly_rent is provided)"},"asking_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Asking Price","description":"Asking price (optional, can be used to calculate monthly_rent using rent_rate default if monthly_rent not provided)"}},"type":"object","title":"Body_calculate_predefined_scenarios_api_v1_deals_pre_defined_scenarios_post"},"BriefItem":{"properties":{"title":{"type":"string","title":"Title"},"detail":{"type":"string","title":"Detail"},"impact":{"type":"string","title":"Impact"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"}},"type":"object","required":["title","detail","impact"],"title":"BriefItem"},"BrowserConfigInput":{"properties":{"headless":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Headless"},"enable_stealth":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Stealth"},"user_agent_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent Mode"},"text_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Text Mode"},"viewport_width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Viewport Width"},"viewport_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Viewport Height"}},"additionalProperties":false,"type":"object","title":"BrowserConfigInput","description":"Allowlisted browser overrides forwarded to Crawl4AI (unknown keys → 422)."},"BuyBoxCriteria":{"properties":{"markets":{"items":{"type":"string"},"type":"array","title":"Markets","description":"Target markets, e.g. ['Austin TX']"},"property_types":{"items":{"type":"string"},"type":"array","title":"Property Types","description":"SFR, duplex, 2-4 unit, 5+ unit, condo, townhouse"},"min_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Price","description":"Minimum purchase price"},"max_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Price","description":"Maximum purchase price"},"min_beds":{"anyOf":[{"type":"integer","maximum":20.0,"minimum":0.0},{"type":"null"}],"title":"Min Beds","description":"Minimum bedrooms"},"min_cap_rate":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Cap Rate","description":"Minimum cap rate (%)"},"min_cash_on_cash":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Cash On Cash","description":"Minimum cash-on-cash return (%)"},"max_age_years":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":0.0},{"type":"null"}],"title":"Max Age Years","description":"Maximum property age in years"},"deal_breakers":{"items":{"type":"string"},"type":"array","title":"Deal Breakers","description":"Knock-out flags, e.g. ['flood_zone', 'hoa', 'active_lien']"},"preferred_features":{"items":{"type":"string"},"type":"array","title":"Preferred Features","description":"Bonus-scoring features, e.g. ['garage', 'pool', 'updated_kitchen']"}},"type":"object","title":"BuyBoxCriteria","description":"Investor buy box — acquisition criteria the agent matches properties against.\n\nLives inside ``InvestmentPreferences.buy_box`` on the investor profile. Edited\nvia the investor profile form; read-only from the agent (the agent reads via\n``GET /profiles/investor`` and mirrors to ``agent.memory`` for semantic recall)."},"ContentItem":{"properties":{"title":{"type":"string","title":"Title","description":"Headline / page title"},"snippet":{"type":"string","title":"Snippet","description":"Summary or extractive snippet"},"source_url":{"type":"string","title":"Source Url","description":"Original source URL"},"source_name":{"type":"string","title":"Source Name","description":"Domain name of source (e.g. zillow.com)"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url","description":"OG/CSE image URL (nullable)"},"published_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published Date","description":"ISO publish date (nullable)"},"content_type":{"$ref":"#/components/schemas/ContentType","description":"Content category"},"relevance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance Score","description":"Discovery Engine relevance"}},"type":"object","required":["title","snippet","source_url","source_name","content_type"],"title":"ContentItem","description":"A single content item from Discovery Engine."},"ContentResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ContentItem"},"type":"array","title":"Items","description":"Content items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Cursor for next page"},"has_more":{"type":"boolean","title":"Has More","description":"Whether more results are available","default":false},"content_type":{"$ref":"#/components/schemas/ContentType","description":"Requested content type"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query","description":"User search query (if any)"}},"type":"object","required":["content_type"],"title":"ContentResponse","description":"Paginated content search response."},"ContentType":{"type":"string","enum":["news","trends","research"],"title":"ContentType","description":"Supported content categories."},"CoreMathEntry":{"properties":{"label":{"type":"string","title":"Label"},"weight":{"type":"integer","title":"Weight"},"input_value":{"type":"string","title":"Input Value"},"bounds":{"type":"string","title":"Bounds"},"raw_points":{"type":"number","title":"Raw Points"},"weighted_points":{"type":"number","title":"Weighted Points"}},"type":"object","required":["label","weight","input_value","bounds","raw_points","weighted_points"],"title":"CoreMathEntry","description":"One row of the score breakdown table shown to users."},"CrawlerConfigInput":{"properties":{"excluded_tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Excluded Tags"},"word_count_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Word Count Threshold"},"wait_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait Until"},"page_timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Timeout"},"simulate_user":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Simulate User"},"magic":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Magic"},"override_navigator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Override Navigator"},"delay_before_return_html":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Delay Before Return Html"},"cache_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cache Mode"}},"additionalProperties":false,"type":"object","title":"CrawlerConfigInput","description":"Allowlisted crawler overrides forwarded to Crawl4AI (unknown keys → 422)."},"DashboardBriefResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BriefItem"},"type":"array","title":"Items"},"generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Generated At"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["items"],"title":"DashboardBriefResponse"},"DashboardDataHealthResponse":{"properties":{"indicators":{"items":{"$ref":"#/components/schemas/DataHealthIndicator"},"type":"array","title":"Indicators"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["indicators"],"title":"DashboardDataHealthResponse"},"DashboardFlightpathResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/FlightpathEntry"},"type":"array","title":"Entries"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["entries"],"title":"DashboardFlightpathResponse"},"DashboardMarketResponse":{"properties":{"markets":{"items":{"$ref":"#/components/schemas/MarketSignal"},"type":"array","title":"Markets"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["markets"],"title":"DashboardMarketResponse"},"DashboardMilestonesResponse":{"properties":{"milestones":{"items":{"$ref":"#/components/schemas/MilestoneItem"},"type":"array","title":"Milestones"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["milestones"],"title":"DashboardMilestonesResponse"},"DashboardOpsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OpsItem"},"type":"array","title":"Items"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["items"],"title":"DashboardOpsResponse"},"DashboardPlaybooksResponse":{"properties":{"playbooks":{"items":{"$ref":"#/components/schemas/PlaybookItem"},"type":"array","title":"Playbooks"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["playbooks"],"title":"DashboardPlaybooksResponse"},"DashboardRiskResponse":{"properties":{"risks":{"items":{"$ref":"#/components/schemas/RiskItem"},"type":"array","title":"Risks"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["risks"],"title":"DashboardRiskResponse"},"DashboardSummaryResponse":{"properties":{"portfolio_summary":{"$ref":"#/components/schemas/PortfolioSummaryResponse","description":"Portfolio summary statistics"},"deals_summary":{"additionalProperties":true,"type":"object","title":"Deals Summary","description":"Deal summary statistics including total_deals, deals_by_status, deals_by_type, avg_deal_score"},"recent_properties":{"items":{"$ref":"#/components/schemas/PortfolioPropertyResponse"},"type":"array","maxItems":5,"title":"Recent Properties","description":"Recent portfolio properties (limited to 5 most recent)"}},"type":"object","required":["portfolio_summary","deals_summary","recent_properties"],"title":"DashboardSummaryResponse","description":"Combined dashboard summary response combining portfolio, deals, and recent properties","example":{}},"DataHealthIndicator":{"properties":{"label":{"type":"string","title":"Label"},"status":{"type":"string","title":"Status"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["label","status","detail"],"title":"DataHealthIndicator"},"DealCalculationResponse":{"properties":{"id":{"type":"integer","title":"Id"},"deal_id":{"type":"integer","title":"Deal Id"},"scenario_name":{"type":"string","title":"Scenario Name"},"is_primary":{"type":"boolean","title":"Is Primary"},"assumptions_json":{"title":"Assumptions Json"},"metrics_json":{"title":"Metrics Json"},"monthly_cash_flow":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cash Flow"},"annual_cash_flow":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Annual Cash Flow"},"cap_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cap Rate"},"cash_on_cash_return":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cash On Cash Return"},"total_roi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Roi"},"break_even_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Break Even Price","description":"Hypothetical purchase price at which Total Expense = Rent"},"break_even_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Break Even Rent","description":"Hypothetical rent price at which Total Expense = Rent"},"break_even_interest_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Break Even Interest Rate","description":"Hypothetical interest rate at which Total Expense = Rent"},"break_even_down_payment_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Break Even Down Payment Pct","description":"Hypothetical down payment % at which Total Expense = Rent"}},"type":"object","required":["id","deal_id","scenario_name","is_primary","assumptions_json","metrics_json"],"title":"DealCalculationResponse","description":"API response schema for deal calculation"},"DealCreate":{"properties":{"property_id":{"type":"integer","title":"Property Id","description":"Property ID"},"deal_type":{"type":"string","enum":["purchase","wholesale","off_market","mls","auction","foreclosure"],"description":"Deal acquisition type"},"deal_status":{"type":"string","enum":["analyzing","under_contract","closed","passed","lost","expired"],"description":"Deal pipeline status","default":"analyzing"},"discovered_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Discovered Date","description":"Date deal was discovered (defaults to today if not provided)"},"deal_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Source","description":"Source of the deal (e.g., 'MLS Listing')"},"offer_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Offer Date","description":"Date offer was made"},"contract_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Contract Date","description":"Date contract was signed"},"closing_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Closing Date","description":"Date deal closed"},"passed_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Passed Date","description":"Date deal was passed on"},"asking_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Asking Price","description":"Asking price"},"offer_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Offer Price","description":"Offer price"},"accepted_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accepted Price","description":"Accepted price"},"deal_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Score","description":"Deal score (0-100)"},"deal_score_breakdown":{"anyOf":[{"$ref":"#/components/schemas/DealScoreSignalCreate"},{"type":"null"}],"description":"Detailed scoring breakdown: the client's numbers only. The band and its words are server-owned and derived from the score on every read."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"General notes about the deal"},"analysis_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Notes","description":"Analysis notes"},"why_passed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Why Passed","description":"Reason deal was passed on"}},"type":"object","required":["property_id","deal_type"],"title":"DealCreate","description":"Request schema for creating a new deal"},"DealImportRequest":{"properties":{"property_type_id":{"type":"integer","title":"Property Type Id","description":"Defaults to 1 (Single Family)","default":1},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"address_line1":{"type":"string","title":"Address Line1","description":"Street address"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"type":"string","title":"City","description":"City"},"state":{"type":"string","title":"State","description":"State"},"zip_code":{"type":"string","title":"Zip Code","description":"ZIP code"},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms"},"bathrooms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bathrooms"},"living_area":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Living Area"},"lot_size_sqft":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lot Size Sqft"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built"},"listing_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Listing Price"},"mls_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mls Number"},"listing_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Status","description":"Listing status","default":"Active"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"office_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Office Name"},"public_remarks":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Remarks","description":"MLS public remarks / listing description from scrape"},"address_standardized":{"type":"boolean","title":"Address Standardized","description":"Set to True when the caller has already standardized the address via a prior upsert-from-scrape call; the backend will then skip the ArcGIS geocode round-trip. Avoid flipping this to True if the address may have changed since the last call.","default":false},"architecture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Architecture"},"cooling":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cooling"},"heating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Heating"},"exterior":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exterior"},"roof":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roof"},"foundation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Foundation"},"amenities":{"items":{"type":"string"},"type":"array","title":"Amenities"},"investment_highlights":{"items":{"type":"string"},"type":"array","title":"Investment Highlights"},"neighborhood_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Neighborhood Notes"},"potential_issues":{"items":{"type":"string"},"type":"array","title":"Potential Issues"},"deal_type":{"type":"string","enum":["purchase","wholesale","off_market","mls","auction","foreclosure"],"description":"Deal acquisition type","default":"mls"},"deal_status":{"type":"string","enum":["analyzing","under_contract","closed","passed","lost","expired"],"description":"Initial deal status","default":"analyzing"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url","description":"Original property listing URL if scraped"},"deal_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Source","description":"Deal/listing source label; stored lowercased. Overrides hostname from source_url."},"images":{"items":{"type":"string"},"type":"array","title":"Images","description":"HTTPS image URLs from scrape (http rejected); deduped; persisted only if listing_media is empty"}},"type":"object","required":["address_line1","city","state","zip_code"],"title":"DealImportRequest","description":"Request schema for creating a deal from scraped or analyzed property data.\n\n``deal_source`` resolution on import (server): explicit ``deal_source`` field >\nhostname label from ``source_url`` > hostname from URL-shaped ``external_id`` >\n``manual``. Listing rows are not overwritten with ``manual`` when a non-empty\n``deal_source`` already exists (see ``DealService.import_deal_from_scrape``)."},"DealListResponse":{"properties":{"deals":{"items":{"$ref":"#/components/schemas/DealResponse"},"type":"array","title":"Deals"},"total_count":{"type":"integer","title":"Total Count"},"filters_applied":{"additionalProperties":true,"type":"object","title":"Filters Applied"}},"type":"object","required":["deals","total_count"],"title":"DealListResponse","description":"API response schema for deal list with summary"},"DealResponse":{"properties":{"id":{"type":"integer","title":"Id"},"investor_id":{"type":"integer","title":"Investor Id"},"property_id":{"type":"integer","title":"Property Id"},"property_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Address","description":"Full property address"},"property_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Type","description":"Property type name"},"property_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Property Type Id","description":"Property type id"},"property_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property City","description":"Property city"},"property_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property State","description":"Property state"},"property_zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Zip","description":"Property ZIP code"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms","description":"Bedroom count"},"bathrooms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bathrooms","description":"Bathroom count"},"living_area":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Living Area","description":"Living area (sqft)"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built","description":"Year property was built"},"floor_count":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Floor Count","description":"Number of floors/stories"},"garage_spaces":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Garage Spaces","description":"Number of garage spaces"},"attached_garage_yn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Attached Garage Yn","description":"Whether the garage is attached"},"primary_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Image Url","description":"First photo from the property's most recent listing_media (by display_order); null if none."},"deal_type":{"type":"string","title":"Deal Type","description":"Deal acquisition type"},"deal_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Source"},"deal_status":{"type":"string","title":"Deal Status","description":"Current deal pipeline status"},"discovered_date":{"type":"string","format":"date","title":"Discovered Date"},"offer_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Offer Date"},"contract_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Contract Date"},"closing_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Closing Date"},"passed_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Passed Date"},"asking_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Asking Price"},"offer_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Offer Price"},"accepted_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accepted Price"},"deal_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deal Score","description":"Deal score 0-100"},"deal_score_breakdown":{},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"analysis_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Notes"},"why_passed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Why Passed"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the deal was added to the investor's pipeline"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"},"calculations":{"title":"Calculations"}},"type":"object","required":["id","investor_id","property_id","deal_type","deal_status","discovered_date"],"title":"DealResponse","description":"API response schema for deal with property details"},"DealScoreDriver-Input":{"properties":{"label":{"type":"string","title":"Label"},"impact":{"type":"string","title":"Impact"},"positive":{"type":"boolean","title":"Positive"}},"type":"object","required":["label","impact","positive"],"title":"DealScoreDriver"},"DealScoreInsufficientResponse":{"properties":{"score":{"type":"null","title":"Score"},"verdict":{"type":"string","title":"Verdict","default":"Insufficient data"},"reason":{"type":"string","title":"Reason"},"missing":{"items":{"type":"string","enum":["monthly_rent","purchase_price"]},"type":"array","title":"Missing","description":"Inputs the caller can supply to make the request scoreable."},"retryable":{"type":"boolean","title":"Retryable","description":"True when the failure is a transient upstream outage, not the inputs.","default":false}},"type":"object","required":["reason"],"title":"DealScoreInsufficientResponse","description":"Returned with HTTP 422 when inputs cannot be resolved."},"DealScoreMetrics":{"properties":{"monthly_rent":{"type":"number","title":"Monthly Rent"},"monthly_mortgage":{"type":"number","title":"Monthly Mortgage"},"monthly_property_tax":{"type":"number","title":"Monthly Property Tax"},"monthly_insurance":{"type":"number","title":"Monthly Insurance"},"monthly_maintenance":{"type":"number","title":"Monthly Maintenance"},"monthly_capex":{"type":"number","title":"Monthly Capex"},"monthly_piti":{"type":"number","title":"Monthly Piti"},"monthly_cash_flow":{"type":"number","title":"Monthly Cash Flow"},"total_expenses":{"type":"number","title":"Total Expenses"},"annual_noi":{"type":"number","title":"Annual Noi"},"cap_rate":{"type":"number","title":"Cap Rate"},"dscr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dscr"},"cash_on_cash":{"type":"number","title":"Cash On Cash"},"grm":{"type":"number","title":"Grm"},"down_payment":{"type":"number","title":"Down Payment"}},"type":"object","required":["monthly_rent","monthly_mortgage","monthly_property_tax","monthly_insurance","monthly_maintenance","monthly_capex","monthly_piti","monthly_cash_flow","total_expenses","annual_noi","cap_rate","cash_on_cash","grm","down_payment"],"title":"DealScoreMetrics","description":"Financial metrics derived from the resolved inputs.\n\nAll monetary values are monthly dollars unless prefixed `annual_`.\n`dscr` is None when debt service is zero (all-cash) — callers must\nhandle this rather than receive a non-JSON `Infinity`."},"DealScoreRawData":{"properties":{"market_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Market Snapshot"},"mortgage_rates":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Mortgage Rates"},"hva":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Hva"},"rent_assessment":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rent Assessment"},"rent_growth_yoy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rent Growth Yoy"}},"additionalProperties":true,"type":"object","title":"DealScoreRawData","description":"Opaque passthrough payloads for diagnostic surfaces. Only populated\nwhen the caller passes `include_raw_data=true`."},"DealScoreRequest":{"properties":{"property_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Property Id","description":"Internal property ID. When supplied, skips address-based identity resolution and uses the DB record directly."},"address":{"anyOf":[{"$ref":"#/components/schemas/PropertyAddress"},{"type":"null"}],"description":"Full property address for location-based resolution. All four sub-fields (address_line1, city, state, zip_code) are required."},"purchase_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Purchase Price","description":"Listing / purchase price"},"monthly_rent":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Monthly Rent","description":"Monthly rent. If omitted, auto-fetched from market-service."},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms","description":"Bedroom count for bedroom-matched rent lookup. If omitted and property_id is provided, loaded from the property record."},"living_area":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Living Area","description":"Living area square footage for Home Value Assessment. If omitted and property_id is provided, loaded from the property record."},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built","description":"Year the property was built. Used to calculate Property Condition (Maintenance & CapEx).If omitted and property_id is provided, loaded from the property record."},"interest_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Interest Rate","description":"Annual interest rate %. Uses FRED 30yr if omitted."},"down_payment_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Down Payment Pct","description":"Down payment %. Default 25."},"property_tax_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Property Tax Rate","description":"Annual property tax rate %. Default from calculation defaults."},"insurance_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Insurance Rate","description":"Annual insurance rate %. Default from calculation defaults."},"fair_market_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fair Market Price","description":"Estimated fair market value for discount calculation."},"rent_growth_yoy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rent Growth Yoy","description":"YoY rent growth %. Defaults to the local measure (12-month forecast, else observed ZORI YoY); when neither exists growth is unmeasured, not 0."},"loan_term_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Loan Term Years","description":"Loan amortization term in years. Default 30."},"vacancy_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vacancy Rate","description":"Vacancy rate % applied to rent for NOI and cash flow. Default 0."},"itemised_expenses":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Itemised Expenses","description":"Itemised monthly dollar expenses (e.g. HOA, utilities, management, other) added to total expenses. `maintenance` and `capex` replace the age-aware reserve line instead of adding to it. Keys are matched case-insensitively with spaces/hyphens as underscores; recognised reserve keys: maintenance (also maintenance_reserve, repairs_and_maintenance) and capex (also cap_ex, capex_reserve, capital_expenditures). Default none."},"include_raw_data":{"type":"boolean","title":"Include Raw Data","description":"Include full assessment payloads and snapshot.","default":false},"rent_is_estimate":{"type":"boolean","title":"Rent Is Estimate","description":"Flag indicating rent is a user-provided estimate.","default":false}},"type":"object","title":"DealScoreRequest","description":"Request body for POST /deals/deal-score.\n\nOne of three identity modes is required:\n1. ``property_id``.\n2. A fully-populated ``address`` (all four fields).\n3. A pure hypothetical: both ``purchase_price`` and ``monthly_rent``,\n   with no ``property_id`` and no ``address`` — for \"what if I paid\n   X and rented at Y?\" queries where the user never named a property.\n\nAny combination of the above is accepted. A request satisfying none\nof the three (including a partial hypothetical with only one of the\ntwo financial figures) is rejected immediately so the orchestrator\nis never called without either a location or a complete pair of\nfinancial inputs to reason about."},"DealScoreResponse":{"properties":{"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"level":{"type":"string","title":"Level"},"label":{"type":"string","title":"Label"},"adjusted_cap_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Adjusted Cap Rate"},"penalty_applied":{"type":"boolean","title":"Penalty Applied","default":false},"boost_applied":{"type":"number","title":"Boost Applied","default":0.0},"mini_scores":{"$ref":"#/components/schemas/MiniScores"},"core_math":{"items":{"$ref":"#/components/schemas/CoreMathEntry"},"type":"array","title":"Core Math"},"drivers":{"items":{"$ref":"#/components/schemas/app__schemas__deal_score__DealScoreDriver"},"type":"array","title":"Drivers"},"break_even_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Break Even Price"},"metrics":{"$ref":"#/components/schemas/DealScoreMetrics"},"resolved_inputs":{"$ref":"#/components/schemas/ResolvedInputs"},"raw_data":{"anyOf":[{"$ref":"#/components/schemas/DealScoreRawData"},{"type":"null"}]},"verdict":{"anyOf":[{"$ref":"#/components/schemas/ScoreVerdict"},{"type":"null"}],"description":"Semantic verdict. `band` is the single authority for the qualitative rating; never re-derive it from `score`. Nullish during migration."},"mini_score_bands":{"additionalProperties":{"$ref":"#/components/schemas/ScoreBand"},"type":"object","title":"Mini Score Bands","description":"Signal band of each measured mini score, keyed like `mini_scores`; an unmeasured (null) mini score has none. Empty when unscored."}},"type":"object","required":["level","label","mini_scores","metrics","resolved_inputs"],"title":"DealScoreResponse","description":"Canonical response for POST /deals/deal-score."},"DealScoreSignal":{"properties":{"score":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Score"},"adjusted_cap_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Adjusted Cap Rate"},"penalty_applied":{"type":"boolean","title":"Penalty Applied","default":false},"boost_applied":{"type":"number","title":"Boost Applied","default":0.0},"mini_scores":{"additionalProperties":{"type":"integer","maximum":100.0,"minimum":0.0},"propertyNames":{"enum":["value","resilience","growth"]},"type":"object","title":"Mini Scores","description":"Measured sub-signals only (value, resilience, growth), each 0-100. A sub-signal whose input was not available is absent, never 0."},"drivers":{"items":{"$ref":"#/components/schemas/app__schemas__deal__DealScoreDriver"},"type":"array","title":"Drivers"},"band":{"anyOf":[{"$ref":"#/components/schemas/ScoreBand"},{"type":"null"}],"description":"Deal band of `score`: the single authority for the qualitative rating (`level`/`label` are its code spelled out). Render it; never re-derive it from `score`. Null when there is no score.","readOnly":true},"level":{"type":"string","title":"Level","description":"The band's code in lower case, e.g. `buy`; `insufficient_data` without one.","readOnly":true},"label":{"type":"string","title":"Label","description":"The band's code as a label, e.g. `Buy`; `Insufficient data` without one.","readOnly":true},"mini_score_bands":{"additionalProperties":{"$ref":"#/components/schemas/ScoreBand"},"type":"object","title":"Mini Score Bands","description":"Signal band of each measured mini score, keyed like `mini_scores`. Empty when no sub-signal was measured.","readOnly":true}},"type":"object","required":["band","level","label","mini_score_bands"],"title":"DealScoreSignal","description":"The Quick Score on a property or deal row: its numbers plus server-derived words.\n\nRows are listed and cached by the hundred, so this carries the ``band``, not\nthe full verdict (the Deal Score response keeps that). ``band``, ``level``,\n``label`` and ``mini_score_bands`` are computed from ``score`` and\n``mini_scores`` on every read: read-only on the wire, and no engine dict,\nstored row, client, ``model_construct`` or ``model_copy`` can set them."},"DealScoreSignalCreate":{"properties":{"score":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Score"},"adjusted_cap_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Adjusted Cap Rate"},"penalty_applied":{"type":"boolean","title":"Penalty Applied","default":false},"boost_applied":{"type":"number","title":"Boost Applied","default":0.0},"mini_scores":{"additionalProperties":{"type":"integer","maximum":100.0,"minimum":0.0},"propertyNames":{"enum":["value","resilience","growth"]},"type":"object","title":"Mini Scores","description":"Measured sub-signals only (value, resilience, growth), each 0-100. A sub-signal whose input was not available is absent, never 0."},"drivers":{"items":{"$ref":"#/components/schemas/DealScoreDriver-Input"},"type":"array","title":"Drivers"}},"type":"object","title":"DealScoreSignalCreate","description":"A client-supplied Quick Score breakdown (``DealCreate.deal_score_breakdown``).\n\nOnly the numbers. The band, its words and the mini-score bands are server-owned:\nnot fields here (unknown keys are ignored, so a client can't store them), and\nderived on every read (see ``DealScoreSignal``). Plain finite floats, so\ncreate_deal's python-mode dump JSON-encodes into JSONB as-is."},"DealStatus":{"type":"string","enum":["analyzing","under_contract","closed","passed","lost","expired"],"title":"DealStatus"},"DealType":{"type":"string","enum":["purchase","wholesale","off_market","mls","auction","foreclosure"],"title":"DealType"},"ExitAnalysisRequest":{"properties":{"purchase_price":{"type":"number","minimum":0.0,"title":"Purchase Price","description":"Original purchase price"},"current_value":{"type":"number","minimum":0.0,"title":"Current Value","description":"Current property value"},"mortgage_balance":{"type":"number","minimum":0.0,"title":"Mortgage Balance","description":"Current mortgage balance"},"interest_rate":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Interest Rate","description":"Annual interest rate (0-100)"},"monthly_rent":{"type":"number","minimum":0.0,"title":"Monthly Rent","description":"Monthly rental income"},"monthly_expenses":{"type":"number","minimum":0.0,"title":"Monthly Expenses","description":"Monthly operating expenses"},"years_owned":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Years Owned","description":"Years property has been owned"},"equity_goal":{"type":"number","minimum":0.0,"title":"Equity Goal","description":"Target equity goal"},"benchmark_rate":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Benchmark Rate","description":"Benchmark return rate for comparison"},"owner_age":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":0.0},{"type":"null"}],"title":"Owner Age","description":"Owner age"}},"type":"object","required":["purchase_price","current_value","mortgage_balance","interest_rate","monthly_rent","monthly_expenses","years_owned","equity_goal","benchmark_rate"],"title":"ExitAnalysisRequest","description":"Request schema for exit strategy analysis."},"ExitAnalysisResponse":{"properties":{"equity":{"type":"number","title":"Equity"},"ltv":{"type":"number","title":"Ltv"},"annual_cash_flow":{"type":"number","title":"Annual Cash Flow"},"roe":{"type":"number","title":"Roe"},"dscr":{"type":"number","title":"Dscr"},"grade":{"type":"string","title":"Grade"},"grade_color":{"type":"string","title":"Grade Color"},"goal_progress":{"type":"number","title":"Goal Progress"},"potential_cap_gains_tax":{"type":"number","title":"Potential Cap Gains Tax"},"remaining_depreciation":{"type":"number","title":"Remaining Depreciation"},"depreciation_run_out":{"type":"boolean","title":"Depreciation Run Out"},"seller_finance_monthly_income":{"type":"number","title":"Seller Finance Monthly Income"},"seller_finance_total_payment":{"type":"number","title":"Seller Finance Total Payment"},"tax_impact_multiplier":{"type":"number","title":"Tax Impact Multiplier"},"monthly_pi":{"type":"number","title":"Monthly Pi"},"total_monthly_cost":{"type":"number","title":"Total Monthly Cost"},"annual_depreciation":{"type":"number","title":"Annual Depreciation"},"noi":{"type":"number","title":"Noi"},"annual_debt_service":{"type":"number","title":"Annual Debt Service"},"estimated_cap_gain":{"type":"number","title":"Estimated Cap Gain"}},"type":"object","required":["equity","ltv","annual_cash_flow","roe","dscr","grade","grade_color","goal_progress","potential_cap_gains_tax","remaining_depreciation","depreciation_run_out","seller_finance_monthly_income","seller_finance_total_payment","tax_impact_multiplier","monthly_pi","total_monthly_cost","annual_depreciation","noi","annual_debt_service","estimated_cap_gain"],"title":"ExitAnalysisResponse","description":"Response schema for exit strategy analysis."},"ExtractionStrategy":{"properties":{"type":{"type":"string","pattern":"^JsonCssExtractionStrategy$","title":"Type","description":"Extraction strategy type","default":"JsonCssExtractionStrategy"},"schema":{"additionalProperties":true,"type":"object","title":"Schema","description":"Extraction schema with name, baseSelector, and fields"}},"type":"object","required":["schema"],"title":"ExtractionStrategy","description":"Extraction strategy configuration"},"FavouriteListCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"FavouriteListCreate","description":"Request body for POST /favourites/lists."},"FavouriteListResponse":{"properties":{"id":{"type":"integer","title":"Id"},"investor_id":{"type":"integer","title":"Investor Id"},"name":{"type":"string","title":"Name"},"is_default":{"type":"boolean","title":"Is Default"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","investor_id","name","is_default"],"title":"FavouriteListResponse","description":"API response for a single named watchlist."},"FavouriteListUpdate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"FavouriteListUpdate","description":"Request body for PATCH /favourites/lists/{list_id}."},"FipsGeographyResponse":{"properties":{"geoid":{"type":"string","title":"Geoid"},"geo_type":{"type":"string","title":"Geo Type"},"state_fips":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Fips"},"county_fips":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County Fips"},"census_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Census Name"},"short_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Name"},"state_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Code"}},"type":"object","required":["geoid","geo_type"],"title":"FipsGeographyResponse","description":"Census FIPS geography matching result.\n\n`geoid` and `geo_type` are required: a FIPS match without a geoid is meaningless\nto consumers (market-service joins on it). The repository is responsible for\nfiltering out null-geoid rows before they reach this schema — see\n`PropertyRepository.lookup_geography` and `_append_if_geoid`."},"FlightpathEntry":{"properties":{"date":{"type":"string","format":"date-time","title":"Date"},"label":{"type":"string","title":"Label"},"inflow":{"type":"number","title":"Inflow"},"outflow":{"type":"number","title":"Outflow"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["date","label","inflow","outflow"],"title":"FlightpathEntry"},"GeoJSONPolygon":{"properties":{"type":{"type":"string","const":"Polygon","title":"Type","description":"Must be the string Polygon"},"coordinates":{"items":{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},"type":"array","minItems":1,"title":"Coordinates","description":"Polygon rings; the outer ring must be closed (first point == last)."}},"additionalProperties":false,"type":"object","required":["type","coordinates"],"title":"GeoJSONPolygon","description":"GeoJSON Polygon (RFC 7946). Coordinates are ``[longitude, latitude]``."},"GeographyLookupResponse":{"properties":{"state_fips":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Fips"},"county_fips":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County Fips"},"county_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County Name"},"city_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Name"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"state_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Code"},"geoid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geoid"},"matches":{"items":{"$ref":"#/components/schemas/FipsGeographyResponse"},"type":"array","title":"Matches","default":[]}},"type":"object","title":"GeographyLookupResponse","description":"Unified geography and FIPS lookup result."},"GroupCreate":{"properties":{"entity_name":{"type":"string","maxLength":255,"minLength":1,"title":"Entity Name","description":"Group name"},"entity_type":{"type":"string","title":"Entity Type","description":"Type: llc, partnership, trust, corporation, s_corp, c_corp"},"state_of_formation":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State Of Formation","description":"Two-letter state code"},"formation_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Formation Date","description":"Date of formation"},"entity_purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Purpose","description":"Purpose of the entity"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["entity_name","entity_type"],"title":"GroupCreate","description":"Request schema for creating a group."},"GroupListItem":{"properties":{"id":{"type":"integer","title":"Id"},"entity_name":{"type":"string","title":"Entity Name"},"entity_type":{"type":"string","title":"Entity Type"},"entity_status":{"type":"string","title":"Entity Status"},"state_of_formation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Of Formation"},"formation_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Formation Date"},"member_count":{"type":"integer","title":"Member Count","default":0},"my_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"My Role"},"my_ownership_percentage":{"title":"My Ownership Percentage"},"my_management_rights":{"type":"boolean","title":"My Management Rights","default":false},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","entity_name","entity_type","entity_status"],"title":"GroupListItem","description":"Response schema for group list."},"GroupMemberResponse":{"properties":{"id":{"type":"integer","title":"Id"},"entity_id":{"type":"integer","title":"Entity Id"},"investor_id":{"type":"integer","title":"Investor Id"},"investor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Investor Name"},"investor_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Investor Email"},"ownership_percentage":{"title":"Ownership Percentage"},"membership_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Membership Type"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"voting_rights":{"type":"boolean","title":"Voting Rights","default":true},"management_rights":{"type":"boolean","title":"Management Rights","default":false},"profit_distribution_percentage":{"title":"Profit Distribution Percentage"},"loss_allocation_percentage":{"title":"Loss Allocation Percentage"},"initial_capital_contribution":{"title":"Initial Capital Contribution"},"additional_contributions":{"title":"Additional Contributions"},"membership_start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Membership Start Date"},"membership_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Membership End Date"},"membership_status":{"type":"string","title":"Membership Status","default":"active"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","entity_id","investor_id"],"title":"GroupMemberResponse","description":"Response schema for a group member."},"GroupMemberUpdate":{"properties":{"ownership_percentage":{"anyOf":[{"type":"number","maximum":100.0,"exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Ownership Percentage"},"membership_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Membership Type"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"voting_rights":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Voting Rights"},"management_rights":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Management Rights"},"profit_distribution_percentage":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Profit Distribution Percentage"},"loss_allocation_percentage":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Loss Allocation Percentage"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"GroupMemberUpdate","description":"Request schema for updating a group member."},"GroupResponse":{"properties":{"id":{"type":"integer","title":"Id"},"entity_name":{"type":"string","title":"Entity Name"},"entity_type":{"type":"string","title":"Entity Type"},"entity_status":{"type":"string","title":"Entity Status"},"entity_ein":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Ein"},"state_of_formation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Of Formation"},"formation_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Formation Date"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"dba_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dba Name"},"entity_purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Purpose"},"registered_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registered Agent"},"principal_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Principal Address"},"mailing_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mailing Address"},"tax_classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Classification"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"member_count":{"type":"integer","title":"Member Count","default":0},"my_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"My Role"},"my_ownership_percentage":{"title":"My Ownership Percentage"},"my_management_rights":{"type":"boolean","title":"My Management Rights","default":false},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","entity_name","entity_type","entity_status"],"title":"GroupResponse","description":"Response schema for group detail."},"GroupUpdate":{"properties":{"entity_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Entity Name"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"state_of_formation":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State Of Formation"},"formation_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Formation Date"},"entity_ein":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Entity Ein"},"legal_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Legal Name"},"dba_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Dba Name"},"entity_purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Purpose"},"registered_agent":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Registered Agent"},"principal_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Principal Address"},"mailing_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mailing Address"},"tax_classification":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Tax Classification"},"entity_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"GroupUpdate","description":"Request schema for updating a group."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HUDAddressRequest":{"properties":{"address":{"type":"string","title":"Address","description":"Full address (state/zip parsed from end if not provided)"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"State code (2 letters); optional if parseable from address"},"zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip","description":"ZIP code; optional if parseable from address"}},"type":"object","required":["address"],"title":"HUDAddressRequest","description":"Request body for admin HUD IL/CHAS lookup (address + optional state/zip)."},"HUDLookupRequest":{"properties":{"address":{"type":"string","title":"Address","description":"Full address (state/zip parsed from end if not provided)"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"State code (2 letters); optional if parseable from address"},"zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip","description":"ZIP code; optional if parseable from address"},"bedrooms":{"anyOf":[{"type":"integer","maximum":4.0,"minimum":0.0},{"type":"null"}],"title":"Bedrooms","description":"Bedroom count (0-4); default 2","default":2}},"type":"object","required":["address"],"title":"HUDLookupRequest","description":"Request body for admin HUD FMR lookup."},"IntelligentAnalyzerRequest":{"properties":{"property":{"additionalProperties":true,"type":"object","title":"Property","description":"Property JSON data to analyze"},"scenario_question":{"type":"string","maxLength":2000,"minLength":1,"title":"Scenario Question","description":"User's scenario question about the property"}},"type":"object","required":["property","scenario_question"],"title":"IntelligentAnalyzerRequest","description":"Request schema for intelligent analyzer endpoint"},"InvestmentPreferences":{"properties":{"preferred_property_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Preferred Property Types"},"investment_goals":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Investment Goals"},"buy_box":{"anyOf":[{"$ref":"#/components/schemas/BuyBoxCriteria"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"InvestmentPreferences","description":"Typed view of the ``investment_preferences`` JSONB column.\n\n``extra='allow'`` preserves backward compatibility: existing records with\narbitrary keys keep working, while new typed fields like ``buy_box`` get\nstructured validation."},"InvestorProfileCreate":{"properties":{"first_name":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Phone"},"investment_strategy":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Investment Strategy","description":"buy_and_hold, flip, brrrr, wholesale, or syndication"},"experience_level":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Experience Level","description":"beginner, intermediate, advanced, or expert"},"target_markets":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Markets","description":"Array of target market locations (e.g., TX, FL, CA)"},"investment_preferences":{"anyOf":[{"$ref":"#/components/schemas/InvestmentPreferences"},{"type":"null"}],"description":"Structured investment preferences including buy_box"},"risk_tolerance":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Risk Tolerance","description":"conservative, moderate, or aggressive"},"tax_bracket":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tax Bracket","description":"Tax bracket percentage (0-100)"},"annual_income":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Annual Income","description":"Annual income"},"available_capital":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Available Capital","description":"Available capital for investment"}},"type":"object","title":"InvestorProfileCreate","description":"Request schema for creating/updating investor profile."},"InvestorProfileResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"full_name":{"type":"string","title":"Full Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"investment_strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Investment Strategy"},"experience_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experience Level"},"target_markets":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Markets"},"investment_preferences":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Investment Preferences"},"risk_tolerance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Tolerance"},"tax_bracket":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tax Bracket"},"annual_income":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Annual Income"},"available_capital":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Available Capital"},"is_active":{"type":"boolean","title":"Is Active"},"email_verified":{"type":"boolean","title":"Email Verified"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","email","first_name","last_name","full_name","is_active","email_verified"],"title":"InvestorProfileResponse","description":"Response schema for investor profile."},"InvestorResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"full_name":{"type":"string","title":"Full Name","description":"Full name of investor"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"investment_strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Investment Strategy","description":"buy_and_hold, flip, brrrr, wholesale, or syndication"},"experience_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experience Level","description":"beginner, intermediate, advanced, or expert"},"target_markets":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Markets"},"investment_preferences":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Investment Preferences"},"risk_tolerance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Tolerance","description":"conservative, moderate, or aggressive"},"tax_bracket":{"title":"Tax Bracket"},"annual_income":{"title":"Annual Income"},"available_capital":{"title":"Available Capital"},"is_active":{"type":"boolean","title":"Is Active","default":true},"email_verified":{"type":"boolean","title":"Email Verified","default":false},"email_verified_at":{"title":"Email Verified At"},"created_at":{"title":"Created At"},"updated_at":{"title":"Updated At"},"last_login_at":{"title":"Last Login At"}},"type":"object","required":["id","email","first_name","last_name","full_name"],"title":"InvestorResponse","description":"API response schema for investor"},"InvitationResponse":{"properties":{"id":{"type":"integer","title":"Id"},"entity_id":{"type":"integer","title":"Entity Id"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"invitee_email":{"type":"string","title":"Invitee Email"},"status":{"type":"string","title":"Status"},"ownership_percentage":{"title":"Ownership Percentage"},"membership_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Membership Type"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"invited_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited By Name"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","entity_id","invitee_email","status"],"title":"InvitationResponse","description":"Response schema for an invitation."},"InviteMemberRequest":{"properties":{"invitee_email":{"type":"string","title":"Invitee Email","description":"Email of the person to invite"},"ownership_percentage":{"anyOf":[{"type":"number","maximum":100.0,"exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Ownership Percentage","description":"Required for legal entities; omit/null for SHARING_GROUP"},"membership_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Membership Type","description":"member, family_member, partner, beneficiary, shareholder, trustee"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role","description":"managing_member, silent_partner, general_partner, limited_partner, member"}},"type":"object","required":["invitee_email"],"title":"InviteMemberRequest","description":"Request schema for inviting a member to a group."},"KGWatermarkResetRequest":{"properties":{"step_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Step Name","description":"Specific step to reset. Omit to reset every step (forces full reload on next incremental run)."}},"type":"object","title":"KGWatermarkResetRequest","description":"Reset one specific step (omit step_name to reset all steps)."},"ListingCreate":{"properties":{"property_id":{"type":"integer","title":"Property Id","description":"Property ID (FK to properties.id)"},"listing_type_id":{"type":"integer","title":"Listing Type Id","description":"Listing type ID (FK to listing_types)"},"listing_status_id":{"type":"integer","title":"Listing Status Id","description":"Listing status ID (FK to listing_statuses)"},"is_sale_listing":{"type":"boolean","title":"Is Sale Listing","description":"True = sale, False = rental","default":true},"listed_date":{"type":"string","format":"date","title":"Listed Date","description":"Date the property was listed"},"list_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"List Price","description":"List price"},"price_per_sqft":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Per Sqft","description":"Price per square foot"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms","description":"Number of bedrooms"},"bathrooms":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Bathrooms","description":"Number of bathrooms"},"living_area":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Living Area","description":"Living area in square feet"},"lot_size_sqft":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lot Size Sqft","description":"Lot size in square feet"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built","description":"Year built"},"removed_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Removed Date","description":"Date the listing was removed"},"first_seen_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen Date","description":"When listing was first seen"},"last_seen_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen Date","description":"When listing was last seen"},"days_on_market":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days On Market","description":"Number of days on market"},"mls_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mls Name","description":"MLS name"},"mls_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mls Number","description":"MLS number"},"deal_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Source","description":"Source of the deal/listing"},"data_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Provider","description":"Origin of listing data (e.g. VRM Properties, Lennar, Zillow)"},"additional_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additional Data","description":"Structured extras from crawl (vendee_eligible, special_financing, etc.)"},"original_list_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Original List Price","description":"Original list price [VOW]"},"previous_list_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Previous List Price","description":"Previous list price [VOW]"},"close_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Close Price","description":"Close price [VOW]"},"close_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Close Date","description":"Close date [VOW]"},"pending_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pending Timestamp","description":"Pending timestamp [VOW]"},"cumulative_days_on_market":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cumulative Days On Market","description":"Cumulative DOM [VOW]"},"concessions_amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Concessions Amount","description":"Concessions amount [VOW]"},"concessions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concessions","description":"Concessions type [VOW]"},"bathrooms_full":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms Full","description":"Full bathrooms"},"bathrooms_half":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms Half","description":"Half bathrooms"},"public_remarks":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Remarks","description":"Property description"},"photos_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Photos Count","description":"Number of photos"},"virtual_tour_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Virtual Tour Url","description":"Virtual tour URL"},"listing_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Url","description":"Listing URL"},"listing_agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Listing Agent Id","description":"Listing agent ID"},"listing_office_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Listing Office Id","description":"Listing office ID"},"listing_builder_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Listing Builder Id","description":"Listing builder ID"},"listing_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Key","description":"RESO listing key"}},"type":"object","required":["property_id","listing_type_id","listing_status_id","listed_date"],"title":"ListingCreate","description":"Schema for creating listing - required fields for POST."},"ListingListResponse":{"properties":{"listings":{"items":{"$ref":"#/components/schemas/ListingResponse"},"type":"array","title":"Listings"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset"},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"},"has_more":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has More","default":false}},"type":"object","required":["listings","total","limit"],"title":"ListingListResponse","description":"API response schema for listing list with pagination."},"ListingMediaItem":{"properties":{"media_url":{"type":"string","title":"Media Url"},"media_type":{"type":"string","title":"Media Type","default":"Photo"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order","default":0},"short_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Description"}},"type":"object","required":["media_url"],"title":"ListingMediaItem","description":"Single listing media item (photo URL)."},"ListingMediaResponse":{"properties":{"media":{"items":{"$ref":"#/components/schemas/ListingMediaItem"},"type":"array","title":"Media"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["media","total"],"title":"ListingMediaResponse","description":"API response for listing media."},"ListingResponse":{"properties":{"id":{"title":"Id"},"property_id":{"title":"Property Id","description":"Property ID (FK to properties.id)"},"listing_type_id":{"title":"Listing Type Id","description":"Listing type ID (FK)"},"listing_status_id":{"title":"Listing Status Id","description":"Listing status ID (FK)"},"is_sale_listing":{"title":"Is Sale Listing","description":"True = sale, False = rental"},"listing_type":{"title":"Listing Type","description":"Listing type name: Standard, New Construction, Foreclosure, Short Sale"},"listing_status":{"title":"Listing Status","description":"Listing status name: Active, Pending, Sold, etc."},"list_price":{"title":"List Price"},"price_per_sqft":{"title":"Price Per Sqft"},"bedrooms":{"title":"Bedrooms"},"bathrooms":{"title":"Bathrooms"},"living_area":{"title":"Living Area"},"lot_size_sqft":{"title":"Lot Size Sqft"},"year_built":{"title":"Year Built"},"listed_date":{"title":"Listed Date"},"removed_date":{"title":"Removed Date"},"first_seen_date":{"title":"First Seen Date"},"last_seen_date":{"title":"Last Seen Date"},"days_on_market":{"title":"Days On Market"},"mls_name":{"title":"Mls Name"},"mls_number":{"title":"Mls Number"},"deal_source":{"title":"Deal Source","description":"Source of the deal/listing"},"data_provider":{"title":"Data Provider","description":"Origin of listing data (e.g. VRM Properties, Lennar, Zillow)"},"additional_data":{"title":"Additional Data","description":"Structured extras from crawl (vendee_eligible, special_financing, etc.)"},"original_list_price":{"title":"Original List Price"},"previous_list_price":{"title":"Previous List Price"},"close_price":{"title":"Close Price"},"close_date":{"title":"Close Date"},"pending_timestamp":{"title":"Pending Timestamp"},"cumulative_days_on_market":{"title":"Cumulative Days On Market"},"concessions_amount":{"title":"Concessions Amount"},"concessions":{"title":"Concessions"},"bathrooms_full":{"title":"Bathrooms Full"},"bathrooms_half":{"title":"Bathrooms Half"},"public_remarks":{"title":"Public Remarks"},"photos_count":{"title":"Photos Count"},"virtual_tour_url":{"title":"Virtual Tour Url"},"listing_url":{"title":"Listing Url"},"listing_agent_id":{"title":"Listing Agent Id"},"listing_agent_name":{"title":"Listing Agent Name"},"listing_agent_phone":{"title":"Listing Agent Phone"},"listing_agent_email":{"title":"Listing Agent Email"},"listing_agent_website":{"title":"Listing Agent Website"},"listing_office_id":{"title":"Listing Office Id"},"listing_office_name":{"title":"Listing Office Name"},"listing_office_phone":{"title":"Listing Office Phone"},"listing_office_email":{"title":"Listing Office Email"},"listing_office_website":{"title":"Listing Office Website"},"listing_builder_id":{"title":"Listing Builder Id"},"builder_name":{"title":"Builder Name"},"builder_development":{"title":"Builder Development"},"builder_phone":{"title":"Builder Phone"},"builder_website":{"title":"Builder Website"},"buyer_agent_name":{"title":"Buyer Agent Name"},"buyer_agent_mls_id":{"title":"Buyer Agent Mls Id"},"buyer_office_name":{"title":"Buyer Office Name"},"buyer_office_mls_id":{"title":"Buyer Office Mls Id"},"buyer_financing":{"title":"Buyer Financing"},"expiration_date":{"title":"Expiration Date"},"withdrawn_date":{"title":"Withdrawn Date"},"cancellation_date":{"title":"Cancellation Date"},"back_on_market_date":{"title":"Back On Market Date"},"status_change_timestamp":{"title":"Status Change Timestamp"},"price_change_timestamp":{"title":"Price Change Timestamp"},"internet_display_yn":{"title":"Internet Display Yn"},"copyright_notice":{"title":"Copyright Notice"},"disclaimer":{"title":"Disclaimer"},"listing_key":{"title":"Listing Key"},"originating_system_name":{"title":"Originating System Name"},"created_at":{"title":"Created At"},"updated_at":{"title":"Updated At"}},"type":"object","required":["id","property_id","listing_type_id","listing_status_id","is_sale_listing","listed_date"],"title":"ListingResponse","description":"API response schema for property listing."},"ListingUpdate":{"properties":{"listing_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Listing Type Id","description":"Listing type ID"},"listing_status_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Listing Status Id","description":"Listing status ID"},"is_sale_listing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Sale Listing","description":"True = sale, False = rental"},"list_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"List Price","description":"List price"},"price_per_sqft":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Per Sqft","description":"Price per square foot"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms","description":"Number of bedrooms"},"bathrooms":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Bathrooms","description":"Number of bathrooms"},"living_area":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Living Area","description":"Living area in square feet"},"lot_size_sqft":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lot Size Sqft","description":"Lot size in square feet"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built","description":"Year built"},"listed_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Listed Date","description":"Date the property was listed"},"removed_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Removed Date","description":"Date the listing was removed"},"first_seen_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen Date","description":"When listing was first seen"},"last_seen_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen Date","description":"When listing was last seen"},"days_on_market":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days On Market","description":"Number of days on market"},"mls_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mls Name","description":"MLS name"},"mls_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mls Number","description":"MLS number"},"deal_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Source","description":"Source of the deal/listing"},"data_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Provider","description":"Origin of listing data (e.g. VRM Properties, Lennar, Zillow)"},"additional_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additional Data","description":"Structured extras from crawl (vendee_eligible, special_financing, etc.)"},"original_list_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Original List Price","description":"Original list price [VOW]"},"previous_list_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Previous List Price","description":"Previous list price [VOW]"},"close_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Close Price","description":"Close price [VOW]"},"close_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Close Date","description":"Close date [VOW]"},"pending_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pending Timestamp","description":"Pending timestamp [VOW]"},"cumulative_days_on_market":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cumulative Days On Market","description":"Cumulative DOM [VOW]"},"concessions_amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Concessions Amount","description":"Concessions amount [VOW]"},"concessions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concessions","description":"Concessions type [VOW]"},"bathrooms_full":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms Full","description":"Full bathrooms"},"bathrooms_half":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms Half","description":"Half bathrooms"},"public_remarks":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Remarks","description":"Property description"},"photos_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Photos Count","description":"Number of photos"},"virtual_tour_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Virtual Tour Url","description":"Virtual tour URL"},"listing_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Url","description":"Listing URL"},"listing_agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Listing Agent Id","description":"Listing agent ID"},"listing_office_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Listing Office Id","description":"Listing office ID"},"listing_builder_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Listing Builder Id","description":"Listing builder ID"},"listing_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Key","description":"RESO listing key"}},"type":"object","title":"ListingUpdate","description":"Schema for updating listing - all fields optional for PATCH."},"LoginEventRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"event_type":{"type":"string","pattern":"^(sign_in|sign_out)$","title":"Event Type"},"auth_method":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Auth Method"},"ip_address":{"anyOf":[{"type":"string","maxLength":45},{"type":"null"}],"title":"Ip Address"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"}},"type":"object","required":["user_id","event_type"],"title":"LoginEventRequest","description":"Request schema for recording login events from NextAuth."},"MarketSignal":{"properties":{"market":{"type":"string","title":"Market"},"change":{"type":"string","title":"Change"},"stat":{"type":"string","title":"Stat"},"direction":{"type":"string","title":"Direction"}},"type":"object","required":["market","change","stat","direction"],"title":"MarketSignal"},"MarketStatisticsResponse":{"properties":{"id":{"type":"integer","title":"Id"},"zip_code":{"type":"string","title":"Zip Code"},"data_type":{"type":"string","title":"Data Type","description":"'sale' or 'rental'"},"stats_month":{"type":"string","format":"date","title":"Stats Month"},"average_price":{"title":"Average Price"},"median_price":{"title":"Median Price"},"min_price":{"title":"Min Price"},"max_price":{"title":"Max Price"},"average_price_per_sqft":{"title":"Average Price Per Sqft"},"median_price_per_sqft":{"title":"Median Price Per Sqft"},"average_days_on_market":{"title":"Average Days On Market"},"median_days_on_market":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Median Days On Market"},"new_listings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"New Listings"},"total_listings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Listings"},"data_by_property_type":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Data By Property Type"},"data_by_bedrooms":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Data By Bedrooms"}},"type":"object","required":["id","zip_code","data_type","stats_month"],"title":"MarketStatisticsResponse","description":"API response schema for market statistics."},"MilestoneItem":{"properties":{"title":{"type":"string","title":"Title"},"progress":{"type":"number","title":"Progress"},"target":{"type":"string","title":"Target"},"description":{"type":"string","title":"Description"}},"type":"object","required":["title","progress","target","description"],"title":"MilestoneItem"},"MiniScores":{"properties":{"value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Value"},"resilience":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Resilience"},"growth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Growth"}},"type":"object","title":"MiniScores","description":"Sub-scores explaining conviction, each on a 0-100 scale.\n\nNull when unmeasured: its input (fair-market price for ``value``, break-even\nfor ``resilience``, rent growth for ``growth``) was not available. Unknown is\nnot LOW, so an unmeasured sub-score has no value and no band."},"OpsItem":{"properties":{"label":{"type":"string","title":"Label"},"due":{"type":"string","format":"date-time","title":"Due"},"owner":{"type":"string","title":"Owner"},"status":{"type":"string","title":"Status"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"}},"type":"object","required":["label","due","owner","status"],"title":"OpsItem"},"OwnershipCheckResponse":{"properties":{"owns":{"type":"boolean","title":"Owns","description":"Whether the investor owns this property"},"portfolio_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Portfolio Id","description":"Portfolio entry ID if owned, null otherwise"}},"type":"object","required":["owns"],"title":"OwnershipCheckResponse","description":"API response for ownership check."},"PaginatedScrapePerformanceMetrics":{"properties":{"total_processing_time_s":{"type":"number","title":"Total Processing Time S","description":"Total request processing time in seconds"},"url_paging_time_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Url Paging Time S","description":"Time spent in url_paging API call"},"parsing_time_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Parsing Time S","description":"Time spent parsing and processing results"},"pages_scraped":{"type":"integer","title":"Pages Scraped","description":"Number of pages successfully scraped"},"properties_extracted":{"type":"integer","title":"Properties Extracted","description":"Total number of properties extracted"},"properties_per_second":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Properties Per Second","description":"Properties extracted per second (throughput)"},"response_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Size Bytes","description":"Size of extracted_content in bytes"},"pages_per_second":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pages Per Second","description":"Pages scraped per second"}},"type":"object","required":["total_processing_time_s","pages_scraped","properties_extracted"],"title":"PaginatedScrapePerformanceMetrics","description":"Performance metrics for paginated scraping"},"PaginatedScrapeRequest":{"properties":{"base_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Base Url","description":"Base URL with pagination parameter (e.g., 'https://example.com/search?page=1')"},"page_param":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Param","description":"URL parameter name for page number (e.g., 'page', 'currentPage')"},"start_page":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Start Page","description":"Starting page number (inclusive)"},"end_page":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"End Page","description":"Ending page number (inclusive)"},"initial_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Initial Url","description":"Initial URL to scrape (first page) - legacy format"},"pagination":{"anyOf":[{"$ref":"#/components/schemas/PaginationConfig"},{"type":"null"}],"description":"Pagination configuration - legacy format"},"browser_config":{"anyOf":[{"$ref":"#/components/schemas/BrowserConfigInput"},{"type":"null"}],"description":"Optional browser configuration (headless, enable_stealth, text_mode, etc.)"},"crawler_config":{"anyOf":[{"$ref":"#/components/schemas/CrawlerConfigInput"},{"type":"null"}],"description":"Optional crawler configuration. If extraction_strategy is provided, it will be merged into crawler_config."},"extraction_strategy":{"anyOf":[{"$ref":"#/components/schemas/ExtractionStrategy"},{"type":"null"}],"description":"Optional extraction strategy for structured data extraction using CSS selectors"},"use_clean_content":{"type":"boolean","title":"Use Clean Content","description":"If True (default), applies noise-reduction filters. Set to False for raw content without filtering.","default":true},"use_url_paging":{"type":"boolean","title":"Use Url Paging","description":"If True (default), uses Crawl4AI /crawl-listings/url-paging endpoint with property schema. If False, uses traditional /crawl endpoint with CSS extraction.","default":true},"extraction_query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Query","description":"Query/instruction for LLM extraction. Should explicitly request JSON format matching the schema. If not provided, uses a strict query that enforces JSON-only output with the simplified property schema."},"timeout":{"anyOf":[{"type":"integer","maximum":900.0,"minimum":10.0},{"type":"null"}],"title":"Timeout","description":"Request timeout in seconds (default: 120, max: 900). Increase for slower sites or complex pages. The infrastructure ceiling is set to 15m."},"combine_results":{"type":"boolean","title":"Combine Results","description":"If True (default), combines results from all pages into a single JSON object. Set to False to receive individual results per page (more resilient to partial failures).","default":true},"url_deep_paging":{"type":"boolean","title":"Url Deep Paging","description":"When use_url_paging is True, enables Crawl4AI BFSDeepCrawlStrategy (depth 1): internal HTML links are crawled and merged with list rows by URL.","default":false},"max_detail_follows":{"type":"integer","maximum":2000.0,"minimum":1.0,"title":"Max Detail Follows","description":"Max child pages per paginated list URL when url_deep_paging is True.","default":200},"detail_concurrency":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Detail Concurrency","description":"Crawl4AI semaphore_count for parallel crawls within each BFS level.","default":2},"detail_content_type":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Detail Content Type","description":"Optional Crawl4AI content_type for detail-page LLM extraction when url_deep_paging is True."},"deep_crawl_url_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Deep Crawl Url Patterns","description":"Optional glob patterns for URLPatternFilter (recommended when url_deep_paging is True)."},"deep_crawl_include_external":{"type":"boolean","title":"Deep Crawl Include External","description":"When url_deep_paging is True, pass include_external to BFSDeepCrawlStrategy.","default":false}},"type":"object","title":"PaginatedScrapeRequest","description":"Request model for paginated scraping"},"PaginatedScrapeResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Overall success status"},"results":{"items":{"$ref":"#/components/schemas/PaginatedScrapeResult"},"type":"array","title":"Results","description":"Results for each page"},"server_processing_time_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Server Processing Time S","description":"Total server processing time in seconds (deprecated, use metrics)"},"metrics":{"anyOf":[{"$ref":"#/components/schemas/PaginatedScrapePerformanceMetrics"},{"type":"null"}],"description":"Detailed performance metrics"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if any"}},"type":"object","required":["success","results"],"title":"PaginatedScrapeResponse","description":"Response model for paginated scraping"},"PaginatedScrapeResult":{"properties":{"url":{"type":"string","title":"Url","description":"URL that was scraped"},"html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html","description":"Full HTML content"},"markdown":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Markdown","description":"Markdown representation (may be dict with fit_markdown, raw_markdown, etc.)"},"extracted_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extracted Content","description":"Extracted content as JSON string (if extraction_strategy was used)"},"success":{"type":"boolean","title":"Success","description":"Whether the scrape was successful"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code","description":"HTTP status code"}},"type":"object","required":["url","success"],"title":"PaginatedScrapeResult","description":"Result for a single page in paginated scraping"},"PaginationConfig":{"properties":{"type":{"type":"string","pattern":"^url_based$","title":"Type","description":"Pagination type. Currently supported: 'url_based'"},"url_based":{"anyOf":[{"$ref":"#/components/schemas/URLBasedPaginationConfig"},{"type":"null"}],"description":"URL-based pagination configuration. Required when type='url_based'"}},"type":"object","required":["type"],"title":"PaginationConfig","description":"Pagination configuration"},"PerformanceMetrics":{"properties":{"crawl_time_ms":{"type":"number","title":"Crawl Time Ms","description":"Time spent crawling/fetching HTML in milliseconds"},"llm_time_ms":{"type":"number","title":"Llm Time Ms","description":"Time spent on LLM extraction in milliseconds"},"total_time_ms":{"type":"number","title":"Total Time Ms","description":"Total end-to-end time in milliseconds"}},"type":"object","required":["crawl_time_ms","llm_time_ms","total_time_ms"],"title":"PerformanceMetrics","description":"Performance metrics for scrape operations"},"PlaybookItem":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"impact":{"type":"string","title":"Impact"},"actionLabel":{"type":"string","title":"Actionlabel"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"}},"type":"object","required":["title","description","impact","actionLabel"],"title":"PlaybookItem"},"PortfolioPropertyCreate":{"properties":{"property_id":{"type":"integer","title":"Property Id","description":"ID of the property to add to portfolio"},"ownership_structure":{"type":"string","title":"Ownership Structure","description":"Ownership structure: individual, direct_co_ownership, or entity"},"ownership_percentage":{"type":"number","title":"Ownership Percentage","description":"Ownership percentage (0-100). Defaults to 100 for individual ownership."},"acquisition_date":{"type":"string","format":"date","title":"Acquisition Date","description":"Purchase/closing date"},"acquisition_price":{"type":"number","title":"Acquisition Price","description":"Acquisition price (total cost to acquire)"},"current_market_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Market Value","description":"Current estimated market value"},"current_loan_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Loan Balance","description":"Current loan balance"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Property status: active, refinanced, sold, transferred, 1031_pending","default":"active"},"purchase_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Price","description":"Total property purchase price (if different from acquisition_price)"},"down_payment":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Down Payment","description":"Down payment amount"},"monthly_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Rent","description":"Monthly rental income"},"interest_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Interest Rate","description":"Interest rate percentage"},"loan_term_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Loan Term Years","description":"Loan term in years"}},"type":"object","required":["property_id","ownership_structure","ownership_percentage","acquisition_date","acquisition_price"],"title":"PortfolioPropertyCreate","description":"Schema for creating a portfolio property - required fields for POST"},"PortfolioPropertyPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PortfolioPropertyResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque cursor for the next page; null when no more items remain."},"has_more":{"type":"boolean","title":"Has More","description":"True if more pages remain after this one."}},"type":"object","required":["items","has_more"],"title":"PortfolioPropertyPage","description":"Cursor-paginated portfolio response.\n\n`next_cursor` is opaque (base64-encoded compound key of acquisition_date\n+ portfolio_id). Clients should treat it as a string and pass it back\nin the `cursor` query parameter to fetch the next page. `has_more` is\na convenience flag so the UI can disable Load More once exhausted."},"PortfolioPropertyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"property_id":{"type":"integer","title":"Property Id"},"address":{"type":"string","title":"Address","description":"Property address"},"property_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Type","description":"Property type name"},"ownership_structure":{"type":"string","title":"Ownership Structure","description":"individual, direct_co_ownership, or entity"},"ownership_percentage":{"type":"number","title":"Ownership Percentage","description":"Ownership percentage (0-100)"},"effective_ownership_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effective Ownership Percentage","description":"Effective ownership percentage (for entity ownership)"},"purchase_date":{"type":"string","format":"date","title":"Purchase Date","description":"Purchase/closing date"},"purchase_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Price","description":"Purchase price from property_financials (may differ from acquisition_price)"},"acquisition_price":{"type":"number","title":"Acquisition Price","description":"Acquisition price (total cost to acquire)"},"current_market_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Market Value","description":"Current market value"},"current_loan_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Loan Balance","description":"Current loan balance"},"current_equity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Equity","description":"Current equity"},"my_equity_share":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"My Equity Share","description":"My equity share"},"total_cash_flow":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cash Flow","description":"Total cash flow"},"my_cash_flow_share":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"My Cash Flow Share","description":"My cash flow share"},"monthly_p_and_i":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly P And I","description":"Monthly principal and interest payment (P&I)"},"zillow_estimate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Zillow Estimate","description":"Zillow estimated market value"},"zillow_estimate_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Zillow Estimate Date","description":"Date of Zillow estimate"},"last_appraisal_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Appraisal Value","description":"Last appraised value"},"last_appraisal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Appraisal Date","description":"Date of last appraisal"},"cap_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cap Rate","description":"Capitalization rate"},"cash_on_cash_return":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cash On Cash Return","description":"Cash-on-cash return (COC)"},"return_on_equity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Return On Equity","description":"Return on Equity (ROE)"},"return_on_assets":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Return On Assets","description":"Return on Assets (ROA)"},"original_loan_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Original Loan Amount","description":"Original loan amount"},"down_payment":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Down Payment","description":"Down payment amount"},"down_payment_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Down Payment Percentage","description":"Down payment percentage (0-100)"},"interest_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Interest Rate","description":"Mortgage interest rate (%)"},"loan_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loan Type","description":"Loan type: conventional, fha, va, hard_money, dscr, cash"},"loan_term_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Loan Term Years","description":"Loan term in years (e.g., 15, 30)"},"monthly_principal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Principal","description":"Monthly principal payment"},"monthly_interest":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Interest","description":"Monthly interest payment"},"monthly_property_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Property Tax","description":"Monthly property tax"},"monthly_hoa_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Hoa Fee","description":"Monthly HOA fee"},"monthly_insurance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Insurance","description":"Monthly insurance"},"monthly_utilities":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Utilities","description":"Monthly utilities"},"monthly_maintenance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Maintenance","description":"Monthly maintenance"},"monthly_property_management":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Property Management","description":"Monthly property management fee"},"monthly_other_expenses":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Other Expenses","description":"Monthly other expenses"},"total_monthly_ops_expenses":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Monthly Ops Expenses","description":"Monthly operating expenses (property tax, insurance, HOA, maintenance, management, utilities, other expenses). Does NOT include mortgage P&I."},"total_monthly_costs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Monthly Costs","description":"Total monthly costs = operating expenses + monthly P&I (mortgage payment)."},"monthly_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Rent","description":"Monthly rental income"},"monthly_cash_flow":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cash Flow","description":"Monthly cash flow = monthly_rent - total_monthly_costs"},"tax_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Rate","description":"Property tax rate (%)"},"original_tax_basis":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Original Tax Basis","description":"Original tax basis (purchase price + closing costs + improvements)"},"total_capital_improvements":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Capital Improvements","description":"Total capital improvements"},"closing_costs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Closing Costs","description":"Closing costs paid at acquisition"},"total_investment":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Investment","description":"Total investment = down_payment + closing_costs + total_capital_improvements"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Property status"},"exit_strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exit Strategy","description":"Exit strategy"}},"type":"object","required":["id","property_id","address","ownership_structure","ownership_percentage","purchase_date","acquisition_price"],"title":"PortfolioPropertyResponse","description":"API response schema for portfolio property"},"PortfolioPropertyUpdate":{"properties":{"ownership_structure":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ownership Structure","description":"Ownership structure: individual, direct_co_ownership, or entity"},"ownership_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ownership Percentage","description":"Ownership percentage (0-100). Required for direct_co_ownership."},"purchase_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Purchase Date","description":"Purchase/closing date (maps to acquisition_date in database)"},"acquisition_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Acquisition Price","description":"Acquisition price in investor_portfolio (total cost to acquire the property)"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Property status: active, refinanced, sold, transferred, 1031_pending"},"current_market_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Market Value","description":"Current estimated market value"},"current_loan_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Loan Balance","description":"Current loan balance"},"last_appraisal_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Appraisal Value","description":"Last appraised value"},"last_appraisal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Appraisal Date","description":"Date of last appraisal"},"exit_strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exit Strategy","description":"Exit strategy: hold_long_term, sell_5yr, 1031_exchange, cash_out_refi, pass_to_heirs"},"target_exit_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target Exit Date","description":"Target exit date"},"target_exit_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Exit Price","description":"Target exit price"},"exit_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exit Trigger","description":"Exit trigger: equity_milestone, market_peak, retirement, life_event"},"zillow_estimate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Zillow Estimate","description":"Zillow estimated market value"},"zillow_estimate_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Zillow Estimate Date","description":"Date of Zillow estimate"},"original_tax_basis":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Original Tax Basis","description":"Original tax basis (purchase price + closing costs + immediate improvements)"},"land_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Land Value","description":"Non-depreciable land value"},"accumulated_depreciation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accumulated Depreciation","description":"Accumulated depreciation"},"total_rent_collected":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Rent Collected","description":"Total rent collected (lifetime)"},"total_expenses_paid":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Expenses Paid","description":"Total expenses paid (lifetime)"},"total_capital_improvements":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Capital Improvements","description":"Total capital improvements"},"closing_costs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Closing Costs","description":"Closing costs paid at acquisition"},"tax_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Rate","description":"Property tax rate (%)"},"self_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Self Managed","description":"Whether property is self-managed"},"acquisition_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acquisition Notes","description":"Notes about acquisition"},"strategy_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Notes","description":"Strategy notes"},"lessons_learned":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lessons Learned","description":"Lessons learned"},"purchase_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Price","description":"Purchase price in property_financials (may differ from acquisition_price)"},"monthly_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Rent","description":"Monthly rental income"},"vacancy_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vacancy Rate","description":"Vacancy rate percentage (0-100)"},"monthly_property_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Property Tax","description":"Monthly property tax"},"monthly_insurance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Insurance","description":"Monthly insurance"},"monthly_hoa":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Hoa","description":"Monthly HOA fee"},"monthly_utilities":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Utilities","description":"Monthly utilities"},"monthly_maintenance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Maintenance","description":"Monthly maintenance"},"monthly_property_management":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Property Management","description":"Monthly property management fee"},"monthly_other_expenses":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Other Expenses","description":"Monthly other expenses"},"monthly_principal_interest":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Principal Interest","description":"Monthly principal and interest payment"},"loan_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Loan Amount","description":"Loan amount"},"interest_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Interest Rate","description":"Interest rate percentage"},"loan_term_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Loan Term Years","description":"Loan term in years"},"loan_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loan Type","description":"Loan type: conventional, fha, va, hard_money, dscr, cash"},"down_payment":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Down Payment","description":"Down payment amount"},"down_payment_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Down Payment Percentage","description":"Down payment percentage (0-100)"}},"type":"object","title":"PortfolioPropertyUpdate","description":"Schema for updating portfolio property - all fields optional for PATCH\n\nSupports updating both investor_portfolio and property_financials fields."},"PortfolioSummaryResponse":{"properties":{"total_properties":{"type":"integer","title":"Total Properties"},"total_equity":{"type":"number","title":"Total Equity"},"total_cash_flow":{"type":"number","title":"Total Cash Flow","description":"Sum of ownership-weighted annual cash flows (same basis as each row's my_cash_flow_share). Not lifetime cumulative cash."},"total_value":{"type":"number","title":"Total Value"},"total_debt":{"type":"number","title":"Total Debt"},"avg_cap_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Cap Rate"},"avg_roe":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Roe"},"avg_ltv":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Ltv"},"avg_coc":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Coc"},"lifetime_net_cash":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lifetime Net Cash","description":"Lifetime cumulative net cash (rent collected − expenses paid), ownership-weighted. Distinct from total_cash_flow (annual)."},"portfolio_grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portfolio Grade"},"properties_by_type":{"title":"Properties By Type"},"properties_by_state":{"title":"Properties By State"}},"type":"object","required":["total_properties","total_equity","total_cash_flow"],"title":"PortfolioSummaryResponse","description":"API response schema for portfolio summary"},"ProFormaRequest":{"properties":{"property_id":{"type":"string","title":"Property Id","description":"Property identifier"},"purchase_price":{"type":"number","exclusiveMinimum":0.0,"title":"Purchase Price","description":"Purchase price"},"monthly_rent":{"type":"number","exclusiveMinimum":0.0,"title":"Monthly Rent","description":"Monthly rental income"},"down_payment":{"type":"number","exclusiveMinimum":0.0,"title":"Down Payment","description":"Down payment amount"},"interest_rate":{"type":"number","maximum":30.0,"minimum":0.0,"title":"Interest Rate","description":"Annual interest rate as a percent (e.g. 6.5 for 6.5%)"},"monthly_property_tax":{"type":"number","minimum":0.0,"title":"Monthly Property Tax","default":0},"monthly_insurance":{"type":"number","minimum":0.0,"title":"Monthly Insurance","default":0},"monthly_hoa":{"type":"number","minimum":0.0,"title":"Monthly Hoa","default":0},"monthly_utilities":{"type":"number","minimum":0.0,"title":"Monthly Utilities","default":0},"monthly_other_expenses":{"type":"number","minimum":0.0,"title":"Monthly Other Expenses","default":0},"current_market_value":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Current Market Value"},"projection_years":{"type":"integer","maximum":30.0,"minimum":1.0,"title":"Projection Years","description":"Number of years to project","default":10},"assumptions":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Assumptions","description":"Custom assumptions (appreciation_rate, inflation_rate, etc.)"}},"type":"object","required":["property_id","purchase_price","monthly_rent","down_payment","interest_rate"],"title":"ProFormaRequest","description":"Request model for pro forma calculation","example":{"assumptions":{"appreciation_rate":0.03,"inflation_rate":0.02},"down_payment":90000,"interest_rate":6.5,"monthly_insurance":125,"monthly_property_tax":375,"monthly_rent":2500,"projection_years":10,"property_id":"prop_123","purchase_price":450000}},"ProfileStatus":{"properties":{"is_active":{"type":"boolean","title":"Is Active","default":false},"profile_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Id"}},"type":"object","title":"ProfileStatus","description":"Status details for a specific role profile."},"ProfileStatusResponse":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"investor":{"$ref":"#/components/schemas/ProfileStatus"},"realtor":{"$ref":"#/components/schemas/ProfileStatus"},"property_manager":{"$ref":"#/components/schemas/ProfileStatus"}},"type":"object","required":["investor","realtor","property_manager"],"title":"ProfileStatusResponse","description":"Unified response for all user profile statuses."},"PropertyAddress":{"properties":{"address_line1":{"type":"string","title":"Address Line1","description":"Street address line 1"},"city":{"type":"string","title":"City","description":"City"},"state":{"type":"string","title":"State","description":"State code, e.g. TX"},"zip_code":{"type":"string","title":"Zip Code","description":"5-digit ZIP code"}},"type":"object","required":["address_line1","city","state","zip_code"],"title":"PropertyAddress","description":"Full property address required for address-based resolution.\n\nAll four fields are required — partial addresses are rejected at the\nboundary so downstream services never silently lose location context."},"PropertyCoordinatesUpdate":{"properties":{"latitude":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Latitude","description":"Latitude coordinate"},"longitude":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Longitude","description":"Longitude coordinate"}},"type":"object","required":["latitude","longitude"],"title":"PropertyCoordinatesUpdate","description":"Coordinates patch payload for internal property updates."},"PropertyCreate":{"properties":{"property_type_id":{"type":"integer","title":"Property Type Id","description":"Property type ID"},"external_id":{"type":"string","title":"External Id","description":"External identifier (e.g., RentCast ID)"},"address_line1":{"type":"string","title":"Address Line1","description":"Street address line 1"},"city":{"type":"string","title":"City","description":"City"},"state":{"type":"string","title":"State","description":"State (2-letter code)"},"zip_code":{"type":"string","title":"Zip Code","description":"ZIP code"},"neighborhood_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Neighborhood Id","description":"Neighborhood ID"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2","description":"Street address line 2"},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County","description":"County"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude","description":"Latitude coordinate"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude","description":"Longitude coordinate"},"mls_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mls Number","description":"MLS number"},"parcel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parcel Id","description":"Parcel ID (APN)"},"assessor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessor Id","description":"Assessor ID"},"subdivision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subdivision","description":"Subdivision name"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms","description":"Number of bedrooms"},"bathrooms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bathrooms","description":"Number of bathrooms"},"bathrooms_full":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms Full","description":"Number of full bathrooms"},"bathrooms_half":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms Half","description":"Number of half bathrooms"},"living_area":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Living Area","description":"Living area in square feet"},"lot_size_sqft":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lot Size Sqft","description":"Lot size in square feet"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built","description":"Year built"},"legal_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Description","description":"Legal description"},"zoning_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zoning Code","description":"Zoning code"},"flood_zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flood Zone","description":"Flood zone"},"association_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Association Fee","description":"Association fee"},"association_fee_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Association Fee Frequency","description":"Association fee frequency"},"hoa_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hoa Name","description":"HOA name"},"hoa_yn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hoa Yn","description":"Has HOA?"},"last_sale_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Sale Date","description":"Last sale date"},"last_sale_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Sale Price","description":"Last sale price"},"owner_occupied":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Owner Occupied","description":"Owner occupied"},"owner_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Owner Info","description":"Owner information JSON"},"assessed_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assessed Value","description":"Assessed value"},"annual_property_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Annual Property Tax","description":"Annual property tax"},"tax_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Year","description":"Tax assessment year"},"tax_assessments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tax Assessments","description":"Tax assessments by year JSON"},"property_history":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Property History","description":"Property history JSON"},"gross_income":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Income","description":"Gross income"},"net_operating_income":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Operating Income","description":"Net operating income (NOI)"},"cap_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cap Rate","description":"Capitalization rate (%)"},"total_actual_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Actual Rent","description":"Total actual rent"},"property_sub_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Sub Type","description":"Property sub type"},"property_condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Condition","description":"Property condition"},"elementary_school":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Elementary School","description":"Elementary school name"},"middle_school":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Middle School","description":"Middle school name"},"high_school":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"High School","description":"High school name"}},"type":"object","required":["property_type_id","external_id","address_line1","city","state","zip_code"],"title":"PropertyCreate","description":"Schema for creating property - required fields for POST."},"PropertyEnricherRequest":{"properties":{"environment":{"type":"string","pattern":"^(local|dev|prod)$","title":"Environment","default":"local"},"state_fips":{"type":"string","pattern":"^\\d{2}$","title":"State Fips","description":"REQUIRED 2-digit state FIPS (V180). e.g. '48' for TX, '12' for FL. Scopes enrich_properties_batch to one state; no default."},"batch_size":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Batch Size","default":5000},"census_limit":{"type":"integer","maximum":8000.0,"minimum":1.0,"title":"Census Limit","default":1000},"census_dry_run":{"type":"boolean","title":"Census Dry Run","default":false},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"Filter properties by city"},"enrich_step":{"type":"string","enum":["property_geo_sql","census_properties","both"],"title":"Enrich Step","description":"property_geo_sql: enrich_properties_batch only. census_properties: Census HTTP pass only. both: Census pass then property_geo SQL.","default":"both"},"force_amenities":{"type":"boolean","title":"Force Amenities","description":"Force re-fill of amenity columns (nearest_hospital_*, has_park_access, has_rec_access, water_district_*) on ALREADY-enriched properties. enrich_properties_batch only re-attempts those columns when property_geo.enriched_at IS NULL (a first-pass gate that stops un-enrichable rural rows from churning). A normal run resets the cooldown to NOW()-2h, which does NOT satisfy that gate — so after a property's first enrichment, new amenity seed data (e.g. a hospital_quality reseed) can never reach it via bulk mode. Set this True after seeding new amenity source data to null out enriched_at on the affected rows so the SP re-qualifies them.","default":false}},"type":"object","required":["state_fips"],"title":"PropertyEnricherRequest"},"PropertyEnricherResponse":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"details":{"additionalProperties":true,"type":"object","title":"Details"}},"type":"object","required":["status","message","details"],"title":"PropertyEnricherResponse"},"PropertyExtractionRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"URL of the property page to extract data from"},"extraction_instruction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Instruction","description":"Custom extraction instruction. If not provided, uses default property extraction schema."}},"type":"object","required":["url"],"title":"PropertyExtractionRequest","description":"Request model for structured property extraction"},"PropertyExtractionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"url":{"type":"string","title":"Url"},"extracted_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extracted Data","description":"Structured JSON data extracted from the property page"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success","url"],"title":"PropertyExtractionResponse","description":"Response model for structured property extraction"},"PropertyFavouriteCreate":{"properties":{"list_id":{"type":"integer","minimum":1.0,"title":"List Id","description":"Target watchlist ID"},"property_id":{"type":"integer","minimum":1.0,"title":"Property Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"priority":{"type":"string","enum":["low","medium","high"],"title":"Priority","default":"medium"},"status":{"type":"string","enum":["saved","researching","offer_pending","passed"],"title":"Status","default":"saved"},"follow_up_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Follow Up At"}},"type":"object","required":["list_id","property_id"],"title":"PropertyFavouriteCreate","description":"Request body for POST /favourites."},"PropertyFavouriteResponse":{"properties":{"id":{"type":"integer","title":"Id"},"investor_id":{"type":"integer","title":"Investor Id"},"list_id":{"type":"integer","title":"List Id"},"property_id":{"type":"integer","title":"Property Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"priority":{"type":"string","enum":["low","medium","high"],"title":"Priority"},"status":{"type":"string","enum":["saved","researching","offer_pending","passed"],"title":"Status"},"follow_up_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Follow Up At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","investor_id","list_id","property_id","priority","status"],"title":"PropertyFavouriteResponse","description":"API response for a single saved property."},"PropertyFavouriteUpdate":{"properties":{"list_id":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"List Id","description":"Move to another list"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"priority":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}],"title":"Priority"},"status":{"anyOf":[{"type":"string","enum":["saved","researching","offer_pending","passed"]},{"type":"null"}],"title":"Status"},"follow_up_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Follow Up At"}},"type":"object","title":"PropertyFavouriteUpdate","description":"Request body for PATCH /favourites/{favourite_id}.\n\nAll fields optional — only supplied fields are written."},"PropertyFeaturesResponse":{"properties":{"id":{"type":"integer","title":"Id"},"property_id":{"type":"integer","title":"Property Id"},"floor_count":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Floor Count"},"room_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Room Count"},"unit_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unit Count"},"garage_spaces":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Garage Spaces"},"cooling_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cooling Type"},"heating_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Heating Type"},"roof_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roof Type"},"fireplace_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fireplace Type"},"garage_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Garage Type"},"view_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View Type"},"architecture_type":{"title":"Architecture Type"},"exterior_type":{"title":"Exterior Type"},"foundation_type":{"title":"Foundation Type"},"pool_type":{"title":"Pool Type"},"cooling_types":{"title":"Cooling Types"},"heating_types":{"title":"Heating Types"},"roof_types":{"title":"Roof Types"},"exterior_types":{"title":"Exterior Types"},"architectural_styles":{"title":"Architectural Styles"},"foundation_types":{"title":"Foundation Types"},"fireplace_features":{"title":"Fireplace Features"},"pool_features":{"title":"Pool Features"},"view_types":{"title":"View Types"},"basement_features":{"title":"Basement Features"},"flooring_types":{"title":"Flooring Types"},"appliances":{"title":"Appliances"},"interior_features":{"title":"Interior Features"},"exterior_features":{"title":"Exterior Features"},"laundry_features":{"title":"Laundry Features"},"parking_features":{"title":"Parking Features"},"security_features":{"title":"Security Features"},"waterfront_features":{"title":"Waterfront Features"},"fencing_types":{"title":"Fencing Types"},"patio_porch_features":{"title":"Patio Porch Features"},"basement_yn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Basement Yn"},"fireplace_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fireplace Count"},"waterfront_yn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Waterfront Yn"},"parking_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Parking Total"},"attached_garage_yn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Attached Garage Yn"},"additional_features":{"title":"Additional Features"}},"type":"object","required":["id","property_id"],"title":"PropertyFeaturesResponse","description":"API response schema for property features (from property_features table)."},"PropertyFinancialsResponse":{"properties":{"id":{"type":"integer","title":"Id"},"portfolio_id":{"type":"integer","title":"Portfolio Id"},"property_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Property Id"},"purchase_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Price"},"down_payment":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Down Payment"},"down_payment_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Down Payment Percentage"},"loan_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Loan Amount"},"interest_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Interest Rate"},"loan_term_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Loan Term Years"},"loan_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loan Type"},"monthly_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Rent"},"annual_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Annual Rent"},"vacancy_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vacancy Rate"},"effective_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effective Rent"},"monthly_property_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Property Tax"},"monthly_insurance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Insurance"},"monthly_hoa":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Hoa"},"total_monthly_ops_expenses":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Monthly Ops Expenses"},"monthly_principal_interest":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Principal Interest"},"monthly_cash_flow":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cash Flow"},"annual_cash_flow":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Annual Cash Flow"},"cap_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cap Rate"},"cash_on_cash_return":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cash On Cash Return"},"gross_rent_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Rent Multiplier"},"debt_service_coverage_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Debt Service Coverage Ratio"},"financing_details_json":{"title":"Financing Details Json"},"expense_breakdown_json":{"title":"Expense Breakdown Json"}},"type":"object","required":["id","portfolio_id"],"title":"PropertyFinancialsResponse","description":"API response schema for property financials."},"PropertyListResponse":{"properties":{"properties":{"items":{"$ref":"#/components/schemas/PropertyResponse"},"type":"array","title":"Properties"},"total_count":{"type":"integer","title":"Total Count"},"for_sale_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"For Sale Count","description":"How many of the total_count matched properties are for sale: the property's listing (its latest, the one the search matched and property_status reads) is an active sale listing (status active, not removed) with an asking price, i.e. the asking price the deal screener uses. Leases, unpriced Coming Soon rows, pending, under contract, sold, withdrawn or removed listings and properties with no listing are not for sale. Null unless include_for_sale_count=true and the search qualifies (see that parameter); also null if the count failed."},"filters_applied":{"additionalProperties":true,"type":"object","title":"Filters Applied"}},"type":"object","required":["properties","total_count"],"title":"PropertyListResponse","description":"API response schema for property list with summary."},"PropertyListingUpsertResponse":{"properties":{"property_id":{"type":"integer","title":"Property Id","description":"ID of the upserted property"},"listing_id":{"type":"integer","title":"Listing Id","description":"ID of the upserted listing"}},"type":"object","required":["property_id","listing_id"],"title":"PropertyListingUpsertResponse","description":"Response for POST /properties/upsert-from-scrape — IDs of the upserted rows."},"PropertyManagerProfileCreate":{"properties":{"company_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company Name"},"license_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"License Number"},"license_state":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"License State","description":"Two-letter state code"},"years_experience":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Years Experience"},"properties_managed":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Properties Managed"},"service_areas":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Service Areas","description":"Array of service areas (e.g., TX, FL, CA)"},"services_offered":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Services Offered","description":"Array of services (e.g., maintenance, tenant_screening, rent_collection)"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"website_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Website Url"}},"type":"object","title":"PropertyManagerProfileCreate","description":"Request schema for creating/updating property manager profile."},"PropertyManagerProfileResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"license_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Number"},"license_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License State"},"years_experience":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Years Experience"},"properties_managed":{"type":"integer","title":"Properties Managed"},"service_areas":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Service Areas"},"services_offered":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Services Offered"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"website_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Url"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","user_id","properties_managed","is_active"],"title":"PropertyManagerProfileResponse","description":"Response schema for property manager profile."},"PropertyPut":{"properties":{"property_type_id":{"type":"integer","title":"Property Type Id","description":"Property type ID"},"external_id":{"type":"string","title":"External Id","description":"External identifier (e.g., RentCast ID)"},"address_line1":{"type":"string","title":"Address Line1","description":"Street address line 1"},"city":{"type":"string","title":"City","description":"City"},"state":{"type":"string","title":"State","description":"State (2-letter code)"},"zip_code":{"type":"string","title":"Zip Code","description":"ZIP code"},"neighborhood_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Neighborhood Id","description":"Neighborhood ID"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2","description":"Street address line 2"},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County","description":"County"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude","description":"Latitude coordinate"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude","description":"Longitude coordinate"},"mls_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mls Number","description":"MLS number"},"parcel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parcel Id","description":"Parcel ID (APN)"},"assessor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessor Id","description":"Assessor ID"},"subdivision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subdivision","description":"Subdivision name"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms","description":"Number of bedrooms"},"bathrooms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bathrooms","description":"Number of bathrooms"},"bathrooms_full":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms Full","description":"Number of full bathrooms"},"bathrooms_half":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms Half","description":"Number of half bathrooms"},"living_area":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Living Area","description":"Living area in square feet"},"lot_size_sqft":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lot Size Sqft","description":"Lot size in square feet"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built","description":"Year built"},"legal_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Description","description":"Legal description"},"zoning_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zoning Code","description":"Zoning code"},"flood_zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flood Zone","description":"Flood zone"},"association_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Association Fee","description":"Association fee"},"association_fee_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Association Fee Frequency","description":"Association fee frequency"},"hoa_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hoa Name","description":"HOA name"},"hoa_yn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hoa Yn","description":"Has HOA?"},"last_sale_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Sale Date","description":"Last sale date"},"last_sale_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Sale Price","description":"Last sale price"},"owner_occupied":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Owner Occupied","description":"Owner occupied"},"owner_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Owner Info","description":"Owner information JSON"},"assessed_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assessed Value","description":"Assessed value"},"annual_property_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Annual Property Tax","description":"Annual property tax"},"tax_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Year","description":"Tax assessment year"},"tax_assessments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tax Assessments","description":"Tax assessments by year JSON"},"property_history":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Property History","description":"Property history JSON"},"gross_income":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Income","description":"Gross income"},"net_operating_income":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Operating Income","description":"Net operating income (NOI)"},"cap_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cap Rate","description":"Capitalization rate (%)"},"total_actual_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Actual Rent","description":"Total actual rent"},"property_sub_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Sub Type","description":"Property sub type"},"property_condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Condition","description":"Property condition"}},"type":"object","required":["property_type_id","external_id","address_line1","city","state","zip_code"],"title":"PropertyPut","description":"Schema for full property update (PUT) - all required fields must be provided."},"PropertyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"property_type_id":{"type":"integer","title":"Property Type Id"},"property_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Type"},"external_id":{"type":"string","title":"External Id","description":"External identifier (e.g., RentCast ID)"},"neighborhood_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Neighborhood Id"},"neighborhood":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Neighborhood"},"address_line1":{"type":"string","title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"type":"string","title":"City"},"state":{"type":"string","title":"State"},"zip_code":{"type":"string","title":"Zip Code"},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County"},"full_address":{"type":"string","title":"Full Address","description":"Full formatted address"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"h3_res9":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"H3 Res9"},"state_fips":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Fips","description":"2-digit state FIPS, e.g. '48'"},"county_fips":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County Fips","description":"5-digit state+county GEOID, e.g. '48491' for Williamson County, TX. Previously 3-digit (county-only); now standardized on the Census GEOID format to match cbsa_fips, place_fips, census_tract, and zip_zcta."},"census_tract":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Census Tract","description":"11-digit tract GEOID, e.g. '48491020207'"},"place_fips":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place Fips","description":"7-digit state+place GEOID, e.g. '4842016'"},"cbsa_fips":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cbsa Fips","description":"5-digit CBSA code, e.g. '12420'"},"zip_zcta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Zcta","description":"5-digit ZCTA, e.g. '78642'"},"mls_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mls Number"},"parcel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parcel Id"},"assessor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessor Id"},"subdivision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subdivision"},"subdivision_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subdivision Id"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms"},"bathrooms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bathrooms"},"bathrooms_full":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms Full"},"bathrooms_half":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms Half"},"living_area":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Living Area"},"lot_size_sqft":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lot Size Sqft"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built"},"legal_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Description"},"zoning_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zoning Code"},"flood_zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flood Zone"},"association_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Association Fee"},"association_fee_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Association Fee Frequency"},"hoa_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hoa Name"},"hoa_fee_includes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hoa Fee Includes"},"hoa_yn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hoa Yn"},"last_sale_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Sale Date"},"last_sale_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Sale Price"},"listing_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Listing Price"},"property_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Status","description":"Active while the property's latest listing is available (status Active, which includes Coming Soon, and not removed); Off Market otherwise, including no listing. The value the Status filter matches."},"listing_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Status","description":"Status of the property's latest listing (any type, priced or not): Active, Pending, Under Contract, Sold, Withdrawn, Expired or Inactive — a listing still open but removed reads Inactive; null when the property has no listings."},"primary_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Image Url","description":"First photo from listing_media on the most recent listing (by display_order); null if none available."},"floor_count":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Floor Count","description":"Number of stories/floors (Decimal(3,1) supports split-levels)"},"garage_spaces":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Garage Spaces","description":"Number of garage spaces"},"attached_garage_yn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Attached Garage Yn","description":"Whether the garage is attached to the home"},"market_rent_median":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Rent Median","description":"Latest RentCast median rent for this ZIP and property type. NULL = no data, show '-'."},"market_rent_per_sqft":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Rent Per Sqft","description":"Latest RentCast median rent per sqft for this ZIP and property type."},"owner_occupied":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Owner Occupied"},"owner_info":{"title":"Owner Info"},"assessed_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assessed Value"},"annual_property_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Annual Property Tax"},"tax_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Year"},"tax_assessments":{"title":"Tax Assessments"},"nearest_major_road":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nearest Major Road","description":"Nearest major road name from traffic counts"},"nearest_major_road_aadt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nearest Major Road Aadt","description":"AADT volume of the nearest major road"},"nearest_major_road_distance_meters":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Nearest Major Road Distance Meters","description":"Distance to nearest major road in meters"},"property_history":{"title":"Property History"},"gross_income":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Income"},"gross_scheduled_income":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Scheduled Income"},"net_operating_income":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Operating Income"},"cap_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cap Rate"},"total_actual_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Actual Rent"},"street_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Number"},"street_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Name"},"street_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Suffix"},"elementary_school":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Elementary School"},"middle_school":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Middle School"},"high_school":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"High School"},"high_school_district":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"High School District"},"property_sub_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Sub Type"},"property_condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Condition"},"year_built_effective":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built Effective"},"mls_area_major":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mls Area Major"},"lot_size_acres":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lot Size Acres"},"features":{},"financials":{},"valuation":{},"market_stats":{},"listing_details":{},"rent_estimate":{"description":"Latest third-party rent estimate (e.g. Rentometer). Use rent_mean as Average Rent; fallback if null."},"deal_score_breakdown":{"description":"Backend-authoritative 'Buy Score' (V4) for property screening."}},"type":"object","required":["id","property_type_id","external_id","address_line1","city","state","zip_code","full_address"],"title":"PropertyResponse","description":"API response schema for property (lean core table)."},"PropertySuggestion":{"properties":{"text":{"type":"string","title":"Text"},"value":{"type":"string","title":"Value"},"type":{"type":"string","title":"Type"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}},"type":"object","required":["text","value","type"],"title":"PropertySuggestion","description":"Schema for search suggestion."},"PropertyUpdate":{"properties":{"property_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Property Type Id","description":"Property type ID"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"External identifier"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1","description":"Street address line 1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2","description":"Street address line 2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code","description":"ZIP code"},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County","description":"County"},"neighborhood_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Neighborhood Id","description":"Neighborhood ID"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude","description":"Latitude coordinate"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude","description":"Longitude coordinate"},"mls_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mls Number","description":"MLS number"},"parcel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parcel Id","description":"Parcel ID (APN)"},"assessor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessor Id","description":"Assessor ID"},"subdivision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subdivision","description":"Subdivision name"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms","description":"Number of bedrooms"},"bathrooms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bathrooms","description":"Number of bathrooms"},"bathrooms_full":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms Full","description":"Number of full bathrooms"},"bathrooms_half":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms Half","description":"Number of half bathrooms"},"living_area":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Living Area","description":"Living area in square feet"},"lot_size_sqft":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lot Size Sqft","description":"Lot size in square feet"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built","description":"Year built"},"legal_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Description","description":"Legal description"},"zoning_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zoning Code","description":"Zoning code"},"flood_zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flood Zone","description":"Flood zone"},"association_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Association Fee","description":"Association fee"},"association_fee_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Association Fee Frequency","description":"Association fee frequency"},"hoa_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hoa Name","description":"HOA name"},"hoa_yn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hoa Yn","description":"Has HOA?"},"last_sale_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Sale Date","description":"Last sale date"},"last_sale_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Sale Price","description":"Last sale price"},"owner_occupied":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Owner Occupied","description":"Owner occupied"},"owner_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Owner Info","description":"Owner information JSON"},"assessed_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assessed Value","description":"Assessed value"},"annual_property_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Annual Property Tax","description":"Annual property tax"},"tax_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Year","description":"Tax assessment year"},"tax_assessments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tax Assessments","description":"Tax assessments by year JSON"},"property_history":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Property History","description":"Property history JSON"},"gross_income":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Income","description":"Gross income"},"net_operating_income":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Operating Income","description":"Net operating income (NOI)"},"cap_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cap Rate","description":"Capitalization rate (%)"},"total_actual_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Actual Rent","description":"Total actual rent"},"property_sub_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Sub Type","description":"Property sub type"},"property_condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Condition","description":"Property condition"}},"type":"object","title":"PropertyUpdate","description":"Schema for updating property - all fields optional for PATCH."},"RealtorProfileCreate":{"properties":{"license_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"License Number"},"license_state":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"License State","description":"Two-letter state code"},"brokerage_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Brokerage Name"},"years_experience":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Years Experience"},"specializations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Specializations","description":"Array of specializations (e.g., residential, commercial, luxury)"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"website_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Website Url"}},"type":"object","title":"RealtorProfileCreate","description":"Request schema for creating/updating realtor profile."},"RealtorProfileResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"license_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Number"},"license_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License State"},"brokerage_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brokerage Name"},"years_experience":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Years Experience"},"specializations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Specializations"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"website_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Url"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","user_id","is_active"],"title":"RealtorProfileResponse","description":"Response schema for realtor profile."},"RentEstimateByAddressRequest":{"properties":{"address":{"$ref":"#/components/schemas/PropertyAddress","description":"Full property address. All four sub-fields (address_line1, city, state, zip_code) are required. Must resolve to a property in our database."},"asking_rent":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Asking Rent","description":"Monthly asking rent to evaluate against the estimate"}},"type":"object","required":["address"],"title":"RentEstimateByAddressRequest","description":"Request body for POST /api/v1/rent-estimate.\n\n``address`` is required and must be complete — a partial address cannot be\nresolved to a property, and a rent estimate without one is meaningless.\n\nThere are deliberately no property-attribute fields here. market-service\ntreats request attributes as subject *overrides* that beat the DB record\n(``build_subject``), so forwarding a caller's bedrooms or living_area would\nassess a different subject than ``GET /properties/{id}/rent-estimate``\ndoes — a different rent, under a different cache key, for the same\nproperty. The property record is the subject."},"RentEstimateGranularity":{"type":"string","enum":["address","radius","zip","county","metro","state"],"title":"RentEstimateGranularity","description":"Geographic resolution of a rent estimate. Source-agnostic so consumers can\nfilter / aggregate across HUD, comps, rentometer, etc. Ordered finest → coarsest;\nmirrors the CHECK constraint on real_estate.property_rent_estimates.granularity."},"RentEstimateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"property_id":{"type":"integer","title":"Property Id"},"source":{"type":"string","title":"Source"},"rent_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rent Mean","description":"Average rent (display as Average Rent). **Null when no estimate is available** — market-service unreachable, or no source had data for this property. Null means UNKNOWN, not $0: rendering or underwriting a zero rent produces a plausible-looking cash flow and deal score from nothing. Rows loaded from the DB always carry a value (the column is NOT NULL); only a synthesized 'no estimate' response is null."},"rent_median":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rent Median"},"rent_percentile_25":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rent Percentile 25"},"rent_percentile_75":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rent Percentile 75"},"rent_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rent Min"},"rent_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rent Max"},"variance_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Variance Pct"},"samples_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Samples Count"},"radius_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Radius Miles"},"look_back_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Look Back Days"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms"},"baths":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baths"},"building_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Type"},"summary_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary Comment"},"source_response_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Response Url"},"granularity":{"anyOf":[{"type":"string","enum":["address","radius","zip","county","metro","state"]},{"type":"null"}],"description":"Geographic resolution of the estimate. Constrained enum (address|radius|zip|county|metro|state), generic across sources so the UI/agent can filter and aggregate."},"fips_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fips Code","description":"Source-area identifier: HUD canonical 10-digit entity ID for county/metro estimates, ZIP code for zip-level. None for address/radius/state."},"includes_utilities":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Includes Utilities","description":"True if rent is gross rent (includes utilities), False if rent to owner only, None if unknown. HUD FMR is always True."},"rent_to_owner_estimate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rent To Owner Estimate","description":"Estimated rent to owner (gross rent minus utility allowance). Set when source is HUD (rule-of-thumb ~15%); null otherwise."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When this estimate was stored (last updated)"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","property_id","source"],"title":"RentEstimateResponse","description":"Latest third-party rent estimate (e.g. Rentometer QuickView) for display."},"ResolvedInputs":{"properties":{"purchase_price":{"type":"number","title":"Purchase Price"},"purchase_price_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purchase Price Source"},"monthly_rent":{"type":"number","title":"Monthly Rent"},"rent_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rent Source"},"interest_rate":{"type":"number","title":"Interest Rate"},"down_payment_pct":{"type":"number","title":"Down Payment Pct"},"property_tax_rate":{"type":"number","title":"Property Tax Rate"},"tax_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Source"},"insurance_rate":{"type":"number","title":"Insurance Rate"},"fair_market_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fair Market Price"},"fmv_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fmv Source"},"rent_growth_yoy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rent Growth Yoy","description":"YoY rent growth % used: the caller's, else the local 12-month forecast / observed ZORI YoY. Null when neither exists (growth unmeasured)."},"vacancy_rate":{"type":"number","title":"Vacancy Rate","description":"Vacancy % applied to rent for NOI and cash flow — the caller's value, or the default when none was given (0.0 = no vacancy modelled)."},"loan_term_years":{"type":"integer","title":"Loan Term Years","description":"Loan amortization term actually used — the caller's, or the default."},"property_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Property Id"},"living_area":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Living Area"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built"},"year_built_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Year Built Source","description":"Where year_built came from: 'manual' (request override), 'property-record', or null when unknown."},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms"}},"type":"object","required":["purchase_price","monthly_rent","interest_rate","down_payment_pct","property_tax_rate","insurance_rate","rent_growth_yoy","vacancy_rate","loan_term_years"],"title":"ResolvedInputs","description":"The inputs the orchestrator actually used after resolving overrides,\nmarket defaults, and internal DB records. Every field is returned so\nthe UI can show provenance ('tax rate: actual' vs 'ZIP avg')."},"ResourceGrantCreate":{"properties":{"resource_type":{"type":"string","enum":["deal","portfolio","favourite_list"],"title":"Resource Type","description":"Kind of resource being shared (deal or portfolio)."},"resource_id":{"type":"integer","minimum":1.0,"title":"Resource Id","description":"ID of the deal or portfolio."},"grantee_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Grantee Email","description":"Email of the investor to share with. Server resolves to investor_id. Privacy note: the UI never learns whether the email belongs to a registered investor — this path always returns the same error shape on failure."},"grantee_investor_id":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Grantee Investor Id","description":"Individual grantee by id (alternative to grantee_email)."},"grantee_entity_id":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Grantee Entity Id","description":"Entity grantee — every active member of this entity (e.g. a SHARING_GROUP Family Group) inherits access."},"access_level":{"type":"string","enum":["view","edit"],"title":"Access Level","description":"view = read-only sharing (current default). edit is reserved for future write-through delegation and is not yet honoured by the RLS policies — only owners can mutate.","default":"view"},"grant_reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Grant Reason","description":"Free-text reason for the grant (audit trail)."}},"type":"object","required":["resource_type","resource_id"],"title":"ResourceGrantCreate","description":"Request body for ``POST /api/v1/resource-grants``.\n\nThe caller is always the grantor — the service stamps\n``granted_by_investor_id`` from the authenticated investor and the\n``resource_grants_insert_policy`` RLS clause enforces it. Callers\nMUST own the resource being shared; the service performs an explicit\nownership check before the INSERT (RLS alone cannot express a\npolymorphic deal/portfolio owner check).\n\nGrantee is exactly one of three:\n    * ``grantee_email``      — UI-friendly path. Service resolves\n                               the email server-side to an active\n                               investor (privacy-preserving — the\n                               UI never learns whether an email is\n                               registered). Returns 404 if no\n                               investor with that email exists.\n    * ``grantee_investor_id`` — direct investor id, used by\n                                internal/service-to-service paths.\n    * ``grantee_entity_id``   — every active member of this entity\n                                (SHARING_GROUP Family Group) inherits\n                                the grant."},"ResourceGrantListResponse":{"properties":{"grants":{"items":{"$ref":"#/components/schemas/ResourceGrantResponse"},"type":"array","title":"Grants"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["grants","total_count"],"title":"ResourceGrantListResponse","description":"Envelope for GET /api/v1/resource-grants."},"ResourceGrantResponse":{"properties":{"id":{"type":"integer","title":"Id"},"resource_type":{"type":"string","enum":["deal","portfolio","favourite_list"],"title":"Resource Type"},"resource_id":{"type":"integer","title":"Resource Id"},"grantee_investor_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Grantee Investor Id"},"grantee_entity_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Grantee Entity Id"},"granted_by_investor_id":{"type":"integer","title":"Granted By Investor Id"},"access_level":{"type":"string","enum":["view","edit"],"title":"Access Level"},"grant_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grant Reason"},"granted_at":{"type":"string","format":"date-time","title":"Granted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"revoked_by_investor_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Revoked By Investor Id"},"revoke_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoke Reason"}},"type":"object","required":["id","resource_type","resource_id","granted_by_investor_id","access_level","granted_at"],"title":"ResourceGrantResponse","description":"Response shape for every grant surface."},"ResourceGrantRevoke":{"properties":{"revoke_reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Revoke Reason","description":"Free-text reason for revoking the grant."}},"type":"object","title":"ResourceGrantRevoke","description":"Optional request body for ``DELETE /api/v1/resource-grants/{id}``.\n\nRevocation is soft — the DB keeps the row and the helpers filter\non ``revoked_at IS NULL``. The reason is captured for audit."},"RiskItem":{"properties":{"label":{"type":"string","title":"Label"},"severity":{"type":"string","title":"Severity"},"insight":{"type":"string","title":"Insight"},"action":{"type":"string","title":"Action"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"}},"type":"object","required":["label","severity","insight","action"],"title":"RiskItem"},"RunJobRequest":{"properties":{"job_name":{"type":"string","minLength":1,"title":"Job Name","description":"Short job name (e.g. 'prop-cafe-ingest-rentcast')"},"env_overrides":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Env Overrides","description":"Optional env var overrides: [{name: str, value: str}]"}},"type":"object","required":["job_name"],"title":"RunJobRequest","description":"Request body for triggering a Cloud Run job."},"ScoreBand":{"properties":{"code":{"type":"string","title":"Code","description":"Stable band code, unique across all kinds, e.g. 'BUY'"},"ordinal":{"type":"integer","title":"Ordinal","description":"Rank within the kind: 0 is the worst band, higher is better. Compare ordinals instead of parsing codes."},"kind":{"type":"string","enum":["deal","vibe","market","consensus","signal"],"title":"Kind","description":"Which band ladder the code belongs to"}},"type":"object","required":["code","ordinal","kind"],"title":"ScoreBand","description":"A score's qualitative band, as decided by the API.\n\nClients render the band they are given; they never derive one from a score."},"ScoreDriver":{"properties":{"code":{"type":"string","title":"Code","description":"Stable code, e.g. 'COC_WEAK'"},"severity":{"type":"string","title":"Severity","description":"'high' | 'med' | 'low'"},"positive":{"type":"boolean","title":"Positive"},"text":{"type":"string","title":"Text","description":"Default rendering; any channel may use as-is"},"params":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"}]},"type":"object","title":"Params","description":"Raw values for channels that re-render, e.g. {'coc': -14.1}"}},"type":"object","required":["code","severity","positive","text"],"title":"ScoreDriver","description":"A single reason behind a score."},"ScoreVerdict":{"properties":{"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"band":{"anyOf":[{"$ref":"#/components/schemas/ScoreBand"},{"type":"null"}]},"drivers":{"items":{"$ref":"#/components/schemas/ScoreDriver"},"type":"array","title":"Drivers"},"data_coverage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Data Coverage"},"insufficient_reasons":{"items":{"type":"string"},"type":"array","title":"Insufficient Reasons"}},"type":"object","title":"ScoreVerdict","description":"Generic score payload. Deal-specific context stays on the deal response.\n\nScore and band are null together. A non-finite score (NaN or infinite) is\ndropped with its band, and 'non_finite_score' is added to\ninsufficient_reasons."},"ScrapePropertyRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"URL of the property page to scrape"},"use_clean_content":{"type":"boolean","title":"Use Clean Content","description":"If True (default), applies noise-reduction filters (excluded_tags, content filtering). Set to False for raw content without filtering.","default":true},"timeout":{"anyOf":[{"type":"integer","maximum":300.0,"minimum":10.0},{"type":"null"}],"title":"Timeout","description":"Request timeout in seconds (default: 120, max: 300). Increase for slower sites or complex pages. The frontend should also increase its timeout accordingly."},"combine_results":{"type":"boolean","title":"Combine Results","description":"If True (default), combines results from all pages into a single JSON object. Set to False to receive individual results per page (more resilient to partial failures).","default":true}},"type":"object","required":["url"],"title":"ScrapePropertyRequest","description":"Request model for scraping property URL"},"ScrapePropertyResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"url":{"type":"string","title":"Url"},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdown","description":"Clean markdown content (prefers fit_markdown when available, falls back to raw_markdown)"},"cleaned_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cleaned Html","description":"Cleaned HTML with noise elements removed (nav, footer, header, etc.)"},"html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html","description":"Full original HTML content"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Page metadata (title, description, OpenGraph tags, etc.)"},"extracted_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extracted Data","description":"Structured JSON data extracted via LLM (always included)"},"data":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Data","description":"Full raw crawl results from Crawl4AI"},"metrics":{"anyOf":[{"$ref":"#/components/schemas/PerformanceMetrics"},{"type":"null"}],"description":"Performance metrics for crawl and LLM extraction times"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success","url"],"title":"ScrapePropertyResponse","description":"Response model for scraped property data"},"ScreenCriterion":{"properties":{"metric":{"type":"string","enum":["monthly_cash_flow","cap_rate","dscr","cash_on_cash","grm","monthly_piti","down_payment","score","price_to_value"],"title":"Metric","description":"Computed metric to test (allowlisted)."},"op":{"type":"string","enum":[">=","<=",">","<","=="],"title":"Op","description":"Comparison operator."},"value":{"type":"number","title":"Value","description":"Threshold the metric is compared against."}},"type":"object","required":["metric","op","value"],"title":"ScreenCriterion","description":"One pass/fail predicate over a computed metric.\n\nAll criteria in a request are ANDed: a property passes only when every\ncriterion holds. Example: ``{\"metric\": \"monthly_cash_flow\", \"op\": \">=\",\n\"value\": 0}`` keeps properties that at least break even."},"ScreenFilters":{"properties":{"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"Filter by city, e.g. 'San Antonio'."},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"2-letter state code, e.g. 'TX'."},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code","description":"5-digit ZIP code."},"data_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Provider","description":"Crawl origin / provider, e.g. 'VRM Properties', 'Lennar'."},"property_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Property Type Id","description":"Property type ID."},"property_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Status","description":"e.g. 'Active', 'Off Market'."},"min_price":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Price","description":"Minimum listing price."},"max_price":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Price","description":"Maximum listing price."},"min_bedrooms":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Min Bedrooms","description":"Minimum bedrooms."},"max_bedrooms":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Max Bedrooms","description":"Maximum bedrooms."},"min_bathrooms":{"anyOf":[{"type":"number","maximum":99.0,"minimum":0.0},{"type":"null"}],"title":"Min Bathrooms","description":"Minimum bathrooms (recorded to one decimal, e.g. 2.5)."},"max_bathrooms":{"anyOf":[{"type":"number","maximum":99.0,"minimum":0.0},{"type":"null"}],"title":"Max Bathrooms","description":"Maximum bathrooms (recorded to one decimal, e.g. 2.5)."},"min_living_area":{"anyOf":[{"type":"integer","maximum":1000000.0,"minimum":0.0},{"type":"null"}],"title":"Min Living Area","description":"Minimum living area, sqft."},"max_living_area":{"anyOf":[{"type":"integer","maximum":1000000.0,"minimum":0.0},{"type":"null"}],"title":"Max Living Area","description":"Maximum living area, sqft."},"min_lot_size_sqft":{"anyOf":[{"type":"integer","maximum":2000000000.0,"minimum":0.0},{"type":"null"}],"title":"Min Lot Size Sqft","description":"Minimum lot size, sqft."},"max_lot_size_sqft":{"anyOf":[{"type":"integer","maximum":2000000000.0,"minimum":0.0},{"type":"null"}],"title":"Max Lot Size Sqft","description":"Maximum lot size, sqft."},"min_year_built":{"anyOf":[{"type":"integer","maximum":9999.0,"minimum":0.0},{"type":"null"}],"title":"Min Year Built","description":"Built in or after this year."},"max_year_built":{"anyOf":[{"type":"integer","maximum":9999.0,"minimum":0.0},{"type":"null"}],"title":"Max Year Built","description":"Built in or before this year."},"min_stories":{"anyOf":[{"type":"number","maximum":99.0,"minimum":0.0},{"type":"null"}],"title":"Min Stories","description":"Minimum stories (recorded to one decimal; 1.5 = one-and-a-half story)."},"max_stories":{"anyOf":[{"type":"number","maximum":99.0,"minimum":0.0},{"type":"null"}],"title":"Max Stories","description":"Maximum stories (recorded to one decimal; 1.5 = one-and-a-half story)."},"condition":{"anyOf":[{"type":"string","enum":["needs_work","move_in_ready","unknown"]},{"type":"null"}],"title":"Condition","description":"Condition read from the sale listing's description: 'needs_work' (says it needs TLC/repairs/updating or a new roof etc., fixer-upper, investor special), 'move_in_ready' (says move-in ready, turnkey, or recently/fully renovated or remodeled), or 'unknown' (no description, or neither stated; 'new roof' or 'updated kitchen' alone is unknown)."}},"additionalProperties":false,"type":"object","title":"ScreenFilters","description":"Candidate-set filters — mirror of the property search filters used to\npick which properties to underwrite.\n\nAn unknown key is a 422: dropping it would screen the unfiltered set and\nreturn it as the filtered answer."},"ScreenFinancing":{"properties":{"down_payment_pct":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Down Payment Pct","description":"Down payment %. Default 25."},"interest_rate":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Interest Rate","description":"Annual interest rate %. Default FRED 30yr / 6.5."},"property_tax_rate":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Property Tax Rate","description":"Annual property tax rate %. Default 2.0."},"insurance_rate":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Insurance Rate","description":"Annual insurance rate %. Default 0.5."}},"type":"object","title":"ScreenFinancing","description":"Financing scenario applied to EVERY candidate. Omitted fields fall back\nto the platform calculation defaults (down payment 25%, FRED/6.5% rate,\ntax 2.0%, insurance 0.5%)."},"ScreenMetrics":{"properties":{"monthly_cash_flow":{"type":"number","title":"Monthly Cash Flow"},"cap_rate":{"type":"number","title":"Cap Rate"},"dscr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dscr"},"cash_on_cash":{"type":"number","title":"Cash On Cash"},"grm":{"type":"number","title":"Grm"},"monthly_piti":{"type":"number","title":"Monthly Piti"},"down_payment":{"type":"number","title":"Down Payment"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"score_band":{"anyOf":[{"$ref":"#/components/schemas/ScoreBand"},{"type":"null"}],"description":"Deal band of `score` from the engine's verdict; null when `score` is. Render this, never re-derive it from `score`."},"price_to_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price To Value","description":"Asking price divided by the row's estimated_value; below 1 means listed under the estimate (0.9 = 10% under). Null when the property has no stored value."}},"type":"object","required":["monthly_cash_flow","cap_rate","cash_on_cash","grm","monthly_piti","down_payment"],"title":"ScreenMetrics","description":"Underwriting metrics for one property at the request's financing scenario.\n\nMonthly dollars unless noted. ``dscr`` is None for all-cash (no debt\nservice). ``score`` is the 0-100 Quick Score (None when inputs are\ninsufficient, e.g. no rent comp); ``score_band`` is its deal band.\n``price_to_value`` is asking price / estimated value (None when no value)."},"ScreenRequest":{"properties":{"property_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Property Ids","description":"Underwrite these property IDs (max 1000). Mutually complete with filters; when both are given, filters further constrain the set. Only ids with a current asking price are screened: total_matched < len(property_ids) when some had none."},"filters":{"anyOf":[{"$ref":"#/components/schemas/ScreenFilters"},{"type":"null"}],"description":"Candidate-set filters when property_ids is not supplied."},"financing":{"$ref":"#/components/schemas/ScreenFinancing","description":"Financing scenario applied to every candidate."},"criteria":{"items":{"$ref":"#/components/schemas/ScreenCriterion"},"type":"array","title":"Criteria","description":"Pass/fail predicates (ANDed). Empty = analyze all, none flagged."},"sort_by":{"type":"string","enum":["monthly_cash_flow","cap_rate","dscr","cash_on_cash","grm","monthly_piti","down_payment","score","price_to_value"],"title":"Sort By","description":"Metric to sort results by.","default":"monthly_cash_flow"},"sort_desc":{"type":"boolean","title":"Sort Desc","description":"Sort descending (best first) when true.","default":true},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","description":"Cap on properties analyzed (most recent listings first).","default":100}},"additionalProperties":false,"type":"object","title":"ScreenRequest","description":"Request body for POST /deals/screen.\n\nProvide EITHER ``property_ids`` (a known set, e.g. piped from a prior\nproperty search) OR ``filters`` (resolve the candidate set here). Providing\nneither screens nothing and is rejected. Unknown keys are rejected too\n(a misplaced filter would otherwise be dropped)."},"ScreenResponse":{"properties":{"total_matched":{"type":"integer","title":"Total Matched","description":"Candidates matching the filters before the cap."},"analyzed":{"type":"integer","title":"Analyzed","description":"Candidate properties processed (post-cap, <= limit). Includes rows skipped for missing price/rent; use len(results without skipped) for the underwritten count."},"passed":{"type":"integer","title":"Passed","description":"Analyzed properties that passed all criteria."},"truncated":{"type":"boolean","title":"Truncated","description":"True when total_matched exceeded the cap and rows were dropped.","default":false},"valued":{"type":"integer","title":"Valued","description":"Underwritten (non-skipped) rows that had a stored value, i.e. the rows a price_to_value criterion could actually test.","default":0},"values_unavailable":{"type":"boolean","title":"Values Unavailable","description":"True when stored values could not be read: every estimated_value / price_to_value is null because of an outage, not because none exist.","default":false},"financing":{"$ref":"#/components/schemas/ScreenFinancing","description":"Resolved financing scenario echo."},"criteria":{"items":{"$ref":"#/components/schemas/ScreenCriterion"},"type":"array","title":"Criteria","description":"Criteria echo (for provenance)."},"results":{"items":{"$ref":"#/components/schemas/ScreenRow"},"type":"array","title":"Results"}},"type":"object","required":["total_matched","analyzed","passed","financing"],"title":"ScreenResponse","description":"Canonical response for POST /deals/screen.\n\nConsumed by the FE (Zod-generated from this schema) and internal callers\n(Rex deal_screener tool). Changes here propagate to the OpenAPI baseline."},"ScreenRow":{"properties":{"property_id":{"type":"integer","title":"Property Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms"},"bathrooms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bathrooms"},"living_area":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Living Area","description":"Living area, sqft."},"lot_size_sqft":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lot Size Sqft"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built"},"stories":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stories","description":"Floor count; 1.5 = one-and-a-half story. Null = not on file."},"condition":{"type":"string","enum":["needs_work","move_in_ready","unknown"],"title":"Condition","description":"Condition read from the listing description (see filters.condition).","default":"unknown"},"condition_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition Note","description":"The description's phrase the condition was read from."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The sale listing's description."},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"monthly_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Rent"},"rent_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rent Source","description":"How rent was resolved: 'market_median', 'per_sqft', or None."},"estimated_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Value","description":"Latest stored sale valuation (AVM); null when none exists."},"estimated_value_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estimated Value Source","description":"Where estimated_value came from, e.g. 'computed_avm', 'rentcast_avm'."},"estimated_value_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Estimated Value Date","description":"Date of estimated_value — report it; an old value may be stale."},"passed":{"type":"boolean","title":"Passed","description":"True when all criteria hold (false if skipped).","default":false},"skipped":{"type":"boolean","title":"Skipped","description":"True when the property could not be underwritten.","default":false},"skip_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skip Reason","description":"Why the property was skipped, if it was."},"metrics":{"anyOf":[{"$ref":"#/components/schemas/ScreenMetrics"},{"type":"null"}]},"failed_criteria":{"items":{"type":"string"},"type":"array","title":"Failed Criteria","description":"Human-readable criteria the property failed, e.g. 'cap_rate >= 6'."}},"type":"object","required":["property_id"],"title":"ScreenRow","description":"One property's screening result."},"SpatialSearchRequest":{"properties":{"geojson":{"$ref":"#/components/schemas/GeoJSONPolygon","description":"GeoJSON polygon geometry. Example: {\"type\": \"Polygon\", \"coordinates\": [[[lng, lat], [lng, lat], ...]]}"},"limit":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Limit","description":"Maximum number of properties to return","default":100}},"type":"object","required":["geojson"],"title":"SpatialSearchRequest","description":"Request schema for polygon-based spatial search."},"URLBasedPaginationConfig":{"properties":{"page_param":{"type":"string","title":"Page Param","description":"URL parameter name for page number (e.g., 'page', 'p', 'offset')","default":"page"},"start_page":{"type":"integer","minimum":1.0,"title":"Start Page","description":"Starting page number (inclusive)","default":1},"end_page":{"type":"integer","minimum":1.0,"title":"End Page","description":"Ending page number (inclusive). Must be >= start_page"},"base_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Base Url","description":"Base URL pattern. If not provided, uses initial_url and appends page parameter."}},"type":"object","required":["end_page"],"title":"URLBasedPaginationConfig","description":"URL-based pagination configuration"},"UserActivityBatchRequest":{"properties":{"events":{"items":{"$ref":"#/components/schemas/UserActivityRequest"},"type":"array","maxItems":50,"title":"Events"}},"type":"object","required":["events"],"title":"UserActivityBatchRequest","description":"Batch request for recording multiple activity events at once."},"UserActivityRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"event_type":{"type":"string","maxLength":50,"title":"Event Type"},"event_name":{"type":"string","maxLength":100,"title":"Event Name"},"path":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Path"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"session_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Session Id"},"ip_address":{"anyOf":[{"type":"string","maxLength":45},{"type":"null"}],"title":"Ip Address"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"referrer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Referrer"},"duration_ms":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Duration Ms"}},"type":"object","required":["user_id","event_type","event_name"],"title":"UserActivityRequest","description":"Request schema for recording user activity from Next.js middleware/client."},"UserResponse":{"properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"id":{"type":"string","format":"uuid","title":"Id"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"role":{"type":"string","title":"Role","description":"Legacy primary role (deprecated - use roles field)"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","description":"List of user roles (multi-role support)"},"is_active":{"type":"boolean","title":"Is Active","default":true},"status":{"$ref":"#/components/schemas/UserStatus","default":"active"},"email_verified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Email Verified"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","role"],"title":"UserResponse","description":"User data returned to the authenticated user."},"UserStatus":{"type":"string","enum":["active","pending","archived","deleted","suspended","locked"],"title":"UserStatus","description":"User account status."},"UserUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"}},"type":"object","title":"UserUpdateRequest","description":"Fields the current user is allowed to update on their own profile."},"UsersListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"items":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Items"}},"type":"object","required":["total","items"],"title":"UsersListResponse","description":"Paginated list of users for admin view."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ValuationCreate":{"properties":{"property_id":{"type":"integer","title":"Property Id","description":"Property ID (FK to properties.id)"},"valuation_type":{"type":"string","title":"Valuation Type","description":"Valuation type: 'sale' or 'rent'"},"estimate_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Estimate Amount","description":"Estimated value/rent"},"valuation_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valuation Date","description":"Date of valuation (defaults to today)"},"estimate_low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Estimate Low","description":"Low estimate"},"estimate_high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Estimate High","description":"High estimate"},"confidence_score":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Confidence Score","description":"Confidence score (0-1)"},"comparables":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Comparables","description":"Comparable properties used"}},"type":"object","required":["property_id","valuation_type","estimate_amount"],"title":"ValuationCreate","description":"Schema for creating valuation - required fields for POST."},"ValuationListResponse":{"properties":{"valuations":{"items":{"$ref":"#/components/schemas/ValuationResponse"},"type":"array","title":"Valuations"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["valuations","total","limit","offset"],"title":"ValuationListResponse","description":"API response schema for valuation list with pagination."},"ValuationResponse":{"properties":{"id":{"type":"integer","title":"Id"},"property_id":{"type":"integer","title":"Property Id","description":"Property ID (FK to properties.id)"},"valuation_type":{"type":"string","title":"Valuation Type","description":"Valuation type: 'sale' or 'rent'"},"estimate_amount":{"title":"Estimate Amount","description":"Estimated value/rent"},"valuation_date":{"title":"Valuation Date","description":"Date of valuation"},"estimate_low":{"title":"Estimate Low","description":"Low estimate"},"estimate_high":{"title":"Estimate High","description":"High estimate"},"confidence_score":{"title":"Confidence Score","description":"Confidence score (0-1)"},"comparables":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Comparables","description":"Comparable properties used"},"comparables_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Comparables Count","description":"Number of comparables"},"estimate_range_pct":{"title":"Estimate Range Pct","description":"Estimate range percentage"},"created_at":{"title":"Created At"},"updated_at":{"title":"Updated At"}},"type":"object","required":["id","property_id","valuation_type","estimate_amount","valuation_date"],"title":"ValuationResponse","description":"API response schema for property valuation."},"ValuationUpdate":{"properties":{"estimate_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Estimate Amount","description":"Estimated value/rent"},"estimate_low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Estimate Low","description":"Low estimate"},"estimate_high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Estimate High","description":"High estimate"},"confidence_score":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Confidence Score","description":"Confidence score (0-1)"},"comparables":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Comparables","description":"Comparable properties used"}},"type":"object","title":"ValuationUpdate","description":"Schema for updating valuation - all fields optional for PATCH."},"app__schemas__deal__DealScoreDriver":{"properties":{"label":{"type":"string","title":"Label"},"impact":{"type":"string","title":"Impact"},"positive":{"type":"boolean","title":"Positive"}},"type":"object","required":["label","impact","positive"],"title":"DealScoreDriver"},"app__schemas__deal_score__DealScoreDriver":{"properties":{"label":{"type":"string","title":"Label"},"impact":{"type":"string","enum":["high","med","low"],"title":"Impact"},"positive":{"type":"boolean","title":"Positive"}},"type":"object","required":["label","impact","positive"],"title":"DealScoreDriver","description":"A single human-readable reason contributing to the score."}}}}