Skip to content

Get an indication survey answer template

GET
/prescription/survey/{idIndicationSurvey}/template
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.

idIndicationSurvey
required
string

Indication-survey identifier returned by the survey list.

Example
42

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"
}