Get an indication survey
GET
/prescription/survey/{lang}/{idIndicationSurvey}
const url = 'https://client-api.abi.ai/prescription/survey/en/42';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/en/42 \ --header 'Authorization: Bearer <token>'Retrieve the questions, choices, and exit logic for one indication survey in the requested language.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”lang
required
string
Example
enidIndicationSurvey
required
string
Indication-survey identifier returned by the survey list.
Example
42Responses
Section titled “Responses”The selected indication survey returned in the requested language, including its questions and choices.
Media typeapplication/json
object
id
string
category
string
isRefill
boolean
title
string
order
integer
questions
Localized survey questions and their available choices.
Array<object>
object
id
integer
title
string
description
string
type
string
displayPosition
string
isRequired
boolean
order
integer
choices
Array<object>
object
id
integer
text
string
indicationSurveyQuestionId
integer
isExitLogic
boolean
order
integer
Example
{ "id": "92", "category": "Digestive Health", "isRefill": false, "title": "Indigestion Survey", "order": 0, "questions": [ { "id": 610, "title": "Do you experience bloating after meals?", "description": "Tell us about your symptoms.", "type": "single_choice", "displayPosition": "vertical", "isRequired": true, "order": 1, "choices": [ { "id": 701, "text": "Yes", "indicationSurveyQuestionId": 610, "isExitLogic": false, "order": 1 } ] } ]}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"}