Get started

Request protocol: HTTP

Base URL: http://employee.dreywandowski.ng/api/

Content type: form-encode

Authentication type: Bearer token

Response Formats: JSON

Register


        # Here is a curl example
        curl \
        -X POST http://employee.dreywandowski.ng/api/employees/addEmployee

        
    


    
        # Response Message
        {
            "message": "User Miranda Lambert created sucessfully!",
            "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoiaG9seV8zMzIyIiwicm9sZSI6InVzZXIiLCJlbWFpbCI6Im1pcmFuZGFAbGFtYmVydC5jb20iLCJpYXQiOjE2NzMyNzI4NzEsImV4cCI6MTY3MzM1OTI3MX0.CZPaTTAtGNdk3YJy_FJSPAHPO9c43C8cVbapqPhjkww",
            "user": {
              "username": "holy_3322",
              "role": "user"
            },
            "expiresAt": "2023-01-09T14:02:37.515Z",
            "status": 1
          }

        

QUERY PARAMETERS

Field Type Comments
firstName string required
lastName string required
username string required
password string required
age integer required
admin boolean required
dept string required
email string required

Verify New User


# Here is a curl example
curl \
-X POST http://employee.dreywandowski.ng/api/employees/verifyEmployee





# Success Response Message
{
        "message" : "User verified succesfully, you may proceed to login",
         "status":1
  }

        # Failure Message
        {
            "message": "Error updating the user with a verified token or updating the dB! Error: Error updating the user with a verified token!!",
            "status": 0
          }

QUERY PARAMETERS

Field Type Description
email string required
pin string 6-digit OTP sent to user's mail

Login


        # Here is a curl example
        curl \
        -X POST http://employee.dreywandowski.ng/api/employees/login

        
    


    
        # Success Response Message
        {
            "message": "Login successful, Authenticated!",
            "status": true,
            "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoibWljaGFlbHNvbiIsInJvbGUiOiJhZG1pbiIsImVtYWlsIjoib2x1c2V1bi5ha2ludGF5b0BnbWFpbC5jb20iLCJpYXQiOjE2NzMyNzE3MjYsImV4cCI6MTY3MzM1ODEyNn0.TnaCwWhyQnz2-0L8UtQo9nBI4sVBi-AIBt4vvdjnXm8",
            "user": {
              "username": "michaelson",
              "role": "admin",
              "email": "[email protected]"
            },
            "expiresAt": "2023-01-09T13:43:32.576Z"
          }

                # Failure Message
                {
                    "message": "Username or password dont match!",
                    "status": false
                  }


        

QUERY PARAMETERS

Field Type Description
username string required
password string required

List Employees


        # Here is a curl example
        curl \
        -X GET https://employee.dreywandowski.ng/api/employees

        
    


    
        # Success Response Message
        {
            "message": "User list retrieved sucessfully!",
            "users": [
              {
                "firstName": "Taylor",
                "lastName": "Swift",
                "username": "autumn_leaves",
                "age": 20,
                "isAdmin": true,
                "email": null,
                "department": "Finance",
                "supervisor": null,
                "subordinates": [
                  "zonik_beauty"
                ]
              },
              {
                "firstName": "Miranda",
                "lastName": "Lambert",
                "username": "holy_water",
                "age": 35,
                "isAdmin": false,
                "email": "[email protected]",
                "department": "Music",
                "supervisor": null,
                "subordinates": null
              }
            ],
            "status": 1
          }


        

QUERY PARAMETERS

Field Type Description

Get Employee


        # Here is a curl example
        curl \
        -X GET https://employee.dreywandowski.ng/api/employees/{employee}

        
    


    
        # Success Response Message
        {
            "message": "User retrieved sucessfully!",
            "user": {
              "firstName": "Wyclef",
              "lastName": "Jean",
              "username": "dreywandowski",
              "age": 62,
              "isAdmin": true,
              "email": "[email protected]",
              "department": "HR",
              "supervisor": null,
              "subordinates": null
            },
            "status": 1
          }
          
                # No Records Message
                {
                    "message": "User not found!",
                    "status": 0
                  }
               


        

QUERY PARAMETERS

Field Type Description
username string employee username

Edit Profile


        # Here is a curl example
        curl \
        -X PUT http://employee.dreywandowski.ng/api/employees/updateEmployee/{username}

        
    


    
        # Success Response Message
        {
            "message": "User updated successfully!",
            "status": 1
          }
          
                # No Records Message
                {
                    "message": "Error editing the user!",
                    "status": 0
                  }
               


        

QUERY PARAMETERS

Field Type Description
username string employee username

Forgot Password


        # Here is a curl example
        curl \
        -X POST http://employee.dreywandowski.ng/api/employees/forgotPassword

        
    


    
        # Success Response Message
        {
            "message": "Password reset token has been sent to your email!",
            "status": 1
          }


        

QUERY PARAMETERS

Field Type Description
email string required

Verify Forgot Password Token


        # Here is a curl example
        curl \
        -X POST http://employee.dreywandowski.ng/api/employees/verifyforgotPin

        
    


    
        # Success Response Message
        {
            "message" : "You can now reset your password!",
             'status': 1
            }

       # Failure Response Message
       {
        "message": "Some error occured while trying to verify your token! Error: Error deleting the user token, no details exist with your input!!",
        "status": 0
      }

        

QUERY PARAMETERS

Field Type Description
email string required
pin string 6-digit OTP sent to user's mail

Reset Password


        # Here is a curl example
        curl \
        -X POST http://employee.dreywandowski.ng/api/employees/resetPassword

        
    


    
        # Success Response Message
        {
            "message": "Password reset succesful!",
            "status": 1
          }


        

QUERY PARAMETERS

Field Type Description
email string required
password string required

Remove Employee


                # Here is a curl example
                curl \
                -X DELETE https://employee.dreywandowski.ng/api/employees/removeEmployee/{username}
        
                
            


            
                # Success Response Message
                {
                    "message": "User deleted succesfully!",
                    "status": 1
                  }
            
                  #Failure Response Message
                  {
                    "message": "Error deleting the user, verify that it exists!",
                    "status": 0
                  }
                

QUERY PARAMETERS

Field Type Comments
username string employee username

Assign Employee To Supervisor


                # Here is a curl example
                curl \
                -X POST https://employee.dreywandowski.ng/api/employees/assignSupervisor/{username}
        
                
            


            
                # Success Response Message
                {
                    "message": "Employee assignment completed sucessfully! durella is now under dreywandowski",
                    "status": 1
                  }
            
                  #Failure Response Message
                  {
                    "message": "Error assigning supervisor to the user, user doesn't exist!",
                    "status": 0
                  }
                

QUERY PARAMETERS

Field Type Comments
username string employee username

Assign Employee To Supervisor


                # Here is a curl example
                curl \
                -X POST https://employee.dreywandowski.ng/api/employees/rankEmployee/{username}
        
                
            


            
                # Success Response Message
                {
                    "message": "User assigned the rank ABO successfully!",
                    "status": 1
                }
            
                  #Failure Response Message
                  {
                    "message": "Error assigning user!",
                    "status": 0
                  }
                

QUERY PARAMETERS

Field Type Comments
rank string desired rank

Calculate Monthly Salary


                # Here is a curl example
                curl \
                -X POST https://employee.dreywandowski.ng/api/employees/calculateSalary/{username}
        
                
            


            
                # Success Response Message
                {
                    "message": "Salary breakdown completed successfully!",
                    "content": [
                        {
                            "basic_salary": 71500,
                            "hmo": 172500,
                            "housing": 7000,
                            "furniture": 6500,
                            "leave_allowance": 58000,
                            "dressing": 30000,
                            "transport": 9000,
                            "education": 8000,
                            "utility": 30000,
                            "total_earnings": 392500,
                            "username": "autumn_leaves",
                            "full_name": "Taylor Swift",
                            "rank": "EXE"
                        }
                    ],
                    "status": 1
                }
            
                  #Failure Response Message
                  {
                    "message": "Unable to set up salary calulation!",
                    "status": 0
                  }
                

QUERY PARAMETERS

Field Type Comments

Download Salary Breakdown


                # Here is a curl example
                curl \
                -X GET https://employee.dreywandowski.ng/api/employees/downloadSalary
        
                
            


            
                # Success Response Message
                {
                   File is downloaded in PDF format
                }
            
                  #Failure Response Message
                  {
                    "message": "File is not existent!!",
                    "status": 0
                }
                

QUERY PARAMETERS

Field Type Comments

