{"openapi":"3.1.0","info":{"title":"vhis-chat","version":"1.0.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health":{"get":{"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chat":{"post":{"summary":"Chat","operationId":"chat_api_chat_post","parameters":[{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lead":{"post":{"summary":"Lead","operationId":"lead_api_lead_post","parameters":[{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/send":{"post":{"summary":"Send Shortlist","description":"Send the saved plans to the person by WhatsApp or email. Always records the lead with the consent tap;\nsends only when the channel's credentials are configured (dry_run otherwise).","operationId":"send_shortlist_api_send_post","parameters":[{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quote":{"post":{"summary":"Quote","description":"Deterministic quote for the widget's guided flow: no model involved, straight from the engine.","operationId":"quote_api_quote_post","parameters":[{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/plans/{cert}":{"get":{"summary":"Plan","operationId":"plan_api_plans__cert__get","parameters":[{"name":"cert","in":"path","required":true,"schema":{"type":"string","title":"Cert"}},{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/schedule/{option_id}":{"get":{"summary":"Schedule","operationId":"schedule_api_schedule__option_id__get","parameters":[{"name":"option_id","in":"path","required":true,"schema":{"type":"string","title":"Option Id"}},{"name":"gender","in":"query","required":false,"schema":{"type":"string","default":"M","title":"Gender"}},{"name":"age_from","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Age From"}},{"name":"age_to","in":"query","required":false,"schema":{"type":"integer","default":80,"title":"Age To"}},{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/history/{cert}":{"get":{"summary":"History","operationId":"history_api_history__cert__get","parameters":[{"name":"cert","in":"path","required":true,"schema":{"type":"string","title":"Cert"}},{"name":"age","in":"query","required":false,"schema":{"type":"integer","default":45,"title":"Age"}},{"name":"gender","in":"query","required":false,"schema":{"type":"string","default":"F","title":"Gender"}},{"name":"smoker","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Smoker"}},{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/increases":{"get":{"summary":"Increases","operationId":"increases_api_increases_get","parameters":[{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/next-year":{"post":{"summary":"Next Year","operationId":"next_year_api_next_year_post","parameters":[{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NextYearIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/compare":{"post":{"summary":"Compare","operationId":"compare_api_compare_post","parameters":[{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recommend":{"post":{"summary":"Recommend Route","operationId":"recommend_route_api_recommend_post","parameters":[{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BriefIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/profile/{cert}":{"get":{"summary":"Profile Route","operationId":"profile_route_api_profile__cert__get","parameters":[{"name":"cert","in":"path","required":true,"schema":{"type":"string","title":"Cert"}},{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/features/{cert}":{"get":{"summary":"Features Route","operationId":"features_route_api_features__cert__get","parameters":[{"name":"cert","in":"path","required":true,"schema":{"type":"string","title":"Cert"}},{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/terms":{"get":{"summary":"Terms","operationId":"terms_api_terms_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}},{"name":"cert","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cert"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notes":{"get":{"summary":"Notes Route","operationId":"notes_route_api_notes_get","parameters":[{"name":"topic","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"x-chat-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Chat-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/followups/run":{"post":{"summary":"Followups Run","description":"Send whatever is due. The in-process loop does this every 15 minutes; this is for cron or a manual kick.","operationId":"followups_run_api_followups_run_post","parameters":[{"name":"x-cron-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/unsubscribe":{"get":{"summary":"Unsubscribe","operationId":"unsubscribe_unsubscribe_get","parameters":[{"name":"r","in":"query","required":false,"schema":{"type":"string","default":"","title":"R"}},{"name":"t","in":"query","required":false,"schema":{"type":"string","default":"","title":"T"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/whatsapp/inbound":{"post":{"summary":"Whatsapp Inbound","operationId":"whatsapp_inbound_api_whatsapp_inbound_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/insurers":{"get":{"summary":"Insurers Index","operationId":"insurers_index_insurers_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/insurers/{slug}":{"get":{"summary":"Insurer Page","operationId":"insurer_page_insurers__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"}}}}}}},"/plans":{"get":{"summary":"Plans Index","operationId":"plans_index_plans_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/plans/{cert}":{"get":{"summary":"Plan Page","operationId":"plan_page_plans__cert__get","parameters":[{"name":"cert","in":"path","required":true,"schema":{"type":"string","title":"Cert"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/increases":{"get":{"summary":"Increases Page","operationId":"increases_page_increases_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/costs":{"get":{"summary":"Costs Index","operationId":"costs_index_costs_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/costs/{slug}":{"get":{"summary":"Cost Page","operationId":"cost_page_costs__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"}}}}}}},"/robots.txt":{"get":{"summary":"Robots","operationId":"robots_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/llms.txt":{"get":{"summary":"Llms","operationId":"llms_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap","operationId":"sitemap_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"BriefIn":{"properties":{"age":{"type":"integer","maximum":99.0,"minimum":0.0,"title":"Age"},"gender":{"type":"string","pattern":"^[MF]$","title":"Gender","default":"F"},"smoker":{"type":"boolean","title":"Smoker","default":false},"currency":{"type":"string","pattern":"^(HKD|USD)$","title":"Currency","default":"HKD"},"room":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Room"},"territory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Territory"},"budget_annual":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget Annual"},"max_deductible":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Deductible"},"needs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Needs"},"priority":{"type":"string","pattern":"^(price|balanced|coverage)$","title":"Priority","default":"balanced"},"years":{"type":"integer","maximum":30.0,"minimum":1.0,"title":"Years","default":10},"brands":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Brands"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":10}},"type":"object","required":["age"],"title":"BriefIn"},"ChatIn":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/Msg"},"type":"array","maxItems":40,"minItems":1,"title":"Messages"},"profile":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Profile"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale","default":"en"}},"type":"object","required":["messages"],"title":"ChatIn"},"CompareIn":{"properties":{"option_ids":{"items":{"type":"string"},"type":"array","maxItems":3,"minItems":2,"title":"Option Ids"},"age":{"type":"integer","maximum":99.0,"minimum":0.0,"title":"Age"},"gender":{"type":"string","pattern":"^[MF]$","title":"Gender","default":"F"},"smoker":{"type":"boolean","title":"Smoker","default":false}},"type":"object","required":["option_ids","age"],"title":"CompareIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LeadIn":{"properties":{"name":{"type":"string","maxLength":120,"title":"Name"},"phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Email"},"preferred_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Contact"},"option_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Option Id"},"profile":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Profile"},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Note"}},"type":"object","required":["name"],"title":"LeadIn"},"Msg":{"properties":{"role":{"type":"string","pattern":"^(user|assistant)$","title":"Role"},"content":{"type":"string","maxLength":4000,"title":"Content"}},"type":"object","required":["role","content"],"title":"Msg"},"NextYearIn":{"properties":{"option_id":{"type":"string","title":"Option Id"},"age":{"type":"integer","maximum":99.0,"minimum":0.0,"title":"Age"},"gender":{"type":"string","pattern":"^[MF]$","title":"Gender","default":"F"},"smoker":{"type":"boolean","title":"Smoker","default":false}},"type":"object","required":["option_id","age"],"title":"NextYearIn"},"QuoteIn":{"properties":{"age":{"type":"integer","maximum":80.0,"minimum":0.0,"title":"Age"},"gender":{"type":"string","pattern":"^[MF]$","title":"Gender"},"smoker":{"type":"boolean","title":"Smoker","default":false},"room":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Room"},"max_deductible":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Deductible"},"plan_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Type"},"insurers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Insurers"},"limit":{"type":"integer","maximum":500.0,"title":"Limit","default":200}},"type":"object","required":["age","gender"],"title":"QuoteIn"},"SendIn":{"properties":{"channel":{"type":"string","pattern":"^(whatsapp|email)$","title":"Channel"},"to":{"type":"string","maxLength":160,"title":"To"},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name","default":""},"consent":{"type":"boolean","title":"Consent","default":false},"profile":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Profile"},"options":{"items":{"type":"string"},"type":"array","maxItems":3,"minItems":1,"title":"Options"},"link":{"anyOf":[{"type":"string","maxLength":600},{"type":"null"}],"title":"Link"}},"type":"object","required":["channel","to","options"],"title":"SendIn"},"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"}}}}