Questionnaires
Manage the intake questionnaires patients fill out for your organisation: list and inspect existing questionnaires, create new ones, update their metadata, and update the SurveyJS model/theme that renders the questionnaire itself.This endpoint set covers questionnaire metadata and the SurveyJS model only. Authoring
features like files, CSS snippets, archiving, duplication, and product-recommendation
mappings are managed in the Admin Tool, not through this API.
List Questionnaires
integer
default:"0"
Page number (0-indexed). Ignored when
all=true.integer
default:"25"
Number of questionnaires per page. Ignored when
all=true.string
default:""
Filter by identifier substring (case-insensitive)
boolean
default:"false"
Return archived (
true) or non-archived (false) questionnairesboolean
default:"false"
Return the complete result set without pagination
questionnaire:read
Example Request
Response
List items omitmodel, mapping, theme, meta_data, and url — use Get a Questionnaire to read those.
Response Fields
Get a Questionnaire
string
required
The questionnaire UID
questionnaire:read
Example Request
Response
Includes the SurveyJSmodel/theme plus every relationship the record carries. These are
raw linkage arrays from the underlying data model rather than a curated public shape, so
expect UIDs (not nested objects) and — for a questionnaire with real usage — potentially long
arrays; they are typically empty only for a questionnaire created and managed solely through
this API:
Response Fields
The Admin Tool’s questionnaire authoring features (custom CSS, file assets, archiving,
duplication) are not exposed by this API; the arrays above only reflect the linkages,
not those authoring actions.
Error Responses
Create a Questionnaire
questionnaire:write
string
required
Questionnaire identifier
string
required
Questionnaire type (e.g.
PRODUCT_RECOMMENDER, DIRECT_TO_CART)Example Request
Response
Returns201 with the created questionnaire, in the same shape as
Get a Questionnaire. model, mapping, theme, and meta_data
are null until set via Update Questionnaire Model.
Error Responses
Update Questionnaire Metadata
questionnaire:write
string
required
The questionnaire UID
string
New identifier
string
New questionnaire type
boolean
Whether submissions are also stored on the patient profile
array
Internal answer-to-attribute mapping (array of objects, or
null).Example Request
Response
Returns200 with the updated questionnaire, in the same shape as
Get a Questionnaire.
Error Responses
Update Questionnaire Model
questionnaire:write
string
required
The questionnaire UID
object
required
The complete SurveyJS questionnaire model to publish.
object
Complete SurveyJS theme. Omit it to keep the current theme.
Example Request
Response
Returns200 with uid, model, and theme only.
Error Responses
Questionnaire Submission Statistics
For organisation-wide statistics (order/prescription volume, doctor and product counts,
submissions across all questionnaires), see Statistics.
statistics:read
string
required
The questionnaire UID
string
Start of the date range (ISO 8601). Defaults to 30 days before
end_date.string
End of the date range (ISO 8601). Defaults to now.
Defaults to the last 31 days (today and the previous 30 days) when no date range is
given. The range between
start_date and end_date may not exceed 30 days.Example Request
Response
Every day in the range is included, with0 for days with no submissions: