---
updatedAt: 2026-07-13T15:03:01.000Z
agentTools:
  projectIndex: https://developer.livehealthily.com/llms.txt
---

# Get the latest state of the assessment

Get the latest state of the assessment

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Healthily API documentation",
    "version": "1.0.0-RC1"
  },
  "servers": [
    {
      "url": "https://portal.your.md",
      "description": "Production server url"
    },
    {
      "url": "http://localhost:8080",
      "description": "Local testing url"
    }
  ],
  "tags": [
    {
      "name": "Consultation",
      "description": "The Consultation API"
    }
  ],
  "paths": {
    "/api/v1/chat": {
      "get": {
        "tags": [
          "Consultation"
        ],
        "summary": "Get the latest state of the assessment",
        "description": "Get the latest state of the assessment",
        "operationId": "getLatestChatAssessment",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Bearer your-token"
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "your-api-key"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully returned the current state or last question",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - missing required parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Action": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "Action label",
            "example": "Call 999"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ActionType"
              },
              {
                "description": "Action type",
                "example": "PHONE_NUMBER"
              }
            ]
          },
          "value": {
            "type": "string",
            "description": "Action value, depends on action type. PHONE_NUMBER values are tel: URIs. Omitted entirely for RESTART actions.",
            "example": "tel:999"
          }
        },
        "description": "Action model"
      },
      "ActionType": {
        "type": "string",
        "enum": [
          "PHONE_NUMBER",
          "EMAIL",
          "URL",
          "RESTART"
        ]
      },
      "ChatResponse": {
        "required": [
          "conversation_details"
        ],
        "type": "object",
        "properties": {
          "conversation_details": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ConversationDetails"
              },
              {
                "description": "Various details about the conversation"
              }
            ]
          },
          "question": {
            "$ref": "#/components/schemas/Question"
          },
          "report": {
            "$ref": "#/components/schemas/PatientReport"
          }
        },
        "description": "Chat response"
      },
      "Choice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Internal id of question choice.",
            "example": "C0011849"
          },
          "text": {
            "type": "string",
            "description": "Choice text"
          },
          "symptom_definition": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Message"
              },
              {
                "description": "Optional plain-language definition of the symptom/conditionality behind this choice, to be shown as supporting/helper copy under the choice label. Reuses the standard message shape (value/type/format); render according to its format. Omitted entirely when the underlying symptom/conditionality has no definition."
              }
            ]
          }
        },
        "description": "Question choice"
      },
      "ConversationDetails": {
        "type": "object",
        "properties": {
          "step_back_possible": {
            "type": "boolean",
            "description": "Flag indicating if stepping back to previous question is allowed"
          },
          "report_possible": {
            "type": "boolean",
            "description": "Flag indicating if the final report generation is possible"
          },
          "scenario": {
            "type": "string",
            "description": "Scenario identifier for the conversation state"
          },
          "conversation_ended": {
            "type": "boolean",
            "description": "Marks the conversation as ended. When this is true, the client can only retrieve the last state. To start a new conversation, another login is needed."
          },
          "symptoms_summary": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SymptomsSummary"
              },
              {
                "description": "Lists of symptoms that are excluded, included and ignored during the consultation"
              }
            ]
          },
          "progress": {
            "$ref": "#/components/schemas/Progress"
          }
        },
        "description": "Conversation details"
      },
      "ErrorResponse": {
        "required": [
          "error",
          "message"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "description": "Basic error response"
      },
      "InformationArticle": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Article ID. Use Content API to get the full version of the article."
          },
          "name": {
            "type": "string",
            "description": "Article name"
          },
          "snippet": {
            "type": "string",
            "description": "Article snippet"
          },
          "image": {
            "type": "string",
            "description": "Image "
          },
          "reading_time_minutes": {
            "type": "integer",
            "description": "Article reading time in minutes",
            "format": "int32"
          }
        },
        "description": "Information report article. A reduced version of the article, to be displayed as information cards. Use the Content API to fetch the entire article."
      },
      "Message": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "Question message to be shown to the user.",
            "example": "Have you ever been diagnosed or suffer with any of the following?"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageTypeEnum"
              },
              {
                "description": "Type of message, hints at where it should be displayed, check MessageTypeEnum for possible values.",
                "example": "HEADER"
              }
            ]
          },
          "format": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageFormatEnum"
              },
              {
                "description": "Format of the message, check MessageFormatEnum for possible values",
                "example": "PLAIN_TEXT"
              }
            ]
          }
        },
        "description": "Question message"
      },
      "MessageFormatEnum": {
        "type": "string",
        "enum": [
          "PLAIN_TEXT",
          "HTML",
          "MARKDOWN"
        ]
      },
      "MessageTypeEnum": {
        "type": "string",
        "enum": [
          "HEADER",
          "PARAGRAPH",
          "INPUT_HINT",
          "BULLET_POINT",
          "OTHER"
        ]
      },
      "OverallOutcome": {
        "type": "object",
        "properties": {
          "subdomain_triage_level": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportTriageLevel"
              },
              {
                "description": "Primary triage level",
                "example": "Self care"
              }
            ]
          },
          "main_recommendation": {
            "type": "string",
            "description": "Overall recommendation",
            "example": "Recommended next step"
          },
          "main_service_recommendation": {
            "type": "string",
            "description": "Overall service recommendation",
            "example": "Self care"
          },
          "messages": {
            "type": "array",
            "description": "Messages regarding the overall outcome",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "action": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Action"
              },
              {
                "description": "Action associated with the overall outcome"
              }
            ]
          },
          "instructions": {
            "type": "array",
            "description": "Instructions to follow, usually shown when a `No outcome` report was generated, to help the user understand the tool better",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          }
        },
        "description": "Overall outcome"
      },
      "PatientReport": {
        "required": [
          "information_articles",
          "other_options",
          "overall_outcome",
          "subdomains_container",
          "summary"
        ],
        "type": "object",
        "properties": {
          "overall_outcome": {
            "$ref": "#/components/schemas/OverallOutcome"
          },
          "subdomains_container": {
            "$ref": "#/components/schemas/PatientReport.SubdomainsContainer"
          },
          "other_options": {
            "$ref": "#/components/schemas/PatientReport.OtherOptions"
          },
          "summary": {
            "$ref": "#/components/schemas/PatientReport.Summary"
          },
          "information_articles": {
            "$ref": "#/components/schemas/PatientReport.InformationArticles"
          },
          "disclaimer_messages": {
            "type": "array",
            "description": "A list of messages to be displayed at the bottom of the report page.",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          }
        },
        "description": "Report data"
      },
      "PatientReport.Content": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name"
          },
          "medical_name": {
            "type": "string",
            "description": "Full medical name"
          },
          "snippet": {
            "type": "string",
            "description": "Snippet, title"
          },
          "triage_messages": {
            "type": "array",
            "description": "Content triage section",
            "items": {
              "$ref": "#/components/schemas/PatientReport.TriageMessage"
            }
          }
        },
        "description": "Content of the next steps article"
      },
      "PatientReport.InformationArticles": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "description": "Ordered list of messages",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "information_articles": {
            "type": "array",
            "description": "List of articles relevant to your case",
            "items": {
              "$ref": "#/components/schemas/InformationArticle"
            }
          }
        },
        "description": "Information articles section"
      },
      "PatientReport.NextStepsArticle": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Next step article name"
          },
          "content": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PatientReport.Content"
              },
              {
                "description": "Next step article content"
              }
            ]
          },
          "information_article": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InformationArticle"
              },
              {
                "description": "Information about the parent article for this condition."
              }
            ]
          }
        },
        "description": "Next steps article"
      },
      "PatientReport.OptionCard": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "description": "Option card messages",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "action": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Action"
              },
              {
                "description": "Option card action, to be rendered as a button"
              }
            ]
          }
        },
        "description": "Summary data"
      },
      "PatientReport.OtherOptions": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "description": "Messages to display above the OptionCards",
            "example": "See alternatives below",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "options": {
            "type": "array",
            "description": "List of option cards to display",
            "items": {
              "$ref": "#/components/schemas/PatientReport.OptionCard"
            }
          }
        },
        "description": "Summary data"
      },
      "PatientReport.Subdomain": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "Subdomain label, to be shown in line with each subdomain",
            "example": "Most likely"
          },
          "cui": {
            "type": "string",
            "description": "Internal ID of the subdomain"
          },
          "name": {
            "type": "string",
            "description": "Subdomain name"
          },
          "subdomain_triage_level": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportTriageLevel"
              },
              {
                "description": "Triage level of the subdomain, is equal with the highest triage level from the attached conditions."
              }
            ]
          },
          "primary_service": {
            "type": "string",
            "description": "Primary service of the subdomain, is the matching service highest triage level attached condition."
          },
          "trigger_details": {
            "type": "array",
            "description": "Triggers details for the subdomain. Some subdomains may expose multiple triggers, while others will expose none.",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "conditions": {
            "type": "array",
            "description": "List of conditions attached to the subdomain",
            "items": {
              "$ref": "#/components/schemas/PatientReport.Subdomain.Condition"
            }
          }
        },
        "description": "Subdomain categories"
      },
      "PatientReport.Subdomain.Condition": {
        "required": [
          "article",
          "cui",
          "level",
          "name",
          "primary_service",
          "superdomain_cui",
          "superdomain_name",
          "trigger_details"
        ],
        "type": "object",
        "properties": {
          "cui": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "level": {
            "$ref": "#/components/schemas/ReportTriageLevel"
          },
          "primary_service": {
            "type": "string"
          },
          "trigger_details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "article": {
            "$ref": "#/components/schemas/PatientReport.NextStepsArticle"
          },
          "superdomain_cui": {
            "type": "string"
          },
          "superdomain_name": {
            "type": "string"
          }
        },
        "description": "Subdomain categories"
      },
      "PatientReport.SubdomainCategories": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "description": "Subdomain category messages",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "subdomain_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PatientReport.SubdomainTypeEnum"
              },
              {
                "description": "Type of this subdomain"
              }
            ]
          },
          "subdomain_category_color": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TriageLevelColor"
              },
              {
                "description": "Color hint for this subdomain"
              }
            ]
          },
          "subdomains": {
            "type": "array",
            "description": "Subdomain, applies to all subdomains in this category",
            "example": "Most likely",
            "items": {
              "$ref": "#/components/schemas/PatientReport.Subdomain"
            }
          }
        },
        "description": "Subdomain categories"
      },
      "PatientReport.SubdomainTypeEnum": {
        "type": "string",
        "enum": [
          "TO_RULE_OUT",
          "LIKELY",
          "ALSO_CONSIDERED"
        ]
      },
      "PatientReport.SubdomainsContainer": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "description": "Messages",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "subdomains_categories": {
            "type": "array",
            "description": "Ordered list of subdomains categories",
            "items": {
              "$ref": "#/components/schemas/PatientReport.SubdomainCategories"
            }
          }
        },
        "description": "Subdomains section"
      },
      "PatientReport.Summary": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "description": "Dropdown header for summary",
            "example": "What you told us",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "summary_containers": {
            "type": "array",
            "description": "Ordered list of summary items, each item has a header and a list of items",
            "items": {
              "$ref": "#/components/schemas/PatientReport.SummaryContainer"
            }
          }
        },
        "description": "Summary data, is a collection of patient submitted information and symptoms, for reference"
      },
      "PatientReport.SummaryContainer": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "Ordered list of items, recommended to show as bullet points",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          }
        },
        "description": "Container for the summary items"
      },
      "PatientReport.TriageMessage": {
        "required": [
          "messages"
        ],
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          }
        },
        "description": "Triage messages for article"
      },
      "Progress": {
        "required": [
          "percentage",
          "stage"
        ],
        "type": "object",
        "properties": {
          "stage": {
            "type": "string",
            "description": "Current stage of the assessment",
            "example": "Symptoms Assessment"
          },
          "percentage": {
            "type": "integer",
            "description": "Percentage completion of the assessment",
            "format": "int32",
            "example": 30
          }
        },
        "description": "Chat response progress"
      },
      "Question": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "choices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Choice"
            }
          },
          "constraints": {
            "$ref": "#/components/schemas/QuestionConstraints"
          }
        },
        "description": "Question"
      },
      "QuestionConstraints": {
        "type": "object",
        "properties": {
          "min_selections": {
            "maximum": 999,
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of choices to be selected.",
            "format": "int32",
            "nullable": true
          },
          "max_selections": {
            "maximum": 999,
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of choices to be selected.",
            "format": "int32",
            "nullable": true
          }
        },
        "description": "Question constraints"
      },
      "ReportTriageLevel": {
        "required": [
          "display_name",
          "triage_level_color"
        ],
        "type": "object",
        "properties": {
          "display_name": {
            "type": "string"
          },
          "triage_level_color": {
            "$ref": "#/components/schemas/TriageLevelColor"
          }
        },
        "description": "Report triage level"
      },
      "SymptomSummary": {
        "type": "object",
        "properties": {
          "cui": {
            "type": "string",
            "description": "Cui"
          },
          "name": {
            "type": "string",
            "description": "Name"
          }
        },
        "description": "Single symptom summary"
      },
      "SymptomsSummary": {
        "type": "object",
        "properties": {
          "selected": {
            "type": "array",
            "description": "Selected symptoms - by user",
            "items": {
              "$ref": "#/components/schemas/SymptomSummary"
            }
          },
          "excluded": {
            "type": "array",
            "description": "Excluded symptoms",
            "items": {
              "$ref": "#/components/schemas/SymptomSummary"
            }
          },
          "ignored": {
            "type": "array",
            "description": "Ignored symptoms",
            "items": {
              "$ref": "#/components/schemas/SymptomSummary"
            }
          }
        },
        "description": "SymptomsSummary"
      },
      "TriageLevelColor": {
        "type": "string",
        "enum": [
          "RED",
          "GREEN",
          "AMBER",
          "BLUE",
          "BLACK",
          "NONE"
        ]
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
```