Pay Staff


                # Here is a curl example
                curl \
                -X POST https://employee.dreywandowski.ng/api/employees/paySalary?username={$username}
        
                
            


            
                # Success Response Message
                {
                    "message": "Transfer initiated sucessfully! Please check your bank account",
                    "status": 1
                }
                  #Failure Response Message
                  {
                    "message" : "Unable to transfer funds, error = Account resolve failed", 
                                "status":0}
                

QUERY PARAMETERS

Field Type Comments
username string staff to transfer to
amount double amount to transfer
narration string e.g May Salary

Create Leave Application


                # Here is a curl example
                curl \
                -X POST http://employee.dreywandowski.ng/api/leaves/createLeave
        
                
            


            
                # Success Response Message
                {
                    "message": "Leave request created sucessfully",
                    "status": 1
                  }
            
                  #Failure Response Message
                  {
                    "message": "Error creating the leave application",
                    "status": 0
                  }
                

QUERY PARAMETERS

Field Type Comments
username string employee username
purpose string reason for the leave
username string employee username
type string leave type
status string the status
date_from date leave start
date_to date leave end

Apply for Leave


                # Here is a curl example
                curl \
                -X POST http://employee.dreywandowski.ng/api/leaves/requestLeave
        
                
            


            
                # Success Response Message
                {
                    "message": "Leave requested sucessfully!",
                    "status": 1
                  }
            
                  #Failure Response Message
                  {
                    "message": "Error requesting the leave application",
                    "status": 0
                  }
                

QUERY PARAMETERS

Field Type Comments
id integer leave application id

Display Leave Applications


                # Here is a curl example
                curl \
                -X GET https://employee.dreywandowski.ng/api/leaves/myLeaves
        
                
            


            
                # Success Response Message
                {
                    "message": "Leave list retrieved sucessfully!",
                    "leaves": [
                      {
                        "id": 1,
                        "purpose": "I'm travelling to the Bahamas",
                        "type": "Annual Leave",
                        "status": "created",
                        "date_from": "2022-10-11T00:00:00.000Z",
                        "date_to": "2022-10-20T00:00:00.000Z",
                        "username": "dreywandowski",
                        "approved": null,
                        "approved_by": null,
                        "rejected_by": null,
                        "createdAt": "2022-11-10T16:03:43.000Z",
                        "updatedAt": "2022-11-10T16:03:43.000Z"
                      }
                    ],
                    "status": 1
                  }
                

QUERY PARAMETERS

Field Type Comments

Display Leave Application


                # Here is a curl example
                curl \
                -X GET https://employee.dreywandowski.ng/api/leaves/myLeaves/{id}
        
                
            


            
                # Success Response Message
                {
                    "message": "Leave list retrieved sucessfully!",
                    "leaves": [
                      {
                        "id": 1,
                        "purpose": "I'm travelling to the Bahamas",
                        "type": "Annual Leave",
                        "status": "created",
                        "date_from": "2022-10-11T00:00:00.000Z",
                        "date_to": "2022-10-20T00:00:00.000Z",
                        "username": "dreywandowski",
                        "approved": null,
                        "approved_by": null,
                        "rejected_by": null,
                        "createdAt": "2022-11-10T16:03:43.000Z",
                        "updatedAt": "2022-11-10T16:03:43.000Z"
                      }
                    ],
                    "status": 1
                  }
                

QUERY PARAMETERS

Field Type Comments
id integer leave application id

Cancel Leave Application


                # Here is a curl example
                curl \
                -X POST http://employee.dreywandowski.ng/api/leaves/cancelLeave/{id}
        
                
            


            
                # Success Response Message
                {
                    "message": "Leave request cancelled sucessfully!",
                    "status": 1
                  }

                  # Failure Response Message
                  {
                    "message": "Error cancelling leave application"",
                    "status": 0 
                  }
                

QUERY PARAMETERS

Field Type Comments
id integer leave application id

Approve Leave Application


                # Here is a curl example
                curl \
                -X POST http://employee.dreywandowski.ng/api/leaves/approve/{id}
        
                
            


            
                # Success Response Message
                {
                    "message": "Leave request approved sucessfully!",
                    "status": 1
                  }

                  # Failure Response Message
                  {
                    "message": "Error Approving Leave application",
                    "status": 0 
                  }
                

QUERY PARAMETERS

Field Type Comments
id integer leave application id

