{"swagger": "2.0", "info": {"title": "HealthPilot API", "description": "HealthPilot backend — AI-powered health companion.", "contact": {"email": "spyxmeni@gmail.com"}, "license": {"name": "Proprietary"}, "version": "v1"}, "basePath": "/api/v1", "consumes": ["application/json"], "produces": ["application/json"], "securityDefinitions": {"Bearer": {"type": "apiKey", "name": "Authorization", "in": "header", "description": "Enter: Bearer <your_access_token>"}}, "security": [{"Bearer": []}], "paths": {"/ads/": {"get": {"operationId": "ads_list", "description": "GET /api/v1/ads/ — returns one random live ad for the mid-page slot.", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["ads"]}, "parameters": []}, "/ads/{id}/click/": {"post": {"operationId": "ads_click_create", "description": "POST /api/v1/ads/<id>/click/ — record a click.", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["ads"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/articles/": {"get": {"operationId": "articles_list", "description": "Public feed — guests can read articles.", "parameters": [{"name": "source", "in": "query", "description": "source", "required": false, "type": "string", "enum": ["who", "cdc", "webmd", "nhs", "mayo", "healthline", "other"]}, {"name": "categories__slug", "in": "query", "description": "categories__slug", "required": false, "type": "string"}, {"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/ArticleList"}}}}}}, "tags": ["articles"]}, "parameters": []}, "/articles/bookmarks/": {"get": {"operationId": "articles_bookmarks_list", "description": "GET /api/v1/articles/bookmarks/ — user's saved articles.", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/ArticleList"}}}}}}, "tags": ["articles"]}, "parameters": []}, "/articles/recommended/": {"get": {"operationId": "articles_recommended_list", "description": "Personalised article feed for the current user.\nTriggers recommendation generation if user has < 5 pending recs.", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/RecommendedArticle"}}}}}}, "tags": ["articles"]}, "parameters": []}, "/articles/{id}/": {"get": {"operationId": "articles_read", "description": "Public — guests can read full articles.", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/ArticleDetail"}}}, "tags": ["articles"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/articles/{id}/bookmark/": {"post": {"operationId": "articles_bookmark_create", "description": "POST /api/v1/articles/<id>/bookmark/ — toggle bookmark.", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["articles"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/articles/{id}/comments/": {"get": {"operationId": "articles_comments_list", "description": "GET/POST /api/v1/articles/<id>/comments/", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Comment"}}}}}}, "tags": ["articles"]}, "post": {"operationId": "articles_comments_create", "description": "GET/POST /api/v1/articles/<id>/comments/", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Comment"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Comment"}}}, "tags": ["articles"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/articles/{id}/like/": {"post": {"operationId": "articles_like_create", "description": "POST /api/v1/articles/<id>/like/ — toggle like.", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["articles"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/assessments/": {"get": {"operationId": "assessments_list", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["assessments"]}, "post": {"operationId": "assessments_create", "description": "", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["assessments"]}, "parameters": []}, "/assessments/guest/": {"post": {"operationId": "assessments_guest_create", "description": "POST /api/v1/assessments/guest/\nAccepts Flutter's 7-field schema. Result returned but NOT saved.", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["assessments"]}, "parameters": []}, "/assessments/{id}/": {"get": {"operationId": "assessments_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Assessment"}}}, "tags": ["assessments"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/auth/activate/": {"post": {"operationId": "auth_activate_create", "description": "POST /api/v1/auth/activate/", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["auth"]}, "parameters": []}, "/auth/guest/": {"post": {"operationId": "auth_guest_create", "description": "POST /api/v1/auth/guest/\nNo body required.  Creates an anonymous guest account and returns tokens.\nGuest accounts have limited feature access (enforced by IsVerifiedUser permission).", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["auth"]}, "parameters": []}, "/auth/login/": {"post": {"operationId": "auth_login_create", "description": "POST /api/v1/auth/login/", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["auth"]}, "parameters": []}, "/auth/logout/": {"post": {"operationId": "auth_logout_create", "description": "POST /api/v1/auth/logout/", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["auth"]}, "parameters": []}, "/auth/me/": {"get": {"operationId": "auth_me_list", "description": "GET  /api/v1/auth/me/   — return current user profile\nPATCH /api/v1/auth/me/  — update current user profile", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["auth"]}, "patch": {"operationId": "auth_me_partial_update", "description": "GET  /api/v1/auth/me/   — return current user profile\nPATCH /api/v1/auth/me/  — update current user profile", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["auth"]}, "parameters": []}, "/auth/me/delete/": {"delete": {"operationId": "auth_me_delete_delete", "description": "DELETE /api/v1/auth/me/\nSoft-deletes the account (sets deleted_at, is_active=False).\nAlso blacklists the provided refresh token.", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["auth"]}, "parameters": []}, "/auth/password/change/": {"post": {"operationId": "auth_password_change_create", "description": "POST /api/v1/auth/password/change/\nRequires authentication.", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["auth"]}, "parameters": []}, "/auth/password/reset/": {"post": {"operationId": "auth_password_reset_create", "description": "POST /api/v1/auth/password/reset/", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["auth"]}, "parameters": []}, "/auth/password/reset/confirm/": {"post": {"operationId": "auth_password_reset_confirm_create", "description": "POST /api/v1/auth/password/reset/confirm/", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["auth"]}, "parameters": []}, "/auth/register/": {"post": {"operationId": "auth_register_create", "description": "POST /api/v1/auth/register/\nCreates an inactive user and sends activation email.", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["auth"]}, "parameters": []}, "/auth/resend-activation/": {"post": {"operationId": "auth_resend-activation_create", "description": "POST /api/v1/auth/resend-activation/", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["auth"]}, "parameters": []}, "/auth/token/refresh/": {"post": {"operationId": "auth_token_refresh_create", "description": "POST /api/v1/auth/token/refresh/", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/TokenRefresh"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/TokenRefresh"}}}, "tags": ["auth"]}, "parameters": []}, "/chat/ai/": {"post": {"operationId": "chat_ai_create", "description": "", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["chat"]}, "parameters": []}, "/chat/ai/history/": {"get": {"operationId": "chat_ai_history_list", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["chat"]}, "delete": {"operationId": "chat_ai_history_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["chat"]}, "parameters": []}, "/chat/direct/{id}/messages/": {"get": {"operationId": "chat_direct_messages_list", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Message"}}}}}}, "tags": ["chat"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/chat/groups/": {"get": {"operationId": "chat_groups_list", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["chat"]}, "post": {"operationId": "chat_groups_create", "description": "", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["chat"]}, "parameters": []}, "/chat/groups/{id}/": {"get": {"operationId": "chat_groups_read", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Message"}}}}}}, "tags": ["chat"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/chat/groups/{id}/join/": {"post": {"operationId": "chat_groups_join_create", "description": "", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["chat"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/chat/groups/{id}/leave/": {"post": {"operationId": "chat_groups_leave_create", "description": "", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["chat"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/chat/groups/{id}/messages/": {"get": {"operationId": "chat_groups_messages_list", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Message"}}}}}}, "tags": ["chat"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/chat/messages/": {"post": {"operationId": "chat_messages_create", "description": "", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["chat"]}, "parameters": []}, "/chat/private/": {"get": {"operationId": "chat_private_list", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["chat"]}, "post": {"operationId": "chat_private_create", "description": "", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["chat"]}, "parameters": []}, "/chat/private/{id}/messages/": {"get": {"operationId": "chat_private_messages_list", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Message"}}}}}}, "tags": ["chat"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/chat/users/": {"get": {"operationId": "chat_users_list", "description": "GET /api/v1/chat/users/\nFlutter uses this to list users available for direct messaging.\nReturns users who are connected peers (accepted PeerConnection).", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["chat"]}, "parameters": []}, "/community/groups/": {"get": {"operationId": "community_groups_list", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["community"]}, "post": {"operationId": "community_groups_create", "description": "", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["community"]}, "parameters": []}, "/community/groups/{id}/": {"get": {"operationId": "community_groups_read", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["community"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/community/groups/{id}/join/": {"post": {"operationId": "community_groups_join_create", "description": "", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["community"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/community/groups/{id}/leave/": {"post": {"operationId": "community_groups_leave_create", "description": "", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["community"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/community/peers/connect/": {"post": {"operationId": "community_peers_connect_create", "description": "POST — send a connection request to another user.", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["community"]}, "parameters": []}, "/community/peers/connections/": {"get": {"operationId": "community_peers_connections_list", "description": "GET — list my accepted peer connections.", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/PeerConnection"}}}}}}, "tags": ["community"]}, "parameters": []}, "/community/peers/suggested/": {"get": {"operationId": "community_peers_suggested_list", "description": "Returns peer match suggestions based on health profile + symptoms.", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["community"]}, "parameters": []}, "/community/peers/{id}/": {"patch": {"operationId": "community_peers_partial_update", "description": "PATCH — accept, decline, or block a connection.", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["community"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/health/dashboard/": {"get": {"operationId": "health_dashboard_list", "description": "GET /api/v1/health/dashboard/\nReturns a 7-day and 30-day summary of the user's health data.\nThis is the main data source for the Health tab home screen.", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["health"]}, "parameters": []}, "/health/goals/": {"get": {"operationId": "health_goals_list", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/HealthGoal"}}}}}}, "tags": ["health"]}, "post": {"operationId": "health_goals_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/HealthGoal"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/HealthGoal"}}}, "tags": ["health"]}, "parameters": []}, "/health/goals/{id}/": {"get": {"operationId": "health_goals_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/HealthGoal"}}}, "tags": ["health"]}, "put": {"operationId": "health_goals_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/HealthGoal"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/HealthGoal"}}}, "tags": ["health"]}, "patch": {"operationId": "health_goals_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/HealthGoal"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/HealthGoal"}}}, "tags": ["health"]}, "delete": {"operationId": "health_goals_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["health"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/health/summaries/": {"get": {"operationId": "health_summaries_list", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/HealthSummary"}}}}}}, "tags": ["health"]}, "parameters": []}, "/health/summaries/latest/": {"get": {"operationId": "health_summaries_latest_list", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["health"]}, "parameters": []}, "/health/symptoms/": {"get": {"operationId": "health_symptoms_list", "description": "", "parameters": [{"name": "severity", "in": "query", "description": "severity", "required": false, "type": "string"}, {"name": "body_location", "in": "query", "description": "body_location", "required": false, "type": "string", "enum": ["head", "neck", "chest", "abdomen", "back", "left_arm", "right_arm", "left_leg", "right_leg", "whole_body", "other"]}, {"name": "frequency", "in": "query", "description": "frequency", "required": false, "type": "string", "enum": ["constant", "intermittent", "occasional", "first_time"]}, {"name": "is_recurring", "in": "query", "description": "is_recurring", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/SymptomLogList"}}}}}}, "tags": ["health"]}, "post": {"operationId": "health_symptoms_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/SymptomLog"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/SymptomLog"}}}, "tags": ["health"]}, "parameters": []}, "/health/symptoms/{id}/": {"get": {"operationId": "health_symptoms_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/SymptomLog"}}}, "tags": ["health"]}, "delete": {"operationId": "health_symptoms_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["health"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/health/vitals/": {"get": {"operationId": "health_vitals_list", "description": "", "parameters": [{"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/VitalLogList"}}}}}}, "tags": ["health"]}, "post": {"operationId": "health_vitals_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/VitalLog"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/VitalLog"}}}, "tags": ["health"]}, "parameters": []}, "/health/vitals/{id}/": {"get": {"operationId": "health_vitals_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/VitalLog"}}}, "tags": ["health"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/medications/": {"get": {"operationId": "medications_list", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/MedicationList"}}}}}}, "tags": ["medications"]}, "post": {"operationId": "medications_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Medication"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Medication"}}}, "tags": ["medications"]}, "parameters": []}, "/medications/{id}/": {"get": {"operationId": "medications_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Medication"}}}, "tags": ["medications"]}, "put": {"operationId": "medications_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Medication"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Medication"}}}, "tags": ["medications"]}, "patch": {"operationId": "medications_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Medication"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Medication"}}}, "tags": ["medications"]}, "delete": {"operationId": "medications_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["medications"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/medications/{id}/doses/": {"get": {"operationId": "medications_doses_list", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/MedicationDose"}}}}}}, "tags": ["medications"]}, "post": {"operationId": "medications_doses_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/MedicationDose"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/MedicationDose"}}}, "tags": ["medications"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/medications/{id}/reminders/": {"get": {"operationId": "medications_reminders_list", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"type": "array", "items": {"$ref": "#/definitions/MedicationReminder"}}}}, "tags": ["medications"]}, "post": {"operationId": "medications_reminders_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/MedicationReminder"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/MedicationReminder"}}}, "tags": ["medications"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/medications/{id}/reminders/{rid}/": {"patch": {"operationId": "medications_reminders_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/MedicationReminder"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/MedicationReminder"}}}, "tags": ["medications"]}, "delete": {"operationId": "medications_reminders_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["medications"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}, {"name": "rid", "in": "path", "required": true, "type": "string"}]}, "/notifications/": {"get": {"operationId": "notifications_list", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Notification"}}}}}}, "tags": ["notifications"]}, "parameters": []}, "/notifications/device/register/": {"post": {"operationId": "notifications_device_register_create", "description": "", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["notifications"]}, "parameters": []}, "/notifications/read/": {"post": {"operationId": "notifications_read_create", "description": "", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["notifications"]}, "parameters": []}, "/notifications/unread-count/": {"get": {"operationId": "notifications_unread-count_list", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["notifications"]}, "parameters": []}, "/nutrition/goals/": {"get": {"operationId": "nutrition_goals_list", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["nutrition"]}, "patch": {"operationId": "nutrition_goals_partial_update", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["nutrition"]}, "parameters": []}, "/nutrition/history/": {"get": {"operationId": "nutrition_history_list", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/MealLog"}}}}}}, "tags": ["nutrition"]}, "post": {"operationId": "nutrition_history_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/MealLog"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/MealLog"}}}, "tags": ["nutrition"]}, "parameters": []}, "/nutrition/meals/": {"get": {"operationId": "nutrition_meals_list", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/MealLog"}}}}}}, "tags": ["nutrition"]}, "post": {"operationId": "nutrition_meals_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/MealLog"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/MealLog"}}}, "tags": ["nutrition"]}, "parameters": []}, "/nutrition/search/": {"get": {"operationId": "nutrition_search_list", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/FoodItem"}}}}}}, "tags": ["nutrition"]}, "parameters": []}, "/nutrition/settings/": {"get": {"operationId": "nutrition_settings_list", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["nutrition"]}, "patch": {"operationId": "nutrition_settings_partial_update", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["nutrition"]}, "parameters": []}, "/nutrition/summary/": {"get": {"operationId": "nutrition_summary_list", "description": "GET /api/v1/nutrition/summary/?date=YYYY-MM-DD — daily totals.", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["nutrition"]}, "parameters": []}, "/profile/doctors/": {"get": {"operationId": "profile_doctors_list", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/PersonalDoctor"}}}}}}, "tags": ["profile"]}, "post": {"operationId": "profile_doctors_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/PersonalDoctor"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/PersonalDoctor"}}}, "tags": ["profile"]}, "parameters": []}, "/profile/doctors/{id}/": {"get": {"operationId": "profile_doctors_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PersonalDoctor"}}}, "tags": ["profile"]}, "put": {"operationId": "profile_doctors_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/PersonalDoctor"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PersonalDoctor"}}}, "tags": ["profile"]}, "patch": {"operationId": "profile_doctors_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/PersonalDoctor"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/PersonalDoctor"}}}, "tags": ["profile"]}, "delete": {"operationId": "profile_doctors_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["profile"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/profile/emergency-contacts/": {"get": {"operationId": "profile_emergency-contacts_list", "description": "", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/EmergencyContact"}}}}}}, "tags": ["profile"]}, "post": {"operationId": "profile_emergency-contacts_create", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/EmergencyContact"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/EmergencyContact"}}}, "tags": ["profile"]}, "parameters": []}, "/profile/emergency-contacts/{id}/": {"get": {"operationId": "profile_emergency-contacts_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/EmergencyContact"}}}, "tags": ["profile"]}, "put": {"operationId": "profile_emergency-contacts_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/EmergencyContact"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/EmergencyContact"}}}, "tags": ["profile"]}, "patch": {"operationId": "profile_emergency-contacts_partial_update", "description": "", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/EmergencyContact"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/EmergencyContact"}}}, "tags": ["profile"]}, "delete": {"operationId": "profile_emergency-contacts_delete", "description": "", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["profile"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/profile/me/": {"get": {"operationId": "profile_me_list", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["profile"]}, "patch": {"operationId": "profile_me_partial_update", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["profile"]}, "parameters": []}, "/subscriptions/cancel/": {"post": {"operationId": "subscriptions_cancel_create", "description": "POST /api/v1/subscriptions/cancel/ — cancel premium, revert to free.", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["subscriptions"]}, "parameters": []}, "/subscriptions/payment/": {"post": {"operationId": "subscriptions_payment_create", "description": "POST /api/v1/subscriptions/payment/\nCreates a pending payment record. The mobile client then\nprocesses via the payment gateway and calls /confirm/ on success.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Payment"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Payment"}}}, "tags": ["subscriptions"]}, "parameters": []}, "/subscriptions/payment/confirm/": {"post": {"operationId": "subscriptions_payment_confirm_create", "description": "POST /api/v1/subscriptions/payment/confirm/\nCalled by the mobile app after the payment gateway confirms success.\nActivates premium membership.", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["subscriptions"]}, "parameters": []}, "/subscriptions/payment/history/": {"get": {"operationId": "subscriptions_payment_history_list", "description": "GET /api/v1/subscriptions/payment/history/", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Payment"}}}}}}, "tags": ["subscriptions"]}, "parameters": []}, "/subscriptions/plans/": {"get": {"operationId": "subscriptions_plans_list", "description": "GET /api/v1/subscriptions/plans/ — returns available plans.", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["subscriptions"]}, "parameters": []}, "/subscriptions/status/": {"get": {"operationId": "subscriptions_status_list", "description": "GET /api/v1/subscriptions/status/", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["subscriptions"]}, "parameters": []}, "/subscriptions/subscribe/{plan}/": {"post": {"operationId": "subscriptions_subscribe_create", "description": "POST /api/v1/subscriptions/subscribe/<plan>/\nFlutter sends this after user selects a plan.\nCreates a Payment record and returns client_secret for Stripe (if configured)\nor returns a manual confirm URL.", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["subscriptions"]}, "parameters": [{"name": "plan", "in": "path", "required": true, "type": "string"}]}}, "definitions": {"ArticleCategory": {"required": ["slug", "name"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "slug": {"title": "Slug", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", "maxLength": 50, "minLength": 1}, "name": {"title": "Name", "type": "string", "maxLength": 100, "minLength": 1}}}, "ArticleList": {"required": ["headline"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "headline": {"title": "Headline", "type": "string", "minLength": 1}, "summary": {"title": "Summary", "description": "Short summary (2-3 sentences) for card display", "type": "string"}, "author": {"title": "Author", "type": "string", "maxLength": 250}, "source": {"title": "Source", "type": "string", "enum": ["who", "cdc", "webmd", "nhs", "mayo", "healthline", "other"]}, "categories": {"type": "array", "items": {"$ref": "#/definitions/ArticleCategory"}, "readOnly": true}, "image_url": {"title": "Image url", "type": "string", "format": "uri", "maxLength": 1000}, "read_time_minutes": {"title": "Read time minutes", "type": "integer", "maximum": 32767, "minimum": 0}, "published_at": {"title": "Published at", "type": "string", "format": "date-time"}}}, "RecommendedArticle": {"type": "object", "properties": {"article": {"$ref": "#/definitions/ArticleList"}, "score": {"title": "Score", "description": "Relevance score 0.0-1.0", "type": "number"}, "reason": {"title": "Reason", "description": "e.g. 'Based on your diabetes diagnosis'", "type": "string", "maxLength": 300}, "seen": {"title": "Seen", "type": "boolean"}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}, "ArticleDetail": {"required": ["headline", "body", "link"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "headline": {"title": "Headline", "type": "string", "minLength": 1}, "body": {"title": "Body", "type": "string", "minLength": 1}, "summary": {"title": "Summary", "description": "Short summary (2-3 sentences) for card display", "type": "string"}, "author": {"title": "Author", "type": "string", "maxLength": 250}, "source": {"title": "Source", "type": "string", "enum": ["who", "cdc", "webmd", "nhs", "mayo", "healthline", "other"]}, "categories": {"type": "array", "items": {"$ref": "#/definitions/ArticleCategory"}, "readOnly": true}, "keywords": {"title": "Keywords", "type": "object"}, "link": {"title": "Link", "type": "string", "format": "uri", "maxLength": 1000, "minLength": 1}, "image_url": {"title": "Image url", "type": "string", "format": "uri", "maxLength": 1000}, "read_time_minutes": {"title": "Read time minutes", "type": "integer", "maximum": 32767, "minimum": 0}, "published_at": {"title": "Published at", "type": "string", "format": "date-time"}, "like_count": {"title": "Like count", "type": "string", "readOnly": true}, "comment_count": {"title": "Comment count", "type": "string", "readOnly": true}, "user_liked": {"title": "User liked", "type": "boolean", "readOnly": true}, "user_bookmarked": {"title": "User bookmarked", "type": "boolean", "readOnly": true}}}, "Comment": {"required": ["article"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "article": {"title": "Article", "type": "integer"}, "text": {"title": "Text", "type": "string"}, "parent": {"title": "Parent", "type": "integer", "x-nullable": true}, "author_name": {"title": "Author name", "type": "string", "readOnly": true}, "replies": {"type": "array", "items": {"type": "string"}, "readOnly": true}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}, "AssessmentResult": {"type": "object", "properties": {"possible_causes": {"title": "Possible causes", "type": "object", "readOnly": true}, "general_advice": {"title": "General advice", "type": "string", "readOnly": true, "minLength": 1}, "seek_emergency_care": {"title": "Seek emergency care", "description": "True if AI flagged this as a potential emergency", "type": "boolean", "readOnly": true}, "disclaimer": {"title": "Disclaimer", "type": "string", "readOnly": true, "minLength": 1}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}, "Assessment": {"required": ["symptoms"], "type": "object", "properties": {"id": {"title": "Id", "type": "string", "format": "uuid", "readOnly": true}, "subject": {"title": "Subject", "type": "string", "default": "myself", "minLength": 1}, "has_other_symptoms": {"title": "Has other symptoms", "type": "boolean", "default": false}, "symptoms_trend": {"title": "Symptoms trend", "type": "string", "default": "", "minLength": 1}, "for_whom": {"title": "For whom", "type": "string", "enum": ["myself", "someone"], "readOnly": true}, "for_whom_description": {"title": "For whom description", "type": "string", "maxLength": 200}, "symptoms": {"title": "Symptoms", "type": "object"}, "symptom_duration": {"title": "Symptom duration", "description": "e.g. '3 days', '2 weeks'", "type": "string", "maxLength": 100}, "severity": {"title": "Severity", "description": "Overall severity 1-10", "type": "integer", "maximum": 32767, "minimum": 0}, "blood_type": {"title": "Blood type", "type": "string", "maxLength": 3}, "allergies": {"title": "Allergies", "type": "string"}, "current_medications": {"title": "Current medications", "type": "string"}, "additional_notes": {"title": "Additional notes", "type": "string"}, "status": {"title": "Status", "type": "string", "enum": ["pending", "processing", "completed", "failed"], "readOnly": true}, "result": {"$ref": "#/definitions/AssessmentResult"}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}, "TokenRefresh": {"required": ["refresh"], "type": "object", "properties": {"refresh": {"title": "Refresh", "type": "string", "minLength": 1}, "access": {"title": "Access", "type": "string", "readOnly": true, "minLength": 1}}}, "Message": {"required": ["content"], "type": "object", "properties": {"id": {"title": "Id", "type": "string", "format": "uuid", "readOnly": true}, "sender_id": {"title": "Sender id", "type": "string", "readOnly": true}, "sender_name": {"title": "Sender name", "type": "string", "readOnly": true}, "content": {"title": "Content", "type": "string", "minLength": 1}, "timestamp": {"title": "Timestamp", "type": "string", "format": "date-time", "readOnly": true}, "is_deleted": {"title": "Is deleted", "type": "string", "readOnly": true}}}, "PeerUser": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "full_name": {"title": "Full name", "type": "string", "readOnly": true}, "age": {"title": "Age", "type": "string", "readOnly": true}, "gender": {"title": "Gender", "type": "string", "enum": ["M", "F", "O", "P"]}, "profile_picture": {"title": "Profile picture", "type": "string", "readOnly": true, "x-nullable": true, "format": "uri"}, "country": {"title": "Country", "type": "string", "maxLength": 100}}}, "PeerConnection": {"required": ["receiver_id"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "requester": {"$ref": "#/definitions/PeerUser"}, "receiver": {"$ref": "#/definitions/PeerUser"}, "receiver_id": {"title": "Receiver id", "type": "integer"}, "status": {"title": "Status", "type": "string", "enum": ["pending", "accepted", "declined", "blocked"], "readOnly": true}, "match_reason": {"title": "Match reason", "type": "string", "maxLength": 300}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}, "HealthGoal": {"required": ["goal_type", "target_value"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "goal_type": {"title": "Goal type", "type": "string", "enum": ["sleep", "steps", "water", "weight", "calories", "blood_sugar", "blood_pressure", "custom"]}, "target_value": {"title": "Target value", "type": "string", "format": "decimal"}, "unit": {"title": "Unit", "type": "string", "maxLength": 20}, "description": {"title": "Description", "type": "string", "maxLength": 300}, "is_active": {"title": "Is active", "type": "boolean"}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}, "updated_at": {"title": "Updated at", "type": "string", "format": "date-time", "readOnly": true}}}, "HealthSummary": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "summary": {"title": "Summary", "type": "string", "readOnly": true, "minLength": 1}, "confidence": {"title": "Confidence", "type": "string", "format": "decimal", "readOnly": true, "x-nullable": true}, "date": {"title": "Date", "type": "string", "format": "date", "readOnly": true}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}, "SymptomLogList": {"required": ["symptom_name", "severity"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "symptom_name": {"title": "Symptom name", "type": "string", "maxLength": 200, "minLength": 1}, "severity": {"title": "Severity", "description": "Severity from 1 (very mild) to 10 (unbearable)", "type": "integer", "maximum": 10, "minimum": 1}, "severity_label": {"title": "Severity label", "type": "string", "readOnly": true}, "body_location": {"title": "Body location", "type": "string", "enum": ["head", "neck", "chest", "abdomen", "back", "left_arm", "right_arm", "left_leg", "right_leg", "whole_body", "other"]}, "logged_at": {"title": "Logged at", "type": "string", "format": "date-time"}}}, "SymptomLog": {"required": ["symptom_name", "severity"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "symptom_name": {"title": "Symptom name", "type": "string", "maxLength": 200, "minLength": 1}, "description": {"title": "Description", "type": "string"}, "severity": {"title": "Severity", "description": "Severity from 1 (very mild) to 10 (unbearable)", "type": "integer", "maximum": 10, "minimum": 1}, "severity_label": {"title": "Severity label", "type": "string", "readOnly": true}, "body_location": {"title": "Body location", "type": "string", "enum": ["head", "neck", "chest", "abdomen", "back", "left_arm", "right_arm", "left_leg", "right_leg", "whole_body", "other"]}, "frequency": {"title": "Frequency", "type": "string", "enum": ["constant", "intermittent", "occasional", "first_time"]}, "is_recurring": {"title": "Is recurring", "type": "boolean"}, "duration_hours": {"title": "Duration hours", "type": "string", "format": "decimal", "x-nullable": true}, "logged_at": {"title": "Logged at", "type": "string", "format": "date-time"}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}, "VitalLogList": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "systolic_bp": {"title": "Systolic bp", "description": "Systolic blood pressure (mmHg)", "type": "integer", "maximum": 300, "minimum": 50, "x-nullable": true}, "diastolic_bp": {"title": "Diastolic bp", "description": "Diastolic blood pressure (mmHg)", "type": "integer", "maximum": 200, "minimum": 30, "x-nullable": true}, "bp_display": {"title": "Bp display", "type": "string", "readOnly": true}, "heart_rate": {"title": "Heart rate", "description": "Heart rate (bpm)", "type": "integer", "maximum": 300, "minimum": 20, "x-nullable": true}, "temperature_c": {"title": "Temperature c", "type": "string", "format": "decimal", "x-nullable": true}, "oxygen_saturation": {"title": "Oxygen saturation", "description": "SpO2 (%)", "type": "integer", "maximum": 100, "minimum": 50, "x-nullable": true}, "blood_glucose": {"title": "Blood glucose", "description": "Blood glucose (mmol/L)", "type": "string", "format": "decimal", "x-nullable": true}, "weight_kg": {"title": "Weight kg", "type": "string", "format": "decimal", "x-nullable": true}, "steps": {"title": "Steps", "type": "integer", "maximum": 2147483647, "minimum": 0, "x-nullable": true}, "measured_at": {"title": "Measured at", "type": "string", "format": "date-time"}}}, "VitalLog": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "systolic_bp": {"title": "Systolic bp", "description": "Systolic blood pressure (mmHg)", "type": "integer", "maximum": 300, "minimum": 50, "x-nullable": true}, "diastolic_bp": {"title": "Diastolic bp", "description": "Diastolic blood pressure (mmHg)", "type": "integer", "maximum": 200, "minimum": 30, "x-nullable": true}, "bp_display": {"title": "Bp display", "type": "string", "readOnly": true}, "heart_rate": {"title": "Heart rate", "description": "Heart rate (bpm)", "type": "integer", "maximum": 300, "minimum": 20, "x-nullable": true}, "temperature_c": {"title": "Temperature c", "type": "string", "format": "decimal", "x-nullable": true}, "oxygen_saturation": {"title": "Oxygen saturation", "description": "SpO2 (%)", "type": "integer", "maximum": 100, "minimum": 50, "x-nullable": true}, "blood_glucose": {"title": "Blood glucose", "description": "Blood glucose (mmol/L)", "type": "string", "format": "decimal", "x-nullable": true}, "weight_kg": {"title": "Weight kg", "type": "string", "format": "decimal", "x-nullable": true}, "steps": {"title": "Steps", "type": "integer", "maximum": 2147483647, "minimum": 0, "x-nullable": true}, "notes": {"title": "Notes", "type": "string"}, "measured_at": {"title": "Measured at", "type": "string", "format": "date-time"}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}, "MedicationList": {"required": ["medication_name"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "medication_name": {"title": "Medication name", "type": "string", "maxLength": 200, "minLength": 1}, "dosage_display": {"title": "Dosage display", "type": "string", "readOnly": true}, "doses_per_day": {"title": "Doses per day", "description": "How many doses per day", "type": "integer", "maximum": 32767, "minimum": 1}, "frequency": {"title": "Frequency", "type": "string", "enum": ["daily", "weekly", "monthly", "as_needed"]}, "start_date": {"title": "Start date", "type": "string", "format": "date"}, "end_date": {"title": "End date", "description": "Leave blank for ongoing medication", "type": "string", "format": "date", "x-nullable": true}, "is_active": {"title": "Is active", "type": "boolean"}, "is_ongoing": {"title": "Is ongoing", "type": "string", "readOnly": true}, "reminders_enabled": {"title": "Reminders enabled", "type": "boolean"}}}, "MedicationReminder": {"required": ["reminder_time"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "reminder_time": {"title": "Reminder time", "description": "Local time to send reminder", "type": "string"}, "days_of_week": {"title": "Days of week", "description": "List of day integers (0=Mon … 6=Sun). Empty = every day.", "type": "object"}, "is_active": {"title": "Is active", "type": "boolean"}}}, "Medication": {"required": ["medication_name", "dosage_amount"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "medication_name": {"title": "Medication name", "type": "string", "maxLength": 200, "minLength": 1}, "dosage_amount": {"title": "Dosage amount", "description": "Amount per dose", "type": "string", "format": "decimal"}, "dosage_unit": {"title": "Dosage unit", "type": "string", "enum": ["mg", "mcg", "ml", "g", "iu", "tabs", "caps", "drops", "other"]}, "doses_per_day": {"title": "Doses per day", "description": "How many doses per day", "type": "integer", "maximum": 32767, "minimum": 1}, "frequency": {"title": "Frequency", "type": "string", "enum": ["daily", "weekly", "monthly", "as_needed"]}, "instructions": {"title": "Instructions", "description": "e.g. Take with food, avoid alcohol", "type": "string"}, "start_date": {"title": "Start date", "type": "string", "format": "date"}, "end_date": {"title": "End date", "description": "Leave blank for ongoing medication", "type": "string", "format": "date", "x-nullable": true}, "is_active": {"title": "Is active", "type": "boolean"}, "reminders_enabled": {"title": "Reminders enabled", "type": "boolean"}, "dosage_display": {"title": "Dosage display", "type": "string", "readOnly": true}, "is_ongoing": {"title": "Is ongoing", "type": "string", "readOnly": true}, "reminders": {"type": "array", "items": {"$ref": "#/definitions/MedicationReminder"}, "readOnly": true}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}, "updated_at": {"title": "Updated at", "type": "string", "format": "date-time", "readOnly": true}}}, "MedicationDose": {"required": ["scheduled_at"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "medication": {"title": "Medication", "type": "integer", "readOnly": true}, "status": {"title": "Status", "type": "string", "enum": ["taken", "skipped", "late"]}, "scheduled_at": {"title": "Scheduled at", "type": "string", "format": "date-time"}, "taken_at": {"title": "Taken at", "type": "string", "format": "date-time", "x-nullable": true}, "notes": {"title": "Notes", "type": "string", "maxLength": 300}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}, "Notification": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "title": {"title": "Title", "type": "string", "readOnly": true, "minLength": 1}, "body": {"title": "Body", "type": "string", "readOnly": true, "minLength": 1}, "notif_type": {"title": "Notif type", "type": "string", "enum": ["medication", "article", "peer", "assessment", "system", "doctor_report"], "readOnly": true}, "data": {"title": "Data", "type": "object", "readOnly": true}, "is_read": {"title": "Is read", "type": "boolean", "readOnly": true}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}, "MealEntry": {"required": ["food_name", "quantity_g"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "food_name": {"title": "Food name", "type": "string", "maxLength": 200, "minLength": 1}, "quantity_g": {"title": "Quantity g", "type": "string", "format": "decimal"}, "calories": {"title": "Calories", "type": "string", "format": "decimal"}, "protein_g": {"title": "Protein g", "type": "string", "format": "decimal"}, "carbs_g": {"title": "Carbs g", "type": "string", "format": "decimal"}, "fat_g": {"title": "Fat g", "type": "string", "format": "decimal"}}}, "MealLog": {"required": ["entries"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "meal_type": {"title": "Meal type", "type": "string", "enum": ["breakfast", "lunch", "dinner", "snack", "other"]}, "notes": {"title": "Notes", "type": "string"}, "logged_at": {"title": "Logged at", "type": "string", "format": "date-time"}, "entries": {"type": "array", "items": {"$ref": "#/definitions/MealEntry"}}, "total_calories": {"title": "Total calories", "type": "number", "readOnly": true}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}, "FoodItem": {"required": ["name"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "name": {"title": "Name", "type": "string", "maxLength": 200, "minLength": 1}, "calories_per_100g": {"title": "Calories per 100g", "type": "string", "format": "decimal"}, "protein_g": {"title": "Protein g", "type": "string", "format": "decimal"}, "carbs_g": {"title": "Carbs g", "type": "string", "format": "decimal"}, "fat_g": {"title": "Fat g", "type": "string", "format": "decimal"}, "fiber_g": {"title": "Fiber g", "type": "string", "format": "decimal"}}}, "PersonalDoctor": {"required": ["first_name", "last_name", "email"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "first_name": {"title": "First name", "type": "string", "maxLength": 100, "minLength": 1}, "last_name": {"title": "Last name", "type": "string", "maxLength": 100, "minLength": 1}, "specialization": {"title": "Specialization", "type": "string", "enum": ["AN", "CA", "DE", "EN", "FA", "GA", "GE", "HA", "IM", "IMM", "NE", "NEU", "OB", "ON", "OP", "PA", "PD", "PS", "PU", "RA", "RH", "SU", "UR", "OTHER"]}, "email": {"title": "Email", "type": "string", "format": "email", "maxLength": 254, "minLength": 1}, "phone": {"title": "Phone", "type": "string", "maxLength": 25}, "sent_frequency": {"title": "Sent frequency", "type": "string", "enum": ["W", "BW", "M"]}, "is_active": {"title": "Is active", "type": "boolean"}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}, "EmergencyContact": {"required": ["first_name", "last_name", "relationship", "phone"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "first_name": {"title": "First name", "type": "string", "maxLength": 100, "minLength": 1}, "last_name": {"title": "Last name", "type": "string", "maxLength": 100, "minLength": 1}, "relationship": {"title": "Relationship", "type": "string", "enum": ["MOTHER", "FATHER", "PARENT", "BROTHER", "SISTER", "SON", "DAUGHTER", "CHILD", "FRIEND", "SPOUSE", "ASSISTANT", "MANAGER", "ROOMMATE", "DOCTOR", "OTHER"]}, "email": {"title": "Email", "type": "string", "format": "email", "maxLength": 254}, "phone": {"title": "Phone", "type": "string", "maxLength": 25, "minLength": 1}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}, "Payment": {"required": ["amount", "payment_method"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "amount": {"title": "Amount", "type": "string", "format": "decimal"}, "currency": {"title": "Currency", "type": "string", "maxLength": 3, "minLength": 1}, "payment_method": {"title": "Payment method", "type": "string", "enum": ["bank", "paypal", "credit_card", "stripe", "other"]}, "status": {"title": "Status", "type": "string", "enum": ["pending", "completed", "failed", "refunded"], "readOnly": true}, "external_ref": {"title": "External ref", "type": "string", "maxLength": 255}, "membership_days": {"title": "Membership days", "type": "integer", "maximum": 2147483647, "minimum": 0}, "created_at": {"title": "Created at", "type": "string", "format": "date-time", "readOnly": true}}}}}