POST /v1/chatbot/answer
The chatbot is built mainly on question-answer flow. This endpoint can be used to answer the last asked question.
Request
Request header additional fields
Parameter name | Parameter type | Parameter description |
---|---|---|
| string | The ongoing check’s identifier |
Request body parameters
Parameter name | Parameter type | Parameter description |
---|---|---|
| string | id of the answered question |
| If the question is not skipped, the answer can be included in this object |
Examples
Response
Response Body data structure
Property name | Property type | Property description |
---|---|---|
| See the purpose of the type | |
| Deprecated. Use GET /v1/chatbot/question and FUNCTION question type instead. |
Example
The check is still in progress, the client app can request the next question
{
"checkStatus": "IN_PROGRESS"
}
QuestionType related behavior
TEXT: The question is expected not to have options. Send the answer value or skip the question (if the question is skippable) and the check moves on to the next question without any additional action
SINGLE_SELECT: The question is expected to have options. Send the id of the selected option, or a skip answer (if the question is skippable) and the check moves on to the next question without any additional action
INFO: The question is expected not to have options. The check moves on only if a skip answer is sent to this endpoint
EXTENDING: The question is expected to have options. If the patient selected an option, send the id of the selected option. After this action, the question should be requested again. Its options list will be expanded with new items. Patients can keep on selecting new options as long as they want, the question must be requested again after each selection. The selection loop can be finished by sending a skip answer. It’s required for the check flow to move on
FUNCTION: This endpoint can not be used for FUNCTION-type questions. The related function’s confirm endpoint must be used to continue the check