{
    "openapi": "3.0.0",
    "info": {
        "title": "Training Employment API",
        "description": "API documentation for Training Employment System",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://training4employment.co.uk",
            "description": "Local API Server"
        },
        {
            "url": "https://trainingforemployment.test"
        }
    ],
    "paths": {
        "/api/application-forms": {
            "get": {
                "tags": [
                    "Application Forms"
                ],
                "summary": "Get list of application forms",
                "description": "Retrieve paginated list of application forms",
                "operationId": "d6092cbdf0ff33ce32a0d98ae8d83697",
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of items per page (default: 10, max: 100)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "maximum": 100,
                            "minimum": 1,
                            "example": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Application forms fetched successfully"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "learner_id": {
                                                        "type": "integer",
                                                        "example": 123
                                                    },
                                                    "is_valid_form": {
                                                        "type": "boolean",
                                                        "example": true
                                                    },
                                                    "father_name": {
                                                        "type": "string",
                                                        "example": "Michael"
                                                    },
                                                    "middle_name": {
                                                        "type": "string",
                                                        "example": "Robert",
                                                        "nullable": true
                                                    },
                                                    "last_name": {
                                                        "type": "string",
                                                        "example": "Doe"
                                                    },
                                                    "birth_date": {
                                                        "type": "string",
                                                        "example": "1990-01-15"
                                                    },
                                                    "address": {
                                                        "type": "string",
                                                        "example": "123 Main Street"
                                                    },
                                                    "nationality": {
                                                        "type": "string",
                                                        "example": "British"
                                                    },
                                                    "email": {
                                                        "type": "string",
                                                        "example": "john.doe@email.com"
                                                    },
                                                    "post_code": {
                                                        "type": "string",
                                                        "example": "SW1A 1AA"
                                                    },
                                                    "phone_number": {
                                                        "type": "string",
                                                        "example": "+441234567890",
                                                        "nullable": true
                                                    },
                                                    "telephone": {
                                                        "type": "string",
                                                        "example": "0123456789",
                                                        "nullable": true
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "example": "Approved"
                                                    },
                                                    "learner_pdf": {
                                                        "type": "string",
                                                        "example": "http://example.com/storage/forms/1.pdf",
                                                        "nullable": true
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2023-01-15T10:30:00Z"
                                                    },
                                                    "updated_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2023-01-15T10:30:00Z"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "meta": {
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 10
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 100
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "example": 10
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No forms found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 404
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "No application forms found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 500
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error fetching application forms"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Application Forms"
                ],
                "summary": "Create a new application form with PDF generation",
                "description": "Store application form data and generate PDF similar to web controller",
                "operationId": "3fe448b72308df57e6b18c906da6d3af",
                "requestBody": {
                    "description": "Application form data",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "learner_id",
                                    "is_valid_form",
                                    "father_name",
                                    "last_name",
                                    "birth_date",
                                    "address",
                                    "nationality",
                                    "email",
                                    "post_code",
                                    "phone_number",
                                    "name",
                                    "contact_num",
                                    "term",
                                    "hear_about",
                                    "guideline1",
                                    "guideline2",
                                    "guideline3"
                                ],
                                "properties": {
                                    "learner_id": {
                                        "type": "integer",
                                        "example": "123"
                                    },
                                    "is_valid_form": {
                                        "description": "Must be 1 to indicate a valid form",
                                        "type": "integer",
                                        "example": "1"
                                    },
                                    "father_name": {
                                        "type": "string",
                                        "example": "Michael"
                                    },
                                    "middle_name": {
                                        "type": "string",
                                        "example": "Robert"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "example": "Doe"
                                    },
                                    "birth_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "1990-01-15"
                                    },
                                    "address": {
                                        "type": "string",
                                        "example": "123 Main Street, London"
                                    },
                                    "nationality": {
                                        "type": "string",
                                        "example": "British"
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "john.doe@email.com"
                                    },
                                    "post_code": {
                                        "type": "string",
                                        "example": "SW1A 1AA"
                                    },
                                    "phone_number": {
                                        "type": "string",
                                        "example": "+441234567890"
                                    },
                                    "telephone": {
                                        "type": "string",
                                        "example": "0123456789"
                                    },
                                    "name": {
                                        "type": "string",
                                        "example": "Jane Smith"
                                    },
                                    "contact_num": {
                                        "type": "string",
                                        "example": "+441234567891"
                                    },
                                    "relationship_to_you": {
                                        "type": "string",
                                        "example": "Friend"
                                    },
                                    "company": {
                                        "type": "string",
                                        "example": "ABC Corporation"
                                    },
                                    "emp_contact_name": {
                                        "type": "string",
                                        "example": "HR Department"
                                    },
                                    "emp_contact_num": {
                                        "type": "string",
                                        "example": "+441234567892"
                                    },
                                    "emp_company_address": {
                                        "type": "string",
                                        "example": "456 Business Ave, London"
                                    },
                                    "emp_post_code": {
                                        "type": "string",
                                        "example": "EC1A 1BB"
                                    },
                                    "levy_number": {
                                        "type": "string",
                                        "example": "LEVY123456"
                                    },
                                    "hear_about": {
                                        "type": "string",
                                        "example": "start 1 to 10 based on options"
                                    },
                                    "guideline1": {
                                        "description": "Must be true to accept guideline 1",
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "guideline2": {
                                        "description": "Must be true to accept guideline 2",
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "guideline3": {
                                        "description": "Must be true to accept guideline 3",
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "term": {
                                        "description": "Must be true to accept terms and conditions",
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Form submitted successfully"
                                        },
                                        "pdfPath": {
                                            "type": "string",
                                            "example": "http://example.com/storage/learners/John_Doe/application_form/John_application_form.pdf"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "In Progress"
                                                },
                                                "pdf_path": {
                                                    "type": "string",
                                                    "example": "http://example.com/storage/learners/John_Doe/application_form/John_application_form.pdf"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/application-forms/hear-about-it": {
            "get": {
                "tags": [
                    "Application Forms"
                ],
                "summary": "Get Hear About It options",
                "description": "Retrieve list of options for how applicants heard about the service",
                "operationId": "0a16182d43b2c6eae998b36adae12166",
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Hear about it options fetched successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "1": {
                                                    "type": "string",
                                                    "example": "Social Media (Facebook, Instagram, LinkedIn, X, TikTok, YouTube, etc.)"
                                                },
                                                "2": {
                                                    "type": "string",
                                                    "example": "Search Engine (Google, Yahoo, etc)"
                                                },
                                                "3": {
                                                    "type": "string",
                                                    "example": "Paid Google Advertisement"
                                                },
                                                "4": {
                                                    "type": "string",
                                                    "example": "Paid Bing Advertisement"
                                                },
                                                "5": {
                                                    "type": "string",
                                                    "example": "Word of Mouth"
                                                },
                                                "6": {
                                                    "type": "string",
                                                    "example": "Email"
                                                },
                                                "7": {
                                                    "type": "string",
                                                    "example": "Referred by a Trainer"
                                                },
                                                "8": {
                                                    "type": "string",
                                                    "example": "Referred by a Friend"
                                                },
                                                "9": {
                                                    "type": "string",
                                                    "example": "Third Party (Hurak, Get Licenced, etc)"
                                                },
                                                "10": {
                                                    "type": "string",
                                                    "example": "Other"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 500
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error fetching hear about it options"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/application-forms/{id}": {
            "put": {
                "tags": [
                    "Application Forms"
                ],
                "summary": "Update an existing application form with PDF regeneration",
                "description": "Update application form data and regenerate PDF if needed",
                "operationId": "513b13715070e20ab98f4c3b6105c31a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Application Form ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "description": "Application form data to update",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "learner_id",
                                    "is_valid_form",
                                    "father_name",
                                    "last_name",
                                    "birth_date",
                                    "address",
                                    "nationality",
                                    "email",
                                    "post_code",
                                    "phone_number",
                                    "name",
                                    "contact_num",
                                    "term",
                                    "hear_about",
                                    "guideline1",
                                    "guideline2",
                                    "guideline3"
                                ],
                                "properties": {
                                    "learner_id": {
                                        "type": "integer",
                                        "example": "123"
                                    },
                                    "is_valid_form": {
                                        "type": "integer",
                                        "example": "1"
                                    },
                                    "father_name": {
                                        "type": "string",
                                        "example": "Michael Updated"
                                    },
                                    "middle_name": {
                                        "type": "string",
                                        "example": "Robert"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "example": "Doe Updated"
                                    },
                                    "birth_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "1990-01-15"
                                    },
                                    "address": {
                                        "type": "string",
                                        "example": "123 Main Street, London Updated"
                                    },
                                    "nationality": {
                                        "type": "string",
                                        "example": "British"
                                    },
                                    "post_code": {
                                        "type": "string",
                                        "example": "SW1A 1AA"
                                    },
                                    "phone_number": {
                                        "type": "string",
                                        "example": "+441234567890"
                                    },
                                    "telephone": {
                                        "type": "string",
                                        "example": "0123456789"
                                    },
                                    "name": {
                                        "type": "string",
                                        "example": "Jane Smith Updated"
                                    },
                                    "contact_num": {
                                        "type": "string",
                                        "example": "+441234567891"
                                    },
                                    "relationship_to_you": {
                                        "type": "string",
                                        "example": "Friend"
                                    },
                                    "company": {
                                        "type": "string",
                                        "example": "ABC Corporation Updated"
                                    },
                                    "emp_contact_name": {
                                        "type": "string",
                                        "example": "HR Department"
                                    },
                                    "emp_contact_num": {
                                        "type": "string",
                                        "example": "+441234567892"
                                    },
                                    "emp_company_address": {
                                        "type": "string",
                                        "example": "456 Business Ave, London Updated"
                                    },
                                    "emp_post_code": {
                                        "type": "string",
                                        "example": "EC1A 1BB"
                                    },
                                    "levy_number": {
                                        "type": "string",
                                        "example": "LEVY123456"
                                    },
                                    "status": {
                                        "type": "string",
                                        "example": "Approved"
                                    },
                                    "comments": {
                                        "type": "string",
                                        "example": "Application approved after review"
                                    },
                                    "hear_about": {
                                        "type": "string",
                                        "example": "start 1 to 10 based on options"
                                    },
                                    "guideline1": {
                                        "description": "Must be true to accept guideline 1",
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "guideline2": {
                                        "description": "Must be true to accept guideline 2",
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "guideline3": {
                                        "description": "Must be true to accept guideline 3",
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "term": {
                                        "description": "Must be true to accept terms and conditions",
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Form updated successfully"
                                        },
                                        "pdfPath": {
                                            "type": "string",
                                            "example": "http://example.com/storage/learners/John_Doe/application_form/John_application_form_updated.pdf"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "Approved"
                                                },
                                                "pdf_path": {
                                                    "type": "string",
                                                    "example": "http://example.com/storage/learners/John_Doe/application_form/John_application_form_updated.pdf"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - Learner ID mismatch",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 403
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Learner ID mismatch. You are not authorized to update this form."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Form not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 404
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Application form not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/auth/login": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "User login",
                "operationId": "userLogin",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "required": [
                                    "email",
                                    "password"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "user@example.com"
                                    },
                                    "password": {
                                        "type": "string",
                                        "format": "password",
                                        "example": "password123"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful login",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Login successful"
                                        },
                                        "token": {
                                            "type": "string",
                                            "example": "1|abcdef123456"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "errors": {
                                            "type": "object",
                                            "example": {
                                                "email": [
                                                    "The email field is required."
                                                ],
                                                "password": [
                                                    "The password field is required."
                                                ]
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid credentials"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/auth/forgot-password": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Forgot Password - Password Reset With OTP",
                "operationId": "f51c7074de53475eab87e336cc4e06a6",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "email",
                                    "otp",
                                    "password"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "user@example.com"
                                    },
                                    "otp": {
                                        "type": "string",
                                        "format": "otp",
                                        "example": "123456"
                                    },
                                    "password": {
                                        "type": "string",
                                        "format": "password",
                                        "example": "newpassword123"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Password reset successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Password reset successfully"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Email not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 404
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Email not registered"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/auth/reset-password": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Reset Password",
                "operationId": "96e44e1ebcd811418fd95ee4c56162f0",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "email",
                                    "otp",
                                    "password",
                                    "password_confirmation"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "user@example.com"
                                    },
                                    "otp": {
                                        "type": "string",
                                        "example": "123456"
                                    },
                                    "password": {
                                        "type": "string",
                                        "format": "password",
                                        "example": "newpassword123"
                                    },
                                    "password_confirmation": {
                                        "type": "string",
                                        "format": "password",
                                        "example": "newpassword123"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Password reset successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Password reset successfully"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid OTP",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 400
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid OTP"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/auth/email-validate": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Validate email and send OTP",
                "operationId": "b9322ab9aaf6719da2cbd9c5b5a2e83a",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "email"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "user@example.com"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OTP sent successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "OTP sent to your email"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Email not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 404
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Email not registered"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/auth/verify-otp": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Verify OTP",
                "operationId": "abcb5741589707b15c7ecac7a67c13aa",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "email",
                                    "otp"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "user@example.com"
                                    },
                                    "otp": {
                                        "type": "string",
                                        "example": "123456"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OTP verified successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "OTP verified successfully"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid OTP",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 400
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid or expired OTP"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/auth/change-password": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Change Password (First Time)",
                "operationId": "58e67cdbde52513b62902b05abf9abcb",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "new_password"
                                ],
                                "properties": {
                                    "new_password": {
                                        "type": "string",
                                        "format": "password",
                                        "example": "newpassword123"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Password changed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Password changed successfully"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 400
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Password check is already completed"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/logout": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Logout user",
                "description": "Logs out the currently authenticated user by revoking their access token.",
                "operationId": "ad65cbbd4e9f201619eae184a5961a98",
                "requestBody": {
                    "description": "No body parameters required",
                    "required": false
                },
                "responses": {
                    "200": {
                        "description": "Successful logout response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Logged out successfully"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or expired token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/balance/outstanding": {
            "get": {
                "tags": [
                    "Balance"
                ],
                "summary": "Get authenticated user's outstanding balance",
                "description": "Returns the total outstanding balance for the authenticated user, computed as the sum of all their invoice totals (total_gross) minus the sum of non-refunded payments.",
                "operationId": "33689730d3330a969eda53925e7d1fcd",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "outstanding_balance": {
                                            "description": "Amount still owed (total invoiced minus total paid)",
                                            "type": "number",
                                            "format": "float",
                                            "example": 123.4500000000000028421709430404007434844970703125
                                        },
                                        "total_invoiced": {
                                            "description": "Sum of gross totals across all user invoices",
                                            "type": "number",
                                            "format": "float",
                                            "example": 500
                                        },
                                        "total_paid": {
                                            "description": "Sum of non-refunded payments applied to user invoices",
                                            "type": "number",
                                            "format": "float",
                                            "example": 376.55000000000001136868377216160297393798828125
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/course-bundles": {
            "get": {
                "tags": [
                    "Course Bundles (Public)"
                ],
                "summary": "Get all course bundles",
                "description": "Returns all course bundles with full data. Public API - no authentication required.",
                "operationId": "14606a0195a377428e469b495580d787",
                "responses": {
                    "200": {
                        "description": "Course bundles retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Course bundles retrieved successfully."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "url": {
                                                        "type": "string",
                                                        "example": "http://example.com/sia-courses-bundles/bundle-slug"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "short_description": {
                                                        "type": "string"
                                                    },
                                                    "regular_price": {
                                                        "type": "number"
                                                    },
                                                    "vat": {
                                                        "type": "number"
                                                    },
                                                    "bundle_image": {
                                                        "type": "string"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/course-prerequisites": {
            "post": {
                "tags": [
                    "CoursePrerequisites"
                ],
                "summary": "Submit first aid qualification",
                "description": "Store user's first aid qualification with external or internal certification",
                "operationId": "caf7edcb97dd2403fc322df46d544cf8",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "qualification_type"
                                ],
                                "properties": {
                                    "qualification_type": {
                                        "description": "Type of qualification - external or internal",
                                        "type": "string",
                                        "enum": [
                                            "external",
                                            "internal"
                                        ]
                                    },
                                    "external_certification_id": {
                                        "description": "ID of external certification (required if qualification_type is external)",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "internal_certification_id": {
                                        "description": "ID of internal certification (required if qualification_type is internal)",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "course_certificate": {
                                        "description": "Certificate file (required for external qualifications)",
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Qualification submitted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 201
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Qualification submitted successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "qualification_type": {
                                                    "type": "string",
                                                    "example": "external"
                                                },
                                                "external_certification_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "internal_certification_id": {
                                                    "type": "integer",
                                                    "example": null
                                                },
                                                "course_certificate": {
                                                    "type": "string",
                                                    "example": "storage/learners/John/course_certificate/John_1234567890_certificate.pdf"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "In Progress"
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 422
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Validation failed"
                                        },
                                        "errors": {
                                            "properties": {
                                                "qualification_type": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "Please select your qualification type."
                                                    }
                                                },
                                                "external_certification_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "Please select an external certification."
                                                    }
                                                },
                                                "internal_certification_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "Please select an internal certification."
                                                    }
                                                },
                                                "course_certificate": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "Please upload your certification document (required for external qualifications)."
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 500
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Server error occurred: Error message"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/course-prerequisites/{id}": {
            "delete": {
                "tags": [
                    "CoursePrerequisites"
                ],
                "summary": "Delete course prerequisite (certification)",
                "description": "Delete a user's certification record by ID. Only the authenticated user's own record can be deleted.",
                "operationId": "34a1708fc1e95de1830db58ddd5d3075",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "User certification ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Certification deleted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Certification deleted successfully."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Certification not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 404
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Certification not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/course-prerequisites/skip": {
            "post": {
                "tags": [
                    "CoursePrerequisites"
                ],
                "summary": "Skip certification submission",
                "description": "Creates a record in user_certifications with is_skip = true",
                "operationId": "1d8a804e7fe69736350576748535ea9a",
                "responses": {
                    "201": {
                        "description": "Certification skip recorded successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 201
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Certification skipped successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "is_skip": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "Skipped"
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Duplicate skip request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 409
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "You have already marked certification as skipped."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 500
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Server error occurred: ..."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/dashboard/banner": {
            "get": {
                "tags": [
                    "Dashboard"
                ],
                "summary": "Get home banner",
                "operationId": "5202477da73fdce1ff9cdc9be6eae215",
                "responses": {
                    "200": {
                        "description": "Home banner retrieved successfully"
                    }
                }
            }
        },
        "/api/dashboard/categories": {
            "get": {
                "tags": [
                    "Dashboard"
                ],
                "summary": "Get all categories",
                "operationId": "1c2522e0696aab0336e39256c9ac713d",
                "responses": {
                    "200": {
                        "description": "List of categories"
                    }
                }
            }
        },
        "/api/dashboard/courses": {
            "get": {
                "tags": [
                    "Dashboard"
                ],
                "summary": "Get all courses",
                "operationId": "eddd4a270340803dd622d204704eb43a",
                "responses": {
                    "200": {
                        "description": "List of courses"
                    }
                }
            }
        },
        "/api/dashboard/admins": {
            "get": {
                "tags": [
                    "Dashboard"
                ],
                "summary": "Get all admins and super admins",
                "operationId": "00bea46214182b1c275ed89e7f97f880",
                "responses": {
                    "200": {
                        "description": "Admins retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Admins retrieved successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "admins": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "John Doe"
                                                            },
                                                            "email": {
                                                                "type": "string",
                                                                "example": "john@example.com"
                                                            },
                                                            "role": {
                                                                "type": "string",
                                                                "example": "Super Admin"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 5
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 401
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 500
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/my-courses": {
            "get": {
                "tags": [
                    "Dashboard"
                ],
                "summary": "Get authenticated learner courses",
                "description": "Return dashboard course data for the authenticated learner.",
                "operationId": "myCourses",
                "responses": {
                    "200": {
                        "description": "Learner courses retrieved successfully"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "500": {
                        "description": "Server error"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/document-uploads/group-a": {
            "post": {
                "tags": [
                    "DocumentUpload"
                ],
                "summary": "Upload Group A document (Primary ID)",
                "description": "Upload the primary identity document for verification (Group A). This API creates a new record for the user.",
                "operationId": "986712918368dd30dbb725d3b0dbe0e3",
                "requestBody": {
                    "description": "Upload Group A document with front and optional back file",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "first_option",
                                    "first_front_upload"
                                ],
                                "properties": {
                                    "first_option": {
                                        "description": "Primary identity document type",
                                        "type": "string",
                                        "enum": [
                                            "passport",
                                            "dvlaLicence",
                                            "dvaLicence",
                                            "birthCertificate",
                                            "residencePermit"
                                        ],
                                        "example": "birthCertificate"
                                    },
                                    "first_front_upload": {
                                        "description": "Front side of the primary document - Allowed mimes: webp,jpeg,png,jpg,gif,pdf | Max size: 10MB",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "first_back_upload": {
                                        "description": "Back side of the primary document (optional) - Allowed mimes: webp,jpeg,png,jpg,gif,pdf | Max size: 10MB",
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Group A document uploaded successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 201
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Group A documents uploaded successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 123
                                                },
                                                "first_option": {
                                                    "type": "string",
                                                    "example": "birthCertificate"
                                                },
                                                "first_front_upload": {
                                                    "type": "string",
                                                    "example": "storage/learners/John_Doe/proof_of_id/front.pdf"
                                                },
                                                "first_back_upload": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "In Progress"
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "type": "object",
                                            "example": {
                                                "first_option": [
                                                    "The first option field is required."
                                                ],
                                                "first_front_upload": [
                                                    "The first front upload must be a valid file."
                                                ]
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error uploading Group A documents"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/document-uploads/group-b": {
            "post": {
                "tags": [
                    "DocumentUpload"
                ],
                "summary": "Upload Group B documents (Proof of address)",
                "description": "Upload secondary address proof documents (Group B). This API updates the same record created from Group A upload.",
                "operationId": "4da3222eb906bbd6812761cabbd30ea2",
                "requestBody": {
                    "description": "Upload Group B documents with front/back files",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "second_option",
                                    "second_front_upload",
                                    "third_front_upload"
                                ],
                                "properties": {
                                    "second_option": {
                                        "description": "Secondary address proof documents (minimum 2 required)",
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "enum": [
                                                "bankStatement",
                                                "utilityBill",
                                                "creditCardStatement",
                                                "councilTaxStatement",
                                                "mortgageStatement",
                                                "officialLetter",
                                                "taxStatement",
                                                "paperDrivingLicence",
                                                "dvaLicencePhotocard",
                                                "pensionStatement",
                                                "UKfirearmslicence"
                                            ],
                                            "example": "bankStatement"
                                        }
                                    },
                                    "second_front_upload": {
                                        "description": "Second document front side - Allowed mimes: webp,jpeg,png,jpg,gif,pdf | Max size: 10MB",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "second_back_upload": {
                                        "description": "Second document back side (optional) - Allowed mimes: webp,jpeg,png,jpg,gif,pdf | Max size: 10MB",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "third_front_upload": {
                                        "description": "Third document front side - Allowed mimes: webp,jpeg,png,jpg,gif,pdf | Max size: 10MB",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "third_back_upload": {
                                        "description": "Third document back side (optional) - Allowed mimes: webp,jpeg,png,jpg,gif,pdf | Max size: 10MB",
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Group B documents uploaded successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Group B documents uploaded successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 123
                                                },
                                                "second_option": {
                                                    "type": "string",
                                                    "example": "bankStatement,utilityBill"
                                                },
                                                "second_front_upload": {
                                                    "type": "string",
                                                    "example": "storage/learners/John_Doe/proof_of_id/second_front.jpg"
                                                },
                                                "second_back_upload": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "third_front_upload": {
                                                    "type": "string",
                                                    "example": "storage/learners/John_Doe/proof_of_id/third_front.png"
                                                },
                                                "third_back_upload": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "Completed"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Group A not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "No existing Group A record found. Upload Group A first."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "type": "object",
                                            "example": {
                                                "second_option": [
                                                    "At least 2 documents are required."
                                                ],
                                                "second_front_upload": [
                                                    "The second front upload must be a valid file."
                                                ]
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error uploading Group B documents"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/document-uploads/{id}": {
            "post": {
                "tags": [
                    "DocumentUpload"
                ],
                "summary": "Update rejected document upload",
                "description": "Update document upload records that have 'Rejected' status. Only rejected documents can be updated.",
                "operationId": "0d429947d31551fe97ea62c2fca4a623",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Document Upload ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 324
                        }
                    }
                ],
                "requestBody": {
                    "description": "Document upload data for update",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "properties": {
                                    "_method": {
                                        "description": "Method override for POST request",
                                        "type": "string",
                                        "example": "POST"
                                    },
                                    "first_front_upload": {
                                        "description": "First document front side",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "first_back_upload": {
                                        "description": "First document back side",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "second_front_upload": {
                                        "description": "Second document front side",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "second_back_upload": {
                                        "description": "Second document back side",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "third_front_upload": {
                                        "description": "Third document front side",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "third_back_upload": {
                                        "description": "Third document back side",
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Document updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Document updated successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 324
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 384
                                                },
                                                "first_front_upload": {
                                                    "type": "string",
                                                    "example": "http://127.0.0.1:8000/storage/learners/Elton Cox_Edwards/proof_of_id/Elton Cox_1758888778_first_front_upload.png"
                                                },
                                                "first_back_upload": {
                                                    "type": "string"
                                                },
                                                "second_front_upload": {
                                                    "type": "string"
                                                },
                                                "second_back_upload": {
                                                    "type": "string"
                                                },
                                                "third_front_upload": {
                                                    "type": "string"
                                                },
                                                "third_back_upload": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "In Progress"
                                                },
                                                "comments": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Only rejected documents can be updated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Document not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Document not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "DocumentUpload"
                ],
                "summary": "Delete document upload",
                "description": "Delete a document upload by ID. Removes the record and all associated files from storage. Only the owner can delete.",
                "operationId": "69cf036289575ed97ca007c87556283a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Document upload ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Document upload deleted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Document upload deleted successfully."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Document not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 404
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Document not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/exams/exam-result": {
            "get": {
                "tags": [
                    "Learner Exam"
                ],
                "summary": "Get all exam results for the logged-in learner",
                "operationId": "353871837f1a8aa1cae61b484878e277",
                "responses": {
                    "200": {
                        "description": "Exam results retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Exam results retrieved successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 7
                                                },
                                                "user_name": {
                                                    "type": "string",
                                                    "example": "John Doe"
                                                },
                                                "results": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "course_name": {
                                                                "type": "string",
                                                                "example": "Door Supervisor Refresher"
                                                            },
                                                            "exam_name": {
                                                                "type": "string",
                                                                "example": "Principles of working in the private security industry - MCO"
                                                            },
                                                            "exam_code": {
                                                                "type": "string",
                                                                "example": "J/617/9686"
                                                            },
                                                            "type": {
                                                                "type": "string",
                                                                "example": "MCQs"
                                                            },
                                                            "score": {
                                                                "type": "integer",
                                                                "example": 51
                                                            },
                                                            "status": {
                                                                "type": "string",
                                                                "example": "Passed"
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": "Exam covers principles of private security industry operations."
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 401
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 500
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error: SQLSTATE[HY000]..."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/messages/inbox": {
            "get": {
                "tags": [
                    "Messages"
                ],
                "summary": "Get user inbox messages",
                "operationId": "0969daacec7437f32e2a315dc5009312",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Items per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 15
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Messages retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Messages retrieved successfully"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "sender_id": {
                                                        "type": "integer",
                                                        "example": 2
                                                    },
                                                    "recipient_id": {
                                                        "type": "integer",
                                                        "example": 3
                                                    },
                                                    "subject": {
                                                        "type": "string",
                                                        "example": "Welcome Message"
                                                    },
                                                    "body": {
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "index": {
                                                                    "type": "integer",
                                                                    "example": 0
                                                                },
                                                                "text": {
                                                                    "type": "string",
                                                                    "example": "This is message text"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "is_read": {
                                                        "type": "boolean",
                                                        "example": false
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "updated_at": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "nullable": true
                                                    },
                                                    "attachments": {
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer",
                                                                    "example": 1
                                                                },
                                                                "file_name": {
                                                                    "type": "string",
                                                                    "example": "document.pdf"
                                                                },
                                                                "file_path": {
                                                                    "type": "string",
                                                                    "example": "attachments/document.pdf"
                                                                },
                                                                "file_size": {
                                                                    "type": "integer",
                                                                    "example": 1024
                                                                },
                                                                "mime_type": {
                                                                    "type": "string",
                                                                    "example": "application/pdf"
                                                                },
                                                                "created_at": {
                                                                    "type": "string",
                                                                    "format": "date-time"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "meta": {
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "from": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "to": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 50
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "example": 4
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 401
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 500
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/messages/sent": {
            "get": {
                "tags": [
                    "Messages"
                ],
                "summary": "Get user sent messages",
                "operationId": "a00e41bc2495f3d33cbd0eca57dd771d",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Items per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 15
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Messages retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Messages retrieved successfully"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "sender_id": {
                                                        "type": "integer",
                                                        "example": 2
                                                    },
                                                    "recipient_id": {
                                                        "type": "integer",
                                                        "example": 3
                                                    },
                                                    "subject": {
                                                        "type": "string",
                                                        "example": "Welcome Message"
                                                    },
                                                    "body": {
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "index": {
                                                                    "type": "integer",
                                                                    "example": 0
                                                                },
                                                                "text": {
                                                                    "type": "string",
                                                                    "example": "This is message text"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "is_read": {
                                                        "type": "boolean",
                                                        "example": false
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "updated_at": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "nullable": true
                                                    },
                                                    "attachments": {
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer",
                                                                    "example": 1
                                                                },
                                                                "file_name": {
                                                                    "type": "string",
                                                                    "example": "document.pdf"
                                                                },
                                                                "file_path": {
                                                                    "type": "string",
                                                                    "example": "attachments/document.pdf"
                                                                },
                                                                "file_size": {
                                                                    "type": "integer",
                                                                    "example": 1024
                                                                },
                                                                "mime_type": {
                                                                    "type": "string",
                                                                    "example": "application/pdf"
                                                                },
                                                                "created_at": {
                                                                    "type": "string",
                                                                    "format": "date-time"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "meta": {
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "from": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "to": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 50
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "example": 4
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 401
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 500
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/messages/{id}/read": {
            "patch": {
                "tags": [
                    "Messages"
                ],
                "summary": "Mark a message as read",
                "operationId": "36a5e93f9eb11637370202615ba29771",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Message ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Message marked as read",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Message marked as read"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - not the recipient"
                    },
                    "404": {
                        "description": "Message not found"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/messages/counts": {
            "get": {
                "tags": [
                    "Messages"
                ],
                "summary": "Get read and unread message counts for the authenticated user (inbox)",
                "operationId": "55554e4abf38246228695bd1f04bcd1a",
                "responses": {
                    "200": {
                        "description": "Counts retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Message counts retrieved successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "read_count": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "unread_count": {
                                                    "type": "integer",
                                                    "example": 3
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/messages": {
            "post": {
                "tags": [
                    "Messages"
                ],
                "summary": "Send a new message",
                "operationId": "c85a9171473a13f151a8672235e01559",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "recipient_id",
                                    "subject",
                                    "body"
                                ],
                                "properties": {
                                    "recipient_id": {
                                        "description": "Array of recipient IDs or 'all_admins'",
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "example": "all_admins"
                                        }
                                    },
                                    "trainer_id": {
                                        "description": "Array of trainer IDs to include (optional)",
                                        "type": "array",
                                        "items": {
                                            "type": "integer",
                                            "example": 25
                                        }
                                    },
                                    "subject": {
                                        "description": "Message subject",
                                        "type": "string",
                                        "maxLength": 255,
                                        "example": "Welcome Message"
                                    },
                                    "body": {
                                        "description": "Message body",
                                        "type": "string",
                                        "example": "This is the message content"
                                    },
                                    "attachments[]": {
                                        "description": "Message attachments",
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "format": "binary"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Message sent successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 201
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Message sent successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "total_recipients": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "recipients_breakdown": {
                                                    "properties": {
                                                        "students": {
                                                            "type": "integer",
                                                            "example": 2
                                                        },
                                                        "trainers": {
                                                            "type": "integer",
                                                            "example": 2
                                                        },
                                                        "admins": {
                                                            "type": "integer",
                                                            "example": 1
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "sent_messages": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "message_id": {
                                                                "type": "integer",
                                                                "example": 45
                                                            },
                                                            "recipient_id": {
                                                                "type": "string",
                                                                "example": "10"
                                                            },
                                                            "recipient_email": {
                                                                "type": "string",
                                                                "example": "user@example.com"
                                                            },
                                                            "recipient_name": {
                                                                "type": "string",
                                                                "example": "John Doe"
                                                            },
                                                            "recipient_type": {
                                                                "type": "string",
                                                                "example": "Student"
                                                            },
                                                            "is_trainer": {
                                                                "type": "boolean",
                                                                "example": false
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 422
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Validation failed"
                                        },
                                        "errors": {
                                            "properties": {
                                                "recipient_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The recipient id field is required."
                                                    }
                                                },
                                                "trainer_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The selected trainer id is not a valid trainer."
                                                    }
                                                },
                                                "subject": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The subject field is required."
                                                    }
                                                },
                                                "body": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The body field is required."
                                                    }
                                                },
                                                "attachments": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The total size of all attachments must not be greater than 5MB."
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 401
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 500
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Message sending failed"
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Error details here"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/profile-photos": {
            "get": {
                "tags": [
                    "Profile Photos"
                ],
                "summary": "Get profile photos for logged-in user",
                "description": "Returns the logged-in user's profile photo (one per user) with id, user_id, url, status and comments.",
                "operationId": "a9f2600c79330e3d045e8c6632056ee3",
                "responses": {
                    "200": {
                        "description": "Profile photo retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Profile photo retrieved successfully."
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "url": {
                                                    "type": "string",
                                                    "example": "http://example.com/storage/learners/John_Doe/profile_photo/photo.jpg"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "In Progress"
                                                },
                                                "comments": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                }
                                            },
                                            "type": "object",
                                            "nullable": true
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Profile Photos"
                ],
                "summary": "Upload a profile photo",
                "description": "Allows a learner to upload a profile photo.",
                "operationId": "969f962b3a056075971d26504452eb2f",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "profile_photo"
                                ],
                                "properties": {
                                    "profile_photo": {
                                        "description": "The profile photo file to upload",
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Profile photo uploaded successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 201
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Profile photo uploaded successfully."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request - Invalid input or profile photo already exists",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 400
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid file upload."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Failed to upload profile photo",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Failed to upload profile photo."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/profile-photos/update/{id}": {
            "post": {
                "tags": [
                    "Profile Photos"
                ],
                "summary": "Update profile photo",
                "description": "Allows a learner to update their profile photo. Only allowed if status is Rejected.",
                "operationId": "ec9958fedf6ecaec904b0a4ca5432a7b",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Profile photo ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "profile_photo"
                                ],
                                "properties": {
                                    "profile_photo": {
                                        "description": "The new profile photo file to upload",
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Profile photo updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Profile photo updated successfully."
                                        },
                                        "data": {
                                            "properties": {
                                                "path": {
                                                    "type": "string",
                                                    "example": "storage/learners/John_Doe/profile_photo/John_profile.png"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid status (not rejected)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 400
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Profile photo can only be updated if status is Rejected."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Profile photo not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 404
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Profile photo not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "code": {
                                            "type": "integer",
                                            "example": 401
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/profile-photos/{id}/reject": {
            "patch": {
                "tags": [
                    "Profile Photos"
                ],
                "summary": "Reject profile photo",
                "description": "Updates the profile photo status to Rejected. Only the photo owner can reject their own photo. Optional comments can be provided.",
                "operationId": "7704980562f838abe7483dcdd5ed47b6",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Profile photo ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "comments": {
                                        "type": "string",
                                        "example": "Photo does not meet requirements.",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Profile photo rejected successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Profile photo rejected successfully."
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "Rejected"
                                                },
                                                "comments": {
                                                    "type": "string",
                                                    "nullable": true
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Profile photo not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 404
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Profile photo not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "code": {
                                            "type": "integer",
                                            "example": 401
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/profile-photos/{id}": {
            "delete": {
                "tags": [
                    "Profile Photos"
                ],
                "summary": "Delete profile photo",
                "description": "Allows a learner to delete their profile photo.",
                "operationId": "a3ecad5bc426e42cb783367e9a160f36",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Profile photo ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Profile photo deleted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Profile photo deleted successfully."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Profile photo not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 404
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Profile photo not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "code": {
                                            "type": "integer",
                                            "example": 401
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/resources": {
            "get": {
                "tags": [
                    "Resources"
                ],
                "summary": "Get user-specific flipbook resources",
                "description": "Retrieve all flipbook resources (tasks and resources) assigned to the authenticated user",
                "operationId": "getFlipbookResources",
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 123
                                                },
                                                "user_name": {
                                                    "type": "string",
                                                    "example": "John Doe"
                                                },
                                                "resources": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "DS Distance Learning Booklet"
                                                            },
                                                            "type": {
                                                                "type": "string",
                                                                "example": "Flip Book"
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": "This Distance Learning Booklet supports learners preparing for..."
                                                            },
                                                            "flipbook_url": {
                                                                "type": "string",
                                                                "example": "http://yourdomain.com/backend/flipbook/view/1"
                                                            },
                                                            "resource_type": {
                                                                "type": "string",
                                                                "example": "task"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Flipbook resources retrieved successfully for user: John Doe"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "User not authenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Failed to retrieve resources"
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Error message details"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/task/english-assessment": {
            "get": {
                "tags": [
                    "TaskSubmission"
                ],
                "summary": "Get English assessment data",
                "description": "Returns English Assessment configuration data",
                "operationId": "7a2dadeb31039d5aeba665bb1a5e3fdf",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "question": {
                                                            "type": "string",
                                                            "example": "What is the main purpose of Text A?"
                                                        },
                                                        "desc": {
                                                            "type": "string",
                                                            "example": "Please select one answer. (1 Point)"
                                                        },
                                                        "type": {
                                                            "type": "string",
                                                            "example": "CHECK_BOX"
                                                        },
                                                        "options": {
                                                            "type": "array",
                                                            "items": {
                                                                "properties": {
                                                                    "label": {
                                                                        "type": "string",
                                                                        "example": "To describe"
                                                                    },
                                                                    "value": {
                                                                        "type": "string",
                                                                        "example": "a"
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        },
                                                        "placeholder": {
                                                            "type": "string",
                                                            "example": "Type your answer here...",
                                                            "nullable": true
                                                        },
                                                        "rules": {
                                                            "properties": {
                                                                "required": {
                                                                    "type": "string",
                                                                    "example": "Please provide an answer"
                                                                },
                                                                "minLength": {
                                                                    "properties": {
                                                                        "value": {
                                                                            "type": "integer",
                                                                            "example": 10
                                                                        },
                                                                        "message": {
                                                                            "type": "string",
                                                                            "example": "Answer must be at least 10 characters long"
                                                                        }
                                                                    },
                                                                    "type": "object"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/task/learner-tasks": {
            "get": {
                "tags": [
                    "TaskSubmission"
                ],
                "summary": "Get learner tasks (excluding reminders, empty task_code)",
                "description": "Fetches tasks where type is NOT 'Reminders' and task_code is NULL or empty",
                "operationId": "9a136343aa6d250850d4b54f66062186",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "English Assessment"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "example": "CourseWork"
                                                    },
                                                    "task_code": {
                                                        "type": "string",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "user_id": {
                                                        "type": "integer",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "example": "2025-03-28 07:21:13"
                                                    },
                                                    "updated_at": {
                                                        "type": "string",
                                                        "example": "2025-03-28 07:21:13"
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "example": null,
                                                        "nullable": true
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error fetching tasks"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/task/learner/submission": {
            "post": {
                "tags": [
                    "TaskSubmission"
                ],
                "summary": "Submit learner task (JSON to PDF)",
                "description": "Learner submits task data from mobile app. The API generates a PDF from JSON and stores submission in database.",
                "operationId": "2936d1c9fb77dcd9ef364718cffb0677",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "task_id",
                                    "course_id",
                                    "cohort_id",
                                    "task_name",
                                    "data"
                                ],
                                "properties": {
                                    "_token": {
                                        "description": "CSRF token (if applicable)",
                                        "type": "string",
                                        "example": "LzCUfNd9x8dAZU70tsD3ErueOGysaSMFbJzIJVMf"
                                    },
                                    "task_id": {
                                        "description": "Task ID",
                                        "type": "integer",
                                        "example": 16
                                    },
                                    "course_id": {
                                        "description": "Course ID",
                                        "type": "integer",
                                        "example": 2
                                    },
                                    "cohort_id": {
                                        "description": "Cohort ID",
                                        "type": "integer",
                                        "example": 104
                                    },
                                    "trainer_id": {
                                        "description": "Trainer ID (optional)",
                                        "type": "integer",
                                        "example": 16
                                    },
                                    "task_name": {
                                        "description": "Task name",
                                        "type": "string",
                                        "example": "DS Refresher WorkBook Unit 1"
                                    },
                                    "data": {
                                        "description": "Form responses as key-value pairs",
                                        "type": "object",
                                        "example": {
                                            "learner_name": "Kiran",
                                            "training_provider": "Training4Employment",
                                            "info_course_start_date": "2025-07-17",
                                            "info_course_end_date": "2025-07-18",
                                            "Q1. Identify THREE different types of equipment that can be used to help you manage venue capacity": [
                                                "General - everyone is searched.",
                                                "Random - selection is based on a random factor",
                                                "Specific - a specific person is selected as there is evidence or an indication that they may be concealing an illegal or prohibited item"
                                            ],
                                            "Q2a. Identify THREE occasions when a door supervisor has the right to search": [
                                                "People on entry",
                                                "people already in the premises",
                                                "The premises"
                                            ],
                                            "Q2b Single sex": "Single Sex searches can only be carried out by the same gender.",
                                            "Q2b Transgender individuals": "Ask the individual which gender they identify as and which gender of officer they would prefer to be searched by. Maintain dignity and privacy.",
                                            "Q3. Identify SEVEN different types of equipment that can be used to assist with searches": [
                                                "Metal Detector",
                                                "Torch/Flashlight",
                                                "Search Mirror",
                                                "Body-Worn Camera",
                                                "Search Gloves",
                                                "Two-Way Radios",
                                                "Personal Protective Equipment (PPE)"
                                            ],
                                            "Q6. State the actions to take if an incident or an accident occurs": "Speak to the Manager and make him aware of the incident/accident.",
                                            "Q11a. Explain what is meant by duty of care": "A moral or legal obligation to ensure the health, safety and welfare of others.",
                                            "Q18. Identify the FIVE different threat levels": [
                                                "Critical",
                                                "Severe",
                                                "Substantial",
                                                "Moderate",
                                                "Low"
                                            ],
                                            "Q24. State FIVE methods of spiking": [
                                                "Adding alcohol or drugs to a person's drink or food without their knowledge or consent",
                                                "Using a needle",
                                                "Drugging someone through cigarettes or vapes",
                                                "Swapping drinks secretly",
                                                "Adding a shot or additional liquid to a drink"
                                            ],
                                            "Q31. State how to manage a spiking incident": "Prioritise victim welfare, call ambulance/police, and ensure safeguarding.",
                                            "first_name": "Kiran",
                                            "last_name": "Khan",
                                            "assessment_date": "2024-08-23 17:03"
                                        }
                                    },
                                    "signature": {
                                        "description": "Base64-encoded signature image (optional)",
                                        "type": "string",
                                        "example": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XS..."
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Task submitted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Form submitted successfully"
                                        },
                                        "pdfPath": {
                                            "type": "string",
                                            "example": "https://yourdomain.com/storage/learners/john_doe/652adf9d3b.pdf"
                                        },
                                        "submission_id": {
                                            "type": "integer",
                                            "example": 105
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Task already in progress",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "In progress"
                                        },
                                        "status": {
                                            "type": "string",
                                            "example": "In Progress"
                                        },
                                        "submission_id": {
                                            "type": "integer",
                                            "example": 105
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "User not authenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "User not authenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong"
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Detailed error message"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/task/ds-refresher-workbook": {
            "get": {
                "tags": [
                    "TaskSubmission"
                ],
                "summary": "Get DS Refresher Workbook data",
                "description": "Returns DS Refresher Workbook configuration data",
                "operationId": "54891d8e460b0a4a05061b9637b5723e",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "question": {
                                                            "type": "string",
                                                            "example": "What is the main purpose of Text A?"
                                                        },
                                                        "desc": {
                                                            "type": "string",
                                                            "example": "Please select one answer. (1 Point)"
                                                        },
                                                        "type": {
                                                            "type": "string",
                                                            "example": "CHECK_BOX"
                                                        },
                                                        "options": {
                                                            "type": "array",
                                                            "items": {
                                                                "properties": {
                                                                    "label": {
                                                                        "type": "string",
                                                                        "example": "To describe"
                                                                    },
                                                                    "value": {
                                                                        "type": "string",
                                                                        "example": "a"
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        },
                                                        "placeholder": {
                                                            "type": "string",
                                                            "example": "Type your answer here...",
                                                            "nullable": true
                                                        },
                                                        "rules": {
                                                            "properties": {
                                                                "required": {
                                                                    "type": "string",
                                                                    "example": "Please provide an answer"
                                                                },
                                                                "minLength": {
                                                                    "properties": {
                                                                        "value": {
                                                                            "type": "integer",
                                                                            "example": 10
                                                                        },
                                                                        "message": {
                                                                            "type": "string",
                                                                            "example": "Answer must be at least 10 characters long"
                                                                        }
                                                                    },
                                                                    "type": "object"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/task/ds-refresher-workbook-2": {
            "get": {
                "tags": [
                    "TaskSubmission"
                ],
                "summary": "Get DS Refresher Workbook 2 data",
                "description": "Returns DS Refresher Workbook 2 configuration data",
                "operationId": "5c88d06a54e87e045647430f9c8baf65",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "question": {
                                                            "type": "string",
                                                            "example": "What is the main purpose of Text A?"
                                                        },
                                                        "desc": {
                                                            "type": "string",
                                                            "example": "Please select one answer. (1 Point)"
                                                        },
                                                        "type": {
                                                            "type": "string",
                                                            "example": "CHECK_BOX"
                                                        },
                                                        "options": {
                                                            "type": "array",
                                                            "items": {
                                                                "properties": {
                                                                    "label": {
                                                                        "type": "string",
                                                                        "example": "To describe"
                                                                    },
                                                                    "value": {
                                                                        "type": "string",
                                                                        "example": "a"
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        },
                                                        "placeholder": {
                                                            "type": "string",
                                                            "example": "Type your answer here...",
                                                            "nullable": true
                                                        },
                                                        "rules": {
                                                            "properties": {
                                                                "required": {
                                                                    "type": "string",
                                                                    "example": "Please provide an answer"
                                                                },
                                                                "minLength": {
                                                                    "properties": {
                                                                        "value": {
                                                                            "type": "integer",
                                                                            "example": 10
                                                                        },
                                                                        "message": {
                                                                            "type": "string",
                                                                            "example": "Answer must be at least 10 characters long"
                                                                        }
                                                                    },
                                                                    "type": "object"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/task/sg-refresher-questions": {
            "get": {
                "tags": [
                    "TaskSubmission"
                ],
                "summary": "Get SG Refresher questions data",
                "description": "Returns SG Refresher questions configuration data",
                "operationId": "02e541f4beb3aafda2c1b1982c5ba2b3",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "question": {
                                                            "type": "string",
                                                            "example": "What is the main purpose of Text A?"
                                                        },
                                                        "desc": {
                                                            "type": "string",
                                                            "example": "Please select one answer. (1 Point)"
                                                        },
                                                        "type": {
                                                            "type": "string",
                                                            "example": "CHECK_BOX"
                                                        },
                                                        "options": {
                                                            "type": "array",
                                                            "items": {
                                                                "properties": {
                                                                    "label": {
                                                                        "type": "string",
                                                                        "example": "To describe"
                                                                    },
                                                                    "value": {
                                                                        "type": "string",
                                                                        "example": "a"
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        },
                                                        "placeholder": {
                                                            "type": "string",
                                                            "example": "Type your answer here...",
                                                            "nullable": true
                                                        },
                                                        "rules": {
                                                            "properties": {
                                                                "required": {
                                                                    "type": "string",
                                                                    "example": "Please provide an answer"
                                                                },
                                                                "minLength": {
                                                                    "properties": {
                                                                        "value": {
                                                                            "type": "integer",
                                                                            "example": 10
                                                                        },
                                                                        "message": {
                                                                            "type": "string",
                                                                            "example": "Answer must be at least 10 characters long"
                                                                        }
                                                                    },
                                                                    "type": "object"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/task/cctv-activity-questions": {
            "get": {
                "tags": [
                    "TaskSubmission"
                ],
                "summary": "Get CCTV Activity Sheet data",
                "description": "Returns CCTV Activity Sheet configuration data",
                "operationId": "abe9de01b61debbda602cc1cc32dfa60",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "question": {
                                                            "type": "string",
                                                            "example": "What is the main purpose of Text A?"
                                                        },
                                                        "desc": {
                                                            "type": "string",
                                                            "example": "Please select one answer. (1 Point)"
                                                        },
                                                        "type": {
                                                            "type": "string",
                                                            "example": "CHECK_BOX"
                                                        },
                                                        "options": {
                                                            "type": "array",
                                                            "items": {
                                                                "properties": {
                                                                    "label": {
                                                                        "type": "string",
                                                                        "example": "To describe"
                                                                    },
                                                                    "value": {
                                                                        "type": "string",
                                                                        "example": "a"
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        },
                                                        "placeholder": {
                                                            "type": "string",
                                                            "example": "Type your answer here...",
                                                            "nullable": true
                                                        },
                                                        "rules": {
                                                            "properties": {
                                                                "required": {
                                                                    "type": "string",
                                                                    "example": "Please provide an answer"
                                                                },
                                                                "minLength": {
                                                                    "properties": {
                                                                        "value": {
                                                                            "type": "integer",
                                                                            "example": 10
                                                                        },
                                                                        "message": {
                                                                            "type": "string",
                                                                            "example": "Answer must be at least 10 characters long"
                                                                        }
                                                                    },
                                                                    "type": "object"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/task/ds-activity-sheet": {
            "get": {
                "tags": [
                    "TaskSubmission"
                ],
                "summary": "Get DS Activity Sheet Sheet data",
                "description": "Returns DS Activity Sheet Sheet configuration data",
                "operationId": "27bdb2e6b5a7051f2f74aba9af459686",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "question": {
                                                            "type": "string",
                                                            "example": "What is the main purpose of Text A?"
                                                        },
                                                        "desc": {
                                                            "type": "string",
                                                            "example": "Please select one answer. (1 Point)"
                                                        },
                                                        "type": {
                                                            "type": "string",
                                                            "example": "CHECK_BOX"
                                                        },
                                                        "options": {
                                                            "type": "array",
                                                            "items": {
                                                                "properties": {
                                                                    "label": {
                                                                        "type": "string",
                                                                        "example": "To describe"
                                                                    },
                                                                    "value": {
                                                                        "type": "string",
                                                                        "example": "a"
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        },
                                                        "placeholder": {
                                                            "type": "string",
                                                            "example": "Type your answer here...",
                                                            "nullable": true
                                                        },
                                                        "rules": {
                                                            "properties": {
                                                                "required": {
                                                                    "type": "string",
                                                                    "example": "Please provide an answer"
                                                                },
                                                                "minLength": {
                                                                    "properties": {
                                                                        "value": {
                                                                            "type": "integer",
                                                                            "example": 10
                                                                        },
                                                                        "message": {
                                                                            "type": "string",
                                                                            "example": "Answer must be at least 10 characters long"
                                                                        }
                                                                    },
                                                                    "type": "object"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/task/pi-health-questionnaire": {
            "get": {
                "tags": [
                    "TaskSubmission"
                ],
                "summary": "Get PI Health Questionnaire Sheet data",
                "description": "Returns PI Health Questionnaire Sheet configuration data",
                "operationId": "cfe3f99921b811ea5ff4b9b7870ccaa5",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "question": {
                                                            "type": "string",
                                                            "example": "What is the main purpose of Text A?"
                                                        },
                                                        "desc": {
                                                            "type": "string",
                                                            "example": "Please select one answer. (1 Point)"
                                                        },
                                                        "type": {
                                                            "type": "string",
                                                            "example": "CHECK_BOX"
                                                        },
                                                        "options": {
                                                            "type": "array",
                                                            "items": {
                                                                "properties": {
                                                                    "label": {
                                                                        "type": "string",
                                                                        "example": "To describe"
                                                                    },
                                                                    "value": {
                                                                        "type": "string",
                                                                        "example": "a"
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        },
                                                        "placeholder": {
                                                            "type": "string",
                                                            "example": "Type your answer here...",
                                                            "nullable": true
                                                        },
                                                        "rules": {
                                                            "properties": {
                                                                "required": {
                                                                    "type": "string",
                                                                    "example": "Please provide an answer"
                                                                },
                                                                "minLength": {
                                                                    "properties": {
                                                                        "value": {
                                                                            "type": "integer",
                                                                            "example": 10
                                                                        },
                                                                        "message": {
                                                                            "type": "string",
                                                                            "example": "Answer must be at least 10 characters long"
                                                                        }
                                                                    },
                                                                    "type": "object"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/task/hsa": {
            "get": {
                "tags": [
                    "TaskSubmission"
                ],
                "summary": "Get HSA Task data",
                "description": "Returns HSA (Health and Safety Assessment) Task configuration data",
                "operationId": "204807117cedd8f07751128b2a03363d",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "HSA Task data fetched successfully"
                                        },
                                        "data": {
                                            "description": "HSA task configuration data (structure depends on config/settings.HSA)",
                                            "type": "object",
                                            "additionalProperties": {
                                                "type": "mixed"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error fetching HSA Task data"
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Exception message"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/task/submission/delete": {
            "delete": {
                "tags": [
                    "TaskSubmission"
                ],
                "summary": "Delete learner task submission by task and user",
                "description": "Deletes a learner task submission for the authenticated user using task_id and user_id.",
                "operationId": "57191b228adaa5f06e98bac2819bc17f",
                "parameters": [
                    {
                        "name": "task_id",
                        "in": "query",
                        "description": "Task ID of submission to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    },
                    {
                        "name": "user_id",
                        "in": "query",
                        "description": "Authenticated user ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 25
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Task submission deleted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Task submission deleted successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "task_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 25
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "task_id and user_id are required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 400
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "task_id and user_id are required"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "User not authenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 401
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "User not authenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "You can only delete your own submissions",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 403
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "You can only delete your own submissions"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Task submission not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 404
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Task submission not found for given task_id and user_id"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Failed to delete submission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 500
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Failed to delete submission"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "bearerFormat": "JWT",
                "scheme": "bearer"
            }
        }
    },
    "tags": [
        {
            "name": "Application Forms",
            "description": "API Endpoints for Application Forms Management"
        },
        {
            "name": "Balance",
            "description": "User balance and outstanding payment endpoints"
        },
        {
            "name": "Course Bundles (Public)",
            "description": "Public course bundle endpoints (no authentication required)"
        },
        {
            "name": "CoursePrerequisites",
            "description": "Course prerequisites endpoints"
        },
        {
            "name": "Dashboard",
            "description": "Learner Dashboard endpoints"
        },
        {
            "name": "DocumentUpload",
            "description": "Document upload endpoints"
        },
        {
            "name": "Learner Exam",
            "description": "Learner Exam endpoints"
        },
        {
            "name": "Messages",
            "description": "API Endpoints for Messages Management"
        },
        {
            "name": "Profile Photos",
            "description": "Profile photo endpoints"
        },
        {
            "name": "Resources",
            "description": "Get user-specific flipbook resources"
        },
        {
            "name": "TaskSubmission",
            "description": "Task submission endpoints"
        },
        {
            "name": "Authentication",
            "description": "Authentication"
        }
    ]
}