XUND
API ReferenceChatbot

Get multiple previously answered questions

GET/v1/chatbot/question/bulk

Use this endpoint to ask multiple questions that were answered before.

In case of losing locally stored data of previously answered questions, the user interface can be rebuilt by using this endpoint.

Usage examples

URLPurpose
/v1/chatbot/question/bulk?ids[]=7e184b14-70a9-4401-b17f-07e0bd0383baRequests the details of the question with the question id 7e184b14-70a9-4401-b17f-07e0bd0383ba
/v1/chatbot/question/bulk?ids[]=7e184b14-70a9-4401-b17f-07e0bd0383ba&ids[]=0185daaf-a95c-4d3d-bc0e-f055be5f8d89&ids[]=ce5b2bf5-5b7a-40ef-a497-a1383e4c47beRequests the details of the questions with the question ids 7e184b14-70a9-4401-b17f-07e0bd0383ba, 0185daaf-a95c-4d3d-bc0e-f055be5f8d89, ce5b2bf5-5b7a-40ef-a497-a1383e4c47be

Authorization

BearerToken
AuthorizationBearer <token>

Authenticate with a JWT bearer token obtained from the token endpoint with your Client Id and API key.

In: header

Query Parameters

ids[]*array<string>

Ids of the requested questions. Sent using array bracket notation (ids[]=<questionId> for each id), as shown in the usage examples.

Header Parameters

check-id*string

The ongoing check's identifier.

language*string

The expected language of the response.

Response Body

application/json

curl -X GET "https://example.com/v1/chatbot/question/bulk?ids%5B%5D=7e184b14-70a9-4401-b17f-07e0bd0383ba&ids%5B%5D=0185daaf-a95c-4d3d-bc0e-f055be5f8d89" \  -H "authorization: Bearer <token>" \  -H "check-id: 5e93d7a1-f240-43b5-8937-33419ea9cb6a" \  -H "language: en"
[  {    "id": "0d690b6d-3693-4a82-b9ee-584587b7cbad",    "text": "In which year were you born?",    "isSkippable": false,    "isAnswered": true,    "type": "TEXT",    "detailedType": "AGE",    "checkStateInfo": {      "detailedState": "AGE",      "state": "PROFILE"    },    "answerValidatorRegex": "^(19[0-9][0-9]|20[01][0-9]|202[0-1])$"  },  {    "id": "01ceb01f-24a7-4566-a5db-c762a7ed1bb8",    "text": "What is your biological gender?",    "isSkippable": false,    "isAnswered": true,    "type": "SINGLE_SELECT",    "detailedType": "GENDER",    "checkStateInfo": {      "detailedState": "GENDER",      "state": "PROFILE"    },    "options": {      "count": 2,      "values": [        {          "id": "b23eb6b5-fc24-4a49-bf7d-ab695c8f04a1",          "text": "Male",          "type": "SURVEY_ANSWER",          "isSelected": true        },        {          "id": "80e5d6f2-d486-45c7-8e3e-7e73e3dd0519",          "text": "Female",          "type": "SURVEY_ANSWER",          "isSelected": false        }      ]    }  },  {    "id": "bd88ab6b-8809-4c32-b8d6-e50d3d9ac618",    "text": "As a first step, we will identify the symptom that bothers you the most",    "isSkippable": true,    "isAnswered": true,    "type": "INFO",    "detailedType": "PROGRESS",    "checkStateInfo": {      "detailedState": "MAIN_SYMPTOM_INFO",      "state": "MAIN_SYMPTOM"    },    "detailedTypeData": {      "currentStep": 1,      "numberOfSteps": 3,      "progress": 0.15,      "title": "Main Symptom"    }  },  {    "id": "f629d545-fbd1-4b37-b6a2-e47eb3866f5c",    "text": "Does your skin also hurt or itch at the affected area?",    "isSkippable": true,    "isAnswered": true,    "type": "SINGLE_SELECT",    "detailedType": "SYMPTOM_SURVEY",    "checkStateInfo": {      "detailedState": "MAIN_SYMPTOM_SURVEY",      "state": "MAIN_SYMPTOM"    },    "detailedTypeData": {      "linkedSymptom": {        "id": "8c2a36c5-b071-4a49-845d-75c496950212",        "name": "Reddening of the skin"      },      "gender": "MALE"    },    "options": {      "count": 3,      "values": [        {          "id": "6ed0e164-c981-4733-a33d-9705ce513386",          "text": "Itchy",          "type": "SURVEY_ANSWER",          "isSelected": false        },        {          "id": "c63624bf-c520-452c-a4d4-57d4e6bc96e7",          "text": "Painful",          "type": "SURVEY_ANSWER",          "isSelected": false        },        {          "id": "f59610c3-3547-476a-a40e-75affe0618c3",          "text": "Neither of the two",          "type": "SURVEY_ANSWER",          "isSelected": false        }      ]    }  },  {    "id": "3070406c-8331-4429-a8a4-ef29b76a56c2",    "text": "Which other symptoms are you experiencing?",    "isSkippable": true,    "isAnswered": true,    "type": "EXTENDING",    "detailedType": "SYMPTOM_SUGGESTION",    "checkStateInfo": {      "detailedState": "SYMPTOM_SUGGESTION_1",      "state": "SYMPTOM_SUGGESTIONS"    },    "options": {      "count": 9,      "values": [        {          "id": "94057df2-51bb-46a1-88c8-07c9d69871c8",          "text": "Swelling of the skin",          "type": "SYMPTOM",          "shortDescription": "Superficial swelling of the skin",          "description": "Superficial swelling of the skin, which can be accompanied by itching and redness",          "isSelected": false        },        {          "id": "4bf98810-a8cb-4d10-80b2-a3c437dc825f",          "text": "Itching",          "type": "SYMPTOM",          "shortDescription": "Desire to scratch the skin",          "description": "A discomfort of the skin that triggers a desire to scratch or rub the affected area",          "isSelected": true        }      ]    }  }]

Last updated on