Get an indication survey answer template
GET
/prescription/survey/{idIndicationSurvey}/template
const url = 'https://client-api.abi.ai/prescription/survey/42/template';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://client-api.abi.ai/prescription/survey/42/template \ --header 'Authorization: Bearer <token>'Retrieve the answer structure for an indication survey. Use the returned identifiers when building the answers payload for validation and prescription submission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”idIndicationSurvey
required
string
Indication-survey identifier returned by the survey list.
Example
42Responses
Section titled “Responses”Answer template returned for the selected indication survey. Use it to construct and validate the answers payload.
Media typeapplication/json
object
id
string
template
Array<object>
object
id
Question identifier.
integer
answer
object
id
Allowed choice identifiers for a single-choice question.
Array<integer>
text
Empty-string template value for an open-ended question.
string
exitLogic
Choice identifier that ends the survey when selected.
integer
Example
{ "id": "20", "template": [ { "id": 1001, "answer": { "id": [ 121, 142 ], "exitLogic": 142 } } ]}Request could not be completed.
Media typeapplication/json
object
code
Short machine-readable error code.
string
message
Human-readable explanation of the error.
string
Examplegenerated
{ "code": "example", "message": "example"}