Link Search Menu Expand Document

Employee

API LINK: https://employeeapidocumentation.docs.apiary.io/#

List of all routes:


Register

This route will send an email to employee with his first password.

  • POST https://nite-apigateway.herokuapp.com/users/employee - Create employee profile
headers: { Authorization: `Bearer ${token}` }

Requires token from manager.

req.body = {
    name: String,
    email: String,
    birth: Date,
    job: String,
    establishment: String,
    phone: String,
    address: String
}

Login

  • POST https://nite-apigateway.herokuapp.com/users/employee/login - Employee login
    req.body = {
      email: String,
      password: String
    }
    

Reset password

  • POST https://nite-apigateway.herokuapp.com/users/employee/resetPassword - Employee reset Password
headers: { Authorization: `Bearer ${token}` }
req.body = {
    password: String
}

Update info

  • PUT https://nite-apigateway.herokuapp.com/users/employee - Update employee info
headers: { Authorization: `Bearer ${token}` }
req.body = {
    name: String,
    email: String,
    phone: String,
    birth: Date,
    password: String
}

Update email

  • PUT https://nite-apigateway.herokuapp.com/users/employee/email - Update employee email
headers: { Authorization: `Bearer ${token}` }
req.body={
    email: String
}

Update password

  • PUT https://nite-apigateway.herokuapp.com/users/employee/password - Update employee password
headers: { Authorization: `Bearer ${token}` }
req.body={
    oldPassword: String,
    newPassword: String
}

Get own info

  • GET https://nite-apigateway.herokuapp.com/users/employee - Get own info
headers: { Authorization: `Bearer ${token}` }

Reset password

  • GET https://nite-apigateway.herokuapp.com/users/employee/sendMail?email= - Ask email to resetPassword

Email in req.query.