{"openapi":"3.1.0","info":{"title":"Cali Dream Construction API","description":"Lead capture and estimates for Cali Dream Construction","version":"1.0.0"},"paths":{"/":{"get":{"summary":"Root","description":"Health check","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/services":{"get":{"summary":"Get Services","description":"Get available services","operationId":"get_services_services_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/portfolio":{"get":{"summary":"Get Portfolio","description":"Get portfolio projects","operationId":"get_portfolio_portfolio_get","parameters":[{"name":"project_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Type"}},{"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"}}}}}}},"/estimate":{"post":{"summary":"Submit Estimate","description":"Submit an estimate request.","operationId":"submit_estimate_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contact":{"post":{"summary":"Submit Contact","description":"Submit a contact form","operationId":"submit_contact_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/review":{"post":{"summary":"Submit Review","description":"Submit a review","operationId":"submit_review_review_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewSubmission"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews":{"get":{"summary":"Get Reviews","description":"Return public, approved reviews only.\n\nKeep the legacy query argument for client compatibility. It never grants\naccess to private moderation records on this public endpoint.","operationId":"get_reviews_reviews_get","parameters":[{"name":"approved_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Approved Only"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","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"}}}}}}},"/leads":{"get":{"summary":"Get Leads","description":"List captured leads (Business Hub) - rows from the leads table.","operationId":"get_leads_leads_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","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"}}}}}}},"/estimates":{"get":{"summary":"Get Estimates","description":"List estimate requests (Business Hub).\n\nEstimate requests submitted via POST /estimate are stored as rows in\nthe leads table, so this is a read view over that same real data.","operationId":"get_estimates_estimates_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","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"}}}}}}},"/pricebook":{"get":{"summary":"Get Pricebook","description":"Price book (Business Hub) - derived from the canonical SERVICES catalog.","operationId":"get_pricebook_pricebook_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/availability":{"get":{"summary":"Check Availability","description":"Check scheduling availability","operationId":"check_availability_availability_get","parameters":[{"name":"project_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Type"}},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats":{"get":{"summary":"Get Stats","description":"Get lead statistics (for internal use)","operationId":"get_stats_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ContactRequest":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"message":{"type":"string","title":"Message"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"}},"type":"object","required":["name","email","message"],"title":"ContactRequest"},"EstimateRequest":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"type":"string","title":"Phone"},"address":{"type":"string","title":"Address"},"city":{"type":"string","title":"City","default":"San Diego"},"project_type":{"type":"string","title":"Project Type"},"description":{"type":"string","title":"Description"},"budget_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Budget Range"},"timeline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timeline"},"how_heard":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"How Heard"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"}},"type":"object","required":["name","email","phone","address","project_type","description"],"title":"EstimateRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ReviewSubmission":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"rating":{"type":"integer","title":"Rating"},"project_type":{"type":"string","title":"Project Type"},"review_text":{"type":"string","title":"Review Text"},"photos":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Photos"},"verification_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Code"}},"type":"object","required":["name","email","rating","project_type","review_text"],"title":"ReviewSubmission"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}