{ "openapi": "3.0.0", "info": { "title": "Anglebert Team Employee Manager API", "description": "Advanced employee management system (Anglebert Team) featuring Sanctum authentication, attendance tracking, and reporting.", "version": "1.0.0" }, "paths": { "/api/attendance": { "get": { "tags": [ "Attendance" ], "summary": "List attendance records", "operationId": "34b5a0f9b766a9e4cb3440357d371351", "parameters": [ { "name": "date", "in": "query", "required": false, "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "List of attendance records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Attendance" } } } } } }, "security": [ { "bearer": [] } ] } }, "/api/attendance/check-in": { "post": { "tags": [ "Attendance" ], "summary": "Record employee check-in", "operationId": "9379095aac0cd891a8397007afa6d03a", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "employee_id" ], "properties": { "employee_id": { "type": "integer" } }, "type": "object" } } } }, "responses": { "201": { "description": "Check-in recorded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Attendance" } } } }, "404": { "description": "Employee not found" } }, "security": [ { "bearer": [] } ] } }, "/api/attendance/check-out": { "post": { "tags": [ "Attendance" ], "summary": "Record employee check-out", "operationId": "3f3748aaa8b4a063a7c01f8167f71620", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "employee_id" ], "properties": { "employee_id": { "type": "integer" } }, "type": "object" } } } }, "responses": { "200": { "description": "Check-out recorded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Attendance" } } } }, "404": { "description": "Open attendance record not found" } }, "security": [ { "bearer": [] } ] } }, "/api/reports/attendance/daily/pdf": { "get": { "tags": [ "Reports" ], "summary": "Download daily attendance report as PDF", "operationId": "e1f18a2e0ad47d3787df6acc7fc35d4f", "parameters": [ { "name": "date", "in": "query", "required": false, "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "PDF file" } }, "security": [ { "bearer": [] } ] } }, "/api/reports/attendance/daily/excel": { "get": { "tags": [ "Reports" ], "summary": "Download daily attendance report as Excel", "operationId": "88c293640fae6980a49a7cd4488bd8ca", "parameters": [ { "name": "date", "in": "query", "required": false, "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "Excel file" } }, "security": [ { "bearer": [] } ] } }, "/api/reports/attendance/daily/email": { "post": { "tags": [ "Reports" ], "summary": "Send daily attendance report (PDF & Excel) to your email", "operationId": "4da0af1508b1abbc0acd5058e0f4c02a", "parameters": [ { "name": "date", "in": "query", "required": false, "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "Report queued for delivery", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The report has been queued for delivery to your email." } }, "type": "object" } } } }, "401": { "description": "Unauthorized" } }, "security": [ { "bearer": [] } ] } }, "/api/auth/register": { "post": { "tags": [ "Auth" ], "summary": "Register a new user", "operationId": "d764dd091cc4494ae0baf360b03319f3", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "name", "email", "password", "password_confirmation" ], "properties": { "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "password": { "type": "string", "format": "password", "minLength": 8 }, "password_confirmation": { "type": "string", "format": "password", "minLength": 8 } }, "type": "object" } } } }, "responses": { "201": { "description": "User registered", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" }, "user": { "$ref": "#/components/schemas/User" }, "access_token": { "type": "string" } }, "type": "object" } } } }, "422": { "description": "Validation error" } } } }, "/api/auth/login": { "post": { "tags": [ "Auth" ], "summary": "Login and retrieve an API token", "operationId": "8dcb70df1020986038d098cc08d05dae", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "email", "password" ], "properties": { "email": { "type": "string", "format": "email" }, "password": { "type": "string", "format": "password" } }, "type": "object" } } } }, "responses": { "200": { "description": "Authenticated", "content": { "application/json": { "schema": { "properties": { "access_token": { "type": "string" }, "token_type": { "type": "string", "example": "bearer" } }, "type": "object" } } } }, "422": { "description": "Validation / auth error" } } } }, "/api/auth/logout": { "post": { "tags": [ "Auth" ], "summary": "Logout current user (revoke token)", "operationId": "69281b12abb272c76871f19cb17ca563", "responses": { "200": { "description": "Logged out" } }, "security": [ { "bearer": [] } ] } }, "/api/auth/forgot-password": { "post": { "tags": [ "Auth" ], "summary": "Request password reset OTP", "operationId": "cff9b52a898f73f39d684747bd69c4e1", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "email" ], "properties": { "email": { "type": "string", "format": "email" } }, "type": "object" } } } }, "responses": { "200": { "description": "Reset OTP sent" }, "422": { "description": "Error sending OTP" } } } }, "/api/auth/reset-password": { "post": { "tags": [ "Auth" ], "summary": "Reset password using OTP", "operationId": "6af92e090f994419a2295111b391a205", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "otp", "email", "password", "password_confirmation" ], "properties": { "otp": { "type": "string", "maxLength": 6, "minLength": 6 }, "email": { "type": "string", "format": "email" }, "password": { "type": "string", "format": "password", "minLength": 8 }, "password_confirmation": { "type": "string", "format": "password", "minLength": 8 } }, "type": "object" } } } }, "responses": { "200": { "description": "Password reset" }, "422": { "description": "Invalid OTP or data" } } } }, "/api/employees": { "get": { "tags": [ "Employees" ], "summary": "List employees", "operationId": "7fc06f144c1cd7925c5c391a6609f02d", "responses": { "200": { "description": "List of employees", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Employee" } } } } } }, "security": [ { "bearer": [] } ] }, "post": { "tags": [ "Employees" ], "summary": "Create a new employee", "operationId": "bfad4edec29b0edbd684a0afbd847510", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "names", "email", "employee_identifier" ], "properties": { "names": { "type": "string" }, "email": { "type": "string", "format": "email" }, "employee_identifier": { "type": "string" }, "phone_number": { "type": "string", "nullable": true } }, "type": "object" } } } }, "responses": { "201": { "description": "Employee created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Employee" } } } }, "422": { "description": "Validation error" } }, "security": [ { "bearer": [] } ] } }, "/api/employees/{id}": { "get": { "tags": [ "Employees" ], "summary": "Get a single employee", "operationId": "d53e117f7e819b6f063fc96ea910eb75", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Employee details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Employee" } } } }, "404": { "description": "Not found" } }, "security": [ { "bearer": [] } ] }, "put": { "tags": [ "Employees" ], "summary": "Update an employee", "operationId": "aab9bddc0c5cab0acc27a9d58b9cb2b0", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "names": { "type": "string" }, "email": { "type": "string", "format": "email" }, "employee_identifier": { "type": "string" }, "phone_number": { "type": "string", "nullable": true } }, "type": "object" } } } }, "responses": { "200": { "description": "Employee updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Employee" } } } }, "422": { "description": "Validation error" } }, "security": [ { "bearer": [] } ] }, "delete": { "tags": [ "Employees" ], "summary": "Delete an employee", "operationId": "4743ab328b7641983d97c047c641038f", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Deleted" } }, "security": [ { "bearer": [] } ] } } }, "components": { "schemas": { "Employee": { "properties": { "id": { "type": "integer", "example": 1 }, "names": { "type": "string", "example": "John Doe" }, "email": { "type": "string", "format": "email", "example": "john@example.com" }, "employee_identifier": { "type": "string", "example": "EMP-001" }, "phone_number": { "type": "string", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "User": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "John Doe" }, "email": { "type": "string", "format": "email", "example": "john@example.com" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "Attendance": { "properties": { "id": { "type": "integer", "example": 1 }, "employee_id": { "type": "integer", "example": 1 }, "check_in_at": { "type": "string", "format": "date-time" }, "check_out_at": { "type": "string", "format": "date-time", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" } }, "securitySchemes": { "bearer": { "type": "http", "bearerFormat": "JWT", "scheme": "bearer" } } }, "tags": [ { "name": "Attendance", "description": "Employee attendance management" }, { "name": "Reports", "description": "Attendance reports" }, { "name": "Auth", "description": "Authentication" }, { "name": "Employees", "description": "Employee management" } ] }