Awell Health Developer Hub
Dev Hub

Request

Mutation

01

Variables

01

Serialization

Given form responses are polymorphic, the answer value for a question should always be sent as a string. Values are validated and deserialized on the Awell side and we will throw an error if a value does not match the corresponding data point value type.

In the table below you can find an overview of all question types, their corresponding data point value type, and the value type you should be sending to the Awell API.

Question typeData point value typeValue type to sendExamples
DatedateISO8601 string"2023-01-01"
Numbernumberstring"10"
Short Textstringstring"Awell is great"
Long Textstringstring"A long story about why Awell is so great"
Multiple Choicenumber

string
(value of selected option)

"1"
Multiple Selectnumbers_array

string
(array of values of the selected options)

"[1, 2, 4]"


"['1', '2', '4']"

Slidernumberstring"50"
Yes/Noboolean

string
(we accept different values for booleans)

"true" | "false"
"t" | "f"
"yes" | "no"
"y" | "n"
"1" | "0"

Specifying the user

The optional X-User-ID header can be used to specify which user is submitting the form response. When this header is present, Awell Orchestration will log a subactivity indicating that this specific user filled in the form.

01

The following input fields are available:

FieldRequiredDescriptionType
activity_idYesthe id of the form activitystring
responseYesthe responses to questions in the formarray of response objects
response.question_idYes, for each response objectthe id of the question for this responsestring
response.valueYes, for each response object

the value of the response, corresponding to the question's data point value type

string

Errors

Missing Value for Required Question

When submitting a form response, if one or more required questions are left unanswered, the backend will return a GraphQL error. The error response will appear as follows:

01

The extensions field in the error object will provide details about the missing values. The unanswered questions are listed under extensions.data.data.

How to use