Tasks
The clinic's shared to-do board.
| Method | Path | Permission |
|---|---|---|
GET | /api/tasks | task:read |
POST | /api/tasks | task:write |
PATCH | /api/tasks/{id} | task:write |
DELETE | /api/tasks/{id} | task:delete |
The task object
| Field | Type | Notes |
|---|---|---|
id | string | Assigned by the server |
title | string | Required. Max 200 characters |
assignee | string | Defaults to "Unassigned" |
assigneeRole | string | null | Department/role of the assignee |
due | string | Free text, defaults to "No due date" |
priority | enum | high | medium (default) | low |
patient | string | null | Linked patient, if any |
notes | string | null | Free text |
done | boolean | Completion state |
createdByName | string | Who created the task |
Examples
# Create
curl -b cookies.txt -X POST http://localhost:4000/api/tasks \
-H "Content-Type: application/json" \
-d '{
"title": "Call Hodan Warsame with lab results",
"assignee": "Dr. Amina Yusuf",
"due": "2026-06-12",
"priority": "high",
"patient": "Hodan Warsame"
}'
# PATCH accepts any subset of fields — e.g. just toggle done:
curl -b cookies.txt -X PATCH http://localhost:4000/api/tasks/TASK_ID \
-H "Content-Type: application/json" \
-d '{ "done": true }'PATCH is a partial update — send only the fields you're changing. Create returns
201; delete returns 204.