Get the next question of the check
/v1/chatbot/questionThe chatbot collects information from Patients by a question–answer flow. This endpoint is used to get the next question of the check.
Usage examples
| URL | Purpose |
|---|---|
/v1/chatbot/question | Using this endpoint without any additional parameter is its most frequent use case. The endpoint without parameters returns the last unanswered question with all its optionItems. |
/v1/chatbot/question?optionTop=10 | The response question object will include only the top 10 optionItems. This parameter has no effect on the value of options.count in the response. |
/v1/chatbot/question?optionTop=10&optionSkip=10 | The response question object will include the optionItems 11 to 20. These parameters have no effect on the value of options.count in the response. |
/v1/chatbot/question?optionSearchTerm=tension%20headache | The response question object will only include optionItems matching the search term: "tension headache". |
Authorization
BearerToken Authenticate with a JWT bearer token obtained from the token endpoint with your Client Id and API key.
In: header
Query Parameters
If provided, only the top optionTop optionItem will be included
in the response. Can be used for paging and/or performance
optimization purposes. This parameter has no effect on the value
of options.count in the response.
If provided, the first optionSkip optionItem will not be included
in the response. Can be used for paging and/or performance
optimization purposes. This parameter has no effect on the value
of options.count in the response.
User-entered search text (localized). If provided, the optionItem list will include only the matching items. The resulting list of optionItems is sorted by relevancy. Space characters should be URL encoded. In some cases filtering happens by medical and not alphabetical logic, therefore the names or descriptions of results might not match the search term exactly.
By using this parameter, a recently asked question can be shown again.
Header Parameters
The ongoing check's identifier.
The expected language of the response.
Response Body
application/json
curl -X GET "https://example.com/v1/chatbot/question" \ -H "authorization: Bearer <token>" \ -H "check-id: 5e93d7a1-f240-43b5-8937-33419ea9cb6a" \ -H "language: en"{ "id": "fadc8892-a7b0-473c-a67d-e8e676f0551f", "text": "In which year were you born?", "isSkippable": false, "isAnswered": false, "type": "TEXT", "detailedType": "AGE", "checkStateInfo": { "detailedState": "AGE", "state": "PROFILE" }, "answerValidatorRegex": "^(19[0-9][0-9]|20[01][0-9]|202[0-2])$"}Last updated on