/api/employee/Auth —
Authorization: Bearer {token} · user_type must be employeeScope — all data is filtered to the authenticated user only (
assigned_user_id = auth()->id())Dashboard
KPI summary for the logged-in employee. Returns personal assignment count and open task count.
{
"success": true,
"msg": "Dashboard",
"data": {
"assignment_count": 2,
"open_task_count": 5,
"welcome_message": "Employee portal dashboard"
}
}Tasks
Paginated list of tasks assigned to this employee, newest first.
| Param | Description |
|---|---|
| per_page | Default 20 |
{
"success": true,
"msg": "Tasks",
"data": [
{
"id": 3,
"business_id": 1,
"project_id": 4,
"project_name": "Block A",
"assigned_user_id": 7,
"title": "Inspect column formwork — Grid B",
"description": "Check alignment and plumb before concrete pour",
"status": "pending",
"priority": "high",
"due_date": "2026-06-25"
},
{
"id": 2,
"business_id": 1,
"project_id": 4,
"project_name": "Block A",
"assigned_user_id": 7,
"title": "Submit rebar delivery sign-off",
"description": "",
"status": "completed",
"priority": "normal",
"due_date": "2026-06-20"
}
],
"pagination": {"current_page": 1, "per_page": 20, "total": 5, "last_page": 1}
}Time Clock
All clock entries for this employee ordered by clock_in_at descending.
{
"success": true,
"msg": "Clock entries",
"data": [
{
"id": 12,
"business_id": 1,
"user_id": 7,
"project_id": 4,
"project_name": "Block A",
"clock_in_at": "2026-06-23T07:45:00+05:00",
"clock_out_at": "2026-06-23T17:00:00+05:00",
"notes": "Foundation inspection and rebar check"
},
{
"id": 11,
"business_id": 1,
"user_id": 7,
"project_id": 4,
"project_name": "Block A",
"clock_in_at": "2026-06-22T08:00:00+05:00",
"clock_out_at": "2026-06-22T16:30:00+05:00",
"notes": ""
}
],
"pagination": {"current_page": 1, "per_page": 20, "total": 28, "last_page": 2}
}Start a new time clock entry. Returns 422 if employee is already clocked in (open entry exists with null clock_out_at).
TimeClockEntry with clock_out_at IS NULL before allowing clock-in.{
"project_id": 4,
"notes": "Starting foundation inspection — Block A"
}{
"success": true,
"msg": "Clocked in",
"data": {
"id": 13,
"business_id": 1,
"user_id": 7,
"project_id": 4,
"project_name": "Block A",
"clock_in_at": "2026-06-23T07:48:00+05:00",
"clock_out_at": null,
"notes": "Starting foundation inspection — Block A"
}
}Close the open clock entry. Returns 422 if no open entry exists.
{
"notes": "Completed column alignment check; all good"
}{
"success": true,
"msg": "Clocked out",
"data": {
"id": 13,
"business_id": 1,
"user_id": 7,
"project_id": 4,
"project_name": "Block A",
"clock_in_at": "2026-06-23T07:48:00+05:00",
"clock_out_at": "2026-06-23T17:05:00+05:00",
"notes": "Completed column alignment check; all good"
}
}Calendar
Calendar events assigned to this employee, ordered by starts_at ascending.
{
"success": true,
"msg": "Calendar",
"data": [
{
"id": 5,
"project_id": 4,
"project_name": "Block A",
"assigned_user_id": 7,
"title": "Foundation inspection",
"description": "Structural engineer site visit",
"starts_at": "2026-07-05T09:00:00+05:00",
"ends_at": "2026-07-05T12:00:00+05:00",
"event_type": "inspection"
}
],
"pagination": {"current_page": 1, "per_page": 20, "total": 3, "last_page": 1}
}Site Visits
Site visit log for this employee, newest first.
{
"success": true,
"msg": "Site visits",
"data": [
{
"id": 4,
"business_id": 1,
"project_id": 4,
"project_name": "Block A",
"user_id": 7,
"title": "Footing pour inspection",
"notes": "All columns poured; no issues",
"visited_at": "2026-06-21T10:00:00+05:00",
"status": "completed"
}
],
"pagination": {"current_page": 1, "per_page": 20, "total": 4, "last_page": 1}
}Log a new site visit. Status is automatically set to completed.
{
"title": "Steel delivery inspection",
"notes": "24 tonnes TMT bars received; checked against delivery note",
"project_id": 4,
"visited_at": "2026-06-23T11:30:00+05:00"
}{
"success": true,
"msg": "Site visit logged",
"data": {
"id": 5,
"business_id": 1,
"project_id": 4,
"project_name": "Block A",
"user_id": 7,
"title": "Steel delivery inspection",
"notes": "24 tonnes TMT bars received; checked against delivery note",
"visited_at": "2026-06-23T11:30:00+05:00",
"status": "completed"
}
}Gallery
Gallery items uploaded by this employee, newest first.
{
"success": true,
"msg": "Gallery",
"data": [
{
"id": 8,
"business_id": 1,
"project_id": 4,
"project_name": "Block A",
"uploaded_by": 7,
"title": "Column formwork Grid B",
"file_path": "gallery/proj4/col-formwork-b.jpg",
"visibility": "internal"
}
],
"pagination": {"current_page": 1, "per_page": 20, "total": 12, "last_page": 1}
}Notifications
Bell-dropdown endpoint. Returns up to 20 most recent unread notifications for the authenticated employee. No pagination key.
{
"success": true,
"msg": "Notifications",
"data": [
{
"id": 7,
"type": "task_assigned",
"title": "Task Assigned to You",
"body": "Inspect column formwork — Grid B is due 25 Jun 2026.",
"is_read": false,
"data": { "task_id": 34, "project_id": 5 },
"created_at": "2026-07-01T08:00:00+05:00"
},
{
"id": 6,
"type": "site_visit_approved",
"title": "Site Visit Log Approved",
"body": "Your site visit log for Al-Noor Tower (30 Jun) has been approved.",
"is_read": false,
"data": { "site_visit_id": 12 },
"created_at": "2026-06-30T17:45:00+05:00"
}
]
}Marks all unread notifications as read for the authenticated employee.
{ "success": true, "msg": "All marked read", "data": null }