Skip to main content

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.
Filter by identifier substring (case-insensitive)
boolean
default:"false"
Return archived (true) or non-archived (false) questionnaires
boolean
default:"false"
Return the complete result set without pagination
Required permission: questionnaire:read

Example Request

Response

List items omit model, mapping, theme, meta_data, and url — use Get a Questionnaire to read those.

Response Fields

Get a Questionnaire

string
required
The questionnaire UID
Required permission: questionnaire:read

Example Request

Response

Includes the SurveyJS model/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

Required permission: questionnaire:write
string
required
Questionnaire identifier
string
required
Questionnaire type (e.g. PRODUCT_RECOMMENDER, DIRECT_TO_CART)

Example Request

Response

Returns 201 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

Updates questionnaire metadata. All body fields are optional; send only the ones you want to change. The SurveyJS model and theme are not accepted here. Publish those with Update Questionnaire Model. Required permission: 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

Returns 200 with the updated questionnaire, in the same shape as Get a Questionnaire.

Error Responses

Update Questionnaire Model

Replaces the live SurveyJS model of a questionnaire owned by your organisation. The change is published immediately and any older autosaved draft is removed.
This endpoint changes the questionnaire shown to patients immediately. Send the complete SurveyJS model, not a partial patch.
Required permission: 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

Returns 200 with uid, model, and theme only.

Error Responses

Questionnaire Submission Statistics

Returns the number of submissions per day for a questionnaire.
For organisation-wide statistics (order/prescription volume, doctor and product counts, submissions across all questionnaires), see Statistics.
Required permission: 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, with 0 for days with no submissions:

Response Fields

Error Responses