API Reference
Complete API surface for the Lab Forms module — config, presets, CRUD, runtime data capture, history, consent, MIS export, and print endpoints
👤 Ritu Kataria📅 Updated: Mar 13, 2026🏷️ feature
API Reference
All endpoints are prefixed with api-v3/account/.
Form Config (Admin Setup)
Base path: api-v3/account/lab/form/<form_type>/
| Method | Path | View | Description |
|---|---|---|---|
| GET | configs | FetchLabFormConfigView | List all configs for lab & form type |
| GET | <config_id> | FetchLabFormConfigView | Get single config with subprocesses, questions, attributes |
| DELETE | configs | FetchLabFormConfigView | Invalidate config cache |
| POST | config/new | LabFormConfigView | Create new form config (process + subprocesses + questions) |
| PUT | config/<config_id>/update | LabFormConfigView | Update form config |
| PATCH | config/<config_id>/enable | EnableDisableLabFormConfig | Enable config |
| PATCH | config/<config_id>/disable | EnableDisableLabFormConfig | Disable config |
| POST | linked-instances/bulk | ProcessLinkedInstancesView | Bulk link processes to instances |
Presets (Global Templates)
Base path: api-v3/account/lab/form/<form_type>/
| Method | Path | View | Description |
|---|---|---|---|
| GET | presets | LabFormPresetView | List all presets |
| GET | preset/<config_id> | LabFormPresetView | Get single preset |
| POST | preset/new | LabFormPresetView | Create preset (restricted to allowed emails) |
| PUT | preset/<config_id>/update | LabFormPresetView | Update preset |
| PATCH | preset/<config_id>/enable | LabFormPresetView | Enable preset |
| PATCH | preset/<config_id>/disable | LabFormPresetView | Disable preset |
| DELETE | presets | LabFormPresetView | Invalidate preset cache |
Granular CRUD (Process / SubProcess / Question)
Base path: api-v3/account/<form_type>/
| Method | Path | Description |
|---|---|---|
| GET/POST | processes / processes/bulk | Fetch / Bulk create processes |
| GET/POST | subprocesses / subprocesses/bulk | Fetch / Bulk create subprocesses |
| GET/POST | questions / questions/bulk | Fetch / Bulk create questions |
| POST/PUT | process/new / process/<id>/update | Create / Update single process |
| PATCH | process/<id>/enable / process/<id>/disable | Enable / Disable process |
| POST | process/subprocess/bulk-link | Bulk link subprocesses to process |
| PUT | process/<id>/subprocess/link / process/<id>/subprocess/unlink | Link / Unlink subprocess |
| POST/PUT | question/new / question/<id>/update | Create / Update single question |
| PATCH | question/<id>/enable / question/<id>/disable | Enable / Disable question |
| POST/PUT | subprocess/new / subprocess/<id>/update | Create / Update single subprocess |
Question Values (Runtime Data Capture)
Base path: api-v3/account/<form_type>/
| Method | Path | Description |
|---|---|---|
| POST | questions/values/bulk | Bulk create question values (main sync endpoint) |
| POST | questions/values/bulk/guest | Guest (unauthenticated) bulk create |
| PUT | <bill_id>/questions/values/bulk/update | Bulk update question values (aoe only) |
| POST | questions/values/sync/failure | Log failed sync values to Elasticsearch |
| GET | <lab_id>/<bill_id>/question/values | Fetch question values for a bill |
Renderer Config
Base path: api-v3/account/<form_type>/
| Method | Path | Description |
|---|---|---|
| GET | renderer/config | Fetch form renderer configuration for the UI |
| GET | preset/renderer/config | Fetch preset renderer configuration |
| GET | renderer/values/default | Fetch default/prefilled values |
Lab Form History & Details
Base path: api-v3/account/lab/form/<form_type>/
| Method | Path | Description |
|---|---|---|
| GET | history/ | List lab forms within date range |
| GET | history/<lab_form_id> | Get lab form details with question values |
| GET | history/attachments/<lab_form_id> | Get attachments with download URLs |
| GET | bill/<bill_id>/responses | Get form responses for a specific bill |
Patient Consent Management
Base path: api-v3/account/patient-consent/
| Method | Path | Description |
|---|---|---|
| GET | <bill_id> | Get consent for a bill |
| POST | <bill_id>/new | Create new patient consent |
| PUT | <form_id>/link-process | Link additional consent processes |
| PUT | <form_id>/unlink-process | Unlink consent processes |
| POST | <form_id>/attachment | Add attachments |
| POST | <action>/notification/<form_id> | Send email notification |
| POST | <lab_form_id>/revoke | Revoke consent |
| POST | <bill_id>/add-test | Add consent for newly added tests |
MIS (Data Export)
Base path: api-v3/account/lab/form/<form_type>/
| Method | Path | Description |
|---|---|---|
| GET | values | Export question values for a date range (max 1 month) |
Print / PDF
Base path: api-v3/account/
| Method | Path | Description |
|---|---|---|
| GET | patient-consent/<form_id>/print | Render consent as HTML |
| GET | patient-consent/<form_id>/print/pdf | Render consent as PDF |
Additional Patient Info (Patient-Facing)
Base path: api-v3/patient/additional-patient-info/
| Method | Path | View | Description |
|---|---|---|---|
| GET | <patient_id> | FetchAdditionalPatientInfoView | Fetch raw question values as {process_id: {question_id: value}} |
| POST | <patient_id>/bulk-create | BulkCreateUdateAdditionalPatientInfoView | Bulk create answers for a patient |
| PUT | <patient_id>/bulk-update | BulkCreateUdateAdditionalPatientInfoView | Bulk update (or create new) answers |
| GET | <lab_id>/<patient_id> | FetchAdditionalPatientInfoDetailsView | Fetch detailed info with form structure, question attributes, pre-signed URLs (CSRF exempt) |
Additional Patient Info Settings (Admin)
Base path: api-v3/account/additional-patient-info/
| Method | Path | View | Description |
|---|---|---|---|
| GET | settings | FetchAdditionalPatientInfoSettingsView | Fetch all settings for the lab (grouped by page) |
| GET | <page>/settings | FetchAdditionalPatientInfoSettingsView | Fetch settings for a specific page |
| POST | settings/bulk-create | BulkCreateAdditionalPatientInfoSettingsView | Bulk create settings for multiple pages |
| POST | <page>/settings/bulk-create | BulkCreateAdditionalPatientInfoSettingsView | Bulk create settings for a specific page |
| PATCH | <page>/settings/<process_id>/enable | UpdateAdditionalPatientInfoSettingsView | Enable a setting |
| PATCH | <page>/settings/<process_id>/disable | UpdateAdditionalPatientInfoSettingsView | Disable a setting |
| PATCH | <page>/settings/<process_id>/set-default | UpdateAdditionalPatientInfoSettingsView | Set a process as default for a page |