This endpoint allows users to submit feedback, optionally with an attachment.
curl -X POST "https://yourdomain.com/feedback/submit" \
-F "user_type=ANONYMOUS" \
-F "name=John Doe" \
-F "email=john.doe@example.com" \
-F "category=Bug Report" \
-F "subject=Login Issue" \
-F "message=Unable to login with valid credentials." \
-F "attachment=@/path/to/your/file.png"
{
"status": 1,
"message": "Feedback submitted and email sent successfully"
}
This endpoint retrieves a list of feedback entries with optional filters and pagination.
curl -X POST "https://yourdomain.com/feedback/list" \
-H "Content-Type: application/json" \
-d '{
"filters": {
"user_type": "STUDENT",
"category": "Bug Report",
"status": "New",
"search": "login"
},
"offset": 0,
"limit": 10
}'
{
"status": 1,
"totalRecords": 2,
"data": [
{
"feedback_id": "1",
"user_id": "2",
"user_type": "STUDENT",
"name": null,
"email": null,
"category": "Bug Report",
"subject": "Login Issue",
"message": "Unable to login with valid credentials.",
"attachment_url": "uploads/feedback/5f2b5c7e8a9a1.png",
"status": "New",
"created_at": "2024-09-17 10:15:30",
"updated_at": "2024-09-17 10:15:30"
},
{
"feedback_id": "2",
"user_id": "3",
"user_type": "STUDENT",
"name": null,
"email": null,
"category": "Bug Report",
"subject": "Error on Dashboard",
"message": "Seeing a 500 error when accessing the dashboard.",
"attachment_url": null,
"status": "New",
"created_at": "2024-09-18 09:20:10",
"updated_at": "2024-09-18 09:20:10"
}
],
"categories": ["Bug Report", "Feature Request", "General Feedback", "Other"],
"statuses": ["New", "In Progress", "Resolved", "Closed"],
"user_types": ["STAFF", "STUDENT", "PARENTS", "GUARDIAN", "ANONYMOUS"]
}
This endpoint retrieves details of a specific feedback entry by its ID.
curl -X POST "https://yourdomain.com/feedback/view" \
-H "Content-Type: application/json" \
-d '{
"feedback_id": 1
}'
{
"status": 1,
"data": {
"feedback_id": "1",
"user_id": "2",
"user_type": "STUDENT",
"name": null,
"email": null,
"category": "Bug Report",
"subject": "Login Issue",
"message": "Unable to login with valid credentials.",
"attachment_url": "uploads/feedback/5f2b5c7e8a9a1.png",
"status": "New",
"created_at": "2024-09-17 10:15:30",
"updated_at": "2024-09-17 10:15:30"
}
}
This endpoint deletes a specific feedback entry by its ID.
curl -X POST "https://yourdomain.com/feedback/delete" \
-H "Content-Type: application/json" \
-d '{
"feedback_id": 1
}'
{
"status": 1,
"message": "Feedback deleted successfully"
}
This endpoint updates the status of a specific feedback entry.
curl -X POST "https://yourdomain.com/feedback/update_status" \
-H "Content-Type: application/json" \
-d '{
"feedback_id": 1,
"status": "Resolved"
}'
{
"status": 1,
"message": "Feedback status updated successfully"
}
delete and update_status are protected and accessible only to authorized users.attachment field in the Submit Feedback endpoint accepts image files (JPEG, PNG, GIF), PDFs, and plain text files up to 5MB in size.status field indicating success (1) or failure (-1), along with a descriptive message.