Invite Patient to Complete Questionnaire
Send an invitation to a patient to complete a specific questionnaire. The invitation can be sent via email or SMS and generates a secure token-based link that allows the patient to access and complete the questionnaire without requiring full authentication.
Sample Use Case: Re-invite Patients to Complete ID/Signature
A common scenario is when patients complete the main intake form but fail to complete the ID verification/signature portion. This endpoint allows you to send them directly to complete only that part.
How It Works
- Use the identification questionnaire ID:
identification-questionnaire - If the patient already has an incomplete ID questionnaire, the existing instance is reused
- The patient picks up where they left off—they do NOT need to redo the intake
Example
POST /ias/patients/patient_xyz789/inviteCompleteQuestionnaire
Content-Type: application/json
Authorization: Bearer <affiliate_token>
{
"questionnaire": "identification-questionnaire",
"orderId": "order_def456"
}Using External SMS Services
If you prefer to use your own SMS provider instead of the built-in SMS:
- Call the endpoint without
inviteTypeor with"email"to avoid triggering internal SMS - The response contains the questionnaire instance
- Use the link pattern with your external SMS service
Alternative: Use the Get Order Link endpoint to get a link for the entire order:
GET /ias/orders/{orderId}/actions/getOrderLink
Authorization: Bearer <affiliate_token>This returns a shortened link that takes the patient to complete all pending items on their order, including ID verification
Endpoint
URL: /ias/patients/:id/inviteCompleteQuestionnaire
Method: POST
Authentication: Required (Affiliate Token)
Content-Type: application/json
Authentication
Required Roles:
AFFILIATE_SUPER_ADMINAFFILIATE_ADMINAFFILIATE_AGENT
Request Parameters
URL Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | String | Yes | The patient ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
questionnaire | String | Yes | The ID of the questionnaire to complete |
orderId | String | No | Optional order ID to attach the questionnaire instance to |
expiryWeeks | Number | No | Number of weeks until the invitation expires (default: 52 weeks) |
inviteType | String | No | How to send the invitation: "email" (default) or "sms" |
Request Examples
Send Email Invitation
POST /ias/patients/patient_xyz789/inviteCompleteQuestionnaire
Content-Type: application/json
Authorization: Bearer <affiliate_token>
{
"questionnaire": "questionnaire_abc123",
"inviteType": "email"
}Send SMS Invitation
POST /ias/patients/patient_xyz789/inviteCompleteQuestionnaire
Content-Type: application/json
Authorization: Bearer <affiliate_token>
{
"questionnaire": "questionnaire_abc123",
"expiryWeeks": 2,
"inviteType": "sms"
}Attach Questionnaire to Order
POST /ias/patients/patient_xyz789/inviteCompleteQuestionnaire
Content-Type: application/json
Authorization: Bearer <affiliate_token>
{
"questionnaire": "questionnaire_abc123",
"orderId": "order_def456",
"inviteType": "email"
}Response
Success Response
Status Code: 200 OK
{
"id": "qi_abc123",
"patient": "patient_xyz789",
"questionnaire": {
"id": "questionnaire_abc123",
"title": "Health Assessment",
"description": "Initial health screening questionnaire"
},
"valid": false,
"expiresAt": "2025-12-19T00:00:00.000Z",
"createdAt": "2024-12-19T10:30:00.000Z"
}Response Fields
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier for the questionnaire instance |
patient | String | The patient ID |
questionnaire | Object | The questionnaire details |
questionnaire.title | String | Title of the questionnaire |
valid | Boolean | Whether the questionnaire has been completed |
expiresAt | String (ISO 8601) | Expiration date |
createdAt | String (ISO 8601) | Creation timestamp |
Error Responses
| Status | Message |
|---|---|
| 404 | Patient not found |
| 404 | Questionnaire not found |
| 401 | Authentication required |
| 500 | Internal server error |
Notes
- Idempotent: Calling multiple times resends the invitation but doesn't create duplicate instances
- Expiration: Default is 52 weeks; customize with
expiryWeeks - White Labeling: Links automatically use your custom domain if configured
Related Endpoints
| Endpoint | Method | Description |
|---|---|---|
/ias/patients/actions/verifyInviteCompleteQuestionnaireToken | GET | Verify invite token |
/ias/orders/:id/actions/getOrderLink | GET | Get order completion link |
/ias/orders/:id/actions/sendOrderLink | POST | Send order link via email/SMS |
Updated 18 days ago