Reject Leave Application


                # Here is a curl example
                curl \
                -X POST http://employee.dreywandowski.ng/api/leaves/reject/{id}
        
                
            


            
                # Success Response Message
                {
                    "message": "Leave request rejected sucessfully!",
                    "status": 1
                  }

                  # Failure Response Message
                  {
                    "message": "Error rejecting Leave application",
                    "status": 0 
                  }
                

QUERY PARAMETERS

Field Type Comments
id integer leave application id

Leave Applications needing Admin attention


                # Here is a curl example
                curl \
                -X GET http://employee.dreywandowski.ng/api/leaves/attention
        
                
            


            
                # Success Response Message
                {
                    "message": "Leave list retrieved sucessfully!",
                    "leaves": [
                      {
                        "id": 2,
                        "purpose": "I'm travelling to the Bahamas",
                        "type": "Annual Leave",
                        "status": "requested",
                        "date_from": "2022-10-11T00:00:00.000Z",
                        "date_to": "2022-10-20T00:00:00.000Z",
                        "username": "autumn_leaves1",
                        "approved": null,
                        "approved_by": null,
                        "rejected_by": null,
                        "createdAt": "2022-11-10T17:21:15.000Z",
                        "updatedAt": "2022-11-10T17:34:30.000Z"
                      }
                    ],
                    "status": 1
                  }
                

QUERY PARAMETERS

Field Type Comments

List Job Applications


        # Here is a curl example
        curl \
        -X GET https://employee.dreywandowski.ng/api/jobs/applications

        
    


    
        # Success Response Message
        {
            "message": "Application list retrieved sucessfully!",
            "applications": [
              {
                "id": 14,
                "firstName": "Adura",
                "lastName": "dreywandowski",
                "email": "[email protected]",
                "phone": 99949494,
                "address": "7, Marina Road, Lagos",
                "location": "Lagos",
                "skills": "Laravel, PHP, Javascript",
                "total_years_of_experience": 4,
                "proffessional_qualifications": "CPN, ICAN",
                "jobAppliedFor": "Software Engineer",
                "createdAt": "2022-11-18T14:44:32.000Z",
                "updatedAt": "2022-11-18T14:44:32.000Z"
              }
              {
                "id": 24,
                "firstName": "Adura",
                "lastName": "dreywandowski",
                "email": "[email protected]",
                "phone": 99949494,
                "address": "3, Awolowo Road, Ikoyi Lagos",
                "location": "Lagos",
                "skills": "Laravel, PHP, Javascript",
                "total_years_of_experience": 4,
                "proffessional_qualifications": "CPN, ICAN",
                "jobAppliedFor": "Software Engineer",
                "createdAt": "2022-11-18T16:33:01.000Z",
                "updatedAt": "2022-11-18T16:33:01.000Z"
              }
            ],
            "status": 1
          }
        

QUERY PARAMETERS

Field Type Description
Add a "csv : 1" body parameter to trigger download as CSV option

Get Job Application


        # Here is a curl example
        curl \
        -X GET https://employee.dreywandowski.ng/api/jobs/applications/{application_id}

        
    


    
        # Success Response Message
        {
            "message": "Application item retrieved sucessfully!",
            "application": [
              {
                "id": 23,
                "firstName": "Adura",
                "lastName": "dreywandowski",
                "email": "[email protected]",
                "phone": 99949494,
                "address": "57, Marina Road, Lagos",
                "location": "Lagos",
                "skills": "Laravel, PHP, Javascript",
                "total_years_of_experience": 4,
                "proffessional_qualifications": "CPN, ICAN",
                "jobAppliedFor": "Software Engineer",
                "createdAt": "2022-11-18T16:25:57.000Z",
                "updatedAt": "2022-11-18T16:25:57.000Z"
              }
            ],
            "status": 1
          }


        

QUERY PARAMETERS

Field Type Description
id integer application id

Post Job


                # Here is a curl example
                curl \
                -X POST https://employee.dreywandowski.ng/api/jobs/applications
        
                
            


            
                # Response Message
                {
                    "message": "Job Software Engineer created sucessfully!",
                    "status": 1
                  }
        
                

QUERY PARAMETERS

Field Type Comments
title string job title
isOpen boolean status of the job posting
yearsOfExperience integer years of experience required
description string info about the job
duties string job duties
qualifications string additional qualifications
skills string skills required for the role
end_date date date for job posting to end
department string department where the job posting will be under

