Conversation ID
Continuing a conversation across multiple API calls
Every response from the chat endpoint contains a unique Conversation ID.
This Conversation ID allows the Smart Symptom Checker to continue a conversation across multiple API calls and should be used as part of each request to the chat endpoint.
Example
Response
The following response from the Healthily API provides a message and single choice question, along with the conversation.id
of 43ecaca6-66ca-41c5-b295-badf702b90c2
{
"conversation": {
"id": "43ecaca6-66ca-41c5-b295-badf702b90c2",
"scenario": "consultation_routine",
"phase": "dynamic-buttons",
"available_commands": [
"STOP_CONVERSATION"
]
},
"question": {
"type": "generic",
"messages": [
{
"type": "generic",
"value_type": "TEXT",
"value": "What would help you most, John?",
"meta": {}
}
],
"mandatory": true,
"multiple": false,
"choices": [
{
"type": "generic",
"id": "assessment",
"label": "Assessment"
},
{
"type": "generic",
"id": "information",
"label": "Information"
}
]
},
"user": {
"name": "John",
"gender": "m",
"age": 33,
"year_of_birth": 1990,
"other": false,
"initial_symptom": "sore throat"
}
}
Request
When constructing the next request, it should contain the same conversation.id
of 43ecaca6-66ca-41c5-b295-badf702b90c2
{
"answer": {
"type": "generic",
"input": {
"include": ["information"],
"exclude": []
}
},
"conversation": {
"id": "43ecaca6-66ca-41c5-b295-badf702b90c2"
}
}
Updated almost 2 years ago
What’s Next