Traversal response
The below JSON object will be sent by the API while traversing through a product. For a detailed response containing actual data we have a full response sample.
{
"traversalId": Guid,
"algoId": int,
"nodes":[...],
"assessmentType": int,
"algoName":"string",
"errors":[
"string"
],
"previousDisabled":bool,
"nextDisabled":bool,
"language":"string"
}
TraversalId : Your unique traversal Identifier.
AlgoId : Identifier of the current algorithm.
AlgoName : The label given to the algorithm. This is made by the content creator.
AssessmentType : Identifier of the assessment.
Language
: Language of the content, e.g. EN, Dutch. Content must be translated in the AssetBuilder
before being released to the system.
Nodes
: An array of Nodes. More than one Node
indicates the content creator wishes you to see more than one set of questions at a time. If you opt to use the /api/v1/{tenantId}/ChatTraversals
endpoint, you will only ever see one node with one question at a time.
Errors
: This will describe any problems the system has faced while attempting to traverse the algorithm. This is likely to be, for example, a validation error when answering questions. Note: this will not be the same as an API error which would normally return a 4xx
or 5xx
response with no body.
PreviousDisabled
: PreviousDisabled=true
indicates that the algorithm has determined that the user should not be allowed to Revisit
a node/question.
NextDisabled
: NextDisabled=true
indicates that the algorithm has determined that the user should not be allowed to Respond
to this node/question. Unless, PreviousDisabled=false
the traversal should be considered to have come to an end.
This response will be sent for every endpoint in the following list:
GET /api/v1/{tenantId}/Traversals/{traversalId}
POST /api/v1/{tenantId}/Traversals
POST /api/v1/{tenantId}/Traversals/{traversalId}/respond
POST /api/v1/{tenantId}/Traversals/{traversalId}/revisit
GET /api/v1/{tenantId}/ChatTraversals/{traversalId}
POST /api/v1/{tenantId}/ChatTraversals
POST /api/v1/{tenantId}/ChatTraversals/{traversalId}/respond
POST /api/v1/{tenantId}/ChatTraversals/{traversalId}/revisit
Please see our Swagger or ReDoc documentation for endpoint details.
Full Response Sample
{
"traversalId":"xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx",
"algoId":4550,
"nodes":[
{
"nodeId":2,
"assetId":0,
"errors":[],
"displayText":null,
"title":null,
"explanation":null,
"data":null,
"questions":[
{
"nodeId":2,
"questionId":13045,
"displayText":"Welcome. Before we start, we need to know a few basic things...",
"title":null,
"answers":[
{
"nodeId":2,
"questionId":13045,
"answerId":7527,
"controlType":"Radio",
"controlValue":null,
"controlChecked":false,
"displayText":"Myself",
"explanation":"",
"data":{
"Properties":{
"Self":"True"
}
}
},
{
"nodeId":2,
"questionId":13045,
"answerId":7528,
"controlType":"Radio",
"controlValue":null,
"controlChecked":false,
"displayText":"Someone else",
"explanation":"",
"data":{
"Properties":{
"Self":"False"
}
}
}
],
"explanation":"",
"data":{}
}
],
"isTable":false
}
],
"assessmentType":0,
"algoName":"Age & Gender",
"errors":[],
"previousDisabled":true,
"nextDisabled":false,
"language":"EN"
}