doctorlink
  • Home
  • Authentication
  • Traversal API
    • Quickstart
    • Answer
    • Conclusion
    • Conclusion report
    • Injected History
    • Node
    • Postman
    • Question
    • Question summary
    • Revisiting questions
    • Traversal create
    • Traversal response
    • Members
  • Traversal Client

Revisiting questions

If you wish to allow your users to revisit a question or node, you may call the the revisit endpoint with the algoId and nodeId of the question you wish to go back to (these two properties are Required). However, if a response has been sent with previousDisabled: true, using previous or revisit endpoints should be disabled.

curl ".../api/v2/{tenantId}/Traversals/{traversalId}/revisit" \
  -X "POST" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json" -d '{
   "algoId": 4550,
   "nodeId": 2
}'

If you're using the ChatTraversals API, you will need to send the assetId of the question you wish to revisit. In this instance, the assetId is the questionId.

curl ".../api/v2/{tenantId}/ChatTraversals/{traversalId}/revisit" \
  -X "POST" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json" -d '{
   "algoId": 4550,
   "nodeId": 2,
   "assetId": 13045
}'

This will get you a standard Traversal Response of the node/question you asked for, assuming it is a valid request.

But you don't have to save all these details yourself! At any point in your journey, you can call the question summary endpoint.