{"openapi":"3.1.0","info":{"title":"Casa Intelligence Engine","description":"Proprietary data ingestion, analysis, and prediction engine for Queensland property development intelligence.","version":"2.0.0"},"paths":{"/engine/ingest/logan":{"post":{"tags":["ingestion"],"summary":"Ingest Logan Endpoint","description":"Trigger Logan City Council DA ingestion.","operationId":"ingest_logan_endpoint_engine_ingest_logan_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/scc":{"post":{"tags":["ingestion"],"summary":"Ingest Scc Endpoint","description":"Trigger Sunshine Coast Council DA ingestion.","operationId":"ingest_scc_endpoint_engine_ingest_scc_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/moreton-bay":{"post":{"tags":["ingestion"],"summary":"Ingest Moreton Bay Endpoint","description":"Trigger Moreton Bay Regional Council DA ingestion.","operationId":"ingest_moreton_bay_endpoint_engine_ingest_moreton_bay_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/gold-coast":{"post":{"tags":["ingestion"],"summary":"Ingest Gold Coast Endpoint","description":"Trigger Gold Coast City Council DA ingestion.","operationId":"ingest_gold_coast_endpoint_engine_ingest_gold_coast_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/brisbane":{"post":{"tags":["ingestion"],"summary":"Ingest Brisbane Endpoint","description":"Trigger Brisbane City Council DA ingestion (development.i scraper).","operationId":"ingest_brisbane_endpoint_engine_ingest_brisbane_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/brisbane-enrich":{"post":{"tags":["ingestion"],"summary":"Enrich Brisbane Endpoint","description":"Enrich Brisbane DA records with detail page data (decision, assessment, dates).","operationId":"enrich_brisbane_endpoint_engine_ingest_brisbane_enrich_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/dcdb-properties":{"post":{"tags":["ingestion"],"summary":"Ingest Dcdb Properties Endpoint","description":"Ingest QLD DCDB cadastral parcels for all SEQ councils (~1.89M properties).","operationId":"ingest_dcdb_properties_endpoint_engine_ingest_dcdb_properties_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/bcc-zones":{"post":{"tags":["ingestion"],"summary":"Ingest Bcc Zones Endpoint","description":"Ingest BCC zone polygons and spatially assign zones to Brisbane properties.","operationId":"ingest_bcc_zones_endpoint_engine_ingest_bcc_zones_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/scc-zones":{"post":{"tags":["ingestion"],"summary":"Ingest Scc Zones Endpoint","description":"Ingest SCC zone polygons and spatially assign zones to Sunshine Coast properties.","operationId":"ingest_scc_zones_endpoint_engine_ingest_scc_zones_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/logan-zones":{"post":{"tags":["ingestion"],"summary":"Ingest Logan Zones Endpoint","description":"Ingest Logan zone polygons and spatially assign zones to Logan properties.","operationId":"ingest_logan_zones_endpoint_engine_ingest_logan_zones_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/gccc-zones":{"post":{"tags":["ingestion"],"summary":"Ingest Gccc Zones Endpoint","description":"Ingest Gold Coast zone polygons and spatially assign zones to GC properties.","operationId":"ingest_gccc_zones_endpoint_engine_ingest_gccc_zones_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/mbrc-zones":{"post":{"tags":["ingestion"],"summary":"Ingest Mbrc Zones Endpoint","description":"Ingest Moreton Bay zone polygons and spatially assign zones to MBRC properties.","operationId":"ingest_mbrc_zones_endpoint_engine_ingest_mbrc_zones_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/all-zones":{"post":{"tags":["ingestion"],"summary":"Ingest All Zones Endpoint","description":"Run zone ingestion for all 5 councils sequentially.","operationId":"ingest_all_zones_endpoint_engine_ingest_all_zones_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/IngestionResponse"},"type":"array","title":"Response Ingest All Zones Endpoint Engine Ingest All Zones Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/planning-alerts":{"post":{"tags":["ingestion"],"summary":"Ingest Planning Alerts Endpoint","description":"Trigger PlanningAlerts ingestion for all SEQ authorities.","operationId":"ingest_planning_alerts_endpoint_engine_ingest_planning_alerts_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/seed-rules":{"post":{"tags":["ingestion"],"summary":"Seed Rules Endpoint","description":"Seed planning rules from known council schemes.","operationId":"seed_rules_endpoint_engine_ingest_seed_rules_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/ingest/all":{"post":{"tags":["ingestion"],"summary":"Ingest All Endpoint","description":"Run all ingestion workers sequentially.","operationId":"ingest_all_endpoint_engine_ingest_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/IngestionResponse"},"type":"array","title":"Response Ingest All Endpoint Engine Ingest All Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/status":{"get":{"tags":["status"],"summary":"Get Status","description":"Health check and status overview. No auth required.\nReturns database connectivity, per-source stats, and record counts.","operationId":"get_status_engine_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}}}}},"/engine/health":{"get":{"tags":["status"],"summary":"Health Check","description":"Simple health check for load balancers and monitoring.","operationId":"health_check_engine_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/engine/db-check":{"get":{"tags":["status"],"summary":"Db Diagnostic","description":"Diagnostic: shows exact DB connection error if any.","operationId":"db_diagnostic_engine_db_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/engine/metrics":{"get":{"tags":["status"],"summary":"Metrics","description":"Lightweight pool + connection metrics for ops dashboards.\n\nReturns SQLAlchemy pool stats (per-worker view) plus pg_stat_activity\nsummary (cluster-wide view). Used by the casa-daily ops dashboard\nand external monitors to detect pool saturation or zombie buildup\nbefore users feel it.\n\nAuth: relies on Railway's private network — endpoint is registered\nbehind the existing /engine prefix. If exposed publicly later, add\nX-API-Key gating like the v1 endpoints.\n\nCosts ~5ms — safe to poll every 10-30s.","operationId":"metrics_engine_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/property/lookup":{"get":{"tags":["property"],"summary":"Lookup Property","description":"Look up a property by street address.\n\n1. Geocodes the address using ArcGIS World Geocoder\n2. Finds the matching ci_properties record (lot/plan match or nearest centroid)\n3. Returns the full property data + zone rules + DA counts\n\nThis is the primary entry point for the website checkout flow.","operationId":"lookup_property_api_v1_property_lookup_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","minLength":3,"description":"Street address to search for","title":"Address"},"description":"Street address to search for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/property/resolve":{"get":{"tags":["property"],"summary":"Resolve Property","description":"Resolve an address to a Casa-Engine property_id.\nLightweight version of /lookup — returns ONLY the UUID + matched\naddress (not the full enrichment payload). The Chrome extension\ncalls this before /api/v1/property/{id} so it can switch to\nUUID-based lookups without paying the full lookup cost.","operationId":"resolve_property_api_v1_property_resolve_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","minLength":3,"description":"Address to resolve to a property UUID","title":"Address"},"description":"Address to resolve to a property UUID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["property"],"summary":"Resolve Property","description":"Take an address (or lat/lng) and return the ci_properties.id that\nrepresents that parcel. Self-heals the row if the parcel isn't in\nour index yet.\n\nBody:\n  {\n    \"address\": \"5 Some Street, Eumundi QLD 4562\",  // optional\n    \"lat\": -26.45297,                              // optional\n    \"lng\":  152.97092                              // optional\n  }\n\nAt least one of (address, lat+lng) is required.","operationId":"resolve_property_api_v1_property_resolve_post","security":[{"APIKeyHeader":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resolve Property Api V1 Property Resolve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/property/{property_id}":{"get":{"tags":["property"],"summary":"Get Property","description":"Get full property intelligence by ID.\n\nSequential (safe) execution, with per-stage timing for visibility:\n\nFirst attempt at parallelisation via asyncio.gather on a single\nAsyncSession produced `asyncpg.InterfaceError: connection is closed`\nin production — SQLAlchemy 2.0 async sessions DO NOT support\nconcurrent statements on a single session, even for read-only\nqueries. Reverted to sequential. The dedup of `ci_rea_listings`\nfetch (passed to both score + intent helpers) is the real durable\nwin — saves one round-trip per request.\n\nPer-stage timing logged at INFO with a tag the operator can grep:\n`[property/get] property_id=... t_fetch=Xms t_zone=Yms t_da=Zms\nt_nearby=Wms t_rea=Vms t_score=Sms t_intent=Ims t_total=Tms`.\nOnce we have several real samples in Railway, the dominant cost\nwill be obvious — almost certainly `t_score` (score_rea_listing\nfans out into _fetch_property_scoring_inputs + forecast_da_pathway).","operationId":"get_property_api_v1_property__property_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/property/{property_id}/pricing-assessment":{"get":{"tags":["property"],"summary":"Pricing Assessment","description":"Lightweight pricing assessment — comparable sales + suburb\nfacets, no Gemini Vision or per-signal breakdown.\n\nThis is the public/free-tier version of the Casa Daily pricing\nengine. The full version (with Vision + multi-signal blend)\nlives behind the cd_subscriptions gate at\ncasadaily.com.au/api/extension/pricing-assessment. Both surface\nthe same shape so the extension can render either one with the\nsame React component.","operationId":"pricing_assessment_api_v1_property__property_id__pricing_assessment_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}},{"name":"asking_price","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Override asking price (defaults to current REA listing)","title":"Asking Price"},"description":"Override asking price (defaults to current REA listing)"},{"name":"bedrooms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Override subject bedroom count. Used as a fallback when ci_rea_listings has no row or its bedrooms field is null. Callers (Chrome extension, dashboard) should pass the count extracted from the REA/Domain listing page — without it the engine can't bedroom-match comps and the fair value gets pulled toward 3-bed median territory on 4-bed listings.","title":"Bedrooms"},"description":"Override subject bedroom count. Used as a fallback when ci_rea_listings has no row or its bedrooms field is null. Callers (Chrome extension, dashboard) should pass the count extracted from the REA/Domain listing page — without it the engine can't bedroom-match comps and the fair value gets pulled toward 3-bed median territory on 4-bed listings."},{"name":"building_area_m2","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Override subject building area (m²). Same rationale as `bedrooms` — used when ci_rea_listings doesn't have it. Drives the building-scale similarity score and unblocks the scale-uplift signal.","title":"Building Area M2"},"description":"Override subject building area (m²). Same rationale as `bedrooms` — used when ci_rea_listings doesn't have it. Drives the building-scale similarity score and unblocks the scale-uplift signal."},{"name":"year_built","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2100,"minimum":1800},{"type":"null"}],"description":"Year the dwelling was built. Extracted by the Chrome extension from the REA/Domain listing DOM. Used as a structured build-recency signal — more reliable than the description-keyword / photo-grade inference fallbacks. Surfaced in the rationale and feeds a recency uplift in downstream consumers.","title":"Year Built"},"description":"Year the dwelling was built. Extracted by the Chrome extension from the REA/Domain listing DOM. Used as a structured build-recency signal — more reliable than the description-keyword / photo-grade inference fallbacks. Surfaced in the rationale and feeds a recency uplift in downstream consumers."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingAssessmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/property/{property_id}/context":{"get":{"tags":["property"],"summary":"Get Property Context","description":"Assemble the full context package for a property.\n\nThis is the rich data payload that gets sent to the AI reasoning engine.\nIncludes: property data, zone rules, overlays, DA history, nearby DAs,\nlocalised insights, and approval statistics.","operationId":"get_property_context_api_v1_property__property_id__context_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyContextPackage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/comparable-das":{"get":{"tags":["comparable-das"],"summary":"Search Comparable Das","description":"Search for comparable DA applications near a target property.\n\nUses PostGIS ST_DWithin for spatial search, with optional filters\nfor application type, zone, and decision. Results are scored by\nrelevance (same zone + similar lot size + recent = higher score).","operationId":"search_comparable_das_api_v1_comparable_das_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","description":"Target property UUID","title":"Property Id"},"description":"Target property UUID"},{"name":"radius","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":100,"description":"Search radius in metres","default":2000,"title":"Radius"},"description":"Search radius in metres"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by DA category (e.g. subdivision, dual_occ, multi_unit)","title":"Type"},"description":"Filter by DA category (e.g. subdivision, dual_occ, multi_unit)"},{"name":"zone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by zone code at lodgement","title":"Zone"},"description":"Filter by zone code at lodgement"},{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by decision (e.g. approved, refused)","title":"Decision"},"description":"Filter by decision (e.g. approved, refused)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results to return","default":25,"title":"Limit"},"description":"Max results to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparableDAResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trends/{lga}":{"get":{"tags":["trends"],"summary":"Get Lga Trends","description":"Get DA statistics and trends for an LGA.","operationId":"get_lga_trends_api_v1_trends__lga__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"lga","in":"path","required":true,"schema":{"type":"string","title":"Lga"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trends/{lga}/{zone_code}":{"get":{"tags":["trends"],"summary":"Get Zone Trends","description":"Get DA statistics and trends for a specific zone within an LGA.","operationId":"get_zone_trends_api_v1_trends__lga___zone_code__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"lga","in":"path","required":true,"schema":{"type":"string","title":"Lga"}},{"name":"zone_code","in":"path","required":true,"schema":{"type":"string","title":"Zone Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/widget/geocode":{"get":{"tags":["widget"],"summary":"Widget Geocode","description":"Geocode an address. Without magic_key: SEQ-biased, up to 8 candidates (the\nChrome Extension's path). With magic_key: the one suggested address, exact.\nNo auth required — proxies the free ArcGIS geocoder.","operationId":"widget_geocode_api_v1_widget_geocode_get","parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Address to geocode","title":"Address"},"description":"Address to geocode"},{"name":"magic_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}],"description":"From /geocode/suggest: resolves that one suggestion exactly, no bias","title":"Magic Key"},"description":"From /geocode/suggest: resolves that one suggestion exactly, no bias"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/widget/geocode/suggest":{"get":{"tags":["widget"],"summary":"Widget Geocode Suggest","description":"Australia-wide address suggestions with no bias, for the website's autocomplete. Each carries a magic_key for /geocode.","operationId":"widget_geocode_suggest_api_v1_widget_geocode_suggest_get","parameters":[{"name":"text","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":300,"description":"What the visitor has typed so far","title":"Text"},"description":"What the visitor has typed so far"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/widget/property":{"get":{"tags":["widget"],"summary":"Widget Property Lookup","description":"Property intelligence for Chrome Extension and widgets.\n\nAccepts address (required) plus optional lat/lng for reliable spatial lookup.\n`?v=3` additionally attaches the `intelligence_v3` block (scenario ladder,\nmeasured yield, planner's take — SPEC-EXTENSION-V3.md §4); without it the\nresponse keeps the pre-v3 shape so the published extension keeps working.\n\nResolution strategy:\n1. Try DB cache (fast path, <50ms)\n2. Try DB live queries (address match → prefix → street → spatial)\n3. Geocode address → fetch from public QLD APIs (never 404 for valid SEQ address)\n\nWhen the database is unavailable, skips straight to public API fallback.","operationId":"widget_property_lookup_api_v1_widget_property_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","minLength":3,"description":"Property street address","title":"Address"},"description":"Property street address"},{"name":"lat","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Latitude (for spatial lookup)","title":"Lat"},"description":"Latitude (for spatial lookup)"},{"name":"lng","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Longitude (for spatial lookup)","title":"Lng"},"description":"Longitude (for spatial lookup)"},{"name":"v","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Response version — 3 adds intelligence_v3","title":"V"},"description":"Response version — 3 adds intelligence_v3"},{"name":"land_area","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Listing's stated land size in m² (from the REA/Domain page). Used ONLY to disclose a multi-lot holding when it materially exceeds the resolved title area; never affects the resolved parcel.","title":"Land Area"},"description":"Listing's stated land size in m² (from the REA/Domain page). Used ONLY to disclose a multi-lot holding when it materially exceeds the resolved title area; never affects the resolved parcel."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetPropertyResponse"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetErrorResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/parcel/by-point":{"get":{"tags":["parcel"],"summary":"Parcel At","operationId":"parcel_at_api_v1_parcel_by_point_get","parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","maximum":-9,"minimum":-45,"title":"Lat"}},{"name":"lon","in":"query","required":true,"schema":{"type":"number","maximum":155,"minimum":110,"title":"Lon"}},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Parcel At Api V1 Parcel By Point Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/glance":{"get":{"tags":["glance"],"summary":"Glance","description":"The binary and the outline, together, in one round trip for the page.\n\nQueensland answers from the zoning we hold. Every other state answers from its\nown live zoning service, one layer, one request. A state with no service wired\nin offers no verdict at all rather than inventing a green banner, which is the\nfault this whole design exists to avoid.\n\nEvery call also writes one ``ci_free_checks`` row (the intent ledger) and\nreturns its id as ``check_id`` beside the resolved ``property_id``, so the\npage's CTA can carry both to checkout. Without them the fast path never\nrendered, the buyer was geocoded a second time, and a free check could never\nbe linked to the report it produced (Conversion Recovery Spec §1.9).","operationId":"glance_api_v1_glance_get","parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","maximum":-9,"minimum":-45,"title":"Lat"}},{"name":"lon","in":"query","required":true,"schema":{"type":"number","maximum":155,"minimum":110,"title":"Lon"}},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"description":"the address the visitor typed, for the intent ledger","title":"Address"},"description":"the address the visitor typed, for the intent ledger"},{"name":"dev_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Dev Type"}},{"name":"ga_client_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Ga Client Id"}},{"name":"utm_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Utm Source"}},{"name":"utm_medium","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Utm Medium"}},{"name":"utm_campaign","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Utm Campaign"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Glance Api V1 Glance Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/create-checkout":{"post":{"tags":["payments"],"summary":"Create Checkout Session","description":"Create a Stripe Checkout session for a report purchase.\n\nRequest body:\n{\n    \"property_id\": \"uuid\",\n    \"report_type\": \"full_report\",\n    \"email\": \"user@example.com\",\n    \"address\": \"14 Smith St, Buderim QLD\"\n}","operationId":"create_checkout_session_api_v1_payments_create_checkout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/payments/webhook":{"post":{"tags":["payments"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events.\n\nOn successful payment:\n1. Mark the report as paid\n2. Trigger report generation in the background\n3. Email the report to the customer","operationId":"stripe_webhook_api_v1_payments_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/payments/report-status/{property_id}":{"get":{"tags":["payments"],"summary":"Get Report Status","description":"Check the status of a report for a property.","operationId":"get_report_status_api_v1_payments_report_status__property_id__get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/retry-report/{report_id}":{"post":{"tags":["payments"],"summary":"Retry Failed Report","description":"Admin-only: Retry a failed report generation. Requires ENGINE_ADMIN_SECRET.","operationId":"retry_failed_report_api_v1_payments_retry_report__report_id__post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/search/properties":{"get":{"tags":["search"],"summary":"Search Properties","description":"Search properties by address with fuzzy matching.","operationId":"search_properties_api_v1_search_properties_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":200,"description":"Search query","title":"Q"},"description":"Search query"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max results","default":10,"title":"Limit"},"description":"Max results"},{"name":"lga","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by LGA name","title":"Lga"},"description":"Filter by LGA name"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertySearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/comparable-sales":{"get":{"tags":["comparable-sales"],"summary":"Search Comparable Sales","description":"Search for comparable property sales near a target property.\nUses PostGIS ST_DWithin for spatial search, filtered by date range and property type.","operationId":"search_comparable_sales_api_v1_comparable_sales_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","description":"Target property UUID","title":"Property Id"},"description":"Target property UUID"},{"name":"radius","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":100,"description":"Search radius in metres","default":2000,"title":"Radius"},"description":"Search radius in metres"},{"name":"property_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by property type","title":"Property Type"},"description":"Filter by property type"},{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":60,"minimum":6,"description":"Look back period in months","default":24,"title":"Months"},"description":"Look back period in months"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max results","default":20,"title":"Limit"},"description":"Max results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/events":{"post":{"tags":["events"],"summary":"Ingest Events","description":"Batch ingest events from extension or dashboard.\n\nLow-latency: batch-inserts to ci_events with minimal processing.\nCapped at 100 events per request.","operationId":"ingest_events_api_v1_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsBatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/events/website":{"post":{"tags":["events"],"summary":"Ingest Website Event","description":"Ingest a single funnel event from the public website (no API key).\n\nga_client_id is stored in anonymous_id (the canonical funnel join key) AND\nmirrored into metadata; free_check_id lives in metadata so the daily check\ncan join events back to ci_free_checks rows.","operationId":"ingest_website_event_api_v1_events_website_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteEventRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/swarm/dashboard":{"get":{"tags":["admin","swarm"],"summary":"Dashboard","description":"One-shot fetch for the dashboard UI.","operationId":"dashboard_api_v1_admin_swarm_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Dashboard Api V1 Admin Swarm Dashboard Get"}}}}}}},"/api/v1/admin/swarm/quarantined":{"get":{"tags":["admin","swarm"],"summary":"Quarantined Endpoint","description":"List gaps that are auto-quarantined or close to it (≥3 failures).","operationId":"quarantined_endpoint_api_v1_admin_swarm_quarantined_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Quarantined Endpoint Api V1 Admin Swarm Quarantined Get"}}}}}}},"/api/v1/admin/swarm/gaps":{"get":{"tags":["admin","swarm"],"summary":"Gaps Endpoint","operationId":"gaps_endpoint_api_v1_admin_swarm_gaps_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"only_active","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Only Active"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Gaps Endpoint Api V1 Admin Swarm Gaps Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/swarm/runs":{"get":{"tags":["admin","swarm"],"summary":"Runs Endpoint","operationId":"runs_endpoint_api_v1_admin_swarm_runs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Runs Endpoint Api V1 Admin Swarm Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/swarm/quality":{"get":{"tags":["admin","swarm"],"summary":"Quality Endpoint","operationId":"quality_endpoint_api_v1_admin_swarm_quality_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Quality Endpoint Api V1 Admin Swarm Quality Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/swarm/proposed":{"get":{"tags":["admin","swarm"],"summary":"Proposed Endpoint","operationId":"proposed_endpoint_api_v1_admin_swarm_proposed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Proposed Endpoint Api V1 Admin Swarm Proposed Get"}}}}}}},"/api/v1/admin/swarm/db-health":{"get":{"tags":["admin","swarm"],"summary":"Db Health Endpoint","operationId":"db_health_endpoint_api_v1_admin_swarm_db_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Db Health Endpoint Api V1 Admin Swarm Db Health Get"}}}}}}},"/api/v1/admin/swarm/provenance/{table_name}/{row_pk}":{"get":{"tags":["admin","swarm"],"summary":"Provenance Lookup","description":"Answer 'where did this number come from?' for any (table, row) pair.","operationId":"provenance_lookup_api_v1_admin_swarm_provenance__table_name___row_pk__get","parameters":[{"name":"table_name","in":"path","required":true,"schema":{"type":"string","title":"Table Name"}},{"name":"row_pk","in":"path","required":true,"schema":{"type":"string","title":"Row Pk"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Provenance Lookup Api V1 Admin Swarm Provenance  Table Name   Row Pk  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/swarm":{"get":{"tags":["admin","swarm-ui"],"summary":"Swarm Ui","operationId":"swarm_ui_admin_swarm_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/v1/rea/quick-pack":{"post":{"tags":["REA"],"summary":"Quick Pack","description":"Mobile-optimised: address in, listing pack + flyer out.\n\nThis is the \"2 taps to generate\" endpoint. Agent provides an address\nand optionally bedrooms/bathrooms/car_spaces. Returns a listing pack\nPDF and an open home flyer in a single call.\n\nTypical response time: 15-30 seconds.","operationId":"quick_pack_api_v1_rea_quick_pack_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickPackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickPackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/rea/quick-flyer":{"post":{"tags":["REA"],"summary":"Quick Flyer","description":"Mobile-optimised: address in, flyer out.\n\nStandalone flyer generation -- no vendor listing required.\nFor agents who need a flyer RIGHT NOW (e.g., 8:30am Saturday morning).\n\nTypical response time: 5-10 seconds.","operationId":"quick_flyer_api_v1_rea_quick_flyer_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickFlyerRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickFlyerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/da/search":{"get":{"tags":["DA Search"],"summary":"Search Das","description":"Main DA search with 15+ filters.\n\nSupports spatial radius search (via address or lat/lng), and filtering\nby LGA, suburb, zone, decision, date range, lots, area, category,\nand description text.","operationId":"search_das_api_v1_da_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Center point address for radius search","title":"Address"},"description":"Center point address for radius search"},{"name":"lat","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Latitude for radius search","title":"Lat"},"description":"Latitude for radius search"},{"name":"lng","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Longitude for radius search","title":"Lng"},"description":"Longitude for radius search"},{"name":"radius_m","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"minimum":100,"description":"Radius in metres","default":2000,"title":"Radius M"},"description":"Radius in metres"},{"name":"lga","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"}},{"name":"suburb","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"}},{"name":"zone_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"}},{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Approved, Refused, or Withdrawn","title":"Decision"},"description":"Approved, Refused, or Withdrawn"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"lots_min","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Lots Min"}},{"name":"lots_max","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Max"}},{"name":"area_m2_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Area M2 Min"}},{"name":"area_m2_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2 Max"}},{"name":"da_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"DA category filter","title":"Da Type"},"description":"DA category filter"},{"name":"description_search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Full-text search on description","title":"Description Search"},"description":"Full-text search on description"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(relevance|distance|date|days)$","default":"relevance","title":"Sort"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DASearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da/search/stats":{"get":{"tags":["DA Search"],"summary":"Search Da Stats","description":"Aggregated statistics for the same search filters.\n\nReturns decision breakdown, zone breakdown, average days, and LGA breakdown.","operationId":"search_da_stats_api_v1_da_search_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},{"name":"lat","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"}},{"name":"lng","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"}},{"name":"radius_m","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"minimum":100,"default":2000,"title":"Radius M"}},{"name":"lga","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"}},{"name":"suburb","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"}},{"name":"zone_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"}},{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"lots_min","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Lots Min"}},{"name":"lots_max","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Max"}},{"name":"area_m2_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Area M2 Min"}},{"name":"area_m2_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2 Max"}},{"name":"da_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Da Type"}},{"name":"description_search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DASearchStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da/search/saved":{"get":{"tags":["DA Search"],"summary":"List Saved Searches","description":"List the current user's saved searches.","operationId":"list_saved_searches_api_v1_da_search_saved_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SavedSearchResponse"},"type":"array","title":"Response List Saved Searches Api V1 Da Search Saved Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["DA Search"],"summary":"Create Saved Search","description":"Save a DA search configuration for quick re-use.","operationId":"create_saved_search_api_v1_da_search_saved_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/da/search/saved/{search_id}":{"delete":{"tags":["DA Search"],"summary":"Delete Saved Search","description":"Delete a saved search. Only the owning user can delete.","operationId":"delete_saved_search_api_v1_da_search_saved__search_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"string","title":"Search Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Saved Search Api V1 Da Search Saved  Search Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da/export/csv":{"get":{"tags":["DA Search"],"summary":"Export Csv","description":"CSV export of DA search results.\n\nMaximum 10,000 rows. UTF-8 with BOM for Excel compatibility.","operationId":"export_csv_api_v1_da_export_csv_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},{"name":"lat","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"}},{"name":"lng","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"}},{"name":"radius_m","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"minimum":100,"default":2000,"title":"Radius M"}},{"name":"lga","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"}},{"name":"suburb","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"}},{"name":"zone_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"}},{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"lots_min","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Lots Min"}},{"name":"lots_max","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Max"}},{"name":"area_m2_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Area M2 Min"}},{"name":"area_m2_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2 Max"}},{"name":"da_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Da Type"}},{"name":"description_search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description Search"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(relevance|distance|date|days)$","default":"relevance","title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da/export/pdf":{"get":{"tags":["DA Search"],"summary":"Export Pdf","description":"PDF export of DA search results (max 100 rows).\n\nRenders a simple HTML table with WeasyPrint and applies org branding if available.","operationId":"export_pdf_api_v1_da_export_pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},{"name":"lat","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"}},{"name":"lng","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"}},{"name":"radius_m","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"minimum":100,"default":2000,"title":"Radius M"}},{"name":"lga","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"}},{"name":"suburb","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"}},{"name":"zone_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"}},{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"lots_min","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Lots Min"}},{"name":"lots_max","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Max"}},{"name":"area_m2_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Area M2 Min"}},{"name":"area_m2_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2 Max"}},{"name":"da_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Da Type"}},{"name":"description_search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description Search"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(relevance|distance|date|days)$","default":"relevance","title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da/types":{"get":{"tags":["DA Search"],"summary":"List Da Types","description":"Get available DA type categories.\n\nReturns distinct category values from ci_da_applications.","operationId":"list_da_types_api_v1_da_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response List Da Types Api V1 Da Types Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/planner/officers":{"get":{"tags":["Planner Analytics"],"summary":"List Officers","description":"List assessment officers with approval rates, median days, and strictness rating.\n\nPremium feature: requires premium or enterprise plan.","operationId":"list_officers_api_v1_planner_officers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by LGA","title":"Lga"},"description":"Filter by LGA"},{"name":"zone_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by zone code","title":"Zone Code"},"description":"Filter by zone code"},{"name":"min_das","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Minimum DAs assessed to include","default":5,"title":"Min Das"},"description":"Minimum DAs assessed to include"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OfficerStat"},"title":"Response List Officers Api V1 Planner Officers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/planner/officers/{officer_name}":{"get":{"tags":["Planner Analytics"],"summary":"Get Officer","description":"Detailed officer profile with overlay strictness analysis,\ntop conditions, and top refusal reasons.\n\nPremium feature: requires premium or enterprise plan.","operationId":"get_officer_api_v1_planner_officers__officer_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"officer_name","in":"path","required":true,"schema":{"type":"string","title":"Officer Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficerDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/planner/refusals":{"get":{"tags":["Planner Analytics"],"summary":"Refusal Analysis","description":"Categorised refusal reason analysis from refused DAs.\n\nBreaks down refusal reasons by category with counts, percentages,\nand example descriptions.\n\nPremium feature: requires premium or enterprise plan.","operationId":"refusal_analysis_api_v1_planner_refusals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"}},{"name":"zone_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RefusalCategory"},"title":"Response Refusal Analysis Api V1 Planner Refusals Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/planner/conditions":{"get":{"tags":["Planner Analytics"],"summary":"Condition Analysis","description":"Approval condition frequency analysis from approved DAs.\n\nBreaks down condition types by category with frequency ratios\nand typical cost ranges.\n\nPremium feature: requires premium or enterprise plan.","operationId":"condition_analysis_api_v1_planner_conditions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"}},{"name":"zone_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConditionCategory"},"title":"Response Condition Analysis Api V1 Planner Conditions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/planner/templates":{"get":{"tags":["Planner Analytics"],"summary":"List Templates","description":"List custom report templates for the user's organization.\n\nRequires authentication and org membership.","operationId":"list_templates_api_v1_planner_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReportTemplateResponse"},"type":"array","title":"Response List Templates Api V1 Planner Templates Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Planner Analytics"],"summary":"Create Template","description":"Create a custom report template for the user's organization.\n\nPremium feature: requires premium or enterprise plan.\nAllows customising section order, hiding sections, and adding\na custom intro paragraph to reports.","operationId":"create_template_api_v1_planner_templates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTemplateCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/planner/officers/{officer_name}/similar-das":{"get":{"tags":["Planner Analytics"],"summary":"Get Officer Similar Das","description":"Get DAs assessed by a specific officer matching filters.","operationId":"get_officer_similar_das_api_v1_planner_officers__officer_name__similar_das_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"officer_name","in":"path","required":true,"schema":{"type":"string","title":"Officer Name"}},{"name":"zone_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"}},{"name":"development_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Development Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/planner/officers/predict":{"get":{"tags":["Planner Analytics"],"summary":"Predict Officer","description":"Predict likely assessment officer based on LGA, zone, and development type.","operationId":"predict_officer_api_v1_planner_officers_predict_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":true,"schema":{"type":"string","minLength":3,"title":"Lga"}},{"name":"zone_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"}},{"name":"development_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Development Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rea-live/search":{"post":{"tags":["rea-live"],"summary":"Queue Live Scrape","description":"Queue a live REA scrape for a suburb.\n\nReturns immediately with a job_id. The actual Playwright (or\nScrapFly cascade) scrape runs in the background and typically\ncompletes in 45-90s. Poll via GET /rea-live/search/{job_id}.\n\nIf the same suburb was scraped in the last 30 minutes, the existing\njob's result is returned (no re-scrape). If 3+ jobs are already in\nflight, a rate_limited response is returned — retry after 60s.","operationId":"queue_live_scrape_api_v1_rea_live_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeQueuedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/rea-live/search/{job_id}":{"get":{"tags":["rea-live"],"summary":"Get Live Scrape Result","description":"Fetch the current status + (when status='done') listings for a job.\n\nStatus lifecycle: queued → running → done | failed.\nWhen done, listings_found > 0 means new listings were upserted into\nci_rea_listings AND the joined listings array is populated. When\nlistings_found == 0, the scrape succeeded but the suburb returned\nno matching properties for the given filters.","operationId":"get_live_scrape_result_api_v1_rea_live_search__job_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/landing-pages":{"post":{"tags":["Landing Pages"],"summary":"Create Landing Page Endpoint","description":"Create a new landing page for a property.","operationId":"create_landing_page_endpoint_api_v1_landing_pages_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingPageCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__landing__LandingPageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Landing Pages"],"summary":"List Landing Pages","description":"List landing pages for the user's organization with scan counts.","operationId":"list_landing_pages_api_v1_landing_pages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/app__schemas__landing__LandingPageResponse"},"title":"Response List Landing Pages Api V1 Landing Pages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/landing-pages/{page_id}/analytics":{"get":{"tags":["Landing Pages"],"summary":"Landing Page Analytics","description":"Get full scan analytics for a landing page.","operationId":"landing_page_analytics_api_v1_landing_pages__page_id__analytics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanAnalytics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/landing-pages/p/{slug}":{"get":{"tags":["Landing Pages","Landing Pages (Public)"],"summary":"Render Landing Page","description":"Public landing page render. Records a scan and returns branded Jinja2 HTML.\n\nSelf-healing: if no landing page exists for this slug but a matching\nreport does (slug = first 8 chars of report ID), the landing page is\nauto-created from the report data.","operationId":"render_landing_page_api_v1_landing_pages_p__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/landing-pages/p/{slug}/capture":{"post":{"tags":["Landing Pages","Landing Pages (Public)"],"summary":"Capture Lead Endpoint","description":"Public endpoint: capture a lead from the landing page form.\n\nAfter capturing the lead, sends a property brief email to the lead\nwith the key property details from the landing page data.","operationId":"capture_lead_endpoint_api_v1_landing_pages_p__slug__capture_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCapture"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/leads":{"post":{"tags":["leads"],"summary":"Create Lead","operationId":"create_lead_api_v1_leads_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Lead Api V1 Leads Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/leads":{"get":{"tags":["leads"],"summary":"List Leads","operationId":"list_leads_api_v1_desk_leads_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"claimed","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"unclaimed | <user> | all","title":"Claimed"},"description":"unclaimed | <user> | all"},{"name":"internal","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"'all' to include Casa's own test rows","title":"Internal"},"description":"'all' to include Casa's own test rows"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":200,"title":"Limit"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Leads Api V1 Desk Leads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/leads/{lead_id}/journey":{"get":{"tags":["leads"],"summary":"Lead Journey","description":"Every property this lead's browsing session looked at, before or after they left their number.\n\nThe join key is the session, not the address on the lead row. That is what makes the ordering\nirrelevant: the events keep arriving on the same session after the number is submitted, so a\nperson who asks for a call and then goes looking at three addresses shows all three, and a\nperson who looks first and asks after shows the same thing. Neither has to tell us anything.\n\nReturns ``{linked, addresses, device, channel, first_seen, last_seen, events}``. ``linked`` is\nfalse when no session could be tied to this lead, which is the honest answer for a lead created\nbefore this link existed, or by a visitor whose browser refused session storage.","operationId":"lead_journey_api_v1_desk_leads__lead_id__journey_get","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Lead Journey Api V1 Desk Leads  Lead Id  Journey Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/leads/{lead_id}":{"patch":{"tags":["leads"],"summary":"Patch Lead","operationId":"patch_lead_api_v1_desk_leads__lead_id__patch","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Lead Api V1 Desk Leads  Lead Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/leads/replied":{"post":{"tags":["leads"],"summary":"Mark Replied","description":"Record that a human is now talking to this person, so no automated\nsequence ever speaks over the top of the conversation again.\n\nConversion Recovery Spec WS6.1. Replies land in Robbie's mailbox, which the\ndatabase cannot see, so the desk records them. Writes the\n``ci_lead_conversations`` suppressor the nurture sweep already gates on\n(the Katherine Clarke row, 2026-09-03), and optionally the opt-out list.\nIdempotent: registering someone twice updates ``last_seen``.\n\nAbsence of a row here is never evidence there is no conversation; this\nonly ever suppresses.","operationId":"mark_replied_api_v1_desk_leads_replied_post","parameters":[{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepliedIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mark Replied Api V1 Desk Leads Replied Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/leads/{lead_id}/payment-link":{"post":{"tags":["leads"],"summary":"Send Payment Link","description":"Create the Stripe checkout link for a quoted lead.\n\nnotify=true (the desk button) emails the link to the lead from hello@.\nnotify=false returns the link without sending anything, for the times\nRobbie puts it in his own reply. Nothing about a report is ever emailed\nautomatically either way.","operationId":"send_payment_link_api_v1_desk_leads__lead_id__payment_link_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}},{"name":"notify","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Notify"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Payment Link Api V1 Desk Leads  Lead Id  Payment Link Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/marketing/c/{token}":{"get":{"tags":["marketing"],"summary":"Click","operationId":"click_api_v1_marketing_c__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"sample","title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/marketing/u/{token}":{"get":{"tags":["marketing"],"summary":"Unsubscribe","operationId":"unsubscribe_api_v1_marketing_u__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["marketing"],"summary":"Unsubscribe One Click","operationId":"unsubscribe_one_click_api_v1_marketing_u__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/orders":{"get":{"tags":["desk"],"summary":"List Orders","operationId":"list_orders_api_v1_desk_orders_get","parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Month"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":300,"title":"Limit"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Orders Api V1 Desk Orders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["desk"],"summary":"Create Account Order","description":"An order taken by email or phone from an account holder: created as paid on account and queued for the desk;\nthe customer gets the three-business-day confirmation.","operationId":"create_account_order_api_v1_desk_orders_post","parameters":[{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__desk_orders__OrderIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Account Order Api V1 Desk Orders Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/orders/{report_id}/attachments":{"get":{"tags":["desk"],"summary":"Order Attachments","operationId":"order_attachments_api_v1_desk_orders__report_id__attachments_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Order Attachments Api V1 Desk Orders  Report Id  Attachments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/orders/{report_id}/not-covered":{"post":{"tags":["desk"],"summary":"Order Not Covered","description":"The desk found it cannot cover the site (terms clause 3). The row is cancelled and can never be invoiced; Robbie tells\nthe customer himself (the desk never emails a customer).","operationId":"order_not_covered_api_v1_desk_orders__report_id__not_covered_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotCoveredIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Order Not Covered Api V1 Desk Orders  Report Id  Not Covered Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/accounts":{"get":{"tags":["desk"],"summary":"List Accounts","operationId":"list_accounts_api_v1_desk_accounts_get","parameters":[{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Accounts Api V1 Desk Accounts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["desk"],"summary":"Create Account","operationId":"create_account_api_v1_desk_accounts_post","parameters":[{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Account Api V1 Desk Accounts Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/accounts/{account_id}/reset-login":{"post":{"tags":["desk"],"summary":"Reset Login","description":"A fresh office password, shown once on the desk and emailed to the account's contact with the welcome.","operationId":"reset_login_api_v1_desk_accounts__account_id__reset_login_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reset Login Api V1 Desk Accounts  Account Id  Reset Login Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/accounts/{account_id}/reset-admin":{"post":{"tags":["desk"],"summary":"Reset Admin","description":"A fresh admin login (new password, must be changed at first sign-in), shown once and emailed to the account's contact.","operationId":"reset_admin_api_v1_desk_accounts__account_id__reset_admin_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reset Admin Api V1 Desk Accounts  Account Id  Reset Admin Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/accounts/{account_id}":{"patch":{"tags":["desk"],"summary":"Patch Account","operationId":"patch_account_api_v1_desk_accounts__account_id__patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Account Api V1 Desk Accounts  Account Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/accounts/{account_id}/rotate-token":{"post":{"tags":["desk"],"summary":"Rotate Token","operationId":"rotate_token_api_v1_desk_accounts__account_id__rotate_token_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Rotate Token Api V1 Desk Accounts  Account Id  Rotate Token Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/accounts/{account_id}/send-link":{"post":{"tags":["desk"],"summary":"Send Link","description":"Email the ordering link (the welcome) to someone at the agency, for an account created by hand or a link re-sent.","operationId":"send_link_api_v1_desk_accounts__account_id__send_link_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WelcomeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Link Api V1 Desk Accounts  Account Id  Send Link Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/accounts/{account_id}/members":{"get":{"tags":["desk"],"summary":"List Members","operationId":"list_members_api_v1_desk_accounts__account_id__members_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Members Api V1 Desk Accounts  Account Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["desk"],"summary":"Add Member","operationId":"add_member_api_v1_desk_accounts__account_id__members_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Member Api V1 Desk Accounts  Account Id  Members Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/accounts/{account_id}/members/{member_id}":{"delete":{"tags":["desk"],"summary":"Remove Member","description":"Deactivates, never deletes: in-flight orders still deliver and still bill (§12).","operationId":"remove_member_api_v1_desk_accounts__account_id__members__member_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"string","title":"Member Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Member Api V1 Desk Accounts  Account Id  Members  Member Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/applications":{"get":{"tags":["desk"],"summary":"List Applications","operationId":"list_applications_api_v1_desk_applications_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"pending","title":"Status"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Applications Api V1 Desk Applications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/accounts/setup":{"post":{"tags":["desk"],"summary":"Setup Account","description":"Open an account on a call, in one step: application record, account, members, ordering link, welcome email.","operationId":"setup_account_api_v1_desk_accounts_setup_post","parameters":[{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Setup Account Api V1 Desk Accounts Setup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/applications/{application_id}/approve":{"post":{"tags":["desk"],"summary":"Approve Application","operationId":"approve_application_api_v1_desk_applications__application_id__approve_post","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","title":"Application Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Application Api V1 Desk Applications  Application Id  Approve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/applications/{application_id}/decline":{"post":{"tags":["desk"],"summary":"Decline Application","operationId":"decline_application_api_v1_desk_applications__application_id__decline_post","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","title":"Application Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeclineIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Decline Application Api V1 Desk Applications  Application Id  Decline Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/accounts/{account_id}/invoices":{"get":{"tags":["desk"],"summary":"List Invoices","operationId":"list_invoices_api_v1_desk_accounts__account_id__invoices_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Invoices Api V1 Desk Accounts  Account Id  Invoices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["desk"],"summary":"Create Invoice","description":"The month's tax invoice for an account: one line per report DELIVERED on account in that Brisbane month at the account's\nrate (GST inclusive, so the ex-GST line is rate / 1.1), numbered from the database sequence, PDF stored on the row, then\nemailed to the billing address only when send=true (the default is to file it for Robbie to send).","operationId":"create_invoice_api_v1_desk_accounts__account_id__invoices_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Invoice Api V1 Desk Accounts  Account Id  Invoices Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/invoices/run":{"post":{"tags":["desk"],"summary":"Run Invoices","operationId":"run_invoices_api_v1_desk_invoices_run_post","parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Month"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Invoices Api V1 Desk Invoices Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/invoices/{invoice_id}/send":{"post":{"tags":["desk"],"summary":"Send Invoice","operationId":"send_invoice_api_v1_desk_invoices__invoice_id__send_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Invoice Api V1 Desk Invoices  Invoice Id  Send Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/invoices/{invoice_id}":{"patch":{"tags":["desk"],"summary":"Patch Invoice","operationId":"patch_invoice_api_v1_desk_invoices__invoice_id__patch","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Invoice Api V1 Desk Invoices  Invoice Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/xero/status":{"get":{"tags":["desk"],"summary":"Xero Status","operationId":"xero_status_api_v1_desk_xero_status_get","parameters":[{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Xero Status Api V1 Desk Xero Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/xero/connect":{"get":{"tags":["desk"],"summary":"Xero Connect","description":"The URL to open in a browser (logged in to Xero as the organisation's owner) to connect the organisation.","operationId":"xero_connect_api_v1_desk_xero_connect_get","parameters":[{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Xero Connect Api V1 Desk Xero Connect Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/xero/sync":{"post":{"tags":["desk"],"summary":"Xero Sync","operationId":"xero_sync_api_v1_desk_xero_sync_post","parameters":[{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Xero Sync Api V1 Desk Xero Sync Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/xero/push-all":{"post":{"tags":["desk"],"summary":"Xero Push All","operationId":"xero_push_all_api_v1_desk_xero_push_all_post","parameters":[{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Xero Push All Api V1 Desk Xero Push All Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/xero/invoices/{invoice_id}/push":{"post":{"tags":["desk"],"summary":"Xero Push","operationId":"xero_push_api_v1_desk_xero_invoices__invoice_id__push_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Xero Push Api V1 Desk Xero Invoices  Invoice Id  Push Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/xero/invoices/{invoice_id}/email":{"post":{"tags":["desk"],"summary":"Xero Email","operationId":"xero_email_api_v1_desk_xero_invoices__invoice_id__email_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Xero Email Api V1 Desk Xero Invoices  Invoice Id  Email Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/invoices/{invoice_id}/pdf":{"get":{"tags":["desk"],"summary":"Invoice Pdf","operationId":"invoice_pdf_api_v1_desk_invoices__invoice_id__pdf_get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/xero/callback":{"get":{"tags":["desk"],"summary":"Xero Callback","operationId":"xero_callback_api_v1_desk_xero_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/approaches":{"get":{"tags":["desk"],"summary":"Get Approaches","operationId":"get_approaches_api_v1_desk_approaches_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"queued","title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":200,"title":"Limit"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Approaches Api V1 Desk Approaches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/approaches/stats":{"get":{"tags":["desk"],"summary":"Get Stats","operationId":"get_stats_api_v1_desk_approaches_stats_get","parameters":[{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Stats Api V1 Desk Approaches Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/approaches/{approach_id}/release":{"post":{"tags":["desk"],"summary":"Post Release","operationId":"post_release_api_v1_desk_approaches__approach_id__release_post","parameters":[{"name":"approach_id","in":"path","required":true,"schema":{"type":"string","title":"Approach Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ByBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Release Api V1 Desk Approaches  Approach Id  Release Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/approaches/{approach_id}/drop":{"post":{"tags":["desk"],"summary":"Post Drop","operationId":"post_drop_api_v1_desk_approaches__approach_id__drop_post","parameters":[{"name":"approach_id","in":"path","required":true,"schema":{"type":"string","title":"Approach Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Drop Api V1 Desk Approaches  Approach Id  Drop Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/approaches/{approach_id}/outcome":{"post":{"tags":["desk"],"summary":"Post Outcome","operationId":"post_outcome_api_v1_desk_approaches__approach_id__outcome_post","parameters":[{"name":"approach_id","in":"path","required":true,"schema":{"type":"string","title":"Approach Id"}},{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Outcome Api V1 Desk Approaches  Approach Id  Outcome Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/desk/calls":{"get":{"tags":["desk"],"summary":"Get Calls","operationId":"get_calls_api_v1_desk_calls_get","parameters":[{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Calls Api V1 Desk Calls Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["desk"],"summary":"Post Call","operationId":"post_call_api_v1_desk_calls_post","parameters":[{"name":"x-desk-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Desk-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Call Api V1 Desk Calls Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/apply":{"post":{"tags":["agency"],"summary":"Apply","operationId":"apply_api_v1_agency_apply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Apply Api V1 Agency Apply Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/login":{"post":{"tags":["agency"],"summary":"Office Login","description":"The office login: agency name and password in, the ordering link out. Wrong either way is one plain sentence.","operationId":"office_login_api_v1_agency_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Office Login Api V1 Agency Login Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/password":{"post":{"tags":["agency"],"summary":"Change Password","description":"From the ordering page: the office changes its password with the current one in hand.","operationId":"change_password_api_v1_agency_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Change Password Api V1 Agency Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/admin/login":{"post":{"tags":["agency"],"summary":"Admin Login","operationId":"admin_login_api_v1_agency_admin_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminLoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Login Api V1 Agency Admin Login Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/admin/settings":{"post":{"tags":["agency"],"summary":"Admin Settings","operationId":"admin_settings_api_v1_agency_admin_settings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTokenIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Settings Api V1 Agency Admin Settings Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/admin/password":{"post":{"tags":["agency"],"summary":"Admin Password","operationId":"admin_password_api_v1_agency_admin_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPasswordIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Password Api V1 Agency Admin Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/admin/office-password":{"post":{"tags":["agency"],"summary":"Admin Office Password","operationId":"admin_office_password_api_v1_agency_admin_office_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminNewPasswordIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Office Password Api V1 Agency Admin Office Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/admin/members/add":{"post":{"tags":["agency"],"summary":"Admin Member Add","operationId":"admin_member_add_api_v1_agency_admin_members_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMemberIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Member Add Api V1 Agency Admin Members Add Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/admin/members/remove":{"post":{"tags":["agency"],"summary":"Admin Member Remove","operationId":"admin_member_remove_api_v1_agency_admin_members_remove_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMemberRemoveIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Member Remove Api V1 Agency Admin Members Remove Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/admin/mode":{"post":{"tags":["agency"],"summary":"Admin Mode","operationId":"admin_mode_api_v1_agency_admin_mode_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminModeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Mode Api V1 Agency Admin Mode Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/admin/accounts-email":{"post":{"tags":["agency"],"summary":"Admin Accounts Email","operationId":"admin_accounts_email_api_v1_agency_admin_accounts_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminEmailIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Accounts Email Api V1 Agency Admin Accounts Email Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/admin/accounts-email/confirm":{"post":{"tags":["agency"],"summary":"Admin Accounts Email Confirm","operationId":"admin_accounts_email_confirm_api_v1_agency_admin_accounts_email_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTokenIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Accounts Email Confirm Api V1 Agency Admin Accounts Email Confirm Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/admin/forgot":{"post":{"tags":["agency"],"summary":"Admin Forgot","operationId":"admin_forgot_api_v1_agency_admin_forgot_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminForgotIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Forgot Api V1 Agency Admin Forgot Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/admin/reset":{"post":{"tags":["agency"],"summary":"Admin Reset","operationId":"admin_reset_api_v1_agency_admin_reset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminResetIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Reset Api V1 Agency Admin Reset Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/account/summary":{"get":{"tags":["agency"],"summary":"Account Summary","operationId":"account_summary_api_v1_agency_account_summary_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":16,"maxLength":64,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Account Summary Api V1 Agency Account Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/account/reports":{"get":{"tags":["agency"],"summary":"Account Reports","operationId":"account_reports_api_v1_agency_account_reports_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":16,"maxLength":64,"title":"Token"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Account Reports Api V1 Agency Account Reports Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/account/packages":{"get":{"tags":["agency"],"summary":"Account Packages","operationId":"account_packages_api_v1_agency_account_packages_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":16,"maxLength":64,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Account Packages Api V1 Agency Account Packages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/account/packages/{report_id}/{key}":{"get":{"tags":["agency"],"summary":"Account Package File","operationId":"account_package_file_api_v1_agency_account_packages__report_id___key__get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":16,"maxLength":64,"title":"Token"}},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Download"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/resolve":{"get":{"tags":["agency"],"summary":"Resolve","operationId":"resolve_api_v1_agency_resolve_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":16,"maxLength":64,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resolve Api V1 Agency Resolve Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/attachments/sign":{"post":{"tags":["agency"],"summary":"Sign Attachment","operationId":"sign_attachment_api_v1_agency_attachments_sign_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Sign Attachment Api V1 Agency Attachments Sign Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/attachments":{"get":{"tags":["agency"],"summary":"List Attachments","operationId":"list_attachments_api_v1_agency_attachments_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":16,"maxLength":64,"title":"Token"}},{"name":"draft_id","in":"query","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Draft Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Attachments Api V1 Agency Attachments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/attachments/remove":{"post":{"tags":["agency"],"summary":"Remove Attachment","operationId":"remove_attachment_api_v1_agency_attachments_remove_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Remove Attachment Api V1 Agency Attachments Remove Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/parcel":{"get":{"tags":["agency"],"summary":"Parcel","description":"The parcel behind a typed address, from the record the report will use, with its outline for the confirmation map.","operationId":"parcel_api_v1_agency_parcel_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":16,"maxLength":64,"title":"Token"}},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}],"title":"Address"}},{"name":"lat","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"}},{"name":"lng","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Parcel Api V1 Agency Parcel Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/orders":{"post":{"tags":["agency"],"summary":"Order","operationId":"order_api_v1_agency_orders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__agency__OrderIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Order Api V1 Agency Orders Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feasibility/free":{"get":{"tags":["feasibility"],"summary":"Free Feasibility Check","description":"Free feasibility check — public, rate-limited endpoint.\n\nReturns basic property intelligence: zone + deterministic zone facts,\noverlays scoped to the categories actually checked, nearby DA activity,\ndevelopment potential, and a Casa Score. No comparable DA deep-dive, no\nfinancial projections. Limited to 10 requests per hour per IP.\n\nlat/lon (optional) are the autocomplete suggestion's geocoder coordinates —\nthey let the lookup resolve strata addresses via the spatial fallback.","operationId":"free_feasibility_check_api_v1_feasibility_free_get","parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","minLength":3,"description":"Property address to check","title":"Address"},"description":"Property address to check"},{"name":"lat","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":90,"minimum":-90},{"type":"null"}],"title":"Lat"}},{"name":"lon","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":180,"minimum":-180},{"type":"null"}],"title":"Lon"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreeFeasibilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feasibility/free/neighbours":{"get":{"tags":["feasibility"],"summary":"Free Neighbour Parcels","description":"Selectable neighbouring parcels (with outlines) around the subject — the\npicking layer for the amalgamation map. Also returns the SUBJECT parcel so a\nclient can draw the whole site from one cadastral source and total a true\ncombined area. Public, IP-rate-limited (Rung 1).","operationId":"free_neighbour_parcels_api_v1_feasibility_free_neighbours_get","parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","description":"Subject parcel UUID","title":"Property Id"},"description":"Subject parcel UUID"},{"name":"radius_m","in":"query","required":false,"schema":{"type":"number","maximum":150.0,"minimum":5.0,"default":60.0,"title":"Radius M"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeighbourParcelsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feasibility/free/combined":{"post":{"tags":["feasibility"],"summary":"Free Combined Check","description":"Re-run the free check on the subject amalgamated with the selected\nneighbouring lots, assessed as one site. Public, IP-rate-limited (Rung 1).","operationId":"free_combined_check_api_v1_feasibility_free_combined_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CombinedCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreeFeasibilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feasibility/free-tiles":{"get":{"tags":["feasibility"],"summary":"Free Capability Tiles","description":"Standalone capability tiles — 1-5 deterministic scenario verdicts for a\nparcel (\"Duplex likely allowed\" + one metric-citing sentence each).\n\nBuilt for the Chrome extension's lazy fetch after the widget's first\npaint (the widget endpoint stays untouched — latency-critical). Cached\nper property via ci_public_check_cache; 100% deterministic, no AI.","operationId":"free_capability_tiles_api_v1_feasibility_free_tiles_get","parameters":[{"name":"property_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Casa property UUID","title":"Property Id"},"description":"Casa property UUID"},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":3},{"type":"null"}],"title":"Address"}},{"name":"lat","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":90,"minimum":-90},{"type":"null"}],"title":"Lat"}},{"name":"lon","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":180,"minimum":-180},{"type":"null"}],"title":"Lon"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreeTilesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feasibility/free/pdf":{"post":{"tags":["feasibility"],"summary":"Free Feasibility Snapshot Pdf","description":"Branded one-page PDF snapshot of a free block check.\n\nThe snapshot is ALWAYS regenerated server-side via `_run_free_check` —\nthe same deterministic path /free itself uses. The `payload` field is\nstill accepted for client compatibility, but it is used ONLY as the\nsource of the address (plus the geocoder lat/lon that resolved it, so\nstrata/alias addresses that resolved in the UI resolve here too). None\nof its claim content — score, overlays, zone, summary — ever reaches the\nrenderer: rendering client-authored claims produced a Casa-branded,\nCasa-hosted PDF asserting whatever the client invented (audit F11,\nfree-checker-2026-08-30 — forgery/phishing vector).\n\nRenders via WeasyPrint, uploads to Supabase Storage, and returns a\nsigned download URL. No AI calls.","operationId":"free_feasibility_snapshot_pdf_api_v1_feasibility_free_pdf_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreeSnapshotPdfRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreeSnapshotPdfResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-feasibility/compose":{"post":{"tags":["casa-daily-feasibility"],"summary":"Compose Feasibility","operationId":"compose_feasibility_api_v1_cd_feasibility_compose_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeasibilityComposeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeasibilityComposeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/cd-feasibility/compose-pdf":{"post":{"tags":["casa-daily-feasibility"],"summary":"Compose Feasibility Pdf","description":"Compile the assembled feasibility into a Typst PDF and return bytes.\n\nUses the bespoke ``casa_daily_v2_feasibility.typ`` template — built\nfor this exact payload shape with embedded site-analysis SVG, AICR\nbreakdown, comparable approvals table, predicted-conditions table,\nfinancial variables snapshot, and the Casa Planner upsell section.\n\nFetches the cached site-analysis SVG for the property (if available)\nand writes it as ``site_analysis.svg`` in the render dir so the\ntemplate's ``image()`` call resolves it.\n\nAuto-generates AI narrative sections (executive_summary,\nsite_assessment, infrastructure_charges_commentary,\ncomparable_approvals_commentary, casa_planner_pathway,\nfinancial_outlook) via Sonnet so each PDF reads in real planner\nvoice with the data woven into the prose, rather than as a sparse\nfact-table.","operationId":"compose_feasibility_pdf_api_v1_cd_feasibility_compose_pdf_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeasibilityPDFRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/cd-feasibility/map-bundle/{property_id}":{"get":{"tags":["casa-daily-feasibility"],"summary":"Get Map Bundle","description":"Spatial bundle for the Casa Daily listing-page interactive map.\n\nReturns the parcel boundary, nearby DAs (within 2km), overlay flags\nas polygons (when geometry available), and comparable sales pins —\nall as GeoJSON the front-end MapLibre layer can render directly.\n\nEach helper runs in its own session so a sparse-data query failure\ndoesn't poison the others (same isolation pattern as /compose).","operationId":"get_map_bundle_api_v1_cd_feasibility_map_bundle__property_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapBundleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-feasibility/parcel-only/{property_id}":{"get":{"tags":["casa-daily-feasibility"],"summary":"Get Parcel Only","description":"Fast parcel + centroid lookup with empty DA/sales/overlay sets.\n\nUse this when the full /map-bundle endpoint is too slow (cold pool,\nGIST contention). The user gets a real map with the parcel outline\n+ property centre, just no nearby pins. The front-end shows a \"DA\nhistory loading…\" hint that resolves once /map-bundle eventually\nsucceeds (or stays empty if it doesn't).","operationId":"get_parcel_only_api_v1_cd_feasibility_parcel_only__property_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapBundleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-feasibility/map-bounds":{"get":{"tags":["casa-daily-feasibility"],"summary":"Get Map Bounds","description":"Return all DAs + comparable sales whose centroids fall inside the\nbounding box [w, s, e, n]. Used by the listing-page map for\nviewport-driven pin loading — the user pans / zooms and we refetch\nthe visible slice (same pattern as the Town Planner workspace map).\n\nBounds are degrees (WGS84). Limits are conservative defaults that\nkeep the response under ~200KB; the endpoint sets `truncated_das` /\n`truncated_sales` flags so the client can warn the user when they've\nzoomed out past the available depth.","operationId":"get_map_bounds_api_v1_cd_feasibility_map_bounds_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"s","in":"query","required":true,"schema":{"type":"number","title":"S"}},{"name":"w","in":"query","required":true,"schema":{"type":"number","title":"W"}},{"name":"n","in":"query","required":true,"schema":{"type":"number","title":"N"}},{"name":"e","in":"query","required":true,"schema":{"type":"number","title":"E"}},{"name":"da_limit","in":"query","required":false,"schema":{"type":"integer","default":800,"title":"Da Limit"}},{"name":"sales_limit","in":"query","required":false,"schema":{"type":"integer","default":400,"title":"Sales Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapBoundsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-feasibility/overlay-query":{"get":{"tags":["casa-daily-feasibility"],"summary":"Overlay Query","description":"Reverse-lookup what zone + overlays apply at the given point.\n\nStrategy: find the ci_properties row whose cadastral boundary\ncontains the click point; surface its zone_code + overlays as the\nanswer. If no parcel covers the point (out of cadastral coverage),\nreturn null property and empty overlays so the front-end can show\n\"out of indexed coverage\".","operationId":"overlay_query_api_v1_cd_feasibility_overlay_query_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","title":"Lat"}},{"name":"lng","in":"query","required":true,"schema":{"type":"number","title":"Lng"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverlayQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-feasibility/artefact-pdf":{"post":{"tags":["casa-daily-feasibility"],"summary":"Compose Artefact Pdf","description":"Compile a Casa Planner artefact into a Typst PDF.\n\nCasa Daily generates the artefact CONTENT via Sonnet (in\n`generate_artefact_action`) and persists section data to\n`cd_project_artefacts.content`. When the user clicks Export PDF\nor asks Casa AI to compile the artefact, Casa Daily POSTs that\ncontent here for Typst rendering.","operationId":"compose_artefact_pdf_api_v1_cd_feasibility_artefact_pdf_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtefactPDFRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/cd-property/brief/{property_id}":{"get":{"tags":["Casa Daily — Property"],"summary":"Get Property Brief","description":"Return the READY-TO-BUY BRIEF for a property.\n\nBy default serves from cache when available (cached briefs cost zero\nper visit). Pass `?refresh=true` to force a fresh Haiku generation\n(used by admin tools or when the underlying intelligence has shifted\nenough that the cached brief is stale).","operationId":"get_property_brief_api_v1_cd_property_brief__property_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyBriefResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-precedent/seed-suburbs":{"post":{"tags":["Casa Daily — Precedent"],"summary":"Seed Suburbs","description":"Return suburbs+zones where dev_type approvals concentrate.\n\nPerformance notes: the townhouse predicate uses ILIKE patterns on\n`ci_da_applications.description` (no trigram GIN yet) and scans\n~270K rows. Cold-cache call lands ~10-15s; subdivision/duplex/etc.\nare 1-5s because dev_type_classified covers them directly.\n\nCache-Control set to `s-maxage=3600, stale-while-revalidate=86400` so\nVercel's edge layer + Casa-Daily's fetch-cache make repeat calls\nfree. The data updates daily (after the nightly DA ingestion run),\nso a 1-hour cache is well within the data freshness budget.","operationId":"seed_suburbs_api_v1_cd_precedent_seed_suburbs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrecedentSeedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrecedentSeedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/cd-spatial/nearby-parcels":{"get":{"tags":["Casa Daily — Spatial"],"summary":"Nearby Parcels","description":"Cadastral parcels intersecting a bbox of `distance` m around (lat, lng).\n\nSourced live from the QLD DCDB ArcGIS service. Use this when the\nin-DB ST_DWithin RPC returns empty for a property whose neighbours\nweren't ingested yet (regional/rural addresses primarily).\n\nTwo input modes:\n  1. Pass `lat` + `lng` directly (callers that already have them).\n  2. Pass `property_id` (UUID) and the endpoint looks up the\n     centroid from ci_properties.centroid via ST_Y/ST_X. Saves the\n     caller one DB round-trip; this is what casa-daily uses.\n\nOn upstream timeout or error returns HTTP 503 — callers should treat\nthat as \"click-to-amalgamate unavailable for this lookup\" and render\nthe rest of the map normally.","operationId":"nearby_parcels_api_v1_cd_spatial_nearby_parcels_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"lat","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":90,"minimum":-90},{"type":"null"}],"description":"Centre latitude (WGS84). Required unless property_id is given.","title":"Lat"},"description":"Centre latitude (WGS84). Required unless property_id is given."},{"name":"lng","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":180,"minimum":-180},{"type":"null"}],"description":"Centre longitude (WGS84). Required unless property_id is given.","title":"Lng"},"description":"Centre longitude (WGS84). Required unless property_id is given."},{"name":"property_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ci_properties.id (UUID). When given, the endpoint looks up the property's centroid and uses it as (lat,lng), so callers don't need to do a separate centroid query first.","title":"Property Id"},"description":"ci_properties.id (UUID). When given, the endpoint looks up the property's centroid and uses it as (lat,lng), so callers don't need to do a separate centroid query first."},{"name":"distance","in":"query","required":false,"schema":{"type":"number","maximum":500,"minimum":10,"description":"Radius in metres; clamped 10-500.","default":150.0,"title":"Distance"},"description":"Radius in metres; clamped 10-500."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NearbyParcelsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/amalgamation/opportunities":{"get":{"tags":["Casa Daily — Amalgamation"],"summary":"Amalgamation Opportunities","description":"Adjacent-property amalgamation finder for builder-developers.\n\nReturns up to `limit` candidates ranked by amalgamation_score DESC.\nEmpty list is a VALID answer — many subject parcels have no\nsame-zone neighbours that combine into a yield-changing site.","operationId":"amalgamation_opportunities_api_v1_amalgamation_opportunities_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"ci_properties.id (UUID) — the subject parcel.","title":"Property Id"},"description":"ci_properties.id (UUID) — the subject parcel."},{"name":"radius_m","in":"query","required":false,"schema":{"type":"number","maximum":25.0,"minimum":0.0,"description":"PostGIS ST_DWithin buffer in metres. 1m captures touching parcels even when cadastral geometries don't perfectly snap. Up to 25m for slightly-separated lots (across a laneway, etc.).","default":1.0,"title":"Radius M"},"description":"PostGIS ST_DWithin buffer in metres. 1m captures touching parcels even when cadastral geometries don't perfectly snap. Up to 25m for slightly-separated lots (across a laneway, etc.)."},{"name":"min_combined_area","in":"query","required":false,"schema":{"type":"number","minimum":0.0,"description":"Drop candidates whose combined area with the subject is below this floor. 900m² is the SEQ dual-occ unlock; raise to 1500 for townhouse-only ambition.","default":900.0,"title":"Min Combined Area"},"description":"Drop candidates whose combined area with the subject is below this floor. 900m² is the SEQ dual-occ unlock; raise to 1500 for townhouse-only ambition."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmalgamationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/render/pdf":{"post":{"tags":["Casa Daily — Render"],"summary":"Render Pdf","description":"Render HTML+CSS to a PDF byte stream.\n\nAuth: X-API-Key (server-to-server, never browser-facing).\n\nResponse: `application/pdf` stream. Body starts with `%PDF-` magic\nbytes (asserted in tests). Caller pipes the response straight into\nSupabase Storage; the endpoint itself is stateless.\n\nFailure modes:\n  - 413 Payload Too Large — body exceeded MAX_BODY_BYTES.\n  - 422 Unprocessable Entity — Pydantic validation (e.g. empty\n    html, unknown page_size).\n  - 504 Gateway Timeout — WeasyPrint took longer than\n    RENDER_TIMEOUT_SECONDS.\n  - 500 Internal Server Error — WeasyPrint raised (malformed\n    HTML, unparseable CSS, missing font, etc.). Message includes\n    the exception class so the caller can show a diagnostic.\n\nBody-size guard runs as a Header-only dependency (see\n`_enforce_body_size`) so we 413 before parsing a 50MB envelope.","operationId":"render_pdf_api_v1_render_pdf_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"content-length","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content-Length"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderPdfRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/projects/{project_id}/conditions":{"get":{"tags":["cd-planner"],"summary":"Get Project Conditions","description":"Return the conditions ledger for a project's linked DA(s).\n\nConditions are derived from ci_da_conditions for every DA whose\n`property_id` matches the project's property. If no DA is matched the\nresponse is empty (200, with empty `conditions` and zero counts) so the\nAI chat surface can render a graceful \"no conditions yet\" state.\n\nFilters:\n  - all              every condition\n  - outstanding      not yet completed (default)\n  - completed        marked done in cd_project_condition_status\n  - monetary         charge_amount > 0\n  - pre_construction category in {timing, infrastructure_charges, ...}","operationId":"get_project_conditions_api_v1_cd_planner_projects__project_id__conditions_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string","pattern":"^(all|outstanding|completed|monetary|pre_construction)$","default":"outstanding","title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/projects/{project_id}/conditions/{condition_id}/status":{"post":{"tags":["cd-planner"],"summary":"Set Condition Status","description":"Toggle a condition's completion state for this project.","operationId":"set_condition_status_api_v1_cd_planner_projects__project_id__conditions__condition_id__status_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"condition_id","in":"path","required":true,"schema":{"type":"string","title":"Condition Id"}},{"name":"status","in":"query","required":true,"schema":{"type":"string","pattern":"^(outstanding|completed|n/a)$","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/projects/{project_id}/da-form":{"get":{"tags":["cd-planner"],"summary":"Get Project Da Form","description":"Return DA form fields pre-populated from project + property data.\n\nOutput shape matches what the casa-daily AI chat tool expects:\n  {\n    download_url, pre_filled_pdf_url, fields {...}, unmapped_fields [...],\n    caveats [...]\n  }\n\nCurrently we return the field map only — pre_filled_pdf_url is left\nnull until a PDF rendering pipeline (WeasyPrint or similar) is wired\nin. The chat card surfaces this as \"Pre-fill prepared\" with\nindividual fields visible.","operationId":"get_project_da_form_api_v1_cd_planner_projects__project_id__da_form_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"council","in":"query","required":true,"schema":{"type":"string","title":"Council"}},{"name":"form_type","in":"query","required":false,"schema":{"type":"string","default":"form_1","title":"Form Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/suburb-pricing-facets":{"get":{"tags":["cd-planner"],"summary":"Get Suburb Pricing Facets","description":"Return median sale price + count per facet level inside a suburb (or LGA).\n\nEach row of the response = one facet bucket (e.g. zone='LDR' or\noverlay='flood' or bedrooms=4). The API joins ci_property_sales to\nci_properties on the matched property_id so we can read zone_code,\noverlays array, etc. from the property.","operationId":"get_suburb_pricing_facets_api_v1_cd_planner_suburb_pricing_facets_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"suburb","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Suburb name (case-insensitive)","title":"Suburb"},"description":"Suburb name (case-insensitive)"},{"name":"lga","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LGA name (alternative to suburb)","title":"Lga"},"description":"LGA name (alternative to suburb)"},{"name":"facet","in":"query","required":false,"schema":{"type":"string","pattern":"^(zone|overlay|bedrooms|bathrooms|floor_band|land_band|property_type)$","description":"Which dimension to bucket sales by.","default":"zone","title":"Facet"},"description":"Which dimension to bucket sales by."},{"name":"months_back","in":"query","required":false,"schema":{"type":"integer","maximum":120,"minimum":3,"default":24,"title":"Months Back"}},{"name":"min_count","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Drop facet levels with fewer than this many sales.","default":3,"title":"Min Count"},"description":"Drop facet levels with fewer than this many sales."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/predict-da-outcome":{"get":{"tags":["cd-planner"],"summary":"Predict Da Outcome","description":"Aggregate stats from ci_da_applications + ci_da_conditions for similar\nDAs to the user's proposed development.\n\nReturns approval rate, time-to-decision percentiles, and the most common\nconditions imposed (with median $ amounts) — the kind of intel that\nnormally requires a $5K Pre-DA report.","operationId":"predict_da_outcome_api_v1_cd_planner_predict_da_outcome_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","title":"Property Id"}},{"name":"dev_type","in":"query","required":true,"schema":{"type":"string","title":"Dev Type"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","pattern":"^(lga_zone|lga_only|state)$","default":"lga_zone","title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/property-sale-history/{property_id}":{"get":{"tags":["cd-planner"],"summary":"Get Property Sale History","description":"Full transaction ledger for a property + computed capital growth p.a.","operationId":"get_property_sale_history_api_v1_cd_planner_property_sale_history__property_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/nearby-das":{"get":{"tags":["cd-planner"],"summary":"Get Nearby Das","description":"Return DAs lodged within `radius_m` of `property_id` in the last\n`since_days`. Used by the neighbour-DA-alert cron to push email\nnotifications when a DA lodges near a saved listing.","operationId":"get_nearby_das_api_v1_cd_planner_nearby_das_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","title":"Property Id"}},{"name":"radius_m","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":50,"default":500,"title":"Radius M"}},{"name":"since_days","in":"query","required":false,"schema":{"type":"integer","maximum":180,"minimum":1,"default":7,"title":"Since Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/school-catchments":{"get":{"tags":["cd-planner"],"summary":"Get School Catchments","description":"For a property: which primary / junior / senior catchments cover it,\nand the 5 nearest school sites with distance.\n\nBacked by ci_school_catchments + ci_school_sites (Education QLD open\ndata, refreshed annually).","operationId":"get_school_catchments_api_v1_cd_planner_school_catchments_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/suburb-intelligence":{"get":{"tags":["cd-planner"],"summary":"Suburb Intelligence","description":"Aggregate every signal we have about a suburb into one composite\nartefact + Promise Score. Auditable, data-backed.\n\nPERFORMANCE NOTES (2026-05-03 fix):\n• All 5 sub-queries run sequentially against the request session in\n  the original implementation. The schools query joined all 1.89M\n  properties × 1,532 catchments before filtering, taking enough to\n  hit Supabase's statement_timeout. The endpoint then returned 500.\n• All five queries use `WHERE UPPER(suburb) = UPPER(:s)`. There IS\n  a btree index on ci_properties.suburb / ci_property_sales.suburb,\n  but the function-on-column kills it. The proper fix is a functional\n  index — see scripts/migrations/2026_05_03_suburb_upper_indexes.sql\n  (apply on next maintenance window). Until then, this endpoint:\n    - Parallelises all five queries (each on its own session)\n    - Wraps each in a 6s asyncio.wait_for so a single slow query\n      can't time out the endpoint\n    - Returns null for any field whose query timed out, so the\n      recipe still gets the fields that DID resolve.","operationId":"suburb_intelligence_api_v1_cd_planner_suburb_intelligence_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"suburb","in":"query","required":true,"schema":{"type":"string","title":"Suburb"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/suburb-trajectory":{"get":{"tags":["cd-planner"],"summary":"Suburb Trajectory","description":"Multi-quarter price trajectory for a suburb (optionally per type),\nexpressed as an annualised compound growth rate from a log-linear\nregression on quarterly medians. Replaces the prior single-year YoY\ndelta which was noisy in low-volume suburbs.\n\nMath\n────\n1. Bucket sales into quarterly medians over the last 24 months.\n2. Need ≥3 quarters with ≥10 sales each to compute a suburb estimate.\n3. Linear regression: log(median_t) = a + b·t (t in years from earliest\n   quarter). annualised_growth = exp(b) - 1.\n4. R² = 1 - SS_res/SS_tot for confidence.\n5. If suburb fails the threshold, fall back to the LGA's trajectory\n   and report fallback_used=True so the caller can surface the\n   degradation honestly.\n\nWhy this matters\n────────────────\nSEQ markets in 2025-26 are running +15-25% YoY. The pricing engine\nused to time-adjust comparables using a single 12mo-vs-prior-12mo\ndelta — fine for high-volume suburbs, noisy in small ones (a 30-sale\nsuburb's median can swing ±10% from one outlier). Quarterly regression\ngives 4-5 data points and a confidence measure.","operationId":"suburb_trajectory_api_v1_cd_planner_suburb_trajectory_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"suburb","in":"query","required":true,"schema":{"type":"string","title":"Suburb"}},{"name":"property_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional filter: 'house', 'unit', 'land', 'townhouse'","title":"Property Type"},"description":"Optional filter: 'house', 'unit', 'land', 'townhouse'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/rank-suburbs":{"get":{"tags":["cd-planner"],"summary":"Rank Suburbs","description":"Rank suburbs in an LGA by Promise Score. Iterates the suburb-\nintelligence aggregation per suburb. For an SEQ LGA with ~50-100\ndistinct suburbs this completes in 2-5 seconds.","operationId":"rank_suburbs_api_v1_cd_planner_rank_suburbs_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"lga","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"}},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form region label (e.g. 'Sunshine Coast')","title":"Region"},"description":"Free-form region label (e.g. 'Sunshine Coast')"},{"name":"top","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":3,"default":10,"title":"Top"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/scheme-context":{"get":{"tags":["cd-planner"],"summary":"Scheme Context","description":"Pull every piece of planning-scheme context Casa Planner artefacts\nneed to cite codes properly: the zone-rule row, overlay provisions,\nand the relevant code names.","operationId":"scheme_context_api_v1_cd_planner_scheme_context_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","title":"Property Id"}},{"name":"dev_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dev Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/comparable-approvals":{"get":{"tags":["cd-planner"],"summary":"Comparable Approvals","description":"Return the N most-comparable approved DAs in the same LGA + zone +\ndev type, with key facts a SoEE precedent table needs: DA number,\naddress, decision date, lot count (where parsed), and the top 3\nconditions imposed.\n\nFalls back to LGA-only if the LGA+zone scope yields nothing.","operationId":"comparable_approvals_api_v1_cd_planner_comparable_approvals_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","title":"Property Id"}},{"name":"dev_type","in":"query","required":true,"schema":{"type":"string","title":"Dev Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":8,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/precedent-corpus":{"get":{"tags":["cd-planner"],"summary":"Precedent Corpus","description":"Deep-mined comparable-approval corpus.\n\nFor each top-N comparable approval, returns the full evidence pack:\n- assessment_reasoning: PO/AO verdicts, departures accepted, citations\n- application_proposal: lot/dwelling/GFA/height/parking dimensions\n- specialist_fingerprints: stormwater, traffic, ecological, bushfire,\n  flood, noise — whichever extracted_data keys exist on the DA's docs\n- submission_themes: aggregated public objection patterns\n- referral_responses: state-agency concurrence + conditions\n\nUsed by Casa Daily artefact-actions.ts when drafting SoEEs / pre-DA\nletters / RFI responses to cite real precedent at draft time.\n\nPerformance note: this is a JOIN-heavy query that pulls\nextracted_data jsonb. We cap N at 20 and limit per-DA doc fetches via\nDISTINCT ON to keep it under 500ms warm.","operationId":"precedent_corpus_api_v1_cd_planner_precedent_corpus_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","title":"Property Id"}},{"name":"dev_type","in":"query","required":true,"schema":{"type":"string","title":"Dev Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":8,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/comparable-sales-aggregated":{"get":{"tags":["cd-planner"],"summary":"Comparable Sales Aggregated","description":"Aggregated comparable-sales stats with price distribution + trend.\n\nTwo scopes:\n  local — sales within radius_m metres of the subject property\n  lga   — sales across the whole LGA, filtered to similar properties\n          (lot size ±lot_band_pct, same property_type, same broad\n          zone family if available)\n\nEach scope returns:\n  summary     — count, median, p25, p75, median $/m², most-recent date\n  by_year     — sales-count + median-price per year (last :months)\n  by_type     — sales-count + median-price per property_type\n  buckets     — price histogram (10 buckets evenly spread p5..p95)\n  sample_rows — up to 30 example rows for spot-checks (the user can\n                deep-dive into the table view to see all)","operationId":"comparable_sales_aggregated_api_v1_cd_planner_comparable_sales_aggregated_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","title":"Property Id"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","pattern":"^(local|lga)$","default":"local","title":"Scope"}},{"name":"radius_m","in":"query","required":false,"schema":{"type":"integer","maximum":20000,"minimum":200,"default":2000,"title":"Radius M"}},{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":120,"minimum":3,"default":24,"title":"Months"}},{"name":"lot_band_pct","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":10,"description":"LGA-scope similarity tolerance — pull sales whose lot is within ±X% of the subject lot.","default":25,"title":"Lot Band Pct"},"description":"LGA-scope similarity tolerance — pull sales whose lot is within ±X% of the subject lot."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/neighbourhood-context":{"get":{"tags":["cd-planner"],"summary":"Neighbourhood Context","description":"All approved DAs within a geographic radius — no dev_type filter.\n\nReturns a grouped view: how many of each application_type / category\nhave been approved nearby in the last N months, plus 5 example DAs\nper group with addresses + decision dates + days_to_decision +\nextracted proposal dimensions (when available).\n\nThis is the answer to 'what have surrounding DAs been approving?' —\na question that's distinct from 'what's the approval rate for\ntownhouses here?'. For RR/RU sites where most works are\nbuilding-approval-only (no DA dataset coverage), this surfaces the\nDAs that DO exist (subdivisions, dual-occs, ancillary dwellings,\nextensions) so the user gets a real-world picture of what council\nhas been amenable to in the neighbourhood.","operationId":"neighbourhood_context_api_v1_cd_planner_neighbourhood_context_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","title":"Property Id"}},{"name":"radius_m","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":200,"default":2000,"title":"Radius M"}},{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":120,"minimum":6,"default":60,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/listings/discover":{"get":{"tags":["cd-planner"],"summary":"Discover Listings","description":"Surface ACTIVE REA listings matching a development profile.\n\nFilters compose with AND semantics. Result set is ordered by\ndevelopment_score DESC then last_seen_date DESC, capped at `limit`.\nEach row includes the rationale string for the find_opportunities\ncard (per-listing reason for the match). Returns the same shape\nthe find_opportunities tool expects so it works whether we call\nin anchor mode (from a property page) or preferences mode (from\nthe dashboard).","operationId":"discover_listings_api_v1_cd_planner_listings_discover_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"council_areas","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated LGA names (e.g. 'Brisbane,Sunshine Coast').","title":"Council Areas"},"description":"Comma-separated LGA names (e.g. 'Brisbane,Sunshine Coast')."},{"name":"opportunity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Dev type filter — subdivision, townhouse, duplex, mcu, kdr, infill. Maps to property_type + score_breakdown signals.","title":"Opportunity Type"},"description":"Dev type filter — subdivision, townhouse, duplex, mcu, kdr, infill. Maps to property_type + score_breakdown signals."},{"name":"budget_min","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Budget Min"}},{"name":"budget_max","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":100000},{"type":"null"}],"title":"Budget Max"}},{"name":"land_area_min","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Land Area Min"}},{"name":"land_area_max","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Land Area Max"}},{"name":"exclude_property_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When set in anchor mode, omit this property from results so Casa AI doesn't surface the seed listing back to itself.","title":"Exclude Property Id"},"description":"When set in anchor mode, omit this property from results so Casa AI doesn't surface the seed listing back to itself."},{"name":"min_score","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":0,"default":70,"title":"Min Score"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":8,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cd-planner/da-precedent-conditions":{"get":{"tags":["cd-planner"],"summary":"Get Da Precedent Conditions","description":"Surface the categorical breakdown of DA conditions for the property's\n(LGA, zone_code) cohort — what conditions actually get attached to\napproved DAs at sites like this.\n\nResponse shape:\n    {\n      \"property_id\": \"...\",\n      \"lga\": \"Brisbane\",\n      \"zone_code\": \"LMR\",\n      \"sample_size\": 142,        # DAs with categorised conditions\n      \"top_categories\": [\n         {\"category\": \"infrastructure_charges\", \"frequency\": 0.87,\n          \"da_count\": 124, \"median_charge\": 18450.0,\n          \"typical_measurement\": null, \"measurement_unit\": null},\n         {\"category\": \"setback\", \"frequency\": 0.62, \"da_count\": 88,\n          \"median_charge\": null,\n          \"typical_measurement\": 6.0, \"measurement_unit\": \"m\"},\n         ...\n      ],\n      \"infrastructure_charge\": {\n          \"median\": 17500.0, \"average\": 19340.0,\n          \"min\": 4200.0, \"max\": 152000.0, \"sample_size\": 67\n      },\n      \"data_available\": true,\n      \"message\": null\n    }\n\nWhen the cohort is too sparse (no rows for this LGA+zone), returns a\n\"data_available\": false response so the caller can render an empty-\nstate card rather than raise.","operationId":"get_da_precedent_conditions_api_v1_cd_planner_da_precedent_conditions_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","title":"Property Id"}},{"name":"top_n","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":8,"title":"Top N"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/deal-sheet/by-property/{property_id}":{"get":{"tags":["deal-sheet"],"summary":"Deal Sheet By Property","description":"Generate a deal sheet for any property by its `ci_properties.id`.","operationId":"deal_sheet_by_property_api_v1_deal_sheet_by_property__property_id__get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}},{"name":"radius_km","in":"query","required":false,"schema":{"type":"number","maximum":10.0,"minimum":0.1,"default":2.0,"title":"Radius Km"}},{"name":"lookback_years","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"Lookback Years"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealSheetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/deal-sheet/by-listing/{listing_id}":{"get":{"tags":["deal-sheet"],"summary":"Deal Sheet By Listing","description":"Generate a deal sheet for a Casa Daily-known REA listing by its UUID.","operationId":"deal_sheet_by_listing_api_v1_deal_sheet_by_listing__listing_id__get","parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"string","title":"Listing Id"}},{"name":"radius_km","in":"query","required":false,"schema":{"type":"number","maximum":10.0,"minimum":0.1,"default":2.0,"title":"Radius Km"}},{"name":"lookback_years","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"Lookback Years"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealSheetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/deal-sheet/by-address":{"get":{"tags":["deal-sheet"],"summary":"Deal Sheet By Address","description":"Generate a deal sheet by free-text address.\n\nResolves the address against `ci_properties` (exact + prefix match).\nReturns 404 if no property is found in the SEQ corpus — the website\ncan show \"we don't have data for this address yet\" and offer to\nnotify when coverage expands.","operationId":"deal_sheet_by_address_api_v1_deal_sheet_by_address_get","parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","minLength":5,"title":"Address"}},{"name":"radius_km","in":"query","required":false,"schema":{"type":"number","maximum":10.0,"minimum":0.1,"default":2.0,"title":"Radius Km"}},{"name":"lookback_years","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"Lookback Years"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealSheetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/consumer/log-search":{"post":{"tags":["consumer"],"summary":"Log Search","description":"Log a public property search to ci_events. Fire-and-forget — never blocks\nthe page render. Powers the data flywheel: every search is intent signal.\n\nNo auth required. We capture anonymous_id (from session_id) + IP-derived city\nfor aggregate analysis without retaining PII.","operationId":"log_search_api_v1_consumer_log_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/consumer/subscribe-alert":{"post":{"tags":["consumer"],"summary":"Subscribe Alert","description":"Capture email + property to alert on (DA activity, comparable sales, etc.).\n\nInserts into ci_leads with source='property_alert'. Future Casa Pro\nsubscription upsell pulls from this list. Idempotent on (email, property_id) —\nduplicate submits update name + return the existing row.","operationId":"subscribe_alert_api_v1_consumer_subscribe_alert_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeAlertRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/consumer/report-checkout":{"post":{"tags":["consumer"],"summary":"Create Report Checkout","description":"Create a Stripe one-time checkout session for a $29 property profile PDF.\n\nFlow:\n  1. Insert a pending ci_reports row (status='pending', paid=False)\n  2. Create Stripe Checkout Session with price = STRIPE_PRICE_PROPERTY_PROFILE\n  3. Return the checkout URL — frontend redirects user to Stripe\n  4. On Stripe webhook (checkout.session.completed), update ci_reports.paid=True\n     and trigger PDF generation (background task)\n  5. User is redirected back to /report/{report_id} which polls for ready","operationId":"create_report_checkout_api_v1_consumer_report_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/consumer/report/{report_id}/finalize":{"post":{"tags":["consumer"],"summary":"Finalize Report","description":"Verify Stripe payment + mark report as ready.\n\nCalled by the frontend after Stripe redirects the user back to\n/report/{id}?session=cs_xxx. We:\n  1. Look up the ci_reports row (must exist, must match Stripe session.metadata.report_id)\n  2. Fetch the Stripe session and verify payment_status == 'paid'\n  3. Update ci_reports.paid=true, status='ready', completed_at=NOW\n  4. Return current status\n\nIdempotent — calling twice is safe.\n\nThe actual report content is rendered at view time using build_deal_sheet\nagainst the property_id — no PDF generation needed. The customer paid for\npermanent access to the live intelligence on this property.","operationId":"finalize_report_api_v1_consumer_report__report_id__finalize_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__consumer__FinalizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/consumer/lots-in-bbox":{"get":{"tags":["consumer"],"summary":"Lots In Bbox","description":"Return GeoJSON FeatureCollection of lots intersecting the viewport bbox.\n\nDrives the public lots map. Two layers:\n  - registered: ci_properties (cadastral, blue rendering on map)\n  - pre_registered: ci_estate_lots (extracted from subdivision plans, yellow rendering)\n\nBbox is in EPSG:4326 (WGS84 lon/lat). Limit is per layer to keep payloads\nmanageable; a typical zoomed-in residential view returns 50-500 features.","operationId":"lots_in_bbox_api_v1_consumer_lots_in_bbox_get","parameters":[{"name":"west","in":"query","required":true,"schema":{"type":"number","title":"West"}},{"name":"south","in":"query","required":true,"schema":{"type":"number","title":"South"}},{"name":"east","in":"query","required":true,"schema":{"type":"number","title":"East"}},{"name":"north","in":"query","required":true,"schema":{"type":"number","title":"North"}},{"name":"kinds","in":"query","required":false,"schema":{"type":"string","default":"both","title":"Kinds"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":2000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Lots In Bbox Api V1 Consumer Lots In Bbox Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/consumer/report/{report_id}":{"get":{"tags":["consumer"],"summary":"Get Report Status","description":"Check report status — frontend polls this after Stripe redirect.\n\nStatuses progress: pending → paid → generating → ready | failed\nReturns download_url only when status='ready'.","operationId":"get_report_status_api_v1_consumer_report__report_id__get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/preliminary/compose":{"post":{"tags":["preliminary"],"summary":"Compose Preliminary","description":"Build the preliminary report payload without payment (dashboard + tests).\n\n``background=true`` returns immediately with a report id to poll\n(GET /report/{id} → status, GET /report/{id}/pdf once ready) — the\nsynchronous path is edge-proxy-timeout-bound at ~300s while a full\nintelligence compose legitimately runs longer.","operationId":"compose_preliminary_api_v1_preliminary_compose_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreliminaryComposeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Compose Preliminary Api V1 Preliminary Compose Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/preliminary/checkout":{"post":{"tags":["preliminary"],"summary":"Create Preliminary Checkout","description":"Create a $199 Stripe one-time checkout for a preliminary planning report.\n\nPre-inserts a pending ci_reports row (carrying the dev intent in report_data\nso fulfilment can compose), then creates the Stripe session. Mirrors the\nworking consumer report-checkout flow.","operationId":"create_preliminary_checkout_api_v1_preliminary_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreliminaryCheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__preliminary__CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/preliminary/report/{report_id}/intent":{"post":{"tags":["preliminary"],"summary":"Post Payment Intent","description":"The buyer's own words, collected AFTER payment (Conversion Recovery\nSpec W8.5): the free-text plan was a pre-payment field on every path and\nthe pre-payment path is now email and payment only. The desk reads\nreport_data.works_intent, so it lands in the same place. Authorised by the\nStripe session that paid for this report, exactly as finalize is.","operationId":"post_payment_intent_api_v1_preliminary_report__report_id__intent_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostPaymentIntent"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Payment Intent Api V1 Preliminary Report  Report Id  Intent Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/preliminary/report/{report_id}/finalize":{"post":{"tags":["preliminary"],"summary":"Finalize Preliminary","description":"Verify Stripe payment then generate + store the report. Idempotent.","operationId":"finalize_preliminary_api_v1_preliminary_report__report_id__finalize_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__preliminary__FinalizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/preliminary/report/{report_id}":{"get":{"tags":["preliminary"],"summary":"Get Preliminary Report","description":"Status + report_data for the public web view (polled after Stripe redirect).","operationId":"get_preliminary_report_api_v1_preliminary_report__report_id__get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/preliminary/report/{report_id}/pdf":{"get":{"tags":["preliminary"],"summary":"Get Preliminary Report Pdf","description":"Downloadable branded PDF of a paid + ready preliminary report.\n\nAccess model matches the JSON GET: possession of the report uuid. The PDF\nis regenerated per request from the stored ``report_data`` payload (a\ndeterministic Typst render, well under a second — no storage round-trip\nneeded) and streamed back as an attachment.","operationId":"get_preliminary_report_pdf_api_v1_preliminary_report__report_id__pdf_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/possibilities/checkout":{"post":{"tags":["possibilities"],"summary":"Create Possibilities Checkout","description":"Create the $199 checkout. Pre-inserts a pending ci_reports row, then a\nStripe session whose metadata.report_type routes every downstream path.","operationId":"create_possibilities_checkout_api_v1_possibilities_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PossibilitiesCheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__possibilities__CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/possibilities/compose":{"post":{"tags":["possibilities"],"summary":"Compose Possibilities","description":"Produce a What's Possible report with no payment — the internal path for\nQA, gifting and accuracy verification.\n\nRuns the REAL pipeline: the same compose, the same Stage-7 gates, the same\n§I grounding audit and Opus final review, the same ready transition and the\nsame ``viewer_url`` (so the QR flyer renders). Two deliberate differences,\nboth of which make the row *less* consequential than a sale:\n\n* **Nothing is emailed.** ``email=None`` — every send in fulfilment is\n  gated on it — and a hold does not page ops (``compose_only=True``).\n* **It is not a purchase.** ``amount_cents=0``, no ``stripe_session_id``\n  and ``requested_by='api-compose'``, so the row fails both the\n  ``genuine_paid`` gate and the ``genuine_revenue`` reporting predicate.\n  That keeps it out of revenue counts, the GA4 purchase event, free-check\n  conversion linkage, nurture buyer-skip and the reconcile sweeps.\n\nAlways background: a full possibilities compose with §I legitimately runs\npast the edge-proxy timeout. Poll ``GET /report/{id}``, then fetch\n``GET /report/{id}/pdf``. A ``needs_review`` status means the accuracy gate\nheld it — read ``report_data.possibilities_hold`` for the reasons.","operationId":"compose_possibilities_api_v1_possibilities_compose_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PossibilitiesComposeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Compose Possibilities Api V1 Possibilities Compose Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/possibilities/report/{report_id}/finalize":{"post":{"tags":["possibilities"],"summary":"Finalize Possibilities","operationId":"finalize_possibilities_api_v1_possibilities_report__report_id__finalize_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__possibilities__FinalizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Finalize Possibilities Api V1 Possibilities Report  Report Id  Finalize Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/possibilities/report/{report_id}":{"get":{"tags":["possibilities"],"summary":"Get Possibilities Report","operationId":"get_possibilities_report_api_v1_possibilities_report__report_id__get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Possibilities Report Api V1 Possibilities Report  Report Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/possibilities/report/{report_id}/pdf":{"get":{"tags":["possibilities"],"summary":"Get Possibilities Report Pdf","operationId":"get_possibilities_report_pdf_api_v1_possibilities_report__report_id__pdf_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/view/{token}":{"get":{"tags":["report-viewer"],"summary":"Get Report View","description":"Light metadata for the public web viewer.\n\nDeliberately cheap: one projection query, no blob transfer, no external\nround-trip. This response is on the critical path of a QR scan, so it\nmust return in a single database hop.","operationId":"get_report_view_api_v1_reports_view__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Report View Api V1 Reports View  Token  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/view/{token}/pdf":{"get":{"tags":["report-viewer"],"summary":"Get Report View Pdf","description":"The report PDF, inline by default so browsers display rather than save.\n\nRe-rendered from ``report_data`` per request (deterministic; the same\nmachinery as the existing public PDF endpoints) unless a persisted copy\nexists in storage.","operationId":"get_report_view_pdf_api_v1_reports_view__token__pdf_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Download"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/checkout":{"post":{"tags":["da-project"],"summary":"Create Da Project Checkout","description":"Create a $1,999 Stripe checkout + a pending ci_tp_projects row.\n\nAuthenticated (§H.3.4): the website proxy forwards the applicant's session\nJWT. The identity used downstream is the AUTHENTICATED one — a body that\nnames someone else's user_id/org is overridden/rejected, so a stolen or\nreplayed request cannot create projects under another account.","operationId":"create_da_project_checkout_api_v1_da_project_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DAProjectCheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__da_project__CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/da-project/{project_id}/finalize":{"post":{"tags":["da-project"],"summary":"Finalize Da Project","description":"Verify Stripe payment then fulfil the project. Idempotent.","operationId":"finalize_da_project_api_v1_da_project__project_id__finalize_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__da_project__FinalizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Finalize Da Project Api V1 Da Project  Project Id  Finalize Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/{project_id}/handoff":{"post":{"tags":["da-project"],"summary":"Add Handoff","description":"Create a manual founder handoff for any not-yet-automated step.\n\nFounder-only — this writes founder worklist tasks across any project, so it\nmust never be callable by an ordinary applicant.","operationId":"add_handoff_api_v1_da_project__project_id__handoff_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Handoff Api V1 Da Project  Project Id  Handoff Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/{project_id}/status":{"post":{"tags":["da-project"],"summary":"Set Project Status","description":"Founder: advance/set a project's DA stage.\n\nUpdates ci_tp_projects.stage + stage_updated_at, writes a customer-visible\nactivity, notifies the project owner (in-app + email). Founder-only.","operationId":"set_project_status_api_v1_da_project__project_id__status_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Project Status Api V1 Da Project  Project Id  Status Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/{project_id}/note":{"post":{"tags":["da-project"],"summary":"Add Project Note","description":"Founder: add a customer-visible update to a project's timeline.\n\nWrites an activity row; if notify, also fires the in-app notification + the\ngeneric 'your project was updated' email. Founder-only.","operationId":"add_project_note_api_v1_da_project__project_id__note_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Project Note Api V1 Da Project  Project Id  Note Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/ops/tasks":{"get":{"tags":["da-project"],"summary":"List Ops Tasks","description":"Founder ops console: all open manual-handoff tasks across projects.\n\nFounder-only — this exposes every customer's address/work items, so it is\ngated to the founder allowlist (matching the website /app/ops email gate).","operationId":"list_ops_tasks_api_v1_da_project_ops_tasks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Ops Tasks Api V1 Da Project Ops Tasks Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/da-project/ops/tasks/{task_id}/done":{"post":{"tags":["da-project"],"summary":"Mark Ops Task Done","description":"Founder: mark a manual-handoff task done.\n\nSets status='done' + completed_at=NOW(). Optionally writes a customer-visible\nactivity on the task's project. Founder-only. Declared before /{project_id}.","operationId":"mark_ops_task_done_api_v1_da_project_ops_tasks__task_id__done_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TaskDoneRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mark Ops Task Done Api V1 Da Project Ops Tasks  Task Id  Done Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/ops/projects/{project_id}/generate-documents":{"post":{"tags":["da-project"],"summary":"Generate Da Documents","description":"Founder: (re-)run the automated DA document pipeline for a project.\n\nOne-click trigger for the console — generates/refreshes the planning report,\nDA form, owner's consent and cover letter as hidden drafts (WS1 runner →\nWS11 ops events). Idempotent per step; pass nothing to run, drafts stay\nhidden until /approve-bundle. Founder-only; declared before /{project_id}.","operationId":"generate_da_documents_api_v1_da_project_ops_projects__project_id__generate_documents_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Generate Da Documents Api V1 Da Project Ops Projects  Project Id  Generate Documents Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/ops/projects/{project_id}/approve-bundle":{"post":{"tags":["da-project"],"summary":"Approve Da Bundle","description":"Founder: approve the auto-generated DA bundle — the §0 release gate.\n\nFlips every `generated_draft` document on the project to `final` (which is\nwhat the customer-surface filter treats as visible), closes the open\n\"Review & approve DA bundle\" task, and notifies the customer that their\ndocuments are ready. This is the single human sign-off in the otherwise\nautomated document pipeline. Founder-only; declared before /{project_id}.","operationId":"approve_da_bundle_api_v1_da_project_ops_projects__project_id__approve_bundle_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Da Bundle Api V1 Da Project Ops Projects  Project Id  Approve Bundle Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/ops/projects/{project_id}/report/sections":{"get":{"tags":["da-project"],"summary":"List Report Sections Endpoint","description":"Founder: list the planning report's editable sections + current text.\n\nReturns ``{project_id, sections: [{key, heading, body, is_override}]}`` in\nreading order — the contract the in-console section editor (Wave 6B) reads to\npopulate its dropdown. Founder-only; declared before /{project_id}.","operationId":"list_report_sections_endpoint_api_v1_da_project_ops_projects__project_id__report_sections_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Report Sections Endpoint Api V1 Da Project Ops Projects  Project Id  Report Sections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/ops/projects/{project_id}/report/sections/{section_key}/regenerate":{"post":{"tags":["da-project"],"summary":"Regenerate Report Section Endpoint","description":"Founder: regenerate ONE section's prose via Haiku — preview only.\n\nBody ``{instruction}``. Returns ``{section_key, heading, current_text,\ndraft_text}``. Does NOT persist — the founder previews, then applies. Founder\n-only; declared before /{project_id}.","operationId":"regenerate_report_section_endpoint_api_v1_da_project_ops_projects__project_id__report_sections__section_key__regenerate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"section_key","in":"path","required":true,"schema":{"type":"string","title":"Section Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionRegenerateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Regenerate Report Section Endpoint Api V1 Da Project Ops Projects  Project Id  Report Sections  Section Key  Regenerate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/ops/projects/{project_id}/report/sections/{section_key}/apply":{"post":{"tags":["da-project"],"summary":"Apply Report Section Endpoint","description":"Founder: persist a section override + re-render the hidden Planning-Report.pdf.\n\nBody ``{text}``. Writes ``metadata.section_overrides[section_key]``, replaces\nthe prior draft (row + storage object), and re-renders. Returns ``{ok,\nsection_key, document_id, ...}``. Founder-only; declared before /{project_id}.","operationId":"apply_report_section_endpoint_api_v1_da_project_ops_projects__project_id__report_sections__section_key__apply_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"section_key","in":"path","required":true,"schema":{"type":"string","title":"Section Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionApplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Apply Report Section Endpoint Api V1 Da Project Ops Projects  Project Id  Report Sections  Section Key  Apply Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/ops/projects/{project_id}/requirements":{"post":{"tags":["da-project"],"summary":"Set Project Requirement","description":"Founder: add / update / waive a document requirement (WS6C).\n\nUpdate an existing requirement by ``requirement_id``, or add/upsert one by\n``doc_type``. Used to add a project-specific requirement (e.g. a bushfire\nreport), retitle one, toggle gating, edit its dependency chain, or waive one\nthat doesn't apply. Founder-only; declared before /{project_id}.","operationId":"set_project_requirement_api_v1_da_project_ops_projects__project_id__requirements_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Project Requirement Api V1 Da Project Ops Projects  Project Id  Requirements Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/ops/projects/{project_id}/requirements/{rid}/surface":{"post":{"tags":["da-project"],"summary":"Surface Project Requirement","description":"Founder: surface a Casa document against a requirement (WS6C).\n\nSets the requirement to ``surfaced``, links the document, and notifies the\ncustomer that a new document is available — how a generated planning report,\nquote, consultant report or the final submission package reaches the\ncustomer's \"From Casa Intelligence\" column. The requirement is resolved by\n``rid`` (its doc_type drives the surface). Founder-only; declared before\n/{project_id}.","operationId":"surface_project_requirement_api_v1_da_project_ops_projects__project_id__requirements__rid__surface_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurfaceRequirementRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Surface Project Requirement Api V1 Da Project Ops Projects  Project Id  Requirements  Rid  Surface Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/ops/projects/{project_id}/quotes":{"get":{"tags":["da-project"],"summary":"List Quote Cards","description":"Founder: list every consultant quote card on a project (Wave 6A).\n\nFounder-only. Returns drafts AND surfaced cards (the founder sees all);\nthe customer surface only ever receives surfaced cards. Declared before\n/{project_id} so FastAPI matches the literal path before the UUID route.","operationId":"list_quote_cards_api_v1_da_project_ops_projects__project_id__quotes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Quote Cards Api V1 Da Project Ops Projects  Project Id  Quotes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["da-project"],"summary":"Add Quote Card","description":"Founder: add a consultant quote-approval card (Wave 6A).\n\nCreates a draft ci_da_consultant_rfqs row carrying the company, quoted price,\ndescription and contact. The card stays hidden from the customer until the\nfounder clicks Surface. Founder-only; declared before /{project_id}.","operationId":"add_quote_card_api_v1_da_project_ops_projects__project_id__quotes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteCardRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Quote Card Api V1 Da Project Ops Projects  Project Id  Quotes Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/ops/projects/{project_id}/quotes/{quote_id}":{"delete":{"tags":["da-project"],"summary":"Delete Quote Card","description":"Founder: remove a quote card before it's surfaced (Wave 6A).\n\nDeletes the card row. Founder-only; declared before /{project_id}.","operationId":"delete_quote_card_api_v1_da_project_ops_projects__project_id__quotes__quote_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Quote Card Api V1 Da Project Ops Projects  Project Id  Quotes  Quote Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/ops/projects/{project_id}/quotes/surface":{"post":{"tags":["da-project"],"summary":"Surface Quote Cards","description":"Founder: surface gathered quote cards to the customer (Wave 6A).\n\nMarks the targeted (or all) draft quote cards surfaced (status 'quoted',\nmetadata.surfaced=true + surfaced_at), writes ONE customer activity, sends\nONE 'status updated' email, and advances the project to consultant_scoping so\nthe approve_quotes CTA is meaningful. Founder-only; declared before\n/{project_id}.","operationId":"surface_quote_cards_api_v1_da_project_ops_projects__project_id__quotes_surface_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SurfaceQuotesRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Surface Quote Cards Api V1 Da Project Ops Projects  Project Id  Quotes Surface Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/ops/projects/{project_id}/rfi":{"get":{"tags":["da-project"],"summary":"List Project Rfis","description":"Founder: every RFI on a project with charge status (Wave 6D).\n\nFounder-only. Returns the full founder shape (items, charge amount + scope +\nstatus) so the console can show approval state and, once approved, generate\nthe response draft. Declared before /{project_id}.","operationId":"list_project_rfis_api_v1_da_project_ops_projects__project_id__rfi_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Project Rfis Api V1 Da Project Ops Projects  Project Id  Rfi Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["da-project"],"summary":"Create Project Rfi","description":"Founder: record an RFI + set the per-response variable charge (Wave 6D).\n\nStores the council's request items + a founder-entered variable charge\n(``response_charge_aud``) and scope on ci_tp_rfi with ``charge_status`` =\n'pending'. Advances the project to the ``rfi`` stage (forward-only) and seeds\nthe ``council_correspondence`` client requirement so the customer can upload\ndirect council correspondence. The customer then sees the\n``approve_extra_work`` CTA with the amount; only after they approve is the\nresponse work unblocked. Founder-only; declared before /{project_id}.","operationId":"create_project_rfi_api_v1_da_project_ops_projects__project_id__rfi_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRFIRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Project Rfi Api V1 Da Project Ops Projects  Project Id  Rfi Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/{project_id}/rfi/{rfi_id}/approve-charge":{"post":{"tags":["da-project"],"summary":"Approve Rfi Charge Endpoint","description":"Customer (applicant-owned): approve the additional RFI-response work (Wave 6D).\n\nSets the RFI's ``charge_status`` to 'approved', writes a customer activity and\nnotifies the founder so the response work is unblocked. Authenticated +\nownership-checked (owner org or founder). Idempotent — a second approve on an\nalready-actioned charge returns a clear 409.","operationId":"approve_rfi_charge_endpoint_api_v1_da_project__project_id__rfi__rfi_id__approve_charge_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"rfi_id","in":"path","required":true,"schema":{"type":"string","title":"Rfi Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Rfi Charge Endpoint Api V1 Da Project  Project Id  Rfi  Rfi Id  Approve Charge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/ops/projects":{"get":{"tags":["da-project"],"summary":"List Ops Projects","description":"Founder ops cockpit: EVERY consumer_da project across all orgs.\n\nFor each project the founder sees system-done vs needs-manual at a glance:\nstage + label, customer email, document count, and open (todo/in_progress)\nvs done task counts. Ordered by most open tasks then most recently updated.\n\nFounder-only — exposes every customer's address/email, so it is gated to the\nfounder allowlist (matching the website /app/ops email gate). Declared before\n/{project_id} so FastAPI matches the literal path before the UUID route.","operationId":"list_ops_projects_api_v1_da_project_ops_projects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Ops Projects Api V1 Da Project Ops Projects Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/da-project/parcel":{"get":{"tags":["da-project"],"summary":"Get Parcel Geojson","description":"Boundary polygon + centroid + address for a property_id.\n\nShape: { property_id, address, geometry: <GeoJSON Polygon>, centroid: [lng, lat] }.\nBoundary is simplified (≈1m tolerance, 6 dp) to keep the wire payload small —\nplenty for the MapLibre parcel-confirm map.","operationId":"get_parcel_geojson_api_v1_da_project_parcel_get","parameters":[{"name":"property_id","in":"query","required":true,"schema":{"type":"string","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Parcel Geojson Api V1 Da Project Parcel Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/{project_id}":{"get":{"tags":["da-project"],"summary":"Get Da Project","description":"Full project detail for the customer dashboard: stage tracker, tasks\n(customer-visible), and timeline.\n\nAuthenticated + ownership-checked: the project must belong to the caller's\norg (founders may view any project for support). Returns 404 — not 403 — for\na project the caller doesn't own so we never confirm a foreign id exists.\n\nDesign Law #0: the customer shape carries ZERO founder/internal tasks, no\ndraft documents, and a filtered timeline. Founders get the full internal view\n(parity with /ops/*). Ownership is checked against the customer shape's\norg_id, so the org check below runs before building the founder shape.","operationId":"get_da_project_api_v1_da_project__project_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Da Project Api V1 Da Project  Project Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/{project_id}/documents":{"get":{"tags":["da-project"],"summary":"List Project Documents","description":"List a project's documents with fresh signed download URLs.\n\nAuthenticated + ownership-checked (owner org or founder).","operationId":"list_project_documents_api_v1_da_project__project_id__documents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Project Documents Api V1 Da Project  Project Id  Documents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["da-project"],"summary":"Upload Project Document","description":"Upload a project document (consultant report, council RFI, etc.).\n\nAuthenticated + ownership-checked (owner org or founder). Stores the file\nin the private project-documents Supabase Storage bucket, records a\nci_tp_project_documents row, and writes a customer-visible activity. Storage\nfailures surface as a clean 502 rather than a 500 — the project page stays\nhealthy.\n\nWS6C — two-way choreography: an optional ``requirement_id`` (or ``doc_type``)\nties the upload to a specific document requirement, flipping that requirement\nto ``received`` and linking the new document. This is how a customer\nfulfilling \"Architectural plans\" or \"Engineering plans\" advances the\nsubmission gate. When a requirement is fulfilled, the stored document's\ncategory is set to the requirement's ``doc_type`` so the lodgement manifest\nmatches it (e.g. an engineering plan set lands as a ``plans``-aliased doc).","operationId":"upload_project_document_api_v1_da_project__project_id__documents_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_project_document_api_v1_da_project__project_id__documents_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Project Document Api V1 Da Project  Project Id  Documents Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project/{project_id}/requirements":{"get":{"tags":["da-project"],"summary":"List Project Requirements","description":"WS6C — the two-way document-requirements view for a project.\n\nAuthenticated + ownership-checked (owner org or founder). Founders get the\nfull flat management list (every requirement, every provider, every status);\ncustomers get the two-part view: ``from_casa`` (surfaced Casa documents, each\nwith a signed download URL) + ``needed_from_you`` (outstanding client\nrequirements, each carrying its dependency note). The customer view never\nleaks internal/unsurfaced rows.","operationId":"list_project_requirements_api_v1_da_project__project_id__requirements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Project Requirements Api V1 Da Project  Project Id  Requirements Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da-project":{"get":{"tags":["da-project"],"summary":"List Da Projects","description":"List an applicant's DA projects for the dashboard.\n\nAuthenticated + ownership-checked: the requested org_id must match the\ncaller's own org (founders may list any org).","operationId":"list_da_projects_api_v1_da_project_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Da Projects Api V1 Da Project Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da/projects/{project_id}/consultants":{"get":{"tags":["da-consultants"],"summary":"Get Scope Consultants","description":"Scope the consultant disciplines this project needs (founder-only).","operationId":"get_scope_consultants_api_v1_da_projects__project_id__consultants_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Scope Consultants Api V1 Da Projects  Project Id  Consultants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da/projects/{project_id}/consultants/rfq":{"post":{"tags":["da-consultants"],"summary":"Post Compose Rfq","description":"Compose a founder-reviewed RFQ pack for one discipline (founder-only).","operationId":"post_compose_rfq_api_v1_da_projects__project_id__consultants_rfq_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeRfqRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Compose Rfq Api V1 Da Projects  Project Id  Consultants Rfq Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da/consultants/followup-sweep":{"post":{"tags":["da-consultants"],"summary":"Post Followup Sweep","description":"Chase outstanding consultant RFQs (founder-only). Dry run unless send=True.","operationId":"post_followup_sweep_api_v1_da_consultants_followup_sweep_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FollowupSweepRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Post Followup Sweep Api V1 Da Consultants Followup Sweep Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/da/projects/{project_id}/lodgement-pack":{"get":{"tags":["da-lodgement"],"summary":"Get Lodgement Pack","description":"Assemble + validate + price the lodgement pack (founder-only preview).\n\nRead-only: nothing is generated or submitted. Returns ``ready``, the\n``documents`` present, what's ``missing``, and the itemised ``fees``\nschedule with an estimated ``fee_total_aud``.","operationId":"get_lodgement_pack_api_v1_da_projects__project_id__lodgement_pack_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Lodgement Pack Api V1 Da Projects  Project Id  Lodgement Pack Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da/projects/{project_id}/mark-lodged":{"post":{"tags":["da-lodgement"],"summary":"Post Mark Lodged","description":"One-click founder action: record the DA as lodged with council.\n\nAdvances the project to the ``lodged`` stage and notifies the customer.\nDoes NOT submit to a council portal — that is the human/transaction step.","operationId":"post_mark_lodged_api_v1_da_projects__project_id__mark_lodged_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MarkLodgedRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Mark Lodged Api V1 Da Projects  Project Id  Mark Lodged Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reconcile/run":{"post":{"tags":["reconcile"],"summary":"Run Reconciliation","operationId":"run_reconciliation_api_v1_reconcile_run_post","parameters":[{"name":"x-reconcile-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Reconcile-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Reconciliation Api V1 Reconcile Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ops/projects/{project_id}/events":{"get":{"tags":["ops"],"summary":"List Project Events","description":"Full append-only event history for one project, newest first. Founder-only.","operationId":"list_project_events_api_v1_ops_projects__project_id__events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Project Events Api V1 Ops Projects  Project Id  Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ops/events":{"get":{"tags":["ops"],"summary":"Search Events","description":"Cross-project event search by customer / step / status. Founder-only.\n\nPowers Claude's \"has X happened for this customer?\" via the ops endpoint\n(the direct-SQL path is the Supabase connector; this is the HTTP twin).","operationId":"search_events_api_v1_ops_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"}},{"name":"step_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Key"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Search Events Api V1 Ops Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ops/projects/{project_id}/steps/{step_key}/run":{"post":{"tags":["ops"],"summary":"Rerun Step","description":"Idempotently re-trigger a step. Founder-only (one-click recovery).\n\n* If a step fn is registered for ``step_key`` (e.g. by WS1), it is re-run\n  via :func:`run_step` (honouring idempotency unless ``force=True``) and the\n  result is returned (200).\n* If no fn is registered yet, an ``awaiting_human`` event is recorded so the\n  re-trigger is durable + visible, and 202 is returned for the founder/sweep\n  to action manually.","operationId":"rerun_step_api_v1_ops_projects__project_id__steps__step_key__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"step_key","in":"path","required":true,"schema":{"type":"string","title":"Step Key"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RunStepRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Rerun Step Api V1 Ops Projects  Project Id  Steps  Step Key  Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ops/projects/{project_id}/health":{"get":{"tags":["ops"],"summary":"Project Health","description":"Per-step latest-status rollup for a project. Founder-only.\n\nFor each ``step_key`` that has ever run, returns the latest event's status,\nattempt count, error, and timing — the single call that answers \"where is\nthis project, and what's broken?\" (§WS11 acceptance).","operationId":"project_health_api_v1_ops_projects__project_id__health_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Project Health Api V1 Ops Projects  Project Id  Health Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent/execute":{"post":{"tags":["Agent"],"summary":"Agent Execute","description":"Execute the AI agent with tool-use loop.\n\nReturns an SSE stream with events: thinking, tool_use, tool_result, message, done, error.\n\nRequires authentication (JWT or API key).\nRate limited based on subscription tier.\n\nNOTE: Does NOT use Depends(get_db) — the agent loop can run for minutes\n(multiple Anthropic API calls). Holding a DB connection for that long\nexhausts the pool and blocks all other endpoints. Instead, short-lived\nsessions are created per tool execution inside the agent loop.","operationId":"agent_execute_api_v1_agent_execute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentExecuteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agent/proactive":{"post":{"tags":["Agent"],"summary":"Agent Proactive","description":"Quick proactive analysis for a property.\n\nReturns three insight fields: key_opportunity, watch_out, quick_take.\nUses Haiku for fast response. Cached per property+user for 24h.\n\nDoes NOT count against agent query quota.\n\nNOTE: Does NOT use Depends(get_db) — the function creates its own\nshort-lived session for DB queries and releases it before calling\nthe Anthropic API, avoiding connection pool exhaustion.","operationId":"agent_proactive_api_v1_agent_proactive_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProactiveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProactiveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agent/match-briefs":{"post":{"tags":["Agent"],"summary":"Agent Match Briefs","description":"Match a property against all active client briefs for the user's org.\n\nReturns match scores and reasons for each brief.\nBuyer's Agent segment feature.","operationId":"agent_match_briefs_api_v1_agent_match_briefs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchBriefsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchBriefsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agent/conversations":{"post":{"tags":["Agent"],"summary":"Save Conversation","description":"Save a chat conversation.","operationId":"save_conversation_api_v1_agent_conversations_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveConversationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Agent"],"summary":"List Conversations","description":"List recent conversations, optionally filtered by property or suburb.","operationId":"list_conversations_api_v1_agent_conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"property_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"}},{"name":"suburb","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent/conversations/{conversation_id}":{"get":{"tags":["Agent"],"summary":"Get Conversation","description":"Get a specific conversation with full messages.","operationId":"get_conversation_api_v1_agent_conversations__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent/feed":{"get":{"tags":["Agent"],"summary":"Get Intelligence Feed","description":"Proactive intelligence feed for the Command Centre sidebar.\n\nReturns recent DA decisions in the user's project LGAs,\nlearning stats, and project reminders.","operationId":"get_intelligence_feed_api_v1_agent_feed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agent/confirm-action":{"post":{"tags":["Agent"],"summary":"Confirm Action","description":"Confirm or deny a pending AI action.\n\nThe AI proposes write actions (create project, send email, etc.)\nand the frontend renders Approve/Deny buttons. This endpoint\nexecutes the action if approved.\n\nActions are stored in the database (ci_pending_actions) so they\npersist across server restarts and don't expire arbitrarily.\nThey remain pending until the user approves or denies them.","operationId":"confirm_action_api_v1_agent_confirm_action_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmActionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agent/pending-actions":{"get":{"tags":["Agent"],"summary":"List Pending Actions","description":"List all pending actions for the current user.","operationId":"list_pending_actions_api_v1_agent_pending_actions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/properties/{property_id}/detail":{"get":{"tags":["Property Detail"],"summary":"Get Property Detail","description":"Get full property detail for a dashboard detail page (Property Intelligence Page).\n\nReturns core property intelligence (zone, overlays, DAs, score breakdown,\ncomparables) plus:\n- Planning rules & setbacks for the property's LGA + zone\n- Suburb market analytics (rents, sales, price/m²)\n- Listing attributes (beds, baths, parking from saved metadata or sales data)\n- Parcel boundary GeoJSON + computed setback/buildable envelope GeoJSON\n- Assigned client briefs (BA segment)\n- Brief matches, competitor context, proactive AI analysis, listing agent info","operationId":"get_property_detail_api_v1_properties__property_id__detail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/{property_id}/site-analysis":{"get":{"tags":["Property Detail"],"summary":"Get Site Analysis","description":"Get site analysis SVG for a property.\n\nReturns cached SVG immediately if available.\nIf not cached, returns 202 Accepted and triggers background generation\nso the request always completes fast (no CORS timeout issues).","operationId":"get_site_analysis_api_v1_properties__property_id__site_analysis_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/da/{da_id}/detail":{"get":{"tags":["DA Detail"],"summary":"Get Da Detail","description":"Return full DA details for the expansion panel.","operationId":"get_da_detail_api_v1_da__da_id__detail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"da_id","in":"path","required":true,"schema":{"type":"string","title":"Da Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DADetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/properties/{property_id}/da-comparison":{"get":{"tags":["DA Detail"],"summary":"Get Da Comparison","description":"AI-generated comparison of subject property vs selected DAs.","operationId":"get_da_comparison_api_v1_properties__property_id__da_comparison_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}},{"name":"da_ids","in":"query","required":true,"schema":{"type":"string","description":"Comma-separated DA IDs to compare","title":"Da Ids"},"description":"Comma-separated DA IDs to compare"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DAComparisonResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/property":{"get":{"tags":["Intelligence"],"summary":"Get Property Intelligence","description":"Combined property intelligence: property data + zone benchmark + overlays\n+ nearby DA stats + risk flags. Powers the Property Intelligence page.","operationId":"get_property_intelligence_api_v1_intelligence_property_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"query","required":false,"schema":{"type":"string","description":"Property address to look up","title":"Address"},"description":"Property address to look up"},{"name":"property_id","in":"query","required":false,"schema":{"type":"string","description":"Property UUID","title":"Property Id"},"description":"Property UUID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyIntelligenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/zone-benchmarks":{"get":{"tags":["Intelligence"],"summary":"Get Zone Benchmarks","description":"Zone-level analytics: approval rates, timing, charge benchmarks.","operationId":"get_zone_benchmarks_api_v1_intelligence_zone_benchmarks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":false,"schema":{"type":"string","description":"Filter by LGA","title":"Lga"},"description":"Filter by LGA"},{"name":"zone_code","in":"query","required":false,"schema":{"type":"string","description":"Filter by zone code","title":"Zone Code"},"description":"Filter by zone code"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ZoneBenchmark"},"title":"Response Get Zone Benchmarks Api V1 Intelligence Zone Benchmarks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/comparable-das":{"get":{"tags":["Intelligence"],"summary":"Get Comparable Das","description":"Spatial comparable DA search with optional condition summaries.\n\nResults are DECIDED applications only (preliminary._DECIDED_FILTER\nsemantics — 'pending'/'unknown'/'in progress' decision strings are\nexcluded, not just NULLs) and deduplicated by application number: a DA\nspanning several parcels joins ci_properties once per parcel, so without\ndedupe the same application repeats at slightly different distances\n(build log 2026-07-10). The nearest row per application is kept.","operationId":"get_comparable_das_api_v1_intelligence_comparable_das_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"query","required":false,"schema":{"type":"string","description":"Center address","title":"Address"},"description":"Center address"},{"name":"property_id","in":"query","required":false,"schema":{"type":"string","description":"Center property UUID","title":"Property Id"},"description":"Center property UUID"},{"name":"radius_m","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":100,"default":2000,"title":"Radius M"}},{"name":"zone_code","in":"query","required":false,"schema":{"type":"string","title":"Zone Code"}},{"name":"decision","in":"query","required":false,"schema":{"type":"string","title":"Decision"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparableDAListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/conditions/benchmark":{"get":{"tags":["Intelligence"],"summary":"Get Condition Benchmarks","description":"Condition frequency and charge benchmarks for a zone+LGA.","operationId":"get_condition_benchmarks_api_v1_intelligence_conditions_benchmark_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":true,"schema":{"type":"string","description":"LGA name","title":"Lga"},"description":"LGA name"},{"name":"zone_code","in":"query","required":false,"schema":{"type":"string","description":"Zone code","title":"Zone Code"},"description":"Zone code"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionBenchmarkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/hotspots":{"get":{"tags":["Intelligence"],"summary":"Get Hotspots","description":"DA activity heatmap data at geohash-5 resolution.","operationId":"get_hotspots_api_v1_intelligence_hotspots_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":false,"schema":{"type":"string","description":"Filter by LGA","title":"Lga"},"description":"Filter by LGA"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HotspotPoint"},"title":"Response Get Hotspots Api V1 Intelligence Hotspots Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/analyze":{"post":{"tags":["Intelligence"],"summary":"Analyze Site","description":"AI-powered site analysis using Claude. Streams results via SSE.\n\nAssembles full property context from the database, then streams\nClaude's evidence-based analysis. Every claim references real DA data.","operationId":"analyze_site_api_v1_intelligence_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/spatial-search":{"get":{"tags":["Intelligence"],"summary":"Spatial Search","description":"Spatial DA search returning GeoJSON FeatureCollection with parcel boundaries.\nPowers the interactive DA Explorer map.","operationId":"spatial_search_api_v1_intelligence_spatial_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lat","in":"query","required":false,"schema":{"type":"number","description":"Center latitude","title":"Lat"},"description":"Center latitude"},{"name":"lng","in":"query","required":false,"schema":{"type":"number","description":"Center longitude","title":"Lng"},"description":"Center longitude"},{"name":"radius_m","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":100,"default":2000,"title":"Radius M"}},{"name":"lga","in":"query","required":false,"schema":{"type":"string","title":"Lga"}},{"name":"zone_code","in":"query","required":false,"schema":{"type":"string","title":"Zone Code"}},{"name":"decision","in":"query","required":false,"schema":{"type":"string","title":"Decision"}},{"name":"overlay","in":"query","required":false,"schema":{"type":"string","description":"Filter by overlay type (flood, bushfire, etc.)","title":"Overlay"},"description":"Filter by overlay type (flood, bushfire, etc.)"},{"name":"lots_min","in":"query","required":false,"schema":{"type":"integer","title":"Lots Min"}},{"name":"lots_max","in":"query","required":false,"schema":{"type":"integer","title":"Lots Max"}},{"name":"area_min","in":"query","required":false,"schema":{"type":"number","description":"Min lot area m²","title":"Area Min"},"description":"Min lot area m²"},{"name":"area_max","in":"query","required":false,"schema":{"type":"number","description":"Max lot area m²","title":"Area Max"},"description":"Max lot area m²"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/parcel/{property_id}":{"get":{"tags":["Intelligence"],"summary":"Get Parcel Detail","description":"Full parcel detail for the DA Explorer side panel.\nReturns property info, boundary GeoJSON, DA list, overlay details.","operationId":"get_parcel_detail_api_v1_intelligence_parcel__property_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/document-search":{"post":{"tags":["deep-intelligence"],"summary":"Search Da Documents","description":"Search across all DA documents and conditions.","operationId":"search_da_documents_api_v1_intelligence_document_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__deep_intelligence__DocumentSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/visual-search":{"post":{"tags":["Intelligence"],"summary":"Visual Search","description":"Multimodal visual document search using pgvector cosine similarity.\n\nSearches only image-embedded chunks (chunk_index < 0) to find visually\nsimilar document pages. Text queries work because text and image embeddings\nshare the same 768D vector space via Gemini Embedding 2.","operationId":"visual_search_api_v1_intelligence_visual_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisualSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisualSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/conditions/search":{"get":{"tags":["Intelligence"],"summary":"Search Conditions Text","description":"Full-text search on ci_da_conditions.condition_text using PostgreSQL\ntsvector/tsquery. Results ordered by relevance.","operationId":"search_conditions_text_api_v1_intelligence_conditions_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"keyword","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Search keyword (required)","title":"Keyword"},"description":"Search keyword (required)"},{"name":"lga","in":"query","required":false,"schema":{"type":"string","description":"Filter by LGA","title":"Lga"},"description":"Filter by LGA"},{"name":"zone_code","in":"query","required":false,"schema":{"type":"string","description":"Filter by zone code","title":"Zone Code"},"description":"Filter by zone code"},{"name":"category","in":"query","required":false,"schema":{"type":"string","description":"Filter by condition category","title":"Category"},"description":"Filter by condition category"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max results","default":50,"title":"Limit"},"description":"Max results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionTextSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/map-data":{"get":{"tags":["Intelligence"],"summary":"Get Map Data","description":"GeoJSON data for the interactive Intelligence Map.\n\nLayers:\n- das: DA application points within bounds (color-coded by decision)\n- heatmap: Development hotspot data from mv_development_hotspots","operationId":"get_map_data_api_v1_intelligence_map_data_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":false,"schema":{"type":"string","description":"Filter by LGA","title":"Lga"},"description":"Filter by LGA"},{"name":"bounds","in":"query","required":false,"schema":{"type":"string","description":"Bounding box: south,west,north,east","title":"Bounds"},"description":"Bounding box: south,west,north,east"},{"name":"layers","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated layers: das, heatmap, overlays","default":"das","title":"Layers"},"description":"Comma-separated layers: das, heatmap, overlays"},{"name":"overlay_types","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated overlay types to show: flood, bushfire, heritage, vegetation, landslide, coastal, environmental","title":"Overlay Types"},"description":"Comma-separated overlay types to show: flood, bushfire, heritage, vegetation, landslide, coastal, environmental"},{"name":"decision_types","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated decision types: approved, refused, pending, withdrawn","title":"Decision Types"},"description":"Comma-separated decision types: approved, refused, pending, withdrawn"},{"name":"require_overlays","in":"query","required":false,"schema":{"type":"string","description":"Only return DAs on properties with these overlays (comma-separated)","title":"Require Overlays"},"description":"Only return DAs on properties with these overlays (comma-separated)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":2000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/da-activity":{"get":{"tags":["Intelligence"],"summary":"Get Da Activity","description":"DA activity stats, monthly trends, and recent decisions for an LGA.","operationId":"get_da_activity_api_v1_intelligence_da_activity_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":false,"schema":{"type":"string","description":"LGA to filter","default":"Brisbane","title":"Lga"},"description":"LGA to filter"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/da-detail/{da_id}":{"get":{"tags":["Intelligence"],"summary":"Get Comprehensive Da Detail","description":"Returns comprehensive DA intelligence including property context,\ndocuments, conditions, and zone-level stats.\n\nResilience contract: every sub-query has its own statement_timeout\nso a saturated pool (e.g. during heavy ingestion) can't block the\nwhole response. Sub-queries that exceed their budget log a warning\nand return null/empty so the panel renders with what we got rather\nthan 5xx-ing the entire endpoint.","operationId":"get_comprehensive_da_detail_api_v1_intelligence_da_detail__da_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"da_id","in":"path","required":true,"schema":{"type":"string","title":"Da Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DADetailResponse2"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/recent-activity":{"get":{"tags":["Intelligence"],"summary":"Get Recent Activity","description":"Recent DA decisions (last 7 days), grouped by day for the activity feed.","operationId":"get_recent_activity_api_v1_intelligence_recent_activity_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":false,"schema":{"type":"string","description":"Filter by LGA","title":"Lga"},"description":"Filter by LGA"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results","default":20,"title":"Limit"},"description":"Max results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/platform-stats":{"get":{"tags":["Intelligence"],"summary":"Get Platform Stats","description":"Live platform-wide stats: total DAs, decision notices, properties, LGA count.","operationId":"get_platform_stats_api_v1_intelligence_platform_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/property/quick-summary":{"get":{"tags":["Intelligence"],"summary":"Get Property Quick Summary","description":"Returns a printable HTML summary for a property.\nIncludes zone, overlays, benchmark stats, and top comparable DAs.","operationId":"get_property_quick_summary_api_v1_intelligence_property_quick_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","description":"Property address","title":"Address"},"description":"Property address"}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/overlay-risk":{"get":{"tags":["Intelligence"],"summary":"Get Overlay Risk","description":"Overlay x conditions cross-reference: how each overlay type affects\napproval rates, processing times, and condition expectations for a zone.\n\nAnswers: \"If a property has a flood overlay in LDR Brisbane, what\nconditions should they expect?\"","operationId":"get_overlay_risk_api_v1_intelligence_overlay_risk_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":true,"schema":{"type":"string","description":"LGA name","title":"Lga"},"description":"LGA name"},{"name":"zone_code","in":"query","required":false,"schema":{"type":"string","description":"Zone code","title":"Zone Code"},"description":"Zone code"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverlayRiskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/area-stats":{"post":{"tags":["Intelligence"],"summary":"Get Area Stats","description":"Compute DA statistics within a user-drawn polygon.\nAccepts polygon vertices as [[lat, lng], ...] and returns\naggregate stats, zone breakdown, and development type distribution.\nUses PostGIS ST_Contains for spatial filtering.","operationId":"get_area_stats_api_v1_intelligence_area_stats_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaStatsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/market-intelligence":{"get":{"tags":["Intelligence"],"summary":"Get Market Intelligence","description":"Real-time market intelligence for a given LGA (optionally filtered by zone).\n\nReturns temporal trends for charting:\n- Lodgement velocity (monthly, 24 months)\n- Processing time trend (quarterly)\n- Approval rate trend (quarterly)\n- Development type mix\n- Hot zones (most active zone codes in last 12 months)","operationId":"get_market_intelligence_api_v1_intelligence_market_intelligence_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":true,"schema":{"type":"string","description":"LGA name (required)","title":"Lga"},"description":"LGA name (required)"},{"name":"zone_code","in":"query","required":false,"schema":{"type":"string","description":"Filter by zone code","title":"Zone Code"},"description":"Filter by zone code"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketIntelligenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/overlay-geometry":{"get":{"tags":["Intelligence"],"summary":"Get Overlay Geometry","description":"Return property boundary as GeoJSON and overlay details with geometry where available.\n\nProvides:\n1. Property boundary polygon (from ci_properties.geometry, converted via ST_AsGeoJSON)\n2. Overlay details from ci_properties.overlay_details JSONB\n3. Each overlay type with its geometry if available","operationId":"get_overlay_geometry_api_v1_intelligence_overlay_geometry_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"property_id","in":"query","required":false,"schema":{"type":"string","description":"Property UUID","title":"Property Id"},"description":"Property UUID"},{"name":"address","in":"query","required":false,"schema":{"type":"string","description":"Property address to look up","title":"Address"},"description":"Property address to look up"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/insights":{"get":{"tags":["Intelligence"],"summary":"Get Discovered Insights","description":"Browse statistically-discovered planning insights.\nThese come from 9 nightly discovery algorithms that find unusual patterns\nin DA approval rates, overlay combinations, officer decisions, etc.","operationId":"get_discovered_insights_api_v1_intelligence_insights_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":false,"schema":{"type":"string","description":"Filter by LGA","title":"Lga"},"description":"Filter by LGA"},{"name":"zone_code","in":"query","required":false,"schema":{"type":"string","description":"Filter by zone code","title":"Zone Code"},"description":"Filter by zone code"},{"name":"category","in":"query","required":false,"schema":{"type":"string","description":"Filter by category: opportunity | risk","title":"Category"},"description":"Filter by category: opportunity | risk"},{"name":"importance","in":"query","required":false,"schema":{"type":"string","description":"Filter by importance: high | medium | low","title":"Importance"},"description":"Filter by importance: high | medium | low"},{"name":"insight_type","in":"query","required":false,"schema":{"type":"string","description":"Filter by insight_type","title":"Insight Type"},"description":"Filter by insight_type"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/infra-charges":{"get":{"tags":["Intelligence"],"summary":"Get Infrastructure Charges","description":"Aggregated infrastructure charge statistics by LGA/zone.\nShows average, median, min, max charges and breakdown by charge type.","operationId":"get_infrastructure_charges_api_v1_intelligence_infra_charges_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":true,"schema":{"type":"string","description":"LGA name (required)","title":"Lga"},"description":"LGA name (required)"},{"name":"zone_code","in":"query","required":false,"schema":{"type":"string","description":"Filter by zone code","title":"Zone Code"},"description":"Filter by zone code"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/engineering-requirements":{"get":{"tags":["Intelligence"],"summary":"Get Engineering Requirements","description":"Aggregated engineering data from extracted structural fields in DA documents.\nReturns geotech (slopes, foundations), stormwater (OSD volumes), and traffic data\nfrom real submitted DA documents.","operationId":"get_engineering_requirements_api_v1_intelligence_engineering_requirements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":true,"schema":{"type":"string","description":"LGA name (required)","title":"Lga"},"description":"LGA name (required)"},{"name":"zone_code","in":"query","required":false,"schema":{"type":"string","description":"Filter by zone code","title":"Zone Code"},"description":"Filter by zone code"},{"name":"overlay","in":"query","required":false,"schema":{"type":"string","description":"Filter by overlay type (flood, bushfire, etc.)","title":"Overlay"},"description":"Filter by overlay type (flood, bushfire, etc.)"},{"name":"doc_type","in":"query","required":false,"schema":{"type":"string","description":"Document type: geotech, stormwater, traffic","title":"Doc Type"},"description":"Document type: geotech, stormwater, traffic"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/market-summary":{"get":{"tags":["Intelligence"],"summary":"Market Summary","description":"DA market summary across SEQ — volumes, approval rates, processing times.","operationId":"market_summary_api_v1_intelligence_market_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/notable-decisions":{"get":{"tags":["Intelligence"],"summary":"Notable Decisions","description":"Recent high-impact DA decisions — refused, large charges, unusual conditions.","operationId":"notable_decisions_api_v1_intelligence_notable_decisions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/activity-heatmap":{"get":{"tags":["Intelligence"],"summary":"Activity Heatmap","description":"DA density by suburb for choropleth map visualization.","operationId":"activity_heatmap_api_v1_intelligence_activity_heatmap_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/personalised-feed":{"get":{"tags":["Intelligence"],"summary":"Personalised Feed","description":"Personalised intelligence feed based on the org's recent usage patterns.\n\nAnalyses ci_context_events to find which LGAs/zones/topics the org has\nbeen researching, then returns targeted market data, recent decisions,\nand condition changes for those specific areas.","operationId":"personalised_feed_api_v1_intelligence_personalised_feed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/dashboard-feed":{"get":{"tags":["Intelligence"],"summary":"Dashboard Feed","description":"Clean dashboard feed — uses total DA counts per LGA (not time-filtered)\nplus approval rates from all-time data. Personalised to org's focus areas.","operationId":"dashboard_feed_api_v1_intelligence_dashboard_feed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/property-lookup":{"get":{"tags":["Intelligence"],"summary":"Property Lookup","description":"Simple property lookup for the home page. Returns property data or empty result.\nNEVER raises exceptions — always returns a valid JSON response.\nUses: exact match → prefix match → fuzzy match → geocode + spatial.","operationId":"property_lookup_api_v1_intelligence_property_lookup_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","minLength":3,"title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/suburb-stats":{"get":{"tags":["Intelligence"],"summary":"Get Suburb Stats","description":"Get interesting stats about a suburb for the workspace loading screen.\n\nA PARAMETER ACCEPTED AND NEVER BOUND (fixed 2026-08-29). `lga` was in the\nsignature and reached none of the seven queries below, every one of which\nmatches on `address LIKE '%<suburb>%'` alone. Suburb names repeat across\ncouncils in SE QLD, and the LIKE also catches street names carrying the\ntoken, so \"Springfield has N decided DAs with an X% approval rate\" could be\nseveral suburbs pooled — a bigger, better-looking number, and the caller\nhad passed the council that would have separated them.","operationId":"get_suburb_stats_api_v1_intelligence_suburb_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"suburb","in":"query","required":true,"schema":{"type":"string","title":"Suburb"}},{"name":"lga","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/conditions/benchmark-detail":{"get":{"tags":["Intelligence"],"summary":"Get Condition Benchmark Detail","description":"Get detailed condition benchmarks with percentile distributions by zone/LGA/development type.","operationId":"get_condition_benchmark_detail_api_v1_intelligence_conditions_benchmark_detail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":true,"schema":{"type":"string","minLength":3,"title":"Lga"}},{"name":"zone_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"}},{"name":"development_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"subdivision, duplex, multi_dwelling, mcu","title":"Development Type"},"description":"subdivision, duplex, multi_dwelling, mcu"},{"name":"lots","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Lots"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionBenchmarkDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/intelligence/intelligence-alerts/recent":{"get":{"tags":["Intelligence"],"summary":"Get Recent Intelligence Alerts","description":"Get recent intelligence alerts aggregated across all org workspaces.","operationId":"get_recent_intelligence_alerts_api_v1_intelligence_intelligence_alerts_recent_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/listing-quality/{rea_listing_id}":{"get":{"tags":["pricing-quality"],"summary":"Get Listing Quality","description":"Return the photo-grade quality assessment for a REA listing.\n\nCache check first; on miss (or force_refresh=1) we run the vision\npass against Gemini Flash and cache the result on\nci_rea_listings.quality_assessment.","operationId":"get_listing_quality_api_v1_listing_quality__rea_listing_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"rea_listing_id","in":"path","required":true,"schema":{"type":"string","title":"Rea Listing Id"}},{"name":"force_refresh","in":"query","required":false,"schema":{"type":"integer","maximum":1,"minimum":0,"default":0,"title":"Force Refresh"}},{"name":"max_photos","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"default":6,"title":"Max Photos"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Listing Quality Api V1 Listing Quality  Rea Listing Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/listing-quality/by-urls":{"post":{"tags":["pricing-quality"],"summary":"Get Listing Quality By Urls","description":"Vision pass over a caller-supplied photo gallery.\n\nNo caching — there's no stable key to cache against (the URLs may\nchange between page loads as REA rotates CDN paths). Cost-bounded\nby the photo cap on the request and the standard quota wait\nin `_run_vision_pass`.\n\nSame response shape as GET /{rea_listing_id} so the downstream\nblend code doesn't need to branch on which path produced the\nassessment. `rea_listing_id` is null in the response since there\nisn't one.","operationId":"get_listing_quality_by_urls_api_v1_listing_quality_by_urls_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisionByUrlsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Listing Quality By Urls Api V1 Listing Quality By Urls Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/intelligence/briefing":{"post":{"tags":["deep-intelligence"],"summary":"Get Intelligence Briefing","description":"Generate a comprehensive intelligence briefing for a property.","operationId":"get_intelligence_briefing_api_v1_intelligence_briefing_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BriefingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/scenarios":{"post":{"tags":["deep-intelligence"],"summary":"Get Scenario Analysis","description":"Generate development scenarios ranked by feasibility.","operationId":"get_scenario_analysis_api_v1_intelligence_scenarios_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenarioRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/officer-dossier":{"get":{"tags":["deep-intelligence"],"summary":"Get Officer Dossier","description":"Get comprehensive officer intelligence profile.","operationId":"get_officer_dossier_api_v1_intelligence_officer_dossier_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":true,"schema":{"type":"string","title":"Lga"}},{"name":"zone_code","in":"query","required":true,"schema":{"type":"string","title":"Zone Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requirements":{"get":{"tags":["requirements"],"summary":"Get Requirements","description":"Tiered, cited requirements checklist for an address × dev-type.\n\nEvery line carries its tier (mandatory/likely/recommended), citation\n(scheme/QDC section OR empirical cohort %) and provenance\n(rule/empirical/both). Powers the planner Requirements tab and the\nfee-proposal-scope export.","operationId":"get_requirements_api_v1_requirements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","minLength":4,"description":"Site address (exact or prefix)","title":"Address"},"description":"Site address (exact or prefix)"},{"name":"dev_type","in":"query","required":true,"schema":{"type":"string","description":"One of: subdivision, duplex, townhouse, mcu, kdr_single","title":"Dev Type"},"description":"One of: subdivision, duplex, townhouse, mcu, kdr_single"},{"name":"lga","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional LGA filter for the address lookup","title":"Lga"},"description":"Optional LGA filter for the address lookup"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/planner/memo":{"post":{"tags":["Planner Memo"],"summary":"Compose a Precedent Memo (.docx) for an address + development type","description":"Returns the memo as a Word attachment. 404 when the address cannot be\nresolved to a parcel we hold; sparse data never errors — the memo states\nwhat is missing instead.","operationId":"create_precedent_memo_api_v1_planner_memo_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/predict-approval":{"post":{"tags":["Prediction Engine"],"summary":"Predict Approval","description":"Predict DA approval probability based on zone benchmarks, overlay risk,\ncomparable DAs, and lot sizing. Returns a 0-100 score with adjustments.","operationId":"predict_approval_api_v1_intelligence_predict_approval_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalPredictionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/predict-conditions":{"post":{"tags":["Prediction Engine"],"summary":"Predict Conditions","description":"Predict likely DA conditions and estimated charges based on comparable\napproved DAs in the same zone and LGA.","operationId":"predict_conditions_api_v1_intelligence_predict_conditions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionPredictionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/compare-sites":{"post":{"tags":["Prediction Engine"],"summary":"Compare Sites","description":"Score and rank multiple sites for development suitability.\nEach site gets a 0-100 score with breakdown and tags.","operationId":"compare_sites_api_v1_intelligence_compare_sites_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareSitesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareSitesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/intelligence/predict-timeline":{"post":{"tags":["Prediction Engine"],"summary":"Predict Timeline","description":"Predict DA processing timeline with percentiles and IR likelihood.","operationId":"predict_timeline_api_v1_intelligence_predict_timeline_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimelinePredictionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimelinePredictionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/planning/use-permissibility":{"get":{"tags":["Planning"],"summary":"Get Use Permissibility","description":"Look up whether a use is permitted in a zone and at what assessment level.","operationId":"get_use_permissibility_api_v1_planning_use_permissibility_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"use","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Use name to look up (e.g. 'Dwelling house', 'Food and drink outlet')","title":"Use"},"description":"Use name to look up (e.g. 'Dwelling house', 'Food and drink outlet')"},{"name":"zone_code","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Zone code (e.g. 'LDR', 'NC', 'MU')","title":"Zone Code"},"description":"Zone code (e.g. 'LDR', 'NC', 'MU')"},{"name":"lga","in":"query","required":true,"schema":{"type":"string","minLength":3,"description":"LGA name (e.g. 'Brisbane', 'Gold Coast')","title":"Lga"},"description":"LGA name (e.g. 'Brisbane', 'Gold Coast')"},{"name":"precinct","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Precinct the land sits in, as stamped on the parcel (ci_properties.overlay_details->'zone_precinct'->>'code'). Required to get a single answer where a scheme answers per precinct — Moreton Bay's General residential precincts differ. Omit it and differing uses come back state=not_held with every precinct's answer named, which is the truth rather than a guess.","title":"Precinct"},"description":"Precinct the land sits in, as stamped on the parcel (ci_properties.overlay_details->'zone_precinct'->>'code'). Required to get a single answer where a scheme answers per precinct — Moreton Bay's General residential precincts differ. Omit it and differing uses come back state=not_held with every precinct's answer named, which is the truth rather than a guess."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsePermissibilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/planning/infrastructure-charges":{"get":{"tags":["Planning"],"summary":"Get Infrastructure Charges","description":"Look up official infrastructure charges and compare with actual charges from DA data.","operationId":"get_infrastructure_charges_api_v1_planning_infrastructure_charges_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":true,"schema":{"type":"string","minLength":3,"description":"LGA name","title":"Lga"},"description":"LGA name"},{"name":"use_category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Use category (e.g. 'residential', 'commercial')","title":"Use Category"},"description":"Use category (e.g. 'residential', 'commercial')"},{"name":"lots","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":200,"minimum":1},{"type":"null"}],"description":"Number of proposed lots/dwellings","title":"Lots"},"description":"Number of proposed lots/dwellings"},{"name":"zone_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Zone code for comparable actual charges","title":"Zone Code"},"description":"Zone code for comparable actual charges"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfrastructureChargesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/planning/assessment-requirements":{"get":{"tags":["Planning"],"summary":"Get Assessment Requirements","description":"Get assessment level and applicable codes for a zone and development type.","operationId":"get_assessment_requirements_api_v1_planning_assessment_requirements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lga","in":"query","required":true,"schema":{"type":"string","minLength":3,"title":"Lga"}},{"name":"zone_code","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Zone Code"}},{"name":"development_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"MCU, RaL, operational_work, building_work","title":"Development Type"},"description":"MCU, RaL, operational_work, building_work"},{"name":"use_or_activity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Specific use to filter by","title":"Use Or Activity"},"description":"Specific use to filter by"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentRequirementsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/planning/provision-search":{"get":{"tags":["Planning"],"summary":"Search Provisions","description":"Search planning scheme provisions using full-text search.","operationId":"search_provisions_api_v1_planning_provision_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":3,"description":"Search text","title":"Query"},"description":"Search text"},{"name":"lga","in":"query","required":true,"schema":{"type":"string","minLength":3,"title":"Lga"}},{"name":"provision_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by type: zone_code, overlay_code, development_code, etc.","title":"Provision Type"},"description":"Filter by type: zone_code, overlay_code, development_code, etc."},{"name":"zone_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/planning/schemes":{"get":{"tags":["Planning"],"summary":"List Schemes","description":"List all available planning schemes with data coverage stats.","operationId":"list_schemes_api_v1_planning_schemes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanningSchemeInfo"},"type":"array","title":"Response List Schemes Api V1 Planning Schemes Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/tp/projects/{project_id}/portal":{"get":{"tags":["client-portal"],"summary":"Get Project Portal","description":"Get the client portal details for a project.","operationId":"get_project_portal_api_v1_tp_projects__project_id__portal_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tp/projects/{project_id}/portal/send":{"post":{"tags":["client-portal"],"summary":"Send Portal To Client","description":"Send portal access details to the client via email.","operationId":"send_portal_to_client_api_v1_tp_projects__project_id__portal_send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSendRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tp/projects/{project_id}/portal/regenerate-password":{"post":{"tags":["client-portal"],"summary":"Regenerate Portal Password","description":"Generate a new password for the client portal.","operationId":"regenerate_portal_password_api_v1_tp_projects__project_id__portal_regenerate_password_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/portal/{token}/login":{"post":{"tags":["client-portal"],"summary":"Portal Login","description":"Client login to their portal.","operationId":"portal_login_api_v1_portal__token__login_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/portal/{token}/status":{"get":{"tags":["client-portal"],"summary":"Get Portal Status","description":"Public endpoint — get project status for client portal (no auth needed for basic info).","operationId":"get_portal_status_api_v1_portal__token__status_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/portal/{token}/documents":{"get":{"tags":["client-portal"],"summary":"Get Portal Documents","description":"List documents accessible to the client for their project.","operationId":"get_portal_documents_api_v1_portal__token__documents_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/client-pages/{token}":{"get":{"tags":["Client Landing Pages"],"summary":"Get Landing Page","description":"Public endpoint (no auth) — fetch a client landing page by token.\nIncrements view counter on each access.","operationId":"get_landing_page_api_v1_client_pages__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__client_pages__LandingPageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/email-reply":{"post":{"tags":["Webhooks"],"summary":"Handle Email Reply","description":"Resend inbound email webhook.\n\nResend POSTs the full email payload:\n{\n    \"from\": \"client@example.com\",\n    \"to\": \"brief-{uuid}@replies.casaintelligence.com.au\",\n    \"subject\": \"Re: Property Recommendations\",\n    \"text\": \"...\",\n    \"html\": \"...\",\n    \"headers\": [...]\n}","operationId":"handle_email_reply_api_v1_webhooks_email_reply_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/webhooks/resend-events":{"post":{"tags":["Webhooks"],"summary":"Handle Resend Events","description":"Resend delivery/engagement events -> ci_email_events. Idempotent per\n(resend_email_id, event_type, occurred_at); never raises to the caller.","operationId":"handle_resend_events_api_v1_webhooks_resend_events_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/intake/email":{"post":{"tags":["intake"],"summary":"Resend Inbound Webhook","description":"Resend `email.received` webhook. Fast path: verify → authorise →\ncap-check → record → (background) compose+reply → 200.","operationId":"resend_inbound_webhook_api_v1_intake_email_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/intake/batch":{"post":{"tags":["intake"],"summary":"Batch Screens","description":"Batch mode (v2.1 §C): their deal flow in as CSV, screens out as a\nzip (one 2-page PDF per address + one consolidated pipeline .xlsx).\n\nDeterministic by default — pass ?reasoning=true to run the Credit\nNotes pass per screen (each one costs API money and minutes; the\nper-day cap applies either way).","operationId":"batch_screens_api_v1_intake_batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"reasoning","in":"query","required":false,"schema":{"type":"boolean","description":"Run the Credit Notes reasoning pass per screen (slower, costs API)","default":false,"title":"Reasoning"},"description":"Run the Credit Notes reasoning pass per screen (slower, costs API)"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_batch_screens_api_v1_intake_batch_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/v1/health":{"get":{"tags":["public-ai"],"summary":"Public Health","description":"Liveness for the public surface.","operationId":"public_health_api_public_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/public/v1/beacon":{"post":{"tags":["public-ai"],"summary":"Crawler Beacon","description":"Records an AI-crawler page READ into the same analytics table as tool calls,\nso `public_api_report.py` shows one unified 'which LLM finds us' picture —\nboth crawlers reading our pages (to cite us) and agents calling our API.\n\nFired fire-and-forget by the website's edge middleware ONLY for AI-crawler\nUser-Agents. We still filter server-side to known AI/search bots, so it can't\nbe used to inject junk browser traffic. Returns 204 always (never blocks a page).","operationId":"crawler_beacon_api_public_v1_beacon_post","parameters":[{"name":"path","in":"query","required":false,"schema":{"type":"string","description":"The site path an AI crawler read.","default":"","title":"Path"},"description":"The site path an AI crawler read."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/v1/":{"get":{"tags":["public-ai"],"summary":"Public Root","description":"Discovery root — a machine- and human-readable description of the surface.","operationId":"public_root_api_public_v1__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/public/v1/openapi.json":{"get":{"tags":["public-ai"],"summary":"Public Openapi","description":"Stable OpenAPI 3.1 contract for the public surface (for auto-wiring).","operationId":"public_openapi_api_public_v1_openapi_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/public/v1/property-check":{"get":{"tags":["public-ai"],"summary":"Property Check","description":"Indicative planning & development intelligence for a SEQ property.\n\nDeterministic (no AI in the hot path), cached, and rate-limited. Returns\nzone, overlays, an indicative development/subdivision outlook + Casa score,\nand aggregate nearby-DA activity. **Indicative only — not planning advice and\nnot a guarantee of approval.** For the definitive answer, order the $199\nPreliminary Planning Report (see `confirm.url`).","operationId":"property_check_api_public_v1_property_check_get","parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","minLength":3,"description":"Property address to check (SEQ).","title":"Address"},"description":"Property address to check (SEQ)."},{"name":"lat","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":90,"minimum":-90},{"type":"null"}],"description":"Optional geocoder latitude.","title":"Lat"},"description":"Optional geocoder latitude."},{"name":"lng","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":180,"minimum":-180},{"type":"null"}],"description":"Optional geocoder longitude.","title":"Lng"},"description":"Optional geocoder longitude."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPropertyCheck"}}}},"404":{"description":"Address could not be resolved in SEQ coverage."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/v1/suburb-da-stats":{"get":{"tags":["public-ai"],"summary":"Suburb Da Stats","description":"Cited, aggregate DA statistics for a suburb × development type: number of\ndecided applications, approval rate, median days-to-decision and median\ninfrastructure charge. Aggregates only. Past decisions do not guarantee\nfuture outcomes.","operationId":"suburb_da_stats_api_public_v1_suburb_da_stats_get","parameters":[{"name":"suburb","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Suburb name, e.g. 'Coorparoo'.","title":"Suburb"},"description":"Suburb name, e.g. 'Coorparoo'."},{"name":"dev_type","in":"query","required":true,"schema":{"type":"string","description":"Development type, e.g. subdivision, duplex, townhouse, mcu, kdr_single, secondary_dwelling (aliases like 'granny_flat', 'units' accepted).","title":"Dev Type"},"description":"Development type, e.g. subdivision, duplex, townhouse, mcu, kdr_single, secondary_dwelling (aliases like 'granny_flat', 'units' accepted)."},{"name":"lga","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional LGA to disambiguate the suburb.","title":"Lga"},"description":"Optional LGA to disambiguate the suburb."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicSuburbDaStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/public/v1/health":{"get":{"tags":["mcp-public"],"summary":"Public Mcp Health","operationId":"public_mcp_health_mcp_public_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp/public/v1/messages":{"post":{"tags":["mcp-public"],"summary":"Public Mcp Messages","description":"Public MCP JSON-RPC endpoint — no API key required.","operationId":"public_mcp_messages_mcp_public_v1_messages_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp/v1/health":{"get":{"tags":["mcp"],"summary":"Mcp Health","description":"MCP server health check.","operationId":"mcp_health_mcp_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp/v1/messages":{"post":{"tags":["mcp"],"summary":"Mcp Messages","description":"Main MCP JSON-RPC endpoint.\n\nHandles:\n- initialize: Return server capabilities\n- tools/list: Return available tools\n- tools/call: Execute a tool\n- notifications/initialized: Acknowledge (no response needed)","operationId":"mcp_messages_mcp_v1_messages_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/learning/correction":{"post":{"tags":["Learning"],"summary":"Record Correction","description":"Record a user correction to an AI output.","operationId":"record_correction_api_v1_learning_correction_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/learning/preference":{"post":{"tags":["Learning"],"summary":"Record Preference","description":"Record an explicit user preference.","operationId":"record_preference_api_v1_learning_preference_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/learning/stats":{"get":{"tags":["Learning"],"summary":"Get Stats","description":"Get learning metrics for the user's organisation.","operationId":"get_stats_api_v1_learning_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearningStatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/learning/corrections":{"get":{"tags":["Learning"],"summary":"List Corrections","description":"List recent corrections for the user's organisation.","operationId":"list_corrections_api_v1_learning_corrections_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/learning/event":{"post":{"tags":["Learning"],"summary":"Capture Learning Event","description":"Capture a frontend-originated learning event.\n\nUsed for tile interactions, thumbs up/down on AI responses,\nprecedent usage, report edits, and other UI signals.","operationId":"capture_learning_event_api_v1_learning_event_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearningEventRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/learning/correction/{correction_id}/confirm":{"post":{"tags":["Learning"],"summary":"Confirm Correction","description":"Confirm a correction is accurate — increases its weight in the graph.\n\nEach confirmation bumps weight by 0.1 and increments confirmation_count.","operationId":"confirm_correction_api_v1_learning_correction__correction_id__confirm_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"correction_id","in":"path","required":true,"schema":{"type":"string","title":"Correction Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/learning/graph/corrections":{"get":{"tags":["Learning"],"summary":"Get Graph Corrections","description":"Get corrections with their graph edges and weights.\n\nReturns corrections with edge counts and conflict indicators\nfor the knowledge graph debug/admin view.","operationId":"get_graph_corrections_api_v1_learning_graph_corrections_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/learning/graph/backfill":{"post":{"tags":["Learning"],"summary":"Trigger Backfill","description":"Trigger embedding backfill for all unembedded corrections.\n\nEmbeds corrections that were created before the graph system\nwas enabled, enabling vector search across historical data.","operationId":"trigger_backfill_api_v1_learning_graph_backfill_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/engine/console/login":{"get":{"tags":["console"],"summary":"Login Page","operationId":"login_page_engine_console_login_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"tags":["console"],"summary":"Login Submit","operationId":"login_submit_engine_console_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_submit_engine_console_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/engine/console/logout":{"get":{"tags":["console"],"summary":"Logout","operationId":"logout_engine_console_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/engine/console/":{"get":{"tags":["console"],"summary":"Dashboard","operationId":"dashboard_engine_console__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/engine/console/search":{"get":{"tags":["console"],"summary":"Search Page","operationId":"search_page_engine_console_search_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/engine/console/search/results":{"get":{"tags":["console"],"summary":"Search Results","operationId":"search_results_engine_console_search_results_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/engine/console/property/{property_id}":{"get":{"tags":["console"],"summary":"Property Detail","operationId":"property_detail_engine_console_property__property_id__get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"string","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/engine/console/das":{"get":{"tags":["console"],"summary":"Da Explorer","operationId":"da_explorer_engine_console_das_get","parameters":[{"name":"lga","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lga"}},{"name":"zone","in":"query","required":false,"schema":{"type":"string","default":"","title":"Zone"}},{"name":"decision","in":"query","required":false,"schema":{"type":"string","default":"","title":"Decision"}},{"name":"date_from","in":"query","required":false,"schema":{"type":"string","default":"","title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","default":"","title":"Date To"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/engine/console/das/results":{"get":{"tags":["console"],"summary":"Da Results Partial","operationId":"da_results_partial_engine_console_das_results_get","parameters":[{"name":"lga","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lga"}},{"name":"zone","in":"query","required":false,"schema":{"type":"string","default":"","title":"Zone"}},{"name":"decision","in":"query","required":false,"schema":{"type":"string","default":"","title":"Decision"}},{"name":"date_from","in":"query","required":false,"schema":{"type":"string","default":"","title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","default":"","title":"Date To"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/engine/console/trends":{"get":{"tags":["console"],"summary":"Trends Page","operationId":"trends_page_engine_console_trends_get","parameters":[{"name":"lga","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lga"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/engine/console/trends/zones":{"get":{"tags":["console"],"summary":"Trends Zones Partial","operationId":"trends_zones_partial_engine_console_trends_zones_get","parameters":[{"name":"lga","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lga"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/engine/console/insights":{"get":{"tags":["console"],"summary":"Insights Page","operationId":"insights_page_engine_console_insights_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/engine/console/insights/generate":{"post":{"tags":["console"],"summary":"Insights Generate","operationId":"insights_generate_engine_console_insights_generate_post","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/engine/console/intelligence":{"get":{"tags":["console"],"summary":"Intelligence Page","operationId":"intelligence_page_engine_console_intelligence_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/engine/console/intelligence/insights/partial":{"get":{"tags":["console"],"summary":"Intelligence Insights Partial","operationId":"intelligence_insights_partial_engine_console_intelligence_insights_partial_get","parameters":[{"name":"filter_category","in":"query","required":false,"schema":{"type":"string","default":"","title":"Filter Category"}},{"name":"filter_type","in":"query","required":false,"schema":{"type":"string","default":"","title":"Filter Type"}},{"name":"filter_lga","in":"query","required":false,"schema":{"type":"string","default":"","title":"Filter Lga"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/engine/console/intelligence/overlay-matrix":{"get":{"tags":["console"],"summary":"Intelligence Overlay Matrix","operationId":"intelligence_overlay_matrix_engine_console_intelligence_overlay_matrix_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/engine/console/intelligence/run-pipeline":{"post":{"tags":["console"],"summary":"Intelligence Run Pipeline","operationId":"intelligence_run_pipeline_engine_console_intelligence_run_pipeline_post","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/engine/console/intelligence/pipeline-status":{"get":{"tags":["console"],"summary":"Intelligence Pipeline Status","description":"Polled by HTMX every 5s while pipeline runs. Returns progress or final result.","operationId":"intelligence_pipeline_status_engine_console_intelligence_pipeline_status_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/v1/admin/health-dashboard":{"get":{"tags":["Admin Monitoring"],"summary":"Health Dashboard","description":"Complete platform health snapshot. Returns:\n- Database connectivity + table row counts\n- API response time stats (last 24h)\n- Error rate (last 24h)\n- Active users (last 24h, 7d, 30d)\n- Cache stats","operationId":"health_dashboard_api_v1_admin_health_dashboard_get","parameters":[{"name":"X-Admin-Secret","in":"header","required":true,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/feature-usage":{"get":{"tags":["Admin Monitoring"],"summary":"Feature Usage","description":"Feature adoption analytics. Shows which endpoints/features users\nare actually using, grouped by endpoint path.","operationId":"feature_usage_api_v1_admin_feature_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":7,"title":"Days"}},{"name":"X-Admin-Secret","in":"header","required":true,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/errors":{"get":{"tags":["Admin Monitoring"],"summary":"Error Log","description":"Recent API errors with details for debugging.","operationId":"error_log_api_v1_admin_errors_get","parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"default":24,"title":"Hours"}},{"name":"X-Admin-Secret","in":"header","required":true,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/subscriptions":{"get":{"tags":["Admin Monitoring"],"summary":"Subscription Stats","description":"Subscription breakdown: how many users on each tier, MRR estimate.","operationId":"subscription_stats_api_v1_admin_subscriptions_get","parameters":[{"name":"X-Admin-Secret","in":"header","required":true,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/data-quality":{"get":{"tags":["Admin Monitoring"],"summary":"Data Quality","description":"Data integrity checks across all planning data tables.\nFlags potential issues for investigation.","operationId":"data_quality_api_v1_admin_data_quality_get","parameters":[{"name":"X-Admin-Secret","in":"header","required":true,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/debug-context":{"get":{"tags":["Admin Monitoring"],"summary":"Debug Context","description":"Gather debugging context for AI-assisted troubleshooting.\nReturns recent errors, slow queries, and system state\nformatted for Claude to analyze.","operationId":"debug_context_api_v1_admin_debug_context_get","parameters":[{"name":"endpoint","in":"query","required":false,"schema":{"type":"string","description":"Filter to specific endpoint","title":"Endpoint"},"description":"Filter to specific endpoint"},{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":48,"minimum":1,"default":6,"title":"Hours"}},{"name":"X-Admin-Secret","in":"header","required":true,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health Check","description":"Lightweight health check with DB connectivity for load balancers.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AccountIn":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name"},"legal_name":{"type":"string","maxLength":200,"minLength":2,"title":"Legal Name"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"billing_email":{"type":"string","maxLength":320,"title":"Billing Email"},"abn":{"type":"string","maxLength":20,"minLength":11,"title":"Abn"},"address":{"type":"string","maxLength":400,"minLength":5,"title":"Address"},"po_required":{"type":"boolean","title":"Po Required","default":false},"po_reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Po Reference"},"rate_aud":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate Aud"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"monthly_cap":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":1.0},{"type":"null"}],"title":"Monthly Cap"},"issue_link":{"type":"boolean","title":"Issue Link","default":true}},"type":"object","required":["name","legal_name","billing_email","abn","address"],"title":"AccountIn","description":"What an accounts department asks for before it will pay an invoice (the four questions answered by Ray White\nIpswich on 15 Sep 2026): legal entity, ABN, billing address, accounts email, and whether a purchase order is needed."},"AccountPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email"},"abn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abn"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"rate_aud":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate Aud"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"monthly_cap":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":1.0},{"type":"null"}],"title":"Monthly Cap"},"require_member_email":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Member Email"},"po_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Po Required"},"po_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Reference"}},"type":"object","title":"AccountPatch"},"AdminEmailIn":{"properties":{"admin_token":{"type":"string","maxLength":400,"minLength":10,"title":"Admin Token"},"email":{"type":"string","maxLength":320,"title":"Email"}},"type":"object","required":["admin_token","email"],"title":"AdminEmailIn"},"AdminForgotIn":{"properties":{"agency":{"type":"string","maxLength":200,"minLength":1,"title":"Agency"}},"type":"object","required":["agency"],"title":"AdminForgotIn"},"AdminLoginIn":{"properties":{"agency":{"type":"string","maxLength":200,"minLength":1,"title":"Agency"},"username":{"type":"string","maxLength":80,"minLength":1,"title":"Username"},"password":{"type":"string","maxLength":200,"minLength":1,"title":"Password"}},"type":"object","required":["agency","username","password"],"title":"AdminLoginIn"},"AdminMemberIn":{"properties":{"admin_token":{"type":"string","maxLength":400,"minLength":10,"title":"Admin Token"},"email":{"type":"string","maxLength":320,"title":"Email"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"}},"type":"object","required":["admin_token","email"],"title":"AdminMemberIn"},"AdminMemberRemoveIn":{"properties":{"admin_token":{"type":"string","maxLength":400,"minLength":10,"title":"Admin Token"},"member_id":{"type":"string","maxLength":36,"minLength":36,"title":"Member Id"}},"type":"object","required":["admin_token","member_id"],"title":"AdminMemberRemoveIn"},"AdminModeIn":{"properties":{"admin_token":{"type":"string","maxLength":400,"minLength":10,"title":"Admin Token"},"who_may_order":{"type":"string","pattern":"^(any|listed)$","title":"Who May Order"}},"type":"object","required":["admin_token","who_may_order"],"title":"AdminModeIn"},"AdminNewPasswordIn":{"properties":{"admin_token":{"type":"string","maxLength":400,"minLength":10,"title":"Admin Token"},"new_password":{"type":"string","maxLength":200,"minLength":10,"title":"New Password"}},"type":"object","required":["admin_token","new_password"],"title":"AdminNewPasswordIn"},"AdminPasswordIn":{"properties":{"admin_token":{"type":"string","maxLength":400,"minLength":10,"title":"Admin Token"},"current_password":{"type":"string","maxLength":200,"minLength":1,"title":"Current Password"},"new_password":{"type":"string","maxLength":200,"minLength":10,"title":"New Password"}},"type":"object","required":["admin_token","current_password","new_password"],"title":"AdminPasswordIn"},"AdminResetIn":{"properties":{"agency":{"type":"string","maxLength":200,"minLength":1,"title":"Agency"},"code":{"type":"string","maxLength":6,"minLength":6,"title":"Code"},"new_password":{"type":"string","maxLength":200,"minLength":10,"title":"New Password"}},"type":"object","required":["agency","code","new_password"],"title":"AdminResetIn"},"AdminTokenIn":{"properties":{"admin_token":{"type":"string","maxLength":400,"minLength":10,"title":"Admin Token"}},"type":"object","required":["admin_token"],"title":"AdminTokenIn"},"AgencyBrandingIn":{"properties":{"agency_name":{"type":"string","maxLength":120,"minLength":2,"title":"Agency Name"},"logo_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Logo Url"},"phone":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Email"},"website":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Website"},"hours":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Hours"}},"type":"object","required":["agency_name"],"title":"AgencyBrandingIn","description":"Optional agent co-branding attached at checkout. The report stays\nauthored by Casa Intelligence — this only sets who it's prepared FOR."},"AgentExecuteRequest":{"properties":{"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"message":{"type":"string","title":"Message"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"history":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"History"}},"type":"object","required":["message"],"title":"AgentExecuteRequest"},"AmalgamationCandidate":{"properties":{"property_id":{"type":"string","title":"Property Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"lot_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lot Plan"},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"same_owner_likelihood":{"type":"number","title":"Same Owner Likelihood","default":0.0},"same_owner_signal":{"type":"string","title":"Same Owner Signal","default":"owner_unknown"},"listing_status":{"type":"string","title":"Listing Status","default":"unknown"},"listing_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Url"},"combined_area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Combined Area M2"},"combined_zone_uplift":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Combined Zone Uplift"},"amalgamation_score":{"type":"integer","title":"Amalgamation Score","default":0}},"type":"object","required":["property_id"],"title":"AmalgamationCandidate","description":"One adjacent property scored against the subject."},"AmalgamationInfo":{"properties":{"lot_count":{"type":"integer","title":"Lot Count"},"combined_area_m2":{"type":"number","title":"Combined Area M2"},"property_ids":{"items":{"type":"string"},"type":"array","title":"Property Ids","default":[]},"addresses":{"items":{"type":"string"},"type":"array","title":"Addresses","default":[]},"same_zone":{"type":"boolean","title":"Same Zone","default":true},"note":{"type":"string","title":"Note"}},"type":"object","required":["lot_count","combined_area_m2","note"],"title":"AmalgamationInfo","description":"Present on a combined (multi-lot) check — the site is an amalgamation of\nthe subject plus the selected neighbouring lots, assessed as one site."},"AmalgamationResponse":{"properties":{"target":{"$ref":"#/components/schemas/AmalgamationTarget"},"adjacent_candidates":{"items":{"$ref":"#/components/schemas/AmalgamationCandidate"},"type":"array","title":"Adjacent Candidates"},"radius_m":{"type":"number","title":"Radius M"},"min_combined_area":{"type":"number","title":"Min Combined Area"}},"type":"object","required":["target","adjacent_candidates","radius_m","min_combined_area"],"title":"AmalgamationResponse"},"AmalgamationTarget":{"properties":{"property_id":{"type":"string","title":"Property Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"lot_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lot Plan"},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"}},"type":"object","required":["property_id"],"title":"AmalgamationTarget","description":"The subject property the user is exploring."},"AnalyzeRequest":{"properties":{"address":{"type":"string","title":"Address"},"analysis_type":{"type":"string","title":"Analysis Type","default":"site_assessment"},"development_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Development Type"},"lot_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lot Count"},"acquisition_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Acquisition Price"},"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question"},"follow_up_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Follow Up Context"}},"type":"object","required":["address"],"title":"AnalyzeRequest"},"ApplicationIn":{"properties":{"trading_name":{"type":"string","maxLength":200,"minLength":2,"title":"Trading Name"},"legal_name":{"type":"string","maxLength":200,"minLength":2,"title":"Legal Name"},"abn":{"type":"string","maxLength":20,"minLength":11,"title":"Abn"},"business_address":{"type":"string","maxLength":400,"minLength":5,"title":"Business Address"},"contact_name":{"type":"string","maxLength":200,"minLength":2,"title":"Contact Name"},"contact_email":{"type":"string","maxLength":320,"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Contact Phone"},"accounts_email":{"type":"string","maxLength":320,"title":"Accounts Email"},"po_required":{"type":"boolean","title":"Po Required","default":false},"po_reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Po Reference"},"who_may_order":{"type":"string","pattern":"^(any|listed)$","title":"Who May Order","default":"any"},"member_emails":{"items":{"type":"string"},"type":"array","maxItems":60,"title":"Member Emails"},"terms_accepted":{"type":"boolean","title":"Terms Accepted"},"terms_version":{"type":"string","maxLength":20,"title":"Terms Version","default":"1.3"}},"type":"object","required":["trading_name","legal_name","abn","business_address","contact_name","contact_email","accounts_email","terms_accepted"],"title":"ApplicationIn"},"ApprovalAdjustment":{"properties":{"factor":{"type":"string","title":"Factor"},"value":{"type":"number","title":"Value"},"impact":{"type":"string","title":"Impact"}},"type":"object","required":["factor","value","impact"],"title":"ApprovalAdjustment"},"ApprovalPredictionResponse":{"properties":{"probability":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Probability"},"confidence":{"type":"string","title":"Confidence"},"comparable_count":{"type":"integer","title":"Comparable Count","default":0},"base_approval_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Base Approval Rate"},"adjustments":{"items":{"$ref":"#/components/schemas/ApprovalAdjustment"},"type":"array","title":"Adjustments"},"risk_factors":{"items":{"type":"string"},"type":"array","title":"Risk Factors"},"supporting_das":{"items":{"$ref":"#/components/schemas/SupportingDA"},"type":"array","title":"Supporting Das"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"zone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Name"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"overlays":{"items":{"type":"string"},"type":"array","title":"Overlays"}},"type":"object","required":["probability","confidence"],"title":"ApprovalPredictionResponse","description":"Response for the approval prediction engine."},"ApprovalTrendEntry":{"properties":{"quarter":{"type":"string","title":"Quarter"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"},"total":{"type":"integer","title":"Total"},"approved":{"type":"integer","title":"Approved"}},"type":"object","required":["quarter","total","approved"],"title":"ApprovalTrendEntry"},"ApproveIn":{"properties":{"rate_aud":{"anyOf":[{"type":"number","minimum":1.0},{"type":"null"}],"title":"Rate Aud"},"monthly_cap":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":1.0},{"type":"null"}],"title":"Monthly Cap"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"reviewed_by":{"type":"string","maxLength":40,"title":"Reviewed By","default":"robbie"}},"type":"object","title":"ApproveIn"},"AreaStatsRequest":{"properties":{"polygon":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","minItems":3,"title":"Polygon","description":"Polygon vertices as [[lat, lng], ...], minimum 3 points"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga","description":"Optional LGA filter"}},"type":"object","required":["polygon"],"title":"AreaStatsRequest","description":"Request body for polygon area statistics."},"AreaStatsResponse":{"properties":{"total_das":{"type":"integer","title":"Total Das","default":0},"approved":{"type":"integer","title":"Approved","default":0},"refused":{"type":"integer","title":"Refused","default":0},"pending":{"type":"integer","title":"Pending","default":0},"approval_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Approval Rate Pct"},"avg_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Avg Days"},"zone_breakdown":{"items":{"$ref":"#/components/schemas/ZoneBreakdownEntry"},"type":"array","title":"Zone Breakdown"},"top_development_types":{"items":{"$ref":"#/components/schemas/DevTypeBreakdownEntry"},"type":"array","title":"Top Development Types"},"avg_infra_charge":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Infra Charge"},"polygon_area_ha":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Polygon Area Ha"}},"type":"object","title":"AreaStatsResponse","description":"Statistics for DAs within a drawn polygon area."},"ArtefactPDFRequest":{"properties":{"artefact_type":{"type":"string","title":"Artefact Type","description":"One of: pre_da_letter | planning_report | rfi_response"},"title":{"type":"string","maxLength":300,"title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"sections":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sections"},"project_name":{"type":"string","maxLength":200,"title":"Project Name"},"user_full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Full Name"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"property":{"additionalProperties":true,"type":"object","title":"Property"},"da_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Da Number"},"council_officer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Council Officer Name"},"version":{"type":"integer","title":"Version","default":1},"disclaimer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disclaimer"}},"type":"object","required":["artefact_type","title","project_name"],"title":"ArtefactPDFRequest","description":"Compile a Casa Planner artefact (pre-DA letter, planning report,\nRFI response) into a Typst PDF using the matching v2 template."},"AssessmentRequirement":{"properties":{"development_type":{"type":"string","title":"Development Type"},"use_or_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Or Activity"},"category_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description"},"assessment_level":{"type":"string","title":"Assessment Level"},"applicable_codes":{"items":{"type":"string"},"type":"array","title":"Applicable Codes","default":[]},"provision_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provision Reference"}},"type":"object","required":["development_type","assessment_level"],"title":"AssessmentRequirement"},"AssessmentRequirementsResponse":{"properties":{"lga":{"type":"string","title":"Lga"},"zone_code":{"type":"string","title":"Zone Code"},"requirements":{"items":{"$ref":"#/components/schemas/AssessmentRequirement"},"type":"array","title":"Requirements","default":[]},"scheme_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheme Name"},"total":{"type":"integer","title":"Total","default":0},"citation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Citation"},"disclaimer":{"type":"string","title":"Disclaimer","default":"This information is indicative only and based on the data sources cited. It should be verified against the current planning scheme and is not a substitute for professional planning advice. Planning schemes are amended regularly — always check the latest version before making decisions."}},"type":"object","required":["lga","zone_code"],"title":"AssessmentRequirementsResponse"},"AssignedClient":{"properties":{"brief_id":{"type":"string","title":"Brief Id"},"client_name":{"type":"string","title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email"},"shortlisted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shortlisted At"}},"type":"object","required":["brief_id","client_name"],"title":"AssignedClient"},"Body_batch_screens_api_v1_intake_batch_post":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"CSV with an 'address' column (optional 'proposed_use')"}},"type":"object","required":["file"],"title":"Body_batch_screens_api_v1_intake_batch_post"},"Body_login_submit_engine_console_login_post":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"Body_login_submit_engine_console_login_post"},"Body_upload_project_document_api_v1_da_project__project_id__documents_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"document_type":{"type":"string","title":"Document Type","default":"other"},"requirement_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requirement Id"},"doc_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Type"}},"type":"object","required":["file"],"title":"Body_upload_project_document_api_v1_da_project__project_id__documents_post"},"BriefingRequest":{"properties":{"address":{"type":"string","title":"Address"},"lga":{"type":"string","title":"Lga"},"zone_code":{"type":"string","title":"Zone Code"},"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"overlays":{"items":{"type":"string"},"type":"array","title":"Overlays"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"}},"type":"object","required":["address","lga","zone_code"],"title":"BriefingRequest"},"ByBody":{"properties":{"by":{"type":"string","maxLength":80,"minLength":1,"title":"By"}},"type":"object","required":["by"],"title":"ByBody"},"CallBody":{"properties":{"by":{"type":"string","maxLength":80,"minLength":1,"title":"By"},"outcome":{"type":"string","title":"Outcome"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"},"approach_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approach Id"},"lead_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Id"},"contact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Id"},"next_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next At"}},"type":"object","required":["by","outcome"],"title":"CallBody"},"CapabilityTile":{"properties":{"key":{"type":"string","title":"Key"},"title":{"type":"string","title":"Title"},"verdict":{"type":"string","title":"Verdict"},"reason":{"type":"string","title":"Reason"},"pathway":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pathway"},"pathway_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pathway Label"},"metric_facts":{"additionalProperties":true,"type":"object","title":"Metric Facts","default":{}},"grounding":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Grounding"}},"type":"object","required":["key","title","verdict","reason"],"title":"CapabilityTile","description":"One deterministic scenario tile: a verdict-tier title plus ONE sentence\nof reasoning citing the real metrics behind the call. No AI anywhere."},"CapabilityTiles":{"properties":{"tiles":{"items":{"$ref":"#/components/schemas/CapabilityTile"},"type":"array","title":"Tiles","default":[]},"disclaimer":{"type":"string","title":"Disclaimer"},"degraded":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Degraded"},"scheme_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheme Name"},"scheme_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheme Version"}},"type":"object","required":["disclaimer"],"title":"CapabilityTiles","description":"The free checker's 1-5 capability tiles + the single disclaimer.\n\n`degraded` is the honest no-call message when zoning is unmapped, the\nzone's rules aren't held, or the record is a strata unit — the tile list\nis then empty rather than guessed."},"ChargeItem":{"properties":{"network":{"type":"string","title":"Network"},"charge_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Charge Type"},"charge_rate":{"type":"number","title":"Charge Rate"},"demand_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Demand Unit"},"estimated_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Quantity"},"estimated_charge":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Charge"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["network","charge_rate"],"title":"ChargeItem"},"CombinedCheckRequest":{"properties":{"subject_property_id":{"type":"string","title":"Subject Property Id"},"neighbour_property_ids":{"items":{"type":"string"},"type":"array","maxItems":12,"title":"Neighbour Property Ids"}},"type":"object","required":["subject_property_id"],"title":"CombinedCheckRequest","description":"Assess the subject parcel amalgamated with the selected neighbour lots."},"ComparableCharges":{"properties":{"median":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median"},"avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg"},"min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min"},"max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max"},"sample_size":{"type":"integer","title":"Sample Size","default":0}},"type":"object","title":"ComparableCharges"},"ComparableDA":{"properties":{"id":{"type":"string","title":"Id"},"application_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Number"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"application_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Type"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"lodgement_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Lodgement Date"},"decision_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Decision Date"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"days_to_decision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days To Decision"},"lots_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Proposed"},"lots_existing":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Existing"},"dwellings_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dwellings Proposed"},"storeys_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Storeys Proposed"},"zone_at_lodgement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone At Lodgement"},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"distance_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Distance M"},"relevance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance Score"}},"type":"object","required":["id"],"title":"ComparableDA","description":"A DA application returned as a comparable."},"ComparableDAListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ComparableDAResult"},"type":"array","title":"Results"},"total_count":{"type":"integer","title":"Total Count","default":0},"radius_m":{"type":"integer","title":"Radius M","default":2000},"center_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center Address"}},"type":"object","title":"ComparableDAListResponse","description":"List of comparable DAs with metadata."},"ComparableDAResponse":{"properties":{"property_id":{"type":"string","title":"Property Id"},"property_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Address"},"search_radius_m":{"type":"integer","title":"Search Radius M"},"zone_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Filter"},"type_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type Filter"},"total_found":{"type":"integer","title":"Total Found"},"das":{"items":{"$ref":"#/components/schemas/ComparableDA"},"type":"array","title":"Das"},"approval_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Approval Rate"},"avg_days_to_decision":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Days To Decision"},"avg_lots_proposed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Lots Proposed"}},"type":"object","required":["property_id","search_radius_m","total_found","das"],"title":"ComparableDAResponse","description":"Response from comparable DA search."},"ComparableDAResult":{"properties":{"da_id":{"type":"string","title":"Da Id"},"application_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Number"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"days_to_decision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days To Decision"},"lots_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Proposed"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"distance_m":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Distance M"},"total_charge":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Charge"},"condition_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Condition Count"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"}},"type":"object","required":["da_id"],"title":"ComparableDAResult","description":"A single comparable DA with optional condition summary."},"ComparableSale":{"properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"sale_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Sale Date"},"sale_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sale Price"},"land_area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Land Area M2"},"price_per_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Per M2"},"property_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Type"},"distance_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Distance M"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms"},"bathrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms"}},"type":"object","title":"ComparableSale","description":"A comparable sale for price fairness scoring."},"ComparableTimeline":{"properties":{"da_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Da Number"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"days":{"type":"integer","title":"Days"},"lots":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots"},"zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone"},"overlays":{"items":{"type":"string"},"type":"array","title":"Overlays","default":[]},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"}},"type":"object","required":["days"],"title":"ComparableTimeline"},"CompareSitesRequest":{"properties":{"addresses":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Addresses","description":"List of addresses to compare"},"development_type":{"type":"string","title":"Development Type","description":"subdivision, duplex, multi_dwelling, mcu, general","default":"general"}},"type":"object","required":["addresses"],"title":"CompareSitesRequest"},"CompareSitesResponse":{"properties":{"sites":{"items":{"$ref":"#/components/schemas/SiteScore"},"type":"array","title":"Sites"},"development_type":{"type":"string","title":"Development Type","default":"general"},"recommended_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recommended Index"}},"type":"object","title":"CompareSitesResponse"},"CompetitorContext":{"properties":{"total_tracked":{"type":"integer","title":"Total Tracked","default":0},"active_count":{"type":"integer","title":"Active Count","default":0},"sold_count":{"type":"integer","title":"Sold Count","default":0},"avg_days_on_market":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Avg Days On Market"}},"type":"object","title":"CompetitorContext"},"ComposeRfqRequest":{"properties":{"discipline":{"type":"string","title":"Discipline","description":"Canonical code (e.g. 'surveyor') or label (e.g. 'Licensed Surveyor')"}},"type":"object","required":["discipline"],"title":"ComposeRfqRequest"},"ConditionBenchmark":{"properties":{"lga":{"type":"string","title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"category":{"type":"string","title":"Category"},"condition_count":{"type":"integer","title":"Condition Count","default":0},"das_with_condition":{"type":"integer","title":"Das With Condition","default":0},"avg_charge":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Charge"},"median_charge":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Charge"},"min_charge":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Charge"},"max_charge":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Charge"}},"type":"object","required":["lga","zone_code","category"],"title":"ConditionBenchmark","description":"Condition frequency and charge stats for a zone+LGA+category."},"ConditionBenchmarkDetailResponse":{"properties":{"lga":{"type":"string","title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"development_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Development Type"},"total_das_analyzed":{"type":"integer","title":"Total Das Analyzed","default":0},"conditions_by_category":{"items":{"$ref":"#/components/schemas/ConditionCategoryBenchmark"},"type":"array","title":"Conditions By Category","default":[]},"overlay_specific_conditions":{"items":{"$ref":"#/components/schemas/OverlayCondition"},"type":"array","title":"Overlay Specific Conditions","default":[]},"citation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Citation"},"disclaimer":{"type":"string","title":"Disclaimer","default":"Based on historical DA condition data. Actual conditions may vary. This is not a substitute for professional planning advice."}},"type":"object","required":["lga"],"title":"ConditionBenchmarkDetailResponse"},"ConditionBenchmarkResponse":{"properties":{"lga":{"type":"string","title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"benchmarks":{"items":{"$ref":"#/components/schemas/ConditionBenchmark"},"type":"array","title":"Benchmarks"},"total_das_analysed":{"type":"integer","title":"Total Das Analysed","default":0}},"type":"object","required":["lga"],"title":"ConditionBenchmarkResponse","description":"Condition benchmarks for a zone+LGA."},"ConditionCategory":{"properties":{"category":{"type":"string","title":"Category"},"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"frequency":{"type":"number","title":"Frequency"},"typical_cost_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Typical Cost Range"}},"type":"object","required":["category","label","count","frequency"],"title":"ConditionCategory","description":"Approval condition category with statistics."},"ConditionCategoryBenchmark":{"properties":{"category":{"type":"string","title":"Category"},"frequency_pct":{"type":"integer","title":"Frequency Pct","default":0},"charge_stats":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Charge Stats"},"official_schedule_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Official Schedule Rate"},"typical_items":{"items":{"type":"string"},"type":"array","title":"Typical Items","default":[]},"sample_conditions":{"items":{"$ref":"#/components/schemas/ConditionSample"},"type":"array","title":"Sample Conditions","default":[]}},"type":"object","required":["category"],"title":"ConditionCategoryBenchmark"},"ConditionPredictionResponse":{"properties":{"predicted_conditions":{"items":{"$ref":"#/components/schemas/PredictedCondition"},"type":"array","title":"Predicted Conditions"},"estimated_total_charges":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Total Charges"},"comparable_das_analyzed":{"type":"integer","title":"Comparable Das Analyzed","default":0},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"}},"type":"object","title":"ConditionPredictionResponse","description":"Response for condition prediction."},"ConditionSample":{"properties":{"da_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Da Number"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"condition_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition Text"},"charge_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Charge Amount"},"lots":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots"},"decided":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided"}},"type":"object","title":"ConditionSample"},"ConditionTextResult":{"properties":{"condition_text":{"type":"string","title":"Condition Text"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"charge_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Charge Amount"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"application_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Number"},"da_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Da Id"}},"type":"object","required":["condition_text"],"title":"ConditionTextResult","description":"A single condition matching a text search."},"ConditionTextSearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ConditionTextResult"},"type":"array","title":"Results"},"total_count":{"type":"integer","title":"Total Count","default":0},"keyword":{"type":"string","title":"Keyword","default":""}},"type":"object","title":"ConditionTextSearchResponse","description":"Response for condition text search."},"ConfirmActionRequest":{"properties":{"action_id":{"type":"string","title":"Action Id"},"approved":{"type":"boolean","title":"Approved"}},"type":"object","required":["action_id","approved"],"title":"ConfirmActionRequest"},"CorrectionRequest":{"properties":{"parent_event_id":{"type":"string","title":"Parent Event Id"},"correction":{"additionalProperties":true,"type":"object","title":"Correction"},"correction_summary":{"type":"string","title":"Correction Summary"},"correction_category":{"type":"string","title":"Correction Category","default":"factual"}},"type":"object","required":["parent_event_id","correction","correction_summary"],"title":"CorrectionRequest"},"CreateRFIRequest":{"properties":{"response_charge_aud":{"type":"number","maximum":1000000.0,"minimum":0.0,"title":"Response Charge Aud","description":"Per-response variable charge (AUD)."},"charge_scope":{"type":"string","maxLength":2000,"minLength":1,"title":"Charge Scope","description":"Short description of the additional RFI-response work."},"rfi_number":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Rfi Number"},"issued_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issued Date","description":"ISO date council issued the RFI."},"response_due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Due Date","description":"ISO date the response is due."},"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items","description":"Council's RFI items (each {council_request: ...}) for the WS7 draft."},"source_document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Document Id"}},"type":"object","required":["response_charge_aud","charge_scope"],"title":"CreateRFIRequest","description":"Founder: record an RFI + the per-response variable charge (Wave 6D).\n\nThe charge VARIES per project — the founder enters ``response_charge_aud`` and\na short ``charge_scope`` describing the work. The customer must approve the\nadditional work (the ``approve_extra_work`` CTA) before Casa drafts + responds.\n``items`` carries the council's request items so the WS7 draft endpoint can\ngenerate the response once the charge is approved."},"DAComparisonResponse":{"properties":{"summary":{"type":"string","title":"Summary"},"property_id":{"type":"string","title":"Property Id"},"da_ids":{"items":{"type":"string"},"type":"array","title":"Da Ids"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["summary","property_id","da_ids"],"title":"DAComparisonResponse"},"DACondition":{"properties":{"number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number"},"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"DACondition"},"DADetailCondition":{"properties":{"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"condition_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition Text"},"charge_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Charge Amount"},"measurement_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Measurement Value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},"type":"object","title":"DADetailCondition"},"DADetailDocument":{"properties":{"id":{"type":"string","title":"Id"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"},"content_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Preview"},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count"}},"type":"object","required":["id"],"title":"DADetailDocument"},"DADetailInfo":{"properties":{"application_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"lodged_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lodged Date"},"decision_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Date"},"days_to_decision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days To Decision"},"lots_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Proposed"},"dwellings_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dwellings Proposed"},"storeys_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Storeys Proposed"},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"cost_of_works_aud":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Of Works Aud"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},"type":"object","title":"DADetailInfo"},"DADetailPropertyInfo":{"properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"lot_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lot Plan"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"zone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Name"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"overlays":{"items":{"type":"string"},"type":"array","title":"Overlays","default":[]},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"boundary_geojson":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boundary Geojson"}},"type":"object","title":"DADetailPropertyInfo"},"DADetailResponse":{"properties":{"da_id":{"type":"string","title":"Da Id"},"application_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Number"},"application_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"decision_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Date"},"lodgement_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lodgement Date"},"days_to_decision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days To Decision"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"lots_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Proposed"},"lots_existing":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Existing"},"dwellings_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dwellings Proposed"},"storeys_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Storeys Proposed"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"zone_at_lodgement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone At Lodgement"},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"overlays":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Overlays"},"conditions":{"items":{"$ref":"#/components/schemas/DACondition"},"type":"array","title":"Conditions","default":[]},"conditions_count":{"type":"integer","title":"Conditions Count","default":0},"assessment_manager":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Manager"},"submitter_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Submitter Count"},"appeal_filed":{"type":"boolean","title":"Appeal Filed","default":false},"appeal_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appeal Outcome"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"}},"type":"object","required":["da_id"],"title":"DADetailResponse"},"DADetailResponse2":{"properties":{"property":{"$ref":"#/components/schemas/DADetailPropertyInfo"},"da":{"$ref":"#/components/schemas/DADetailInfo"},"documents":{"items":{"$ref":"#/components/schemas/DADetailDocument"},"type":"array","title":"Documents","default":[]},"conditions":{"items":{"$ref":"#/components/schemas/DADetailCondition"},"type":"array","title":"Conditions","default":[]},"stats":{"$ref":"#/components/schemas/DADetailStats"}},"type":"object","required":["property","da","stats"],"title":"DADetailResponse2","description":"Comprehensive DA intelligence for town planner workflows."},"DADetailStats":{"properties":{"comparable_count":{"type":"integer","title":"Comparable Count","default":0},"zone_approval_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Zone Approval Rate"}},"type":"object","title":"DADetailStats"},"DAProjectCheckoutRequest":{"properties":{"org_id":{"type":"string","title":"Org Id","description":"Applicant's personal org (ci_organizations.id)"},"email":{"type":"string","format":"email","title":"Email"},"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"address":{"type":"string","maxLength":400,"minLength":3,"title":"Address"},"dev_type":{"type":"string","title":"Dev Type","default":"kdr_single"},"unit_count":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Unit Count","default":1},"works_intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Works Intent"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"source_report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Report Id","description":"Preliminary report this was started from"},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"},"utm":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Utm","description":"Marketing attribution pairs (utm_source/utm_medium/utm_campaign/utm_term/utm_content/referrer). Sanitized server-side."}},"type":"object","required":["org_id","email","address"],"title":"DAProjectCheckoutRequest"},"DASearchRequest":{"properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"radius_m":{"type":"integer","maximum":50000.0,"minimum":100.0,"title":"Radius M","default":2000},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"suburb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"date_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"},"date_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"},"lots_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Min"},"lots_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Max"},"area_m2_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2 Min"},"area_m2_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2 Max"},"da_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Da Type"},"description_search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description Search"},"sort":{"type":"string","pattern":"^(relevance|distance|date|days)$","title":"Sort","default":"relevance"},"page":{"type":"integer","minimum":1.0,"title":"Page","default":1},"per_page":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","default":20}},"type":"object","title":"DASearchRequest","description":"DA search filter parameters."},"DASearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/DASearchResult"},"type":"array","title":"Results"},"total_count":{"type":"integer","title":"Total Count"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"}},"type":"object","required":["results","total_count","page","per_page"],"title":"DASearchResponse","description":"Paginated DA search response."},"DASearchResult":{"properties":{"id":{"type":"string","title":"Id"},"application_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Number"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"days_to_decision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days To Decision"},"lots_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Proposed"},"dwellings_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dwellings Proposed"},"storeys_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Storeys Proposed"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"lodged_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lodged Date"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"distance_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Distance M"}},"type":"object","required":["id"],"title":"DASearchResult","description":"Single DA search result."},"DASearchStats":{"properties":{"total_count":{"type":"integer","title":"Total Count"},"decision_breakdown":{"additionalProperties":{"type":"integer"},"type":"object","title":"Decision Breakdown"},"zone_breakdown":{"additionalProperties":{"type":"integer"},"type":"object","title":"Zone Breakdown"},"avg_days_to_decision":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Days To Decision"},"lga_breakdown":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Lga Breakdown"}},"type":"object","required":["total_count","decision_breakdown","zone_breakdown"],"title":"DASearchStats","description":"Aggregated statistics for a DA search query."},"DealSheetResponse":{"properties":{"deal_sheet":{"additionalProperties":true,"type":"object","title":"Deal Sheet"},"html":{"type":"string","title":"Html"}},"type":"object","required":["deal_sheet","html"],"title":"DealSheetResponse","description":"JSON response — for React rendering in the dashboard or public page."},"DeclineIn":{"properties":{"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"},"reviewed_by":{"type":"string","maxLength":40,"title":"Reviewed By","default":"robbie"}},"type":"object","title":"DeclineIn"},"DevTypeBreakdownEntry":{"properties":{"development_type":{"type":"string","title":"Development Type"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","required":["development_type"],"title":"DevTypeBreakdownEntry","description":"Development type breakdown within a polygon area."},"DevelopmentMixEntry":{"properties":{"type":{"type":"string","title":"Type"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["type","count"],"title":"DevelopmentMixEntry"},"DocumentSearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/DocumentSearchResult"},"type":"array","title":"Results"},"total_count":{"type":"integer","title":"Total Count","default":0},"query":{"type":"string","title":"Query","default":""}},"type":"object","title":"DocumentSearchResponse","description":"Response for document search."},"DocumentSearchResult":{"properties":{"chunk_text":{"type":"string","title":"Chunk Text"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"application_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Number"},"similarity_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Similarity Score"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"da_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Da Id"},"result_type":{"type":"string","title":"Result Type","default":"text"},"page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Number"}},"type":"object","required":["chunk_text"],"title":"DocumentSearchResult","description":"A single document chunk matching the search query."},"DropBody":{"properties":{"by":{"type":"string","maxLength":80,"minLength":1,"title":"By"},"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"}},"type":"object","required":["by","reason"],"title":"DropBody"},"EventItem":{"properties":{"event_type":{"type":"string","title":"Event Type","description":"Event type, e.g. 'property_view', 'ai_question'"},"event_category":{"type":"string","title":"Event Category","description":"Category: 'engagement', 'conversion', 'feature_use', 'navigation'","default":"engagement"},"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id","description":"Property UUID if applicable"},"source":{"type":"string","title":"Source","description":"Source: 'extension', 'dashboard', 'api'","default":"unknown"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Event-specific data"}},"type":"object","required":["event_type"],"title":"EventItem","description":"A single trackable event."},"EventsBatchRequest":{"properties":{"events":{"items":{"$ref":"#/components/schemas/EventItem"},"type":"array","maxItems":100,"minItems":1,"title":"Events"},"anonymous_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anonymous Id","description":"Extension installation ID for anonymous tracking"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Groups events into sessions"}},"type":"object","required":["events"],"title":"EventsBatchRequest","description":"Batch of events from extension or dashboard."},"EventsResponse":{"properties":{"status":{"type":"string","title":"Status","default":"ok"},"ingested":{"type":"integer","title":"Ingested","default":0}},"type":"object","title":"EventsResponse","description":"Response from event ingestion."},"FeasibilityComposePayload":{"properties":{"property":{"additionalProperties":true,"type":"object","title":"Property"},"feasibility":{"additionalProperties":true,"type":"object","title":"Feasibility"},"infrastructure_charges":{"additionalProperties":true,"type":"object","title":"Infrastructure Charges"},"predicted_conditions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Predicted Conditions"},"assessment_levels":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Assessment Levels"},"timeline":{"additionalProperties":true,"type":"object","title":"Timeline"},"nearby_das":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Nearby Das"},"da_pathway":{"additionalProperties":true,"type":"object","title":"Da Pathway"},"required_documents":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Required Documents"},"consultant_package":{"additionalProperties":true,"type":"object","title":"Consultant Package"},"informational_only":{"type":"boolean","title":"Informational Only","default":true},"disclaimer":{"type":"string","title":"Disclaimer","default":"Informational only — not financial, taxation, or planning advice. Verify all numbers with your accountant, lender, surveyor, and council assessment officer before relying on them for any commercial decision."}},"type":"object","required":["property","feasibility","infrastructure_charges","predicted_conditions","assessment_levels","timeline","nearby_das","da_pathway","required_documents","consultant_package"],"title":"FeasibilityComposePayload","description":"The full deterministic payload Casa Daily renders as inline cards."},"FeasibilityComposeRequest":{"properties":{"property_id":{"type":"string","title":"Property Id","description":"ci_properties.id (UUID)"},"dev_type":{"type":"string","title":"Dev Type","description":"Development outcome — one of: subdivision, townhouse, duplex, mcu, kdr_single. Drives proposed_lots/dwellings defaults and the application_type categorisation."},"unit_count":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Unit Count","description":"Number of lots / dwellings proposed.","default":1},"proposed_gfa_m2":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Proposed Gfa M2","description":"Optional GFA. Casa Daily can let the user override."},"proposed_height_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Proposed Height M"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Casa Daily user UUID for attribution / cost tracking."}},"type":"object","required":["property_id","dev_type"],"title":"FeasibilityComposeRequest"},"FeasibilityComposeResponse":{"properties":{"payload":{"$ref":"#/components/schemas/FeasibilityComposePayload"}},"type":"object","required":["payload"],"title":"FeasibilityComposeResponse"},"FeasibilityOverlay":{"properties":{"category":{"type":"string","title":"Category"},"severity":{"type":"string","title":"Severity"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["category","severity"],"title":"FeasibilityOverlay"},"FeasibilityPDFRequest":{"properties":{"payload":{"$ref":"#/components/schemas/FeasibilityComposePayload"},"project_name":{"type":"string","maxLength":200,"title":"Project Name"},"user_full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Full Name"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"ai_narrative":{"additionalProperties":true,"type":"object","title":"Ai Narrative","description":"AI-generated narrative sections keyed by name: executive_summary, site_assessment, casa_planner_pathway, etc."},"casa_planner_section":{"additionalProperties":true,"type":"object","title":"Casa Planner Section","description":"The Casa Planner upsell block — likelihood, required docs, consultant pack, cost-to-DA, marketing CTA. Optional but expected for the launch pitch."},"variables_snapshot":{"additionalProperties":true,"type":"object","title":"Variables Snapshot","description":"User-edited financial variables sheet at PDF compile time (purchase_price, unit_count, build_cost_per_unit, etc.)"},"variables_outputs":{"additionalProperties":true,"type":"object","title":"Variables Outputs","description":"Computed financial outputs from the variables sheet (profit, margin_pct, total_project_cost, breakeven_sale_price_per_unit, etc.)"},"dev_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dev Type"},"unit_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unit Count"}},"type":"object","required":["payload","project_name"],"title":"FeasibilityPDFRequest","description":"Casa Daily sends the full assembled payload it intends to print.\n\nThe user may have edited inputs in the variables-sheet card before\nclicking 'Generate feasibility report', so the source of truth for\nthe PDF is the post-edit payload, not the original /compose response.\nThe AI narrative comes from Casa Daily's curated chat synthesis —\nit's NOT regenerated server-side here so the PDF matches what the\nuser saw on screen."},"FlyerResult":{"properties":{"report_id":{"type":"string","format":"uuid","title":"Report Id"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"}},"type":"object","required":["report_id"],"title":"FlyerResult","description":"Summary of a generated flyer report."},"FollowupSweepRequest":{"properties":{"older_than_days":{"type":"integer","maximum":90.0,"minimum":0.0,"title":"Older Than Days","default":5},"send":{"type":"boolean","title":"Send","description":"When true, email a reminder to RFQs with a contact on file","default":false}},"type":"object","title":"FollowupSweepRequest"},"FreeFeasibilityResponse":{"properties":{"address":{"type":"string","title":"Address"},"display_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Label"},"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"cadastral_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cadastral Address"},"suburb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"},"lga":{"type":"string","title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"zone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Name"},"overlays":{"items":{"$ref":"#/components/schemas/FeasibilityOverlay"},"type":"array","title":"Overlays","default":[]},"overlay_count":{"type":"integer","title":"Overlay Count","default":0},"overlays_checked":{"items":{"type":"string"},"type":"array","title":"Overlays Checked","default":[]},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"development_potential":{"type":"string","title":"Development Potential","description":"yes, no, maybe, or unknown (we could not assess)"},"casa_score":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Casa Score"},"summary":{"type":"string","title":"Summary"},"report_url":{"type":"string","title":"Report Url"},"zone_facts":{"anyOf":[{"$ref":"#/components/schemas/ZoneFacts"},{"type":"null"}]},"nearby_activity":{"anyOf":[{"$ref":"#/components/schemas/NearbyActivity"},{"type":"null"}]},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lon":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lon"},"boundary_geojson":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boundary Geojson"},"boundary_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boundary Status"},"boundary_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boundary Note"},"score_percentile":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score Percentile"},"capability_tiles":{"anyOf":[{"$ref":"#/components/schemas/CapabilityTiles"},{"type":"null"}]},"data_status":{"type":"string","title":"Data Status","default":"complete"},"degraded_components":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Degraded Components"},"degraded_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Degraded Reason"},"amalgamation":{"anyOf":[{"$ref":"#/components/schemas/AmalgamationInfo"},{"type":"null"}]},"overlays_definitive":{"type":"boolean","title":"Overlays Definitive","default":false},"overlay_probe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overlay Probe"}},"type":"object","required":["address","lga","development_potential","summary","report_url"],"title":"FreeFeasibilityResponse"},"FreeSnapshotPdfRequest":{"properties":{"address":{"anyOf":[{"type":"string","minLength":3},{"type":"null"}],"title":"Address"},"payload":{"anyOf":[{"$ref":"#/components/schemas/FreeFeasibilityResponse"},{"type":"null"}]}},"type":"object","title":"FreeSnapshotPdfRequest","description":"Request for the one-page free snapshot PDF.\n\nProvide either a previously returned free-check payload (preferred —\navoids re-running the lookup) or an address to re-run the check."},"FreeSnapshotPdfResponse":{"properties":{"pdf_url":{"type":"string","title":"Pdf Url"}},"type":"object","required":["pdf_url"],"title":"FreeSnapshotPdfResponse"},"FreeTilesResponse":{"properties":{"property_id":{"type":"string","title":"Property Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"tiles":{"items":{"$ref":"#/components/schemas/CapabilityTile"},"type":"array","title":"Tiles","default":[]},"disclaimer":{"type":"string","title":"Disclaimer"},"degraded":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Degraded"},"scheme_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheme Name"},"scheme_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheme Version"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["property_id","disclaimer"],"title":"FreeTilesResponse","description":"Standalone capability-tiles payload (extension sidepanel lazy fetch)."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HandoffRequest":{"properties":{"title":{"type":"string","maxLength":300,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"priority":{"type":"string","title":"Priority","default":"medium"},"customer_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Activity","description":"What the customer sees on their timeline while we do this manually."}},"type":"object","required":["title"],"title":"HandoffRequest"},"HoldingBlock":{"properties":{"is_partial_holding":{"type":"boolean","title":"Is Partial Holding","default":true},"resolved_area_m2":{"type":"number","title":"Resolved Area M2"},"listing_area_m2":{"type":"number","title":"Listing Area M2"},"ratio":{"type":"number","title":"Ratio"},"note":{"type":"string","title":"Note"}},"type":"object","required":["resolved_area_m2","listing_area_m2","ratio","note"],"title":"HoldingBlock","description":"Partial-holding disclosure — the listing spans more than the one title\nwe resolved. Never fabricated: only present when a trustworthy listing land\nsize is materially larger than the resolved parcel."},"HotZoneEntry":{"properties":{"zone_code":{"type":"string","title":"Zone Code"},"count_12m":{"type":"integer","title":"Count 12M"}},"type":"object","required":["zone_code","count_12m"],"title":"HotZoneEntry"},"HotspotPoint":{"properties":{"geohash":{"type":"string","title":"Geohash"},"lat":{"type":"number","title":"Lat"},"lng":{"type":"number","title":"Lng"},"total_das":{"type":"integer","title":"Total Das","default":0},"recent_das":{"type":"integer","title":"Recent Das","default":0},"approved":{"type":"integer","title":"Approved","default":0},"refused":{"type":"integer","title":"Refused","default":0}},"type":"object","required":["geohash","lat","lng"],"title":"HotspotPoint","description":"DA activity density at a geohash grid cell."},"IRPrediction":{"properties":{"likelihood_pct":{"type":"integer","title":"Likelihood Pct"},"predicted_items":{"type":"integer","title":"Predicted Items"},"common_ir_topics":{"items":{"type":"string"},"type":"array","title":"Common Ir Topics","default":[]},"ir_adds_days":{"additionalProperties":true,"type":"object","title":"Ir Adds Days","default":{}}},"type":"object","required":["likelihood_pct","predicted_items"],"title":"IRPrediction"},"InfrastructureChargesResponse":{"properties":{"lga":{"type":"string","title":"Lga"},"resolution_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Name"},"effective_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effective Date"},"charges":{"items":{"$ref":"#/components/schemas/ChargeItem"},"type":"array","title":"Charges","default":[]},"total_estimated_charge":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Estimated Charge"},"comparable_actual_charges":{"anyOf":[{"$ref":"#/components/schemas/ComparableCharges"},{"type":"null"}]},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"use_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Category"},"citation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Citation"},"comparable_citation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Comparable Citation"},"disclaimer":{"type":"string","title":"Disclaimer","default":"This information is indicative only and based on the data sources cited. It should be verified against the current planning scheme and is not a substitute for professional planning advice. Planning schemes are amended regularly — always check the latest version before making decisions."}},"type":"object","required":["lga"],"title":"InfrastructureChargesResponse"},"IngestionResponse":{"properties":{"source":{"type":"string","title":"Source"},"status":{"type":"string","title":"Status"},"records_fetched":{"type":"integer","title":"Records Fetched"},"records_new":{"type":"integer","title":"Records New"},"records_updated":{"type":"integer","title":"Records Updated"},"records_failed":{"type":"integer","title":"Records Failed"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"duration_seconds":{"type":"number","title":"Duration Seconds"},"run_id":{"type":"string","title":"Run Id"}},"type":"object","required":["source","status","records_fetched","records_new","records_updated","records_failed","errors","duration_seconds","run_id"],"title":"IngestionResponse","description":"Response from an ingestion endpoint."},"IngestionRunResponse":{"properties":{"id":{"type":"string","title":"Id"},"source":{"type":"string","title":"Source"},"status":{"type":"string","title":"Status"},"records_fetched":{"type":"integer","title":"Records Fetched"},"records_new":{"type":"integer","title":"Records New"},"records_updated":{"type":"integer","title":"Records Updated"},"records_failed":{"type":"integer","title":"Records Failed"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","source","status","records_fetched","records_new","records_updated","records_failed"],"title":"IngestionRunResponse","description":"Representation of an ingestion run for the status endpoint."},"InvoiceIn":{"properties":{"month":{"type":"string","title":"Month"},"send":{"type":"boolean","title":"Send","default":false}},"type":"object","required":["month"],"title":"InvoiceIn"},"InvoicePatch":{"properties":{"status":{"type":"string","pattern":"^(issued|paid|disputed|void)$","title":"Status"},"paid_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Paid On"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["status"],"title":"InvoicePatch"},"LandingPageCreate":{"properties":{"property_id":{"type":"string","title":"Property Id"},"page_type":{"type":"string","title":"Page Type","default":"property"},"property_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Property Data"}},"type":"object","required":["property_id"],"title":"LandingPageCreate","description":"Request body for creating a new landing page."},"LandingPageProperty":{"properties":{"property_id":{"type":"string","title":"Property Id"},"address":{"type":"string","title":"Address"},"suburb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"zone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Name"},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"development_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Development Score"},"score_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Score Label"},"score_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Score Tier"},"score_breakdown":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Score Breakdown"},"allows_subdivision":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allows Subdivision"},"overlays":{"items":{"type":"string"},"type":"array","title":"Overlays","default":[]},"max_lots":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Lots"},"estimated_value_low":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Value Low"},"estimated_value_high":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Value High"},"ai_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Summary"},"match_highlights":{"items":{"type":"string"},"type":"array","title":"Match Highlights","default":[]},"listing_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Url"},"listing_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Source"},"hero_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hero Image Url"},"listing_price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Price"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms"},"bathrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms"},"car_spaces":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Car Spaces"},"property_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Type"},"planning_rules":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Planning Rules"},"nearby_da_stats":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Nearby Da Stats"},"centroid_lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Centroid Lat"},"centroid_lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Centroid Lng"},"boundary_geojson":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"title":"Boundary Geojson"}},"type":"object","required":["property_id","address"],"title":"LandingPageProperty"},"LeadCapture":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},"type":"object","required":["email"],"title":"LeadCapture","description":"Public form submission for email capture on landing pages."},"LeadIn":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Phone"},"address":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}],"title":"Address"},"context":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Context"},"page_url":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Page Url"},"source":{"type":"string","maxLength":40,"title":"Source","default":"popup"}},"type":"object","title":"LeadIn"},"LeadPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"address_confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Address Confirmed"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"call_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Context"},"report_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Type"},"quoted_price_aud":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quoted Price Aud"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"claimed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimed By"},"referrer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer Name"},"referrer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer Email"},"referrer_agency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer Agency"},"internal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Internal"}},"type":"object","title":"LeadPatch"},"LearningEventRequest":{"properties":{"event_type":{"type":"string","title":"Event Type"},"parent_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Event Id"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"}},"type":"object","required":["event_type"],"title":"LearningEventRequest"},"LearningStatsResponse":{"properties":{"total_interactions":{"type":"integer","title":"Total Interactions"},"total_corrections":{"type":"integer","title":"Total Corrections"},"total_preferences":{"type":"integer","title":"Total Preferences"},"unique_users":{"type":"integer","title":"Unique Users"},"correction_rate":{"type":"number","title":"Correction Rate"},"first_interaction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Interaction"},"last_interaction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Interaction"}},"type":"object","required":["total_interactions","total_corrections","total_preferences","unique_users","correction_rate"],"title":"LearningStatsResponse"},"ListingAgentInfo":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"agency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agency"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"ListingAgentInfo"},"ListingAttributes":{"properties":{"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms"},"bathrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms"},"car_spaces":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Car Spaces"},"property_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Type"},"land_area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Land Area M2"},"floor_area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Floor Area M2"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built"}},"type":"object","title":"ListingAttributes"},"ListingPackResult":{"properties":{"report_id":{"type":"string","format":"uuid","title":"Report Id"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"}},"type":"object","required":["report_id"],"title":"ListingPackResult","description":"Summary of a generated listing pack report."},"LocalisedInsight":{"properties":{"insight_type":{"type":"string","title":"Insight Type"},"headline":{"type":"string","title":"Headline"},"detail":{"type":"string","title":"Detail"},"evidence_count":{"type":"integer","title":"Evidence Count","default":0},"relevance_score":{"type":"number","title":"Relevance Score","default":0.0},"radius_m":{"type":"integer","title":"Radius M","default":0}},"type":"object","required":["insight_type","headline","detail"],"title":"LocalisedInsight","description":"A property-specific insight derived from spatial DA analysis."},"LodgementVelocityEntry":{"properties":{"month":{"type":"string","title":"Month"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["month","count"],"title":"LodgementVelocityEntry"},"LogSearchRequest":{"properties":{"address":{"type":"string","maxLength":400,"minLength":3,"title":"Address"},"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"suburb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"referrer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"source":{"type":"string","title":"Source","default":"consumer_property_search"},"intent_signals":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Intent Signals"}},"type":"object","required":["address"],"title":"LogSearchRequest"},"LoginIn":{"properties":{"agency":{"type":"string","maxLength":200,"minLength":1,"title":"Agency"},"password":{"type":"string","maxLength":200,"minLength":1,"title":"Password"}},"type":"object","required":["agency","password"],"title":"LoginIn"},"MapBoundsResponse":{"properties":{"bounds":{"additionalProperties":{"type":"number"},"type":"object","title":"Bounds"},"nearby_das":{"additionalProperties":true,"type":"object","title":"Nearby Das"},"comparable_sales":{"additionalProperties":true,"type":"object","title":"Comparable Sales"},"truncated_das":{"type":"boolean","title":"Truncated Das"},"truncated_sales":{"type":"boolean","title":"Truncated Sales"},"degraded":{"type":"boolean","title":"Degraded","default":false},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","default":[]}},"type":"object","required":["bounds","nearby_das","comparable_sales","truncated_das","truncated_sales"],"title":"MapBoundsResponse"},"MapBundleResponse":{"properties":{"property":{"additionalProperties":true,"type":"object","title":"Property"},"parcel":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parcel"},"nearby_das":{"additionalProperties":true,"type":"object","title":"Nearby Das"},"overlays":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Overlays"},"comparable_sales":{"additionalProperties":true,"type":"object","title":"Comparable Sales"},"informational_only":{"type":"boolean","title":"Informational Only","default":true}},"type":"object","required":["property","nearby_das","overlays","comparable_sales"],"title":"MapBundleResponse","description":"Single payload powering the listing-page interactive map."},"MarkLodgedRequest":{"properties":{"reference":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Reference","description":"Council lodgement / application reference, if issued."}},"type":"object","title":"MarkLodgedRequest"},"MarketIntelligenceResponse":{"properties":{"lga":{"type":"string","title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"lodgement_velocity":{"items":{"$ref":"#/components/schemas/LodgementVelocityEntry"},"type":"array","title":"Lodgement Velocity"},"processing_trend":{"items":{"$ref":"#/components/schemas/ProcessingTrendEntry"},"type":"array","title":"Processing Trend"},"approval_trend":{"items":{"$ref":"#/components/schemas/ApprovalTrendEntry"},"type":"array","title":"Approval Trend"},"development_mix":{"items":{"$ref":"#/components/schemas/DevelopmentMixEntry"},"type":"array","title":"Development Mix"},"hot_zones":{"items":{"$ref":"#/components/schemas/HotZoneEntry"},"type":"array","title":"Hot Zones"}},"type":"object","required":["lga","lodgement_velocity","processing_trend","approval_trend","development_mix","hot_zones"],"title":"MarketIntelligenceResponse"},"MatchBriefsRequest":{"properties":{"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"address":{"type":"string","title":"Address"}},"type":"object","required":["address"],"title":"MatchBriefsRequest"},"MatchBriefsResponse":{"properties":{"matches":{"items":{"$ref":"#/components/schemas/app__api__v1__agent__BriefMatchResult"},"type":"array","title":"Matches"}},"type":"object","required":["matches"],"title":"MatchBriefsResponse"},"MemberIn":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Phone"},"role":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Role"}},"type":"object","required":["email"],"title":"MemberIn"},"MemoRequest":{"properties":{"address":{"type":"string","minLength":3,"title":"Address","description":"Site address"},"dev_type":{"type":"string","minLength":2,"title":"Dev Type","description":"Development type (e.g. dual_occupancy, subdivision, townhouse)"},"intent":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Intent","description":"Optional free-text client brief, quoted verbatim in the memo"}},"type":"object","required":["address","dev_type"],"title":"MemoRequest"},"NearbyActivity":{"properties":{"radius_m":{"type":"integer","title":"Radius M","default":750},"years":{"type":"integer","title":"Years","default":5},"total_count":{"type":"integer","title":"Total Count","default":0},"approved_count":{"type":"integer","title":"Approved Count","default":0},"median_days_to_decision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Median Days To Decision"},"nearest":{"items":{"$ref":"#/components/schemas/NearbyDA"},"type":"array","title":"Nearest","default":[]},"intel_nuggets":{"items":{"type":"string"},"type":"array","title":"Intel Nuggets","default":[]}},"type":"object","title":"NearbyActivity","description":"DA activity within radius_m of the property over the last `years` years."},"NearbyDA":{"properties":{"application_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"distance_m":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Distance M"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lon":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lon"}},"type":"object","title":"NearbyDA","description":"A single nearby development application (teaser detail)."},"NearbyParcelFeature":{"properties":{"type":{"type":"string","title":"Type","default":"Feature"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"geometry":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Geometry"},"properties":{"additionalProperties":true,"type":"object","title":"Properties"}},"type":"object","title":"NearbyParcelFeature","description":"GeoJSON Feature with cadastral properties.\n\nGeometry is a Polygon (or null if ArcGIS returned no rings — those\nrows are filtered out before this model is constructed, so callers\ncan assume geometry is present)."},"NearbyParcelsResponse":{"properties":{"type":{"type":"string","title":"Type","default":"FeatureCollection"},"features":{"items":{"$ref":"#/components/schemas/NearbyParcelFeature"},"type":"array","title":"Features"}},"type":"object","required":["features"],"title":"NearbyParcelsResponse","description":"GeoJSON FeatureCollection, ready to feed straight into MapLibre."},"NearbyStats":{"properties":{"total":{"type":"integer","title":"Total","default":0},"approved":{"type":"integer","title":"Approved","default":0},"refused":{"type":"integer","title":"Refused","default":0},"avg_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Avg Days"},"radius_m":{"type":"integer","title":"Radius M","default":2000}},"type":"object","title":"NearbyStats","description":"DA activity stats within a radius of the property."},"NeighbourParcel":{"properties":{"property_id":{"type":"string","title":"Property Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"lot_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lot Plan"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"distance_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Distance M"},"boundary_geojson":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boundary Geojson"}},"type":"object","required":["property_id"],"title":"NeighbourParcel","description":"One selectable neighbouring parcel for the amalgamation map."},"NeighbourParcelsResponse":{"properties":{"subject_property_id":{"type":"string","title":"Subject Property Id"},"subject":{"anyOf":[{"$ref":"#/components/schemas/NeighbourParcel"},{"type":"null"}]},"parcels":{"items":{"$ref":"#/components/schemas/NeighbourParcel"},"type":"array","title":"Parcels","default":[]}},"type":"object","required":["subject_property_id"],"title":"NeighbourParcelsResponse"},"NotCoveredIn":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"}},"type":"object","title":"NotCoveredIn"},"NoteRequest":{"properties":{"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"},"notify":{"type":"boolean","title":"Notify","default":true}},"type":"object","required":["message"],"title":"NoteRequest"},"OfficerDetail":{"properties":{"officer_name":{"type":"string","title":"Officer Name"},"das_assessed":{"type":"integer","title":"Das Assessed"},"approval_rate":{"type":"number","title":"Approval Rate"},"median_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Median Days"},"overlay_analysis":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Overlay Analysis"},"top_conditions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Top Conditions"},"top_refusal_reasons":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Top Refusal Reasons"}},"type":"object","required":["officer_name","das_assessed","approval_rate"],"title":"OfficerDetail","description":"Detailed officer profile with overlay analysis and patterns."},"OfficerStat":{"properties":{"officer_name":{"type":"string","title":"Officer Name"},"das_assessed":{"type":"integer","title":"Das Assessed"},"approval_rate":{"type":"number","title":"Approval Rate"},"median_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Median Days"},"strictness_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strictness Rating"}},"type":"object","required":["officer_name","das_assessed","approval_rate"],"title":"OfficerStat","description":"Summary statistics for a single assessment officer."},"OutcomeBody":{"properties":{"by":{"type":"string","maxLength":80,"minLength":1,"title":"By"},"outcome":{"type":"string","title":"Outcome"},"summary":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Summary"}},"type":"object","required":["by","outcome"],"title":"OutcomeBody"},"OverlayCondition":{"properties":{"overlay":{"type":"string","title":"Overlay"},"frequency_pct":{"type":"integer","title":"Frequency Pct","default":0},"typical_items":{"items":{"type":"string"},"type":"array","title":"Typical Items","default":[]},"sample_conditions":{"items":{"$ref":"#/components/schemas/ConditionSample"},"type":"array","title":"Sample Conditions","default":[]}},"type":"object","required":["overlay"],"title":"OverlayCondition"},"OverlayQueryResponse":{"properties":{"lat":{"type":"number","title":"Lat"},"lng":{"type":"number","title":"Lng"},"property":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Property"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"zone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Name"},"overlays":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Overlays"},"planning_scheme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Planning Scheme"},"informational_only":{"type":"boolean","title":"Informational Only","default":true},"disclaimer":{"type":"string","title":"Disclaimer","default":"Informational only — overlay flags drawn from Casa Intelligence's indexed cadastral data. Council mapping is the source of truth; verify before relying on for any commercial or regulatory decision."}},"type":"object","required":["lat","lng","property","zone_code","zone_name","overlays","planning_scheme"],"title":"OverlayQueryResponse"},"OverlayRiskEntry":{"properties":{"overlay_type":{"type":"string","title":"Overlay Type"},"overlay_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overlay Name"},"da_count":{"type":"integer","title":"Da Count","default":0},"approved_count":{"type":"integer","title":"Approved Count","default":0},"refused_count":{"type":"integer","title":"Refused Count","default":0},"approval_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Approval Rate Pct"},"avg_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Avg Days"},"das_with_charges":{"type":"integer","title":"Das With Charges","default":0},"avg_infra_charge":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Infra Charge"},"avg_condition_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Avg Condition Count"}},"type":"object","required":["overlay_type"],"title":"OverlayRiskEntry","description":"Overlay risk data for a specific overlay type in a zone+LGA."},"OverlayRiskResponse":{"properties":{"lga":{"type":"string","title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"entries":{"items":{"$ref":"#/components/schemas/OverlayRiskEntry"},"type":"array","title":"Entries"},"zone_baseline_approval_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Zone Baseline Approval Rate"}},"type":"object","required":["lga"],"title":"OverlayRiskResponse","description":"Overlay risk matrix for a zone+LGA."},"OverlayStatus":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status","default":"clear"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["code","name"],"title":"OverlayStatus","description":"Status of a single overlay type for a property."},"PasswordIn":{"properties":{"token":{"type":"string","maxLength":64,"minLength":16,"title":"Token"},"current_password":{"type":"string","maxLength":200,"minLength":1,"title":"Current Password"},"new_password":{"type":"string","maxLength":200,"minLength":10,"title":"New Password"}},"type":"object","required":["token","current_password","new_password"],"title":"PasswordIn"},"PlanningRulesData":{"properties":{"min_lot_area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Lot Area M2"},"min_frontage_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Frontage M"},"max_site_cover_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Site Cover Pct"},"max_height_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Height M"},"max_storeys":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Storeys"},"setback_front_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Setback Front M"},"setback_side_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Setback Side M"},"setback_rear_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Setback Rear M"},"dual_occ_permitted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dual Occ Permitted"},"dual_occ_min_parent_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dual Occ Min Parent M2"},"multi_unit_permitted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Multi Unit Permitted"},"allows_subdivision":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allows Subdivision"},"scheme_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheme Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"PlanningRulesData"},"PlanningSchemeInfo":{"properties":{"id":{"type":"string","title":"Id"},"lga":{"type":"string","title":"Lga"},"scheme_name":{"type":"string","title":"Scheme Name"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"effective_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effective Date"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"total_provisions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Provisions"},"assessment_entries":{"type":"integer","title":"Assessment Entries","default":0},"use_table_entries":{"type":"integer","title":"Use Table Entries","default":0},"charges_entries":{"type":"integer","title":"Charges Entries","default":0}},"type":"object","required":["id","lga","scheme_name"],"title":"PlanningSchemeInfo"},"PortalSendRequest":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"PortalSendRequest"},"PossibilitiesCheckoutRequest":{"properties":{"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"address_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Label"},"email":{"type":"string","format":"email","title":"Email"},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"},"utm":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Utm"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"branding":{"anyOf":[{"$ref":"#/components/schemas/AgencyBrandingIn"},{"type":"null"}]},"free_check_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Free Check Id"},"ga_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ga Client Id"},"works_intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Works Intent"},"phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Phone"}},"type":"object","required":["email"],"title":"PossibilitiesCheckoutRequest"},"PossibilitiesComposeRequest":{"properties":{"property_id":{"type":"string","title":"Property Id","description":"ci_properties.id (UUID)"}},"type":"object","required":["property_id"],"title":"PossibilitiesComposeRequest","description":"Compose-only request. Deliberately just the property: the paid path\nalways runs the §I review, so there is no flag here that could produce a\nweaker artefact than the one a customer receives."},"PostPaymentIntent":{"properties":{"stripe_session_id":{"type":"string","title":"Stripe Session Id"},"works_intent":{"type":"string","maxLength":2000,"minLength":1,"title":"Works Intent"}},"type":"object","required":["stripe_session_id","works_intent"],"title":"PostPaymentIntent"},"PrecedentSeedRequest":{"properties":{"dev_type":{"type":"string","enum":["subdivision","duplex","townhouse","multi_unit","secondary_dwelling","mcu","kdr","single_dwelling"],"title":"Dev Type","description":"Development type to seed from."},"lookback_months":{"type":"integer","maximum":120.0,"minimum":6.0,"title":"Lookback Months","description":"How far back to count approvals.","default":36},"lgas":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Lgas","description":"Restrict to these LGAs. None = all SEQ. Pass a subset (e.g. ['Sunshine Coast']) to seed within the user's preferred patch."},"min_approvals":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Min Approvals","description":"Drop suburbs/zones with fewer approved DAs.","default":3},"min_approval_rate_pct":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Min Approval Rate Pct","description":"Drop (suburb, zone) combos where less than this %% of decided DAs were approved.","default":50.0},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","description":"Max (suburb, zone) tuples to return.","default":20}},"type":"object","required":["dev_type"],"title":"PrecedentSeedRequest"},"PrecedentSeedResponse":{"properties":{"dev_type":{"type":"string","title":"Dev Type"},"lookback_months":{"type":"integer","title":"Lookback Months"},"lgas":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Lgas"},"total":{"type":"integer","title":"Total"},"suburbs":{"items":{"$ref":"#/components/schemas/PrecedentSuburb"},"type":"array","title":"Suburbs"},"elapsed_ms":{"type":"integer","title":"Elapsed Ms"}},"type":"object","required":["dev_type","lookback_months","lgas","total","suburbs","elapsed_ms"],"title":"PrecedentSeedResponse"},"PrecedentSuburb":{"properties":{"lga":{"type":"string","title":"Lga"},"suburb":{"type":"string","title":"Suburb"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"approved_n":{"type":"integer","title":"Approved N"},"refused_n":{"type":"integer","title":"Refused N"},"decided_n":{"type":"integer","title":"Decided N"},"approval_rate_pct":{"type":"number","title":"Approval Rate Pct"},"newest_decision_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Newest Decision Year"},"median_decision_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Median Decision Year"}},"type":"object","required":["lga","suburb","zone_code","approved_n","refused_n","decided_n","approval_rate_pct","newest_decision_year","median_decision_year"],"title":"PrecedentSuburb"},"PredictedCondition":{"properties":{"category":{"type":"string","title":"Category"},"likelihood_pct":{"type":"integer","title":"Likelihood Pct","default":0},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"median_charge":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Charge"},"avg_charge":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Charge"},"charge_range":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Charge Range"},"total_estimate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Estimate"},"based_on":{"type":"integer","title":"Based On","default":0},"typical_wording":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Typical Wording"}},"type":"object","required":["category"],"title":"PredictedCondition"},"PredictionRequest":{"properties":{"address":{"type":"string","minLength":3,"title":"Address","description":"Property address to look up"},"development_type":{"type":"string","title":"Development Type","description":"subdivision, duplex, multi_dwelling, mcu, general","default":"general"},"lot_count":{"anyOf":[{"type":"integer","maximum":200.0,"minimum":1.0},{"type":"null"}],"title":"Lot Count","description":"Proposed number of lots/dwellings"}},"type":"object","required":["address"],"title":"PredictionRequest","description":"Request body for approval prediction and condition prediction."},"PreferenceRequest":{"properties":{"preference_area":{"type":"string","title":"Preference Area"},"preference_value":{"type":"string","title":"Preference Value"}},"type":"object","required":["preference_area","preference_value"],"title":"PreferenceRequest"},"PreliminaryCheckoutRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id","description":"UUID of ci_properties row, if already resolved"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address","description":"SEQ address — resolved server-side if property_id absent"},"dev_type":{"type":"string","title":"Dev Type","default":"kdr_single"},"unit_count":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Unit Count","default":1},"works_intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Works Intent"},"address_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Label"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"},"utm":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Utm","description":"Marketing attribution pairs (utm_source/utm_medium/utm_campaign/utm_term/utm_content/referrer). Sanitized server-side."},"free_check_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Free Check Id","description":"ci_free_checks id this purchase originated from, for conversion linkage"},"ga_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ga Client Id","description":"GA4 client id from the buyer's _ga cookie, for server-side purchase events"},"phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Phone","description":"Optional, and it stays optional. Baymard measured 14 per cent of shoppers refusing to give a phone number to an online store, so a required field costs buyers and returns junk from some who stay. Travels to the desk so a person can call about the property when the buyer wants that."},"neighbour_property_ids":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":12},{"type":"null"}],"title":"Neighbour Property Ids","description":"Adjoining lot UUIDs to amalgamate with the subject into one combined-site report. Validated (contiguous + uniform controls) before charging; mixed-control selections are blocked at checkout."}},"type":"object","required":["email"],"title":"PreliminaryCheckoutRequest"},"PreliminaryComposeRequest":{"properties":{"property_id":{"type":"string","title":"Property Id","description":"ci_properties.id (UUID)"},"dev_type":{"type":"string","title":"Dev Type","description":"One of: subdivision, townhouse, duplex, mcu, kdr_single, secondary_dwelling.","default":"kdr_single"},"unit_count":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Unit Count","default":1},"works_intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Works Intent","description":"Free-text description of the works the applicant wants to do."},"combined_property_ids":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":12},{"type":"null"}],"title":"Combined Property Ids","description":"Adjoining lot UUIDs to amalgamate with property_id into one combined-site report (admin verification of the paid amalgamation path)."},"include_intelligence":{"type":"boolean","title":"Include Intelligence","description":"When False, skip the AI reasoning/§I passes and compose the deterministic report only — free + fast, for structural/visual QA of the PDF (site plan, layout, amalgamation) without AI spend.","default":true},"background":{"type":"boolean","title":"Background","description":"Run compose off the request path: returns {report_id, status: 'generating'} immediately; poll GET /report/{id} until status='ready', then GET /report/{id}/pdf. Use this for full-intelligence composes — synchronous compose can exceed the edge proxy's ~300s request timeout and return a 502 with the work lost.","default":false},"final_review":{"type":"boolean","title":"Final Review","description":"Also run the §I Opus final-review pass on the composed payload (normally paid-path only). Lets §I be verified end-to-end via this admin endpoint without a Stripe purchase: edits/flags log to ci_report_review_edits and the payload carries the final_review stamp. Only honoured with background=true.","default":false}},"type":"object","required":["property_id"],"title":"PreliminaryComposeRequest"},"PricingAssessmentResponse":{"properties":{"property_id":{"type":"string","title":"Property Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms"},"asking_price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Asking Price"},"asking_price_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asking Price Source"},"fair_value_low":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fair Value Low"},"fair_value_mid":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fair Value Mid"},"fair_value_high":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fair Value High"},"delta_pct_vs_mid":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Delta Pct Vs Mid"},"verdict":{"type":"string","title":"Verdict","default":"unknown"},"bargaining_room_aud":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bargaining Room Aud"},"recommended_offer_low":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recommended Offer Low"},"recommended_offer_high":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recommended Offer High"},"comparables_used":{"type":"integer","title":"Comparables Used","default":0},"zone_facet_median":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Zone Facet Median"},"bedroom_facet_median":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedroom Facet Median"},"suburb_median":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Suburb Median"},"bathrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathrooms"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built"},"days_on_market":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days On Market"},"rationale":{"items":{"type":"string"},"type":"array","title":"Rationale","default":[]},"top_comparables":{"items":{"$ref":"#/components/schemas/PricingComparable"},"type":"array","title":"Top Comparables","default":[]},"tier":{"type":"string","title":"Tier","default":"lite"}},"type":"object","required":["property_id"],"title":"PricingAssessmentResponse","description":"Lightweight pricing assessment — comparable-sales + suburb-\nfacets blend, NO Gemini Vision (saves cost so it's safe to expose\npublicly with X-API-Key gating only).\n\nSame shape as Casa Daily's PricingAssessmentPayload so the\nextension can render the assessment with the same component\nwhether the user is signed in or not."},"PricingComparable":{"properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"sale_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sale Date"},"sale_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sale Price"},"distance_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Distance M"},"land_area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Land Area M2"},"bedrooms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bedrooms"},"similarity_pct":{"type":"integer","title":"Similarity Pct","default":0}},"type":"object","title":"PricingComparable","description":"A single comparable sale, similarity-weighted."},"ProactiveInsight":{"properties":{"key_opportunity":{"type":"string","title":"Key Opportunity","default":""},"watch_out":{"type":"string","title":"Watch Out","default":""},"quick_take":{"type":"string","title":"Quick Take","default":""}},"type":"object","title":"ProactiveInsight"},"ProactiveRequest":{"properties":{"property_id":{"type":"string","title":"Property Id"},"address":{"type":"string","title":"Address"}},"type":"object","required":["property_id","address"],"title":"ProactiveRequest"},"ProactiveResponse":{"properties":{"key_opportunity":{"type":"string","title":"Key Opportunity"},"watch_out":{"type":"string","title":"Watch Out"},"quick_take":{"type":"string","title":"Quick Take"}},"type":"object","required":["key_opportunity","watch_out","quick_take"],"title":"ProactiveResponse"},"ProcessingTrendEntry":{"properties":{"quarter":{"type":"string","title":"Quarter"},"avg_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Avg Days"},"decisions":{"type":"integer","title":"Decisions"}},"type":"object","required":["quarter","decisions"],"title":"ProcessingTrendEntry"},"PropertyBriefResponse":{"properties":{"property_id":{"type":"string","title":"Property Id"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headline"},"brief_text":{"type":"string","title":"Brief Text"},"viability":{"additionalProperties":{"$ref":"#/components/schemas/PropertyBriefViability"},"type":"object","title":"Viability"},"cited_da_numbers":{"items":{"type":"string"},"type":"array","title":"Cited Da Numbers"},"comparables":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Comparables","description":"Comparable approved DAs the page renders as photo cards. Includes application_number, address, distance_m, decision_year, description, lots_proposed, lga, photo_url (if any)."},"cached":{"type":"boolean","title":"Cached","default":false},"generated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generated At"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"elapsed_ms":{"type":"integer","title":"Elapsed Ms"}},"type":"object","required":["property_id","brief_text","elapsed_ms"],"title":"PropertyBriefResponse"},"PropertyBriefViability":{"properties":{"rating":{"type":"string","title":"Rating","description":"high | medium | low | none"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"}},"type":"object","required":["rating"],"title":"PropertyBriefViability"},"PropertyContextPackage":{"properties":{"property":{"$ref":"#/components/schemas/PropertySummary"},"zone_rules":{"anyOf":[{"$ref":"#/components/schemas/ZoneRules"},{"type":"null"}]},"overlays":{"items":{"$ref":"#/components/schemas/PropertyOverlay"},"type":"array","title":"Overlays","default":[]},"da_history":{"items":{"$ref":"#/components/schemas/ComparableDA"},"type":"array","title":"Da History","default":[]},"nearby_das":{"items":{"$ref":"#/components/schemas/ComparableDA"},"type":"array","title":"Nearby Das","default":[]},"insights":{"items":{"$ref":"#/components/schemas/LocalisedInsight"},"type":"array","title":"Insights","default":[]},"approval_stats":{"anyOf":[{"$ref":"#/components/schemas/TrendStat"},{"type":"null"}]},"zone_trend":{"anyOf":[{"$ref":"#/components/schemas/TrendStat"},{"type":"null"}]}},"type":"object","required":["property"],"title":"PropertyContextPackage","description":"The full context package assembled for a property.\nThis is what gets sent to the AI reasoning engine."},"PropertyDetailResponse":{"properties":{"property":{"additionalProperties":true,"type":"object","title":"Property"},"proactive_analysis":{"anyOf":[{"$ref":"#/components/schemas/ProactiveInsight"},{"type":"null"}]},"brief_matches":{"anyOf":[{"items":{"$ref":"#/components/schemas/app__api__v1__property_detail__BriefMatchResult"},"type":"array"},{"type":"null"}],"title":"Brief Matches"},"competitor_context":{"anyOf":[{"$ref":"#/components/schemas/CompetitorContext"},{"type":"null"}]},"listing_agent":{"anyOf":[{"$ref":"#/components/schemas/ListingAgentInfo"},{"type":"null"}]},"listing_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Url"},"listing_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Source"},"listing_price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Price"},"hero_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hero Image Url"},"saved_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saved Notes"},"saved_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saved Id"},"planning_rules":{"anyOf":[{"$ref":"#/components/schemas/PlanningRulesData"},{"type":"null"}]},"suburb_analytics":{"anyOf":[{"$ref":"#/components/schemas/SuburbAnalytics"},{"type":"null"}]},"listing_attributes":{"anyOf":[{"$ref":"#/components/schemas/ListingAttributes"},{"type":"null"}]},"boundary_geojson":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boundary Geojson"},"setback_geojson":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Setback Geojson"},"assigned_clients":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssignedClient"},"type":"array"},{"type":"null"}],"title":"Assigned Clients"},"site_analysis":{"anyOf":[{"$ref":"#/components/schemas/SiteAnalysisData"},{"type":"null"}]},"cached":{"type":"boolean","title":"Cached","default":false},"cache_age_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Age Seconds"}},"type":"object","required":["property"],"title":"PropertyDetailResponse"},"PropertyIntelligenceResponse":{"properties":{"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"address":{"type":"string","title":"Address"},"suburb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"lot_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lot Plan"},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"zone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Name"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"zone_benchmark":{"anyOf":[{"$ref":"#/components/schemas/ZoneBenchmark"},{"type":"null"}]},"overlays":{"items":{"$ref":"#/components/schemas/OverlayStatus"},"type":"array","title":"Overlays"},"risk_flags":{"items":{"type":"string"},"type":"array","title":"Risk Flags"},"nearby_stats":{"$ref":"#/components/schemas/NearbyStats"},"min_lot_area":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Lot Area"},"max_height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Height"},"allows_subdivision":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allows Subdivision"},"comparable_das_count":{"type":"integer","title":"Comparable Das Count","default":0},"evidence_count":{"type":"integer","title":"Evidence Count","default":0}},"type":"object","required":["address"],"title":"PropertyIntelligenceResponse","description":"Combined property intelligence package for the dashboard."},"PropertyLocation":{"properties":{"latitude":{"type":"number","title":"Latitude"},"longitude":{"type":"number","title":"Longitude"}},"type":"object","required":["latitude","longitude"],"title":"PropertyLocation","description":"Geographic coordinates for a property."},"PropertyLookupResponse":{"properties":{"property":{"$ref":"#/components/schemas/PropertySummary"},"zone_rules":{"anyOf":[{"$ref":"#/components/schemas/ZoneRules"},{"type":"null"}]},"score":{"anyOf":[{"$ref":"#/components/schemas/PropertyScore"},{"type":"null"}]},"da_count":{"type":"integer","title":"Da Count","default":0},"nearby_da_count":{"type":"integer","title":"Nearby Da Count","default":0},"has_development_potential":{"type":"boolean","title":"Has Development Potential","default":false},"listing_intent_subdivision":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Listing Intent Subdivision"},"listing_intent_keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Listing Intent Keywords"}},"type":"object","required":["property"],"title":"PropertyLookupResponse","description":"Full response from property lookup endpoint."},"PropertyOverlay":{"properties":{"code":{"type":"string","title":"Code"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"constraint_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Constraint Summary"}},"type":"object","required":["code"],"title":"PropertyOverlay","description":"A single overlay affecting a property."},"PropertyResolveResponse":{"properties":{"property_id":{"type":"string","title":"Property Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"cadastral_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cadastral Address"},"suburb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"matched_via":{"type":"string","title":"Matched Via"}},"type":"object","required":["property_id","matched_via"],"title":"PropertyResolveResponse","description":"Lightweight response for resolving an address to a property_id.\nThe Chrome extension calls this before /api/v1/property/{id} to\navoid the full enrichment overhead just to find the UUID."},"PropertyScore":{"properties":{"casa_score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Casa Score","default":0},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"tier_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Color"},"tier_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Label"},"components":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Components"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"}},"type":"object","title":"PropertyScore","description":"Casa Score block — same scoring used by widget endpoint and\nthe Casa Daily dashboard so both products show the same number."},"PropertySearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/PropertySearchResult"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"},"query":{"type":"string","title":"Query"}},"type":"object","required":["results","total","query"],"title":"PropertySearchResponse"},"PropertySearchResult":{"properties":{"id":{"type":"string","title":"Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"lot_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lot Plan"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"suburb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"}},"type":"object","required":["id"],"title":"PropertySearchResult"},"PropertySummary":{"properties":{"id":{"type":"string","title":"Id"},"lot_plan":{"type":"string","title":"Lot Plan"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"suburb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"},"postcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postcode"},"lga":{"type":"string","title":"Lga"},"state":{"type":"string","title":"State","default":"QLD"},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"frontage_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frontage M"},"depth_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth M"},"shape_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shape Factor"},"is_corner":{"type":"boolean","title":"Is Corner","default":false},"is_battle_axe":{"type":"boolean","title":"Is Battle Axe","default":false},"location":{"anyOf":[{"$ref":"#/components/schemas/PropertyLocation"},{"type":"null"}]},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"zone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Name"},"overlays":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Overlays"},"is_in_pda":{"type":"boolean","title":"Is In Pda","default":false},"pda_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pda Name"},"subdivision_eligible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Subdivision Eligible"},"subdivision_pathway":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subdivision Pathway"},"max_lots":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Lots"},"da_approval_probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Da Approval Probability"},"development_potential":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Development Potential"},"estimated_uplift_low":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Uplift Low"},"estimated_uplift_high":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Uplift High"},"data_quality":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Data Quality"},"last_enriched":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Enriched"}},"type":"object","required":["id","lot_plan","lga"],"title":"PropertySummary","description":"Core property data returned from lookup."},"ProvisionResult":{"properties":{"id":{"type":"string","title":"Id"},"section_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Number"},"section_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Title"},"provision_type":{"type":"string","title":"Provision Type"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"full_text":{"type":"string","title":"Full Text"},"key_parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Key Parameters"},"relevance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance Score"}},"type":"object","required":["id","provision_type","full_text"],"title":"ProvisionResult"},"ProvisionSearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"lga":{"type":"string","title":"Lga"},"results":{"items":{"$ref":"#/components/schemas/ProvisionResult"},"type":"array","title":"Results","default":[]},"total":{"type":"integer","title":"Total","default":0}},"type":"object","required":["query","lga"],"title":"ProvisionSearchResponse"},"PublicAreaActivity":{"properties":{"radius_m":{"type":"integer","title":"Radius M","default":750},"years":{"type":"integer","title":"Years","default":5},"total":{"type":"integer","title":"Total","default":0},"approved":{"type":"integer","title":"Approved","default":0},"approval_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Approval Rate","description":"Approved / decided in the local cohort."},"median_days_to_decision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Median Days To Decision"}},"type":"object","title":"PublicAreaActivity","description":"Aggregate DA activity near the parcel. Aggregates ONLY — no raw records."},"PublicAttribution":{"properties":{"source":{"type":"string","title":"Source","default":"Casa Intelligence"},"cite_as":{"type":"string","title":"Cite As","default":"Casa Intelligence — casaintelligence.com.au"},"url":{"type":"string","title":"Url","default":"https://www.casaintelligence.com.au"}},"type":"object","title":"PublicAttribution"},"PublicConfirm":{"properties":{"product":{"type":"string","title":"Product","default":"$199 Preliminary Planning Report"},"price_aud":{"type":"integer","title":"Price Aud","default":150},"url":{"type":"string","title":"Url","description":"Order URL for the definitive report for this address."}},"type":"object","required":["url"],"title":"PublicConfirm"},"PublicCoverage":{"properties":{"region":{"type":"string","title":"Region","default":"South East Queensland, Australia"},"lgas":{"items":{"type":"string"},"type":"array","title":"Lgas"}},"type":"object","title":"PublicCoverage"},"PublicIndicative":{"properties":{"development_potential":{"type":"string","title":"Development Potential","description":"Indicative development potential: 'yes', 'maybe' or 'no'."},"subdivision":{"type":"string","title":"Subdivision","description":"Indicative subdivision outlook: 'possible', 'constrained' or 'unlikely'. Indicative only — confirm with the $199 report."},"score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Score","description":"Casa development score (0-100), indicative."},"basis":{"type":"string","title":"Basis","default":"Derived from Casa Intelligence's index of decided South East Queensland development applications, council planning-scheme rules, and live council overlay checks — not from this specific site's assessment."}},"type":"object","required":["development_potential","subdivision","score"],"title":"PublicIndicative","description":"Derived, deterministic indicative signals. No LLM, no guarantee."},"PublicPropertyCheck":{"properties":{"schema_version":{"type":"string","title":"Schema Version","default":"1.0"},"address":{"type":"string","title":"Address"},"suburb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"},"lga":{"type":"string","title":"Lga"},"zone":{"$ref":"#/components/schemas/PublicZone"},"lot_size_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lot Size M2"},"overlays":{"items":{"type":"string"},"type":"array","title":"Overlays"},"overlays_checked":{"items":{"type":"string"},"type":"array","title":"Overlays Checked","description":"Overlay categories actually checked for this parcel (honesty scoping)."},"indicative":{"$ref":"#/components/schemas/PublicIndicative"},"area_da_activity":{"anyOf":[{"$ref":"#/components/schemas/PublicAreaActivity"},{"type":"null"}]},"caveat":{"type":"string","title":"Caveat","default":"Indicative only, derived from historical council decisions and planning-scheme rules. Subject to site-specific constraints. This is not planning advice and not a guarantee of approval — every application is assessed by the council on its individual merits. For a definitive, site-specific answer, order the $199 Preliminary Planning Report."},"confirm":{"$ref":"#/components/schemas/PublicConfirm"},"attribution":{"$ref":"#/components/schemas/PublicAttribution"},"coverage":{"$ref":"#/components/schemas/PublicCoverage"},"resolved":{"type":"boolean","title":"Resolved","default":true},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["address","lga","indicative","confirm"],"title":"PublicPropertyCheck","description":"The stable public property-check payload (schema_version 1.x)."},"PublicSuburbDaStats":{"properties":{"schema_version":{"type":"string","title":"Schema Version","default":"1.0"},"suburb":{"type":"string","title":"Suburb"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"dev_type":{"type":"string","title":"Dev Type"},"dev_type_label":{"type":"string","title":"Dev Type Label"},"decided":{"type":"integer","title":"Decided","description":"Number of decided applications in the cohort."},"approved":{"type":"integer","title":"Approved","default":0},"approval_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Approval Rate"},"median_days_to_decision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Median Days To Decision"},"median_infrastructure_charge_aud":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Median Infrastructure Charge Aud"},"charge_sample_size":{"type":"integer","title":"Charge Sample Size","default":0},"sample_note":{"type":"string","title":"Sample Note","description":"States the sample size and that past decisions do not guarantee outcomes."},"caveat":{"type":"string","title":"Caveat","default":"Indicative only, derived from historical council decisions and planning-scheme rules. Subject to site-specific constraints. This is not planning advice and not a guarantee of approval — every application is assessed by the council on its individual merits. For a definitive, site-specific answer, order the $199 Preliminary Planning Report."},"confirm":{"$ref":"#/components/schemas/PublicConfirm"},"attribution":{"$ref":"#/components/schemas/PublicAttribution"}},"type":"object","required":["suburb","dev_type","dev_type_label","decided","sample_note","confirm"],"title":"PublicSuburbDaStats","description":"Aggregate, cited suburb × development-type DA statistics. Aggregates only."},"PublicZone":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Planning-scheme zone code, e.g. 'LDR'."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Human-readable zone name, e.g. 'Low Density Residential'."}},"type":"object","title":"PublicZone"},"QuickFlyerRequest":{"properties":{"address":{"type":"string","minLength":5,"title":"Address","description":"Full property address"}},"type":"object","required":["address"],"title":"QuickFlyerRequest","description":"Request body for POST /api/v1/rea/quick-flyer."},"QuickFlyerResponse":{"properties":{"property_id":{"type":"string","format":"uuid","title":"Property Id"},"report_id":{"type":"string","format":"uuid","title":"Report Id"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"casa_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Casa Score"},"generation_time_ms":{"type":"integer","title":"Generation Time Ms"}},"type":"object","required":["property_id","report_id","generation_time_ms"],"title":"QuickFlyerResponse","description":"Response for POST /api/v1/rea/quick-flyer."},"QuickPackRequest":{"properties":{"address":{"type":"string","minLength":5,"title":"Address","description":"Full property address"},"bedrooms":{"anyOf":[{"type":"integer","maximum":20.0,"minimum":0.0},{"type":"null"}],"title":"Bedrooms"},"bathrooms":{"anyOf":[{"type":"integer","maximum":20.0,"minimum":0.0},{"type":"null"}],"title":"Bathrooms"},"car_spaces":{"anyOf":[{"type":"integer","maximum":20.0,"minimum":0.0},{"type":"null"}],"title":"Car Spaces"}},"type":"object","required":["address"],"title":"QuickPackRequest","description":"Request body for POST /api/v1/rea/quick-pack."},"QuickPackResponse":{"properties":{"property_id":{"type":"string","format":"uuid","title":"Property Id"},"listing_pack":{"$ref":"#/components/schemas/ListingPackResult"},"flyer":{"$ref":"#/components/schemas/FlyerResult"},"casa_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Casa Score"},"generation_time_ms":{"type":"integer","title":"Generation Time Ms"}},"type":"object","required":["property_id","listing_pack","flyer","generation_time_ms"],"title":"QuickPackResponse","description":"Response for POST /api/v1/rea/quick-pack."},"QuoteCardRequest":{"properties":{"company":{"type":"string","maxLength":300,"minLength":1,"title":"Company","description":"Company / consultant name"},"price_aud":{"type":"number","maximum":10000000.0,"minimum":0.0,"title":"Price Aud","description":"The quoted price (AUD)"},"description":{"type":"string","maxLength":2000,"title":"Description","description":"Brief description of the quoted scope","default":""},"contact":{"type":"string","maxLength":400,"title":"Contact","description":"Consultant contact info (email / phone)","default":""}},"type":"object","required":["company","price_aud"],"title":"QuoteCardRequest","description":"Founder: add a consultant quote-approval card (Wave 6A).\n\nA founder-entered card = one ``ci_da_consultant_rfqs`` row. The company/role\nname, the quoted price, a brief description and the consultant's contact info\nare captured so the founder can stack several cards, then surface them all to\nthe customer at once."},"RefusalCategory":{"properties":{"category":{"type":"string","title":"Category"},"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"percentage":{"type":"number","title":"Percentage"},"example_descriptions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Example Descriptions"}},"type":"object","required":["category","label","count","percentage"],"title":"RefusalCategory","description":"Refusal reason category with statistics."},"RemoveIn":{"properties":{"token":{"type":"string","maxLength":64,"minLength":16,"title":"Token"},"draft_id":{"type":"string","maxLength":36,"minLength":36,"title":"Draft Id"},"path":{"type":"string","maxLength":400,"minLength":1,"title":"Path"}},"type":"object","required":["token","draft_id","path"],"title":"RemoveIn"},"RenderPdfRequest":{"properties":{"html":{"type":"string","maxLength":5242880,"minLength":1,"title":"Html","description":"Full HTML document — DOCTYPE through </html>."},"base_css":{"anyOf":[{"type":"string","maxLength":262144},{"type":"null"}],"title":"Base Css","description":"Optional extra stylesheet, appended to the document."},"page_size":{"type":"string","enum":["A4","Letter"],"title":"Page Size","description":"WeasyPrint page size — A4 or Letter.","default":"A4"},"orientation":{"type":"string","enum":["portrait","landscape"],"title":"Orientation","description":"Page orientation — portrait or landscape.","default":"portrait"}},"type":"object","required":["html"],"title":"RenderPdfRequest","description":"The HTML+CSS payload Casa Daily POSTs to us.\n\n`html` is the FULL document — DOCTYPE, `<html>`, `<head>`,\n`<style>`/`<link>`, `<body>`. WeasyPrint parses it as-is.\n\n`base_css` is an optional extra stylesheet appended to the\ndocument. We support it as a separate field so Casa Daily can\nkeep its print-grade brand CSS in one file and reuse it across\nboth report templates — it doesn't have to inline it into every\nHTML string. If present, it's added as a WeasyPrint\n`CSS(string=...)` stylesheet alongside the document's own\nembedded styles.\n\n`page_size` / `orientation` drive the `@page` rule we prepend\nso the caller doesn't have to re-state it in every template.\nThe caller's own CSS can still override these via its own\n`@page` rule (last one wins per CSS cascade)."},"RepliedIn":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Note"},"unsubscribe":{"type":"boolean","title":"Unsubscribe","default":false}},"type":"object","required":["email"],"title":"RepliedIn"},"ReportCheckoutRequest":{"properties":{"property_id":{"type":"string","title":"Property Id","description":"UUID of ci_properties row"},"email":{"type":"string","format":"email","title":"Email"},"address_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Label"},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"}},"type":"object","required":["property_id","email"],"title":"ReportCheckoutRequest"},"ReportCheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"},"session_id":{"type":"string","title":"Session Id"},"report_id":{"type":"string","title":"Report Id"}},"type":"object","required":["checkout_url","session_id","report_id"],"title":"ReportCheckoutResponse"},"ReportResponse":{"properties":{"id":{"type":"string","title":"Id"},"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"status":{"type":"string","title":"Status"},"paid":{"type":"boolean","title":"Paid"},"report_type":{"type":"string","title":"Report Type"},"report_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Report Data"},"requested_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Email"},"created_at":{"type":"string","title":"Created At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"agent":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent"}},"type":"object","required":["id","property_id","status","paid","report_type","created_at"],"title":"ReportResponse"},"ReportStatusResponse":{"properties":{"id":{"type":"string","title":"Id"},"property_id":{"type":"string","title":"Property Id"},"status":{"type":"string","title":"Status"},"paid":{"type":"boolean","title":"Paid"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"requested_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Email"},"generation_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Generation Time Ms"},"created_at":{"type":"string","title":"Created At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","property_id","status","paid","download_url","requested_email","generation_time_ms","created_at","completed_at"],"title":"ReportStatusResponse"},"ReportTemplateCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"section_order":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Section Order"},"hidden_sections":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hidden Sections"},"custom_intro":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Intro"},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["name"],"title":"ReportTemplateCreate","description":"Request to create a custom report template."},"ReportTemplateResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"section_order":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Section Order"},"hidden_sections":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hidden Sections"},"custom_intro":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Intro"},"is_default":{"type":"boolean","title":"Is Default"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","name","is_default","created_at"],"title":"ReportTemplateResponse","description":"Response for a report template."},"RequirementUpsertRequest":{"properties":{"requirement_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requirement Id"},"doc_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Type"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"'client' or 'casa'"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"outstanding|received|surfaced|waived"},"gates_submission":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Gates Submission"},"depends_on":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Depends On"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"RequirementUpsertRequest","description":"Founder add / update / waive a document requirement (WS6C).\n\nUpdate an existing requirement by ``requirement_id``, or add/upsert one by\n``doc_type``. Only supplied fields are changed. Waive via ``status='waived'``."},"RunStepRequest":{"properties":{"force":{"type":"boolean","title":"Force","default":false}},"type":"object","title":"RunStepRequest"},"SalesSearchResponse":{"properties":{"property_id":{"type":"string","title":"Property Id"},"property_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Address"},"search_radius_m":{"type":"integer","title":"Search Radius M"},"total_found":{"type":"integer","title":"Total Found"},"sales":{"items":{"$ref":"#/components/schemas/ComparableSale"},"type":"array","title":"Sales","default":[]},"suburb_stats":{"anyOf":[{"$ref":"#/components/schemas/SuburbSalesStats"},{"type":"null"}]}},"type":"object","required":["property_id","search_radius_m","total_found"],"title":"SalesSearchResponse","description":"Response from comparable sales search."},"SaveConversationRequest":{"properties":{"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"property_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Address"},"suburb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages"}},"type":"object","required":["messages"],"title":"SaveConversationRequest"},"SavedSearchCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"filters":{"$ref":"#/components/schemas/DASearchRequest"}},"type":"object","required":["name","filters"],"title":"SavedSearchCreate","description":"Request to save a DA search configuration."},"SavedSearchResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"filters":{"additionalProperties":true,"type":"object","title":"Filters"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","name","filters","created_at"],"title":"SavedSearchResponse","description":"Saved search response."},"ScanAnalytics":{"properties":{"total_scans":{"type":"integer","title":"Total Scans"},"unique_visitors":{"type":"integer","title":"Unique Visitors"},"scans_by_day":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Scans By Day"},"scans_by_device":{"additionalProperties":{"type":"integer"},"type":"object","title":"Scans By Device"},"scans_by_hour":{"additionalProperties":{"type":"integer"},"type":"object","title":"Scans By Hour"}},"type":"object","required":["total_scans","unique_visitors","scans_by_day","scans_by_device","scans_by_hour"],"title":"ScanAnalytics","description":"Full scan analytics breakdown for a landing page."},"ScenarioRequest":{"properties":{"lga":{"type":"string","title":"Lga"},"zone_code":{"type":"string","title":"Zone Code"},"site_area_m2":{"type":"number","title":"Site Area M2"},"overlays":{"items":{"type":"string"},"type":"array","title":"Overlays"},"current_lots":{"type":"integer","title":"Current Lots","default":1}},"type":"object","required":["lga","zone_code","site_area_m2"],"title":"ScenarioRequest"},"ScrapeListing":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"property_id":{"anyOf":[{"type":"string"},{"type":"string","format":"uuid"},{"type":"null"}],"title":"Property Id"},"address_raw":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Raw"},"price_current":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Current"},"land_area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Land Area M2"},"development_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Development Score"},"canonical_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Url"}},"additionalProperties":true,"type":"object","title":"ScrapeListing","description":"One row of a live REA scrape's results.\n\nThe agent_tools_hotspots.get_rea_search_results function returns\nraw `ci_rea_listings` rows whose DB column names DON'T match the\nPydantic field names this model originally defined, AND whose\ntypes include Python UUIDs that Pydantic 2.13 will NOT silently\ncoerce to str. Both mismatches need handling so the endpoint\ndoesn't 422.\n\nHistory (2026-05-23):\n  - First 422: \"listings.0.listing_id Field required\" — model\n    required a field that didn't exist in the data shape. Fixed\n    by making everything optional + adding `alias` for the\n    renamed columns.\n  - Second 422 (after first fix): \"listings.0.id Input should\n    be a valid string [type=string_type, input_value=UUID(...)]\"\n    — Pydantic 2.13 type-strictness rejects UUID for a str-typed\n    field even in lax mode. Fixed by widening the type to\n    `str | UUID | None` and adding a `field_validator` that\n    stringifies UUIDs explicitly.\n\n`extra=\"allow\"` lets the additional DB columns (suburb, lga,\nbedrooms, bathrooms, car_spaces, building_area_m2, price_display,\nprice_low, listed_date, last_seen_date, score_tier, score_summary,\nstatus, thumbnail_url, property_type) pass through unmolested.\ncasa-daily's strict TypeScript type just ignores fields it\ndoesn't know about."},"ScrapeQueuedResponse":{"properties":{"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"existing_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Existing Job Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"suburb":{"type":"string","title":"Suburb"},"postcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postcode"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"rea_search_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rea Search Url"},"expected_duration_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Duration S"},"deduped":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deduped"},"rate_limited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rate Limited"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["suburb"],"title":"ScrapeQueuedResponse","description":"Response shape for POST /rea-live/search.\n\nNote: `job_id` is OPTIONAL because the search_rea_live tool returns\n`existing_job_id` (no `job_id`) when a dedup hit occurs — same\nsuburb scraped within the last 30 minutes reuses the prior job.\nWithout making job_id optional, the dedup path 422s with\n\"ValidationError: job_id Field required\" — confirmed in prod\n2026-05-23. Callers should check `existing_job_id` when `job_id`\nis absent."},"ScrapeRequest":{"properties":{"suburb":{"type":"string","maxLength":80,"minLength":2,"title":"Suburb","description":"Suburb to scrape, e.g. 'Coorparoo' or 'Mooloolaba'."},"postcode":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}],"title":"Postcode","description":"Optional postcode; auto-resolved from ci_properties if omitted."},"max_price":{"anyOf":[{"type":"integer","maximum":50000000.0,"minimum":10000.0},{"type":"null"}],"title":"Max Price","description":"Optional max listing price in AUD."},"min_lot_m2":{"anyOf":[{"type":"integer","maximum":200000.0,"minimum":100.0},{"type":"null"}],"title":"Min Lot M2","description":"Optional minimum lot area in m²."}},"type":"object","required":["suburb"],"title":"ScrapeRequest","description":"Inputs accepted by POST /rea-live/search.\n\nMirrors search_rea_live's tool input schema so the underlying\nfunction is called untouched."},"ScrapeResultResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"},"suburb":{"type":"string","title":"Suburb"},"queued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queued At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"duration_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration S"},"listings_found":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Listings Found"},"listings":{"items":{"$ref":"#/components/schemas/ScrapeListing"},"type":"array","title":"Listings","default":[]},"executor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Executor"},"error_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Class"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["job_id","status","suburb"],"title":"ScrapeResultResponse"},"SectionApplyRequest":{"properties":{"text":{"type":"string","maxLength":8000,"minLength":1,"title":"Text"}},"type":"object","required":["text"],"title":"SectionApplyRequest","description":"The section body to persist as an override + re-render."},"SectionRegenerateRequest":{"properties":{"instruction":{"type":"string","maxLength":4000,"minLength":1,"title":"Instruction"}},"type":"object","required":["instruction"],"title":"SectionRegenerateRequest","description":"Free-text edit instruction for one planning-report section."},"SetupIn":{"properties":{"trading_name":{"type":"string","maxLength":200,"minLength":2,"title":"Trading Name"},"legal_name":{"type":"string","maxLength":200,"minLength":2,"title":"Legal Name"},"abn":{"type":"string","maxLength":20,"minLength":11,"title":"Abn"},"business_address":{"type":"string","maxLength":400,"minLength":5,"title":"Business Address"},"contact_name":{"type":"string","maxLength":200,"minLength":2,"title":"Contact Name"},"contact_email":{"type":"string","maxLength":320,"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Contact Phone"},"accounts_email":{"type":"string","maxLength":320,"title":"Accounts Email"},"po_required":{"type":"boolean","title":"Po Required","default":false},"po_reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Po Reference"},"who_may_order":{"type":"string","pattern":"^(any|listed)$","title":"Who May Order","default":"any"},"member_emails":{"items":{"type":"string"},"type":"array","maxItems":60,"title":"Member Emails"},"rate_aud":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate Aud"},"monthly_cap":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":1.0},{"type":"null"}],"title":"Monthly Cap"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"set_up_by":{"type":"string","maxLength":80,"title":"Set Up By","default":"desk"}},"type":"object","required":["trading_name","legal_name","abn","business_address","contact_name","contact_email","accounts_email"],"title":"SetupIn","description":"An account opened on a call: the nine facts the online application asks for, agreed with the agency live."},"SignIn":{"properties":{"token":{"type":"string","maxLength":64,"minLength":16,"title":"Token"},"draft_id":{"type":"string","maxLength":36,"minLength":36,"title":"Draft Id"},"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"size_bytes":{"type":"integer","minimum":1.0,"title":"Size Bytes"},"content_type":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Content Type"}},"type":"object","required":["token","draft_id","filename","size_bytes"],"title":"SignIn"},"SimpleAck":{"properties":{"ok":{"type":"boolean","title":"Ok"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"type":"object","required":["ok"],"title":"SimpleAck"},"SiteAnalysisData":{"properties":{"svg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Svg"},"generated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generated At"},"generation_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Generation Time Ms"}},"type":"object","title":"SiteAnalysisData"},"SiteScore":{"properties":{"address":{"type":"string","title":"Address"},"score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Score"},"rank":{"type":"integer","title":"Rank","default":1},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"approval_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Approval Rate"},"overlay_count":{"type":"integer","title":"Overlay Count","default":0},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"min_lot_area":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Lot Area"},"avg_processing_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Avg Processing Days"},"nearby_approved":{"type":"integer","title":"Nearby Approved","default":0},"nearby_refused":{"type":"integer","title":"Nearby Refused","default":0},"estimated_charges":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Charges"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"breakdown":{"additionalProperties":true,"type":"object","title":"Breakdown"}},"type":"object","required":["address","score"],"title":"SiteScore"},"SourceStatus":{"properties":{"source":{"type":"string","title":"Source"},"last_run":{"anyOf":[{"$ref":"#/components/schemas/IngestionRunResponse"},{"type":"null"}]},"total_records":{"type":"integer","title":"Total Records"}},"type":"object","required":["source","total_records"],"title":"SourceStatus","description":"Status of a single ingestion source."},"StatusResponse":{"properties":{"engine":{"type":"string","title":"Engine"},"version":{"type":"string","title":"Version"},"status":{"type":"string","title":"Status"},"database_connected":{"type":"boolean","title":"Database Connected"},"sources":{"items":{"$ref":"#/components/schemas/SourceStatus"},"type":"array","title":"Sources"},"total_da_records":{"type":"integer","title":"Total Da Records"},"total_planning_rules":{"type":"integer","title":"Total Planning Rules"},"uptime_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uptime Info"}},"type":"object","required":["engine","version","status","database_connected","sources","total_da_records","total_planning_rules"],"title":"StatusResponse","description":"Response from the status endpoint."},"StatusUpdateRequest":{"properties":{"stage":{"type":"string","title":"Stage","description":"A DA_STAGES key to move the project to."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Internal note (not shown to the customer)."},"customer_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Message","description":"Customer-visible message. Defaults to a friendly stage blurb."}},"type":"object","required":["stage"],"title":"StatusUpdateRequest"},"SubscribeAlertRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"address":{"type":"string","maxLength":400,"minLength":3,"title":"Address"},"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"suburb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"source":{"type":"string","title":"Source","default":"property_alert"}},"type":"object","required":["email","address"],"title":"SubscribeAlertRequest"},"SuburbAnalytics":{"properties":{"suburb":{"type":"string","title":"Suburb","default":""},"median_rent_house":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Rent House"},"median_rent_unit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Rent Unit"},"rent_growth_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rent Growth Pct"},"recent_sales_count":{"type":"integer","title":"Recent Sales Count","default":0},"median_sale_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Sale Price"},"avg_price_per_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Price Per M2"},"days_on_market_avg":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days On Market Avg"}},"type":"object","title":"SuburbAnalytics"},"SuburbSalesStats":{"properties":{"suburb":{"type":"string","title":"Suburb"},"lga":{"type":"string","title":"Lga"},"property_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Type"},"total_sales":{"type":"integer","title":"Total Sales","default":0},"median_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Price"},"avg_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Price"},"avg_price_per_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Price Per M2"},"median_price_per_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Price Per M2"},"sales_last_12m":{"type":"integer","title":"Sales Last 12M","default":0},"annual_growth_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Annual Growth Pct"}},"type":"object","required":["suburb","lga"],"title":"SuburbSalesStats","description":"Aggregated sales statistics for a suburb."},"SupportingDA":{"properties":{"da_id":{"type":"string","title":"Da Id"},"application_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Number"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"days_to_decision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days To Decision"},"distance_m":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Distance M"},"lots_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Proposed"}},"type":"object","required":["da_id"],"title":"SupportingDA"},"SurfaceQuotesRequest":{"properties":{"quote_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Quote Ids","description":"Specific card ids to surface; omit to surface all unsurfaced cards."},"advance_stage":{"type":"boolean","title":"Advance Stage","description":"Advance the customer view to consultant_scoping so the approve_quotes CTA is meaningful (only moves forward; never rewinds).","default":true}},"type":"object","title":"SurfaceQuotesRequest","description":"Founder: surface gathered quote cards to the customer (Wave 6A).\n\nSurfaces all draft quote cards on the project, or only the given\n``quote_ids`` when supplied. One customer activity + one email are written."},"SurfaceRequirementRequest":{"properties":{"document_id":{"type":"string","title":"Document Id","description":"ci_tp_project_documents id to surface"},"notify":{"type":"boolean","title":"Notify","default":true}},"type":"object","required":["document_id"],"title":"SurfaceRequirementRequest","description":"Founder: surface a Casa document against a requirement (WS6C)."},"TaskDoneRequest":{"properties":{"customer_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Activity","description":"Optional customer-visible timeline entry when ticking the task off."}},"type":"object","title":"TaskDoneRequest"},"TimelineFactor":{"properties":{"factor":{"type":"string","title":"Factor"},"impact_days":{"type":"integer","title":"Impact Days"},"note":{"type":"string","title":"Note"}},"type":"object","required":["factor","impact_days","note"],"title":"TimelineFactor"},"TimelinePredictionRequest":{"properties":{"address":{"type":"string","minLength":3,"title":"Address"},"development_type":{"type":"string","title":"Development Type","description":"subdivision, duplex, multi_dwelling, mcu, general","default":"general"},"lots":{"anyOf":[{"type":"integer","maximum":200.0,"minimum":1.0},{"type":"null"}],"title":"Lots"},"assessment_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Level","description":"code, impact"},"overlays":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Overlays","description":"Overlay types to consider"},"include_ir_prediction":{"type":"boolean","title":"Include Ir Prediction","description":"Include information request prediction","default":true}},"type":"object","required":["address"],"title":"TimelinePredictionRequest","description":"Request body for timeline prediction."},"TimelinePredictionResponse":{"properties":{"predicted_days":{"additionalProperties":true,"type":"object","title":"Predicted Days","default":{}},"ir_prediction":{"anyOf":[{"$ref":"#/components/schemas/IRPrediction"},{"type":"null"}]},"factors":{"items":{"$ref":"#/components/schemas/TimelineFactor"},"type":"array","title":"Factors","default":[]},"comparable_timelines":{"items":{"$ref":"#/components/schemas/ComparableTimeline"},"type":"array","title":"Comparable Timelines","default":[]},"model_confidence":{"type":"string","title":"Model Confidence","default":"medium"},"based_on":{"type":"integer","title":"Based On","default":0},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"citation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Citation"},"disclaimer":{"type":"string","title":"Disclaimer","default":"Timeline predictions are based on historical DA processing data and are indicative only. Actual timelines may vary based on application complexity, council workload, and information request responses."}},"type":"object","title":"TimelinePredictionResponse"},"TrendResponse":{"properties":{"lga":{"type":"string","title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"period":{"type":"string","title":"Period","default":"all_time"},"stats":{"$ref":"#/components/schemas/TrendStat"},"recent_12m":{"anyOf":[{"$ref":"#/components/schemas/TrendStat"},{"type":"null"}]}},"type":"object","required":["lga","stats"],"title":"TrendResponse","description":"Response from trends endpoint."},"TrendStat":{"properties":{"total_das":{"type":"integer","title":"Total Das","default":0},"approved":{"type":"integer","title":"Approved","default":0},"refused":{"type":"integer","title":"Refused","default":0},"pending":{"type":"integer","title":"Pending","default":0},"withdrawn":{"type":"integer","title":"Withdrawn","default":0},"approval_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Approval Rate"},"avg_days_to_decision":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Days To Decision"},"avg_lots_proposed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Lots Proposed"},"most_common_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Most Common Type"}},"type":"object","title":"TrendStat","description":"Aggregate DA statistics for an LGA or zone."},"UsePermissibilityResponse":{"properties":{"exact_match":{"anyOf":[{"$ref":"#/components/schemas/UsePermissibilityResult"},{"type":"null"}]},"similar_matches":{"items":{"$ref":"#/components/schemas/UsePermissibilityResult"},"type":"array","title":"Similar Matches","default":[]},"query":{"type":"string","title":"Query"},"zone_code":{"type":"string","title":"Zone Code"},"lga":{"type":"string","title":"Lga"},"state":{"type":"string","title":"State","default":"permitted"},"statement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statement"},"citation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Citation"},"disclaimer":{"type":"string","title":"Disclaimer","default":"This information is indicative only and based on the data sources cited. It should be verified against the current planning scheme and is not a substitute for professional planning advice. Planning schemes are amended regularly — always check the latest version before making decisions."}},"type":"object","required":["query","zone_code","lga"],"title":"UsePermissibilityResponse"},"UsePermissibilityResult":{"properties":{"use_name":{"type":"string","title":"Use Name"},"zone_code":{"type":"string","title":"Zone Code"},"zone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Name"},"lga":{"type":"string","title":"Lga"},"permissibility":{"type":"string","title":"Permissibility"},"state":{"type":"string","title":"State","default":"permitted"},"statement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statement"},"definition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definition"},"conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conditions"},"applicable_codes":{"items":{"type":"string"},"type":"array","title":"Applicable Codes","default":[]},"provision_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provision Reference"},"scheme_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheme Name"}},"type":"object","required":["use_name","zone_code","lga","permissibility"],"title":"UsePermissibilityResult"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VisionByUrlsRequest":{"properties":{"photo_urls":{"items":{"type":"string"},"type":"array","maxItems":12,"minItems":1,"title":"Photo Urls"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},"type":"object","required":["photo_urls"],"title":"VisionByUrlsRequest","description":"Payload for /api/v1/listing-quality/by-urls.\n\nCaller supplies a photo gallery directly — used by Casa Daily's\npricing tool when ci_rea_listings has no row for the subject\nproperty (un-scraped listings). The Chrome extension extracts the\nURLs from the live REA / Domain page DOM and passes them through."},"VisualSearchRequest":{"properties":{"query":{"type":"string","maxLength":500,"minLength":3,"title":"Query","description":"Natural language search query"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga","description":"Filter by LGA"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type","description":"Filter by document type"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","description":"Max results to return","default":20}},"type":"object","required":["query"],"title":"VisualSearchRequest","description":"Request body for multimodal visual document search."},"VisualSearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/VisualSearchResult"},"type":"array","title":"Results"},"total_count":{"type":"integer","title":"Total Count","default":0},"query":{"type":"string","title":"Query","default":""}},"type":"object","title":"VisualSearchResponse","description":"Response for visual document search."},"VisualSearchResult":{"properties":{"document_id":{"type":"string","title":"Document Id"},"page_number":{"type":"integer","title":"Page Number"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"similarity_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Similarity Score"},"application_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Number"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"da_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Da Id"}},"type":"object","required":["document_id","page_number"],"title":"VisualSearchResult","description":"A single image-embedded page matching the visual search query."},"WebsiteEventRequest":{"properties":{"event_type":{"type":"string","maxLength":64,"title":"Event Type"},"free_check_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Free Check Id"},"ga_client_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Ga Client Id"},"session_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Session Id"},"address":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Address"},"variant":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Variant"},"dev_type":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Dev Type"},"page":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Page"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Extra event-specific data (size-capped server-side)"}},"type":"object","required":["event_type"],"title":"WebsiteEventRequest","description":"A single funnel event from the public website (no API key).\n\nevent_type must be on the server-side allow-list (see\napp/api/v1/events.py WEBSITE_EVENT_CATEGORIES) — this is analytics\ningestion, not a general write endpoint. ga_client_id is the canonical\nfunnel join key (DATA-CLARITY-AUDIT.md §5); free_check_id links the event\nto its originating ci_free_checks row."},"WebsiteEventResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true}},"type":"object","title":"WebsiteEventResponse","description":"Response for website event ingestion."},"WelcomeIn":{"properties":{"to":{"type":"string","maxLength":320,"title":"To"},"first_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"First Name"}},"type":"object","required":["to"],"title":"WelcomeIn"},"WidgetComparableDA":{"properties":{"da_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Da Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"lots_proposed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lots Proposed"},"days_to_decision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days To Decision"},"distance_m":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Distance M"},"application_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"WidgetComparableDA","description":"Minimal comparable DA for widget display (top 3)."},"WidgetErrorResponse":{"properties":{"error":{"type":"string","title":"Error"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["error"],"title":"WidgetErrorResponse","description":"Error response for widget API."},"WidgetOverlay":{"properties":{"category":{"type":"string","title":"Category"},"severity":{"type":"string","title":"Severity","default":"Medium"}},"type":"object","required":["category"],"title":"WidgetOverlay","description":"Compact overlay summary for widget display."},"WidgetPropertyResponse":{"properties":{"property_id":{"type":"string","title":"Property Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"suburb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"},"lga":{"type":"string","title":"Lga"},"development_score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Development Score","default":0},"score_label":{"type":"string","title":"Score Label","default":"Not Assessed"},"score_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Score Tier"},"tier_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Color"},"score_breakdown":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Score Breakdown"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"zone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Name"},"allows_subdivision":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allows Subdivision"},"area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area M2"},"min_lot_area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Lot Area M2"},"overlay_count":{"type":"integer","title":"Overlay Count","default":0},"overlay_severity":{"type":"string","title":"Overlay Severity","default":"None"},"overlays":{"items":{"$ref":"#/components/schemas/WidgetOverlay"},"type":"array","title":"Overlays","default":[]},"nearby_da_count":{"type":"integer","title":"Nearby Da Count","default":0},"nearby_decided":{"type":"integer","title":"Nearby Decided","default":0},"nearby_approved":{"type":"integer","title":"Nearby Approved","default":0},"nearby_approval_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Nearby Approval Rate"},"avg_days_to_decision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Avg Days To Decision"},"top_comparables":{"items":{"$ref":"#/components/schemas/WidgetComparableDA"},"type":"array","title":"Top Comparables","default":[]},"report_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Url"},"holding":{"anyOf":[{"$ref":"#/components/schemas/HoldingBlock"},{"type":"null"}]},"data_freshness":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data Freshness"}},"type":"object","required":["property_id","lga"],"title":"WidgetPropertyResponse","description":"Slim response optimized for the Developer Window widget.\n\nContains only the data needed to render the widget panel.\nSub-200ms target response time via pre-computed materialized view."},"ZoneBenchmark":{"properties":{"lga":{"type":"string","title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"total_das":{"type":"integer","title":"Total Das","default":0},"approved":{"type":"integer","title":"Approved","default":0},"refused":{"type":"integer","title":"Refused","default":0},"pending":{"type":"integer","title":"Pending","default":0},"approval_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Approval Rate Pct"},"avg_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Avg Days"},"median_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Median Days"},"p25_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"P25 Days"},"p75_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"P75 Days"},"recent_total":{"type":"integer","title":"Recent Total","default":0},"recent_approval_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recent Approval Rate Pct"}},"type":"object","required":["lga","zone_code"],"title":"ZoneBenchmark","description":"Pre-computed approval rate, timing, and charge benchmarks for a zone+LGA."},"ZoneBreakdownEntry":{"properties":{"zone_code":{"type":"string","title":"Zone Code"},"zone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Name"},"da_count":{"type":"integer","title":"Da Count","default":0},"approved":{"type":"integer","title":"Approved","default":0},"refused":{"type":"integer","title":"Refused","default":0}},"type":"object","required":["zone_code"],"title":"ZoneBreakdownEntry","description":"Zone breakdown within a polygon area."},"ZoneFacts":{"properties":{"min_lot_area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Lot Area M2"},"min_frontage_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Frontage M"},"max_site_cover_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Site Cover Pct"},"max_height_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Height M"},"max_storeys":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Storeys"},"height_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Height Source"},"zone_max_height_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Zone Max Height M"},"zone_max_storeys":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Zone Max Storeys"},"height_overlay_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Height Overlay Label"},"dual_occ_permitted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dual Occ Permitted"},"dual_occ_assessment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dual Occ Assessment"},"multi_unit_permitted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Multi Unit Permitted"},"multi_unit_assessment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Multi Unit Assessment"},"secondary_dwelling":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Secondary Dwelling"},"allows_subdivision":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allows Subdivision"},"scheme_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheme Name"},"scheme_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheme Version"},"irregular_lot":{"type":"boolean","title":"Irregular Lot","default":false},"lot_shape_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lot Shape Note"}},"type":"object","title":"ZoneFacts","description":"Deterministic zone facts pulled straight from ci_planning_rules.\nEvery field is optional — only facts actually recorded in the DB are\npopulated. No guessing, no AI."},"ZoneRules":{"properties":{"zone_code":{"type":"string","title":"Zone Code"},"zone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Name"},"lga":{"type":"string","title":"Lga"},"min_lot_area_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Lot Area M2"},"min_frontage_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Frontage M"},"max_site_cover_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Site Cover Pct"},"max_height_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Height M"},"max_storeys":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Storeys"},"min_setback_front_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Setback Front M"},"min_setback_side_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Setback Side M"},"min_setback_rear_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Setback Rear M"},"allows_subdivision":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allows Subdivision"},"dual_occ_permitted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dual Occ Permitted"},"dual_occ_min_parent_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dual Occ Min Parent M2"},"dual_occ_min_result_m2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dual Occ Min Result M2"},"multi_unit_permitted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Multi Unit Permitted"},"multi_unit_density":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Multi Unit Density"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["zone_code","lga"],"title":"ZoneRules","description":"Planning rules for a property's zone."},"app__api__v1__agency__OrderIn":{"properties":{"token":{"type":"string","maxLength":64,"minLength":16,"title":"Token"},"draft_id":{"type":"string","maxLength":36,"minLength":36,"title":"Draft Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"type":"string","maxLength":320,"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Phone"},"address":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}],"title":"Address"},"property_id":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"Property Id"},"address_label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Address Label"},"neighbour_property_ids":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":12},{"type":"null"}],"title":"Neighbour Property Ids"},"context":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Context"},"po_number":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Po Number"},"purpose":{"anyOf":[{"type":"string","pattern":"^(listing|appraisal)$"},{"type":"null"}],"title":"Purpose"},"report_type":{"type":"string","pattern":"^(preliminary_planning|site_possibilities)$","title":"Report Type","default":"preliminary_planning"}},"type":"object","required":["token","draft_id","name","email"],"title":"OrderIn"},"app__api__v1__agent__BriefMatchResult":{"properties":{"brief_id":{"type":"string","title":"Brief Id"},"client_name":{"type":"string","title":"Client Name"},"match_score":{"type":"integer","title":"Match Score"},"match_reasons":{"items":{"type":"string"},"type":"array","title":"Match Reasons"},"gaps":{"items":{"type":"string"},"type":"array","title":"Gaps"}},"type":"object","required":["brief_id","client_name","match_score","match_reasons","gaps"],"title":"BriefMatchResult"},"app__api__v1__client_pages__LandingPageResponse":{"properties":{"token":{"type":"string","title":"Token"},"ba_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ba Name"},"ba_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ba Email"},"ba_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ba Phone"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name"},"org_logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Logo Url"},"properties":{"items":{"$ref":"#/components/schemas/LandingPageProperty"},"type":"array","title":"Properties","default":[]},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"views":{"type":"integer","title":"Views","default":0}},"type":"object","required":["token"],"title":"LandingPageResponse"},"app__api__v1__consumer__FinalizeRequest":{"properties":{"stripe_session_id":{"type":"string","title":"Stripe Session Id"}},"type":"object","required":["stripe_session_id"],"title":"FinalizeRequest"},"app__api__v1__da_project__CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"},"session_id":{"type":"string","title":"Session Id"},"project_id":{"type":"string","title":"Project Id"}},"type":"object","required":["checkout_url","session_id","project_id"],"title":"CheckoutResponse"},"app__api__v1__da_project__FinalizeRequest":{"properties":{"stripe_session_id":{"type":"string","title":"Stripe Session Id"}},"type":"object","required":["stripe_session_id"],"title":"FinalizeRequest"},"app__api__v1__deep_intelligence__DocumentSearchRequest":{"properties":{"query":{"type":"string","title":"Query"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga"},"zone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Code"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"limit":{"type":"integer","title":"Limit","default":10}},"type":"object","required":["query"],"title":"DocumentSearchRequest"},"app__api__v1__desk_orders__OrderIn":{"properties":{"account_id":{"type":"string","title":"Account Id"},"customer_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Customer Name"},"email":{"type":"string","maxLength":320,"title":"Email"},"address":{"type":"string","maxLength":400,"title":"Address"},"lga":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Lga"},"intent":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Intent"},"report_type":{"type":"string","title":"Report Type","default":"preliminary_planning"}},"type":"object","required":["account_id","email","address"],"title":"OrderIn"},"app__api__v1__possibilities__CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"},"session_id":{"type":"string","title":"Session Id"},"report_id":{"type":"string","title":"Report Id"}},"type":"object","required":["checkout_url","session_id","report_id"],"title":"CheckoutResponse"},"app__api__v1__possibilities__FinalizeRequest":{"properties":{"session_id":{"type":"string","minLength":8,"title":"Session Id"}},"type":"object","required":["session_id"],"title":"FinalizeRequest"},"app__api__v1__preliminary__CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"},"session_id":{"type":"string","title":"Session Id"},"report_id":{"type":"string","title":"Report Id"}},"type":"object","required":["checkout_url","session_id","report_id"],"title":"CheckoutResponse"},"app__api__v1__preliminary__FinalizeRequest":{"properties":{"stripe_session_id":{"type":"string","title":"Stripe Session Id"}},"type":"object","required":["stripe_session_id"],"title":"FinalizeRequest"},"app__api__v1__property_detail__BriefMatchResult":{"properties":{"brief_id":{"type":"string","title":"Brief Id"},"client_name":{"type":"string","title":"Client Name"},"match_score":{"type":"integer","title":"Match Score"},"match_reasons":{"items":{"type":"string"},"type":"array","title":"Match Reasons","default":[]},"gaps":{"items":{"type":"string"},"type":"array","title":"Gaps","default":[]},"summary":{"type":"string","title":"Summary","default":""}},"type":"object","required":["brief_id","client_name","match_score"],"title":"BriefMatchResult"},"app__schemas__landing__LandingPageResponse":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"property_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Address"},"page_type":{"type":"string","title":"Page Type"},"is_white_label":{"type":"boolean","title":"Is White Label"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","title":"Created At"},"total_scans":{"type":"integer","title":"Total Scans","default":0},"total_leads":{"type":"integer","title":"Total Leads","default":0},"unique_visitors":{"type":"integer","title":"Unique Visitors","default":0}},"type":"object","required":["id","slug","page_type","is_white_label","is_active","created_at"],"title":"LandingPageResponse","description":"Response for a single landing page with scan summary."},"app__schemas__planner_intelligence__DocumentSearchRequest":{"properties":{"query":{"type":"string","maxLength":500,"minLength":3,"title":"Query","description":"Natural language search query"},"lga":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lga","description":"Filter by LGA"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type","description":"Filter by document type"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","description":"Max results to return","default":20}},"type":"object","required":["query"],"title":"DocumentSearchRequest","description":"Request body for semantic document search."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}}}