Create Patient Survey
This endpoint will create a survey for a patient
Request
PUT /accounts/{account-uuid}/patients/{patient-uuid}/surveys
account-uuid
is a 22-character identifier for the accountsurvey-uuid
is a 22-character identifier for the patient
Authorization
Authorization is required. Since this endpoint will be used from the Dashboard, nothing is needed from dashboard code, since the auth cookie is handled by the API
Headers
N/A
Query Parameters
N/A
Body
{
"surveyType": "<survey-type>",
"deliveryMethod": "<delivery-method>",
"sendInviteToPatientEmail": "<patient-email>",
"sendInviteToPatientPhone": "<patient-phone>"
}
surveyType
- What type of survey will be createdallergyBaseline
pediatricAllergyBaseline
snot22
asthmaControl
deliveryMethod
- How the survey will be delivered. Allowed options are:inClinic
sendInviteToPatient
sendInviteToPatientEmail
- The email to send the invitation to. Only allowed whendeliveryMethod
issendInviteToPatient
sendInviteToPatientPhone
- The phone to send the invitation to. Only allowed whendeliveryMethod
issendInviteToPatient
Response
Response | Status Code | More Information |
---|---|---|
Success | 201 |
If the response is successful |
Unauthorized | 401 |
If user is not authorized for the requested account/survey |
Not Found | 404 |
If the account or patient cannot be found |
Validation Error | 422 |
Validation error for user input |
Internal Server Error | 500 |
Unknown error |
Validation Error (422)
When a 422
validation error is returned, additional information will be returned that can be used in the user interface. For more details about validation errors see Validation Errors.
Headers
N/A
Body
{
"surveyUrl": "<survey-url>"
}