Feedback
Feedback entries are linked to visits or patients when configured.
The feedback model
Properties
- Name
id- Type
- string
- Description
Feedback UUID.
- Name
rating- Type
- number
- Description
Score when applicable.
- Name
comment- Type
- string
- Description
Free-text feedback.
GET/api/feedback
List feedback
Paginated feedback list.
Request
GET
/api/feedbackcurl -X GET http://localhost:3000/api/feedback \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "RESPONDED",
"sentDate": "2026-10-05T06:30:00.000Z",
"respondedAt": "2026-10-05T06:30:00.000Z",
"patient": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"patientName": "Ahmad bin Ali"
},
"template": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Post-visit survey"
}
}
],
"pagination": {
"page": 1,
"pageSize": 20,
"total": 1,
"totalPages": 1
}
}
GET/api/feedback/stats
Feedback stats
Aggregated ratings.
Request
GET
/api/feedback/statscurl -X GET http://localhost:3000/api/feedback/stats \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"averageRating": 4.6,
"responseRate": 0.72,
"totalSent": 50,
"totalResponded": 36
}
GET/api/feedback/:id
Retrieve feedback
Single feedback record.
Request
GET
/api/feedback/:idcurl -X GET http://localhost:3000/api/feedback/:id \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "RESPONDED",
"rating": 5,
"comment": "Short wait time and friendly staff."
}
DELETE/api/feedback/:id
Delete feedback
Remove feedback entry.
Request
DELETE
/api/feedback/:idcurl -X DELETE http://localhost:3000/api/feedback/:id \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"deleted": true
}