Job Listing


        # Here is a curl example
        curl \
        -X GET https://employee.dreywandowski.ng/api/jobs

        
    


    
        # Success Response Message
        {{
            "message": "Job list retrieved sucessfully!",
            "jobs": [
              {
                "id": 1,
                "title": "Software Engineer",
                "isOpen": true,
                "yearsOfExperience": 2,
                "description": "You will be a lead developer responsible for the development of new software products and enhancements to existing products.",
                "duties": "Writing clean, high-quality, high-performance, maintainable code ",
                "qualifications": "Bachelor's degree in Computer Science (or related field) 3+ years of relevant work experience Expertise in DevOps, Object Oriented Design, Database Design",
                "skills": "Must be an expert in any of PHP, Laravel, Codeigniter, Symfony, Python, Flask, Django, Android Development, iOS development, Flutter, Swift, Kotlin, etc",
                "department": "IT",
                "end_date": "2022-12-31T00:00:00.000Z",
                "createdAt": "2022-11-16T16:49:05.000Z",
                "updatedAt": "2022-11-16T16:49:05.000Z"
              },
              {
                "id": 2,
                "title": "Backend Developer",
                "isOpen": true,
                "yearsOfExperience": 1,
                "description": "Develop backend APIs",
                "duties": "PHP developer",
                "qualifications": "Bachelor's degree in Computer Science (or related field) 3+ years of relevant work experience Expertise in DevOps, Object Oriented Design, Database Design",
                "skills": "Must be an expert in any of PHP and Laravel",
                "department": "IT",
                "end_date": "2022-12-01T00:00:00.000Z",
                "createdAt": "2022-11-16T16:52:53.000Z",
                "updatedAt": "2022-11-16T16:52:53.000Z"
              }
            ],
            "status": 1
          }
        

QUERY PARAMETERS

Field Type Description

Get Job Application


        # Here is a curl example
        curl \
        -X GET https://employee.dreywandowski.ng/api/jobs/{job_id}

        
    


    
        # Success Response Message
        {
            "message": "Job item retrieved sucessfully!",
            "job": [
              {
                "id": 2,
                "title": "Backend Developer",
                "isOpen": true,
                "yearsOfExperience": 1,
                "description": "Develop backend APIs",
                "duties": "PHP developer",
                "qualifications": "Bachelor's degree in Computer Science (or related field) 3+ years of relevant work experience Expertise in DevOps, Object Oriented Design, Database Design",
                "skills": "Must be an expert in any of PHP and Laravel",
                "end_date": "2022-12-01T00:00:00.000Z",
                "createdAt": "2022-11-16T16:52:53.000Z",
                "updatedAt": "2022-11-16T16:52:53.000Z"
              }
            ],
            "status": 1
          }


        

QUERY PARAMETERS

Field Type Description
id integer job id

Change Job Application Status


                # Here is a curl example
                curl \
                -X POST https://employee.dreywandowski.ng/api/jobs/applications/changeAppStatus
        
                
            


            
                # Success Response Message
                {
                    "message": "Application status updated sucessfully!",
                    "status": 1
                  }
            
                  #Failure Response Message
                  {
                    "message": "Error updating application status",
                    "status": 0
                  }
                

QUERY PARAMETERS

Field Type Comments
id string application id
status integer status that would denote the application stage. 2 is for first interview, 3 is final interview, 4 is hired
interview_date date date of interview -- optional

Apply for Job


                # Here is a curl example
                curl \
                -X POST https://employee.dreywandowski.ng/api/jobs/applications/apply/{job_id}
        
                
            


            
                # Success Response Message
                {
                    "message": "Application submitted sucessfully!",
                    "status": 1
                  }
            
                  #Failure Response Message
                  {
                    "message": "Error aplying for the job",
                    "status": 0
                  }
                

QUERY PARAMETERS

Field Type Comments
firstName string first name
lastName string last name
email string email address
phone integer phone number
address string mail address
location string state or city
yearsOfExperience integer years of experience
skills string applicant skills
proffessional_qualifications string applicant qualifications
jobAppliedFor string job applied for
job_id integer foreign key id for job applied for

Logout


        # Here is a curl example
        curl \
        -X POST http://employee.dreywandowski.ng/api/employees/logout

        
    


    
        # Success Response Message
        {
            "message": "Logout successful, Unauthenticated!",
            "status": 1 
          }

                # Failure Message
                {
                    "message": " Error logging out the user, kindly check the error msg!",
                    "status": 0
                  }


        

QUERY PARAMETERS

Field Type Description