swagger: "2.0"
info:
  version: "1.0"
  title: SnapHRM
  description: |
    This contains documentation for SnapHRM API.
    ## Points to remember
    * **Messages**: Do not use messages returned in API directly. They are meant for developers and are not translated.
host: localhost:8000
#host: localhost:8000
basePath: /v1
schemes:
  - https
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  Bearer:
    type: apiKey
    name: Authorization
    in: header
paths:
#
#///////////////////////////////////
# Auth Endpoints
#///////////////////////////////////
#
  /auth/login:
    post:
      tags:
        - Auth
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: email
          in: query
          type: string
          description: Email id of user who wants to login
          required: true
        - name: password
          in: query
          type: string
          description: Password of user's account
          required: true
        - name: remember_me
          in: query
          type: boolean
          description: If true, a long lasting token is generated for user
          required: true
          default: false
      responses:
        200:
          description: Login was successful, return auth token and basic employee data
          schema:
            $ref: "#/definitions/LoginResponse"
        422:
          description: Data could not be validated
          schema:
            $ref: "#/definitions/ValidationException"
        403:
          description: User is not allowed to perform this action. Either invalid token or permission error
          schema:
            $ref: "#/definitions/UnauthorizedException"
        500:
          description: An unknown error occured
          schema:
            $ref: "#/definitions/ApiException"
  /auth/logout:
    post:
      tags:
        - Auth
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: token
          in: query
          type: string
          description: Current auth token in use. To logout, simply this token will be invalidated.
          required: true
      responses:
        200:
          description: Logout was successful
          schema:
            $ref: "#/definitions/LogoutResponse"
        422:
          description: Data could not be validated
          schema:
            $ref: "#/definitions/ValidationException"
        500:
          description: An unknown error occured
          schema:
            $ref: "#/definitions/ApiException"
  /auth/forgot-password:
    post:
      tags:
        - Auth
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: email
          in: query
          type: string
          description: Email Id for which password is to be reset
          required: true
      responses:
        200:
          description: If an email is submitted, always success is returned, even if email does not exist, to prevent brut-force attacks.
          schema:
            $ref: "#/definitions/ForgotPasswordResponse"
        422:
          description: Data could not be validated
          schema:
            $ref: "#/definitions/ValidationException"
        500:
          description: An unknown error occured
          schema:
            $ref: "#/definitions/ApiException"
  /auth/reset-password:
    post:
      tags:
        - Auth
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: password_reset_token
          in: query
          type: string
          description: Password reset code recevied in email
          required: true
        - name: password
          in: query
          type: string
          description: New password. Confirm password validation is done on client side and not required in API
          required: true
      responses:
        200:
          description: Password reset was successful
          schema:
            $ref: "#/definitions/ResetPasswordResponse"
        422:
          description: Data could not be validated
          schema:
            $ref: "#/definitions/ValidationException"
        500:
          description: An unknown error occured
          schema:
            $ref: "#/definitions/ApiException"
  /auth/refresh:
    get:
      tags:
        - Auth
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: token
          in: query
          type: string
          description: Token that needs to be refreshed
          required: true
      responses:
        200:
          description: Token refreshed successfuly
          schema:
            $ref: "#/definitions/RefreshTokenResponse"
        422:
          description: Data could not be validated
          schema:
            $ref: "#/definitions/ValidationException"
        500:
          description: An unknown error occured
          schema:
            $ref: "#/definitions/ApiException"

  /auth/application:
    post:
      tags:
        - Auth
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: app_key
          in: query
          type: string
          description: Application key
          required: true
        - name: app_secret
          in: query
          type: string
          description: Application secret key
          required: true
      responses:
        200:
          description: Login was successful, return auth token and basic employee data
          schema:
            $ref: "#/definitions/LoginResponse"
        422:
          description: Data could not be validated
          schema:
            $ref: "#/definitions/ValidationException"
        403:
          description: User is not allowed to perform this action. Either invalid token or permission error
          schema:
            $ref: "#/definitions/UnauthorizedException"
        500:
          description: An unknown error occured
          schema:
            $ref: "#/definitions/ApiException"
#
#///////////////////////////////////
# App Endpoints
#///////////////////////////////////
#
  /app:
    get:
      tags:
        - App
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
      responses:
        200:
          description: Request completed successfully
          schema:
            $ref: "#/definitions/AppResponse"
        500:
          description: An unknown error occured
          schema:
            $ref: "#/definitions/ApiException"
        404:
          description: Company not found
          schema:
            $ref: "#/definitions/ResourceNotFoundException"
#
#///////////////////////////////////
# Me Endpoints
#///////////////////////////////////
#
  /me/news:
    get:
      tags:
        - Me
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all news intended to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/News"
  /me/calendar:
    get:
      tags:
        - Me
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all events intended to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Event"
#
#///////////////////////////////////
# Company Endpoints
#///////////////////////////////////
#
  /company:
    get:
      tags:
        - Company
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all companies in SnapHRM (for superadmin only)
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Company"
    post:
      tags:
        - Company
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Company"
      responses:
        200:
          description: Sends the company with id
          schema:
            $ref: "#/definitions/PostResponse"
  /company/{id}:
    get:
      tags:
        - Company
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          description: ID of the company
          required: true
        - $ref: "#/parameters/fieldsParam"
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Company"
    put:
      tags:
        - Company
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          description: ID of the company
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Company"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Company
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
  /company/{company}/setting/{id}:
    get:
      tags:
        - Company
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          description: ID of the company
          required: true
        - name: company
          in: path
          type: string
          description: ID of the company
          required: true
        - $ref: "#/parameters/fieldsParam"
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/CompanySetting"
    put:
      tags:
        - Company
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          description: ID of the company setting
          required: true
        - name: company
          in: path
          type: string
          description: ID of the company
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/CompanySetting"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
#
#///////////////////////////////////
# File Endpoints
#///////////////////////////////////
#
  /file:
    post:
      tags:
        - Files
      consumes:
         - multipart/form-data
      parameters:
        - name: file
          in: formData
          required: true
          type: file
        - name: type
          in: query
          required: true
          type: string
        - name: crop
          in: query
          type: boolean
          default: false
        - name: width
          in: query
          type: number
          format: int32
          default: 0
        - name: height
          in: query
          type: number
          format: int32
          default: 0
        - name: x
          in: query
          type: number
          format: int32
          default: 0
        - name: y
          in: query
          type: number
          format: int32
          default: 0
      responses:
        200:
          description: List all employees in current company that match the criteria
          schema:
            type: object
            properties:
              data:
                type: object
                properties:
                  name:
                    type: string
                    description: Name of uploaded file
  /file/{name}:
    get:
      tags:
        - Files
      parameters:
        - name: name
          type: string
          in: path
          required: true
      responses:
        200:
          description: Request was successful
#
#///////////////////////////////////
# Employee Endpoints
#///////////////////////////////////
#
  /employee:
    get:
      tags:
        - Employees
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all employees in current company that match the criteria
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Employee"
    post:
      tags:
        - Employees
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Employee"
      responses:
        200:
          description: Sends the employee with id
          schema:
            $ref: "#/definitions/PostResponse"
  /employee/{id}:
    get:
      tags:
        - Employees
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          description: ID of the employee (not employee_id)
          required: true
        - $ref: "#/parameters/fieldsParam"
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Employee"
    put:
      tags:
        - Employees
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          description: ID of the employee (not employee_id)
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Employee"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Employees
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          description: ID of the employee (not employee_id)
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
  /employee/{id}/profile:
    get:
      tags:
        - Employees
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          description: ID of the employee (not employee_id)
          required: true
      responses:
        200:
          description: Reqeust was successful
  /employee/team:
    get:
      tags:
        - Employees
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
      responses:
        200:
          description: Reqeust was successful
  /employee/{id}/password:
    post:
      tags:
        - Employees
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          description: ID of the employee (not employee_id)
          required: true
        - name: old_password
          in: query
          type: string
          description: Employee's previous password
          required: true
        - name: new_password
          in: query
          type: string
          description: Employee's new password
          required: true
      responses:
        200:
          description: Password change was successful
          schema:
            $ref: "#/definitions/ResetPasswordResponse"
        422:
          description: Previous password was incorrect
          schema:
            $ref: "#/definitions/ValidationException"
        500:
          description: An unknown error occured
          schema:
            $ref: "#/definitions/ApiException"
#
#///////////////////////////////////
# Designation Endpoints
#///////////////////////////////////
#
  /designation:
    get:
      tags:
        - Designations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all designations in current company that match the criteria
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Designation"
    post:
      tags:
        - Designations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Designation"
      responses:
        200:
          description: Sends the designation with id
          schema:
            $ref: "#/definitions/PostResponse"
  /designation/{id}:
    get:
      tags:
        - Designations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Designation"
    put:
      tags:
        - Designations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Designation"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Designations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
#
#///////////////////////////////////
# Department Endpoints
#///////////////////////////////////
#
  /department:
    get:
      tags:
        - Departments
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all departments in current company that match the criteria
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Department"
    post:
      tags:
        - Departments
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Department"
      responses:
        200:
          description: Sends the department with id
          schema:
            $ref: "#/definitions/PostResponse"
  /department/{id}:
    get:
      tags:
        - Departments
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Designation"
    put:
      tags:
        - Departments
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Department"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Departments
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
#
#///////////////////////////////////
# Location Endpoints
#///////////////////////////////////
#
  /location:
    get:
      tags:
        - Locations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all locations in current company that match the criteria
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Location"
    post:
      tags:
        - Locations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Location"
      responses:
        200:
          description: Sends the Location with id
          schema:
            $ref: "#/definitions/PostResponse"
  /location/{id}:
    get:
      tags:
        - Locations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Location"
    put:
      tags:
        - Locations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Location"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Locations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
#
#///////////////////////////////////
# News Endpoints
#///////////////////////////////////
#
  /news:
    get:
      tags:
        - News
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all news visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/News"
    post:
      tags:
        - News
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/News"
      responses:
        200:
          description: Sends the news with id
          schema:
            $ref: "#/definitions/PostResponse"
  /news/{id}:
    get:
      tags:
        - News
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/News"
    put:
      tags:
        - News
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/News"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - News
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
  /news/{id}/read:
    patch:
      tags:
        - News
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Updates read status of the news for current user
          schema:
            type: object
            properties:
              message:
                type: string
#
#///////////////////////////////////
# Award Endpoints
#///////////////////////////////////
#
  /award:
    get:
      tags:
        - Awards
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all awards visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Award"
    post:
      tags:
        - Awards
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Award"
      responses:
        200:
          description: Sends the award with id
          schema:
            $ref: "#/definitions/PostResponse"
  /award/{id}:
    get:
      tags:
        - Awards
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Award"
    put:
      tags:
        - Awards
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Award"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Awards
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
#
#///////////////////////////////////
# Appreciation Endpoints
#///////////////////////////////////
#
  /appreciation:
    get:
      tags:
        - Appreciations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all appreciation visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Appreciation"
    post:
      tags:
        - Appreciations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Appreciation"
      responses:
        200:
          description: Sends the appreciation with id
          schema:
            $ref: "#/definitions/PostResponse"
  /appreciation/{id}:
    get:
      tags:
        - Appreciations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Appreciation"
    put:
      tags:
        - Appreciations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Appreciation"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Appreciations
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
#
#///////////////////////////////////
# Asset Endpoints
#///////////////////////////////////
#
  /asset/types:
    get:
      tags:
        - Assets
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
      responses:
        200:
          description: List all asset types
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/AssetType"
  /asset:
    get:
      tags:
        - Assets
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all assets visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Asset"
    post:
      tags:
        - Assets
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Asset"
      responses:
        200:
          description: Sends the asset with id
          schema:
            $ref: "#/definitions/PostResponse"
  /asset/{id}:
    get:
      tags:
        - Assets
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Asset"
    put:
      tags:
        - Assets
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Asset"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Assets
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
#
#///////////////////////////////////
# Asset Endpoints
#///////////////////////////////////
#
  /asset/{asset}/history:
    get:
      tags:
        - Assets
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
        - name: asset
          type: number
          in: path
          required: true
      responses:
        200:
          description: List all asset history entires for this asset
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/AssetHistory"
    post:
      tags:
        - Assets
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: asset
          type: number
          in: path
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/AssetHistory"
      responses:
        200:
          description: Sends the asset history with id
          schema:
            $ref: "#/definitions/PostResponse"
  /asset/{asset}/history/{id}:
    get:
      tags:
        - Assets
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: asset
          type: number
          in: path
          required: true
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/AssetHistory"
    put:
      tags:
        - Assets
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: asset
          type: number
          in: path
          required: true
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/AssetHistory"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Assets
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: asset
          type: number
          in: path
          required: true
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
#
#///////////////////////////////////
# Job Endpoints
#///////////////////////////////////
#
  /job:
    get:
      tags:
        - Job
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all jobs visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Job"
    post:
      tags:
        - Job
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Job"
      responses:
        200:
          description: Sends the job with id
          schema:
            $ref: "#/definitions/PostResponse"
  /job/{id}:
    get:
      tags:
        - Job
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Job"
    put:
      tags:
        - Job
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Job"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Job
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
  /job/public/{slug}:
    get:
      tags:
        - Job
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: slug
          in: path
          type: string
          required: true
      responses:
        200:
          description: Get job with given slug
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Job"
  /job/public/{slug}/apply:
    post:
      tags:
        - Job
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: slug
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Job"
      responses:
        200:
          description: Apply to job 
          schema:
            $ref: "#/definitions/PostResponse"
#
#///////////////////////////////////
# Job Application Endpoints
#///////////////////////////////////
#
  /job-application/stages:
      get:
        tags:
          - Job Application
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
        responses:
          200:
            description: List all job application stages
            schema:
              allOf:
              - $ref: '#/definitions/Response'
              - type: object
                properties:
                  data:
                    type: array
                    items:
                        $ref: "#/definitions/JobApplication"
  /job-application:
    get:
      tags:
        - Job Application
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all job applications visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Job"
    post:
      tags:
        - Job Application
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Job"
      responses:
        200:
          description: Sends the application with id
          schema:
            $ref: "#/definitions/PostResponse"
  /job-application/{id}:
    get:
      tags:
        - Job Application
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/JobApplication"
    put:
      tags:
        - Job Application
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/JobApplication"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Job Application
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
  /job-application/{job_application}/stage:
      get:
        tags:
          - Job Application
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - $ref: "#/parameters/fieldsParam"
          - $ref: "#/parameters/filtersParam"
          - $ref: "#/parameters/limitParam"
          - $ref: "#/parameters/orderParam"
          - $ref: "#/parameters/offsetParam"
          - name: job_application
            type: number
            in: path
            required: true
        responses:
          200:
            description: List all job applications
            schema:
              allOf:
              - $ref: '#/definitions/Response'
              - type: object
                properties:
                  data:
                    type: array
                    items:
                        $ref: "#/definitions/JobApplicationStage"
      post:
        tags:
          - Job Application
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - name: job_application
            type: number
            in: path
            required: true
          - name: body
            in: body
            required: true
            schema:
              $ref: "#/definitions/JobApplicationStage"
        responses:
          200:
            description: Sends the job application stages with id
            schema:
              $ref: "#/definitions/PostResponse"
  /job-application/{job_application}/stage/{id}:
      get:
        tags:
          - Assets
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - $ref: "#/parameters/fieldsParam"
          - name: job_application
            type: number
            in: path
            required: true
          - name: id
            in: path
            type: string
            required: true
        responses:
          200:
            description: Fetches the corresponding object
            schema:
              allOf:
              - $ref: '#/definitions/SingleResponse'
              - type: object
                properties:
                  data:
                    type: array
                    items:
                        $ref: "#/definitions/JobApplicationStage"
      put:
        tags:
          - Job Application
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - name: job_application
            type: number
            in: path
            required: true
          - name: id
            in: path
            type: string
            required: true
          - name: body
            in: body
            required: true
            schema:
              $ref: "#/definitions/JobApplicationStage"
        responses:
          200:
            description: Updates the corresponding object
            schema:
              type: object
              properties:
                message:
                  type: string
      delete:
        tags:
          - Job Application
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - name: job_application
            type: number
            in: path
            required: true
          - name: id
            in: path
            type: string
            required: true
        responses:
          200:
            description: Deletes the corresponding object
            schema:
              type: object
              properties:
                message:
                  type: string
#
#///////////////////////////////////
# Event Endpoints
#///////////////////////////////////
#
  /event:
    get:
      tags:
        - Events
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all event visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Event"
    post:
      tags:
        - Events
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Event"
      responses:
        200:
          description: Sends the event with id
          schema:
            $ref: "#/definitions/PostResponse"
  /event/weekend:
    post:
      tags:
        - Events
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: type
          in: query
          type: string
          required: true
        - name: year
          in: query
          type: string
          required: true
      responses:
        200:
          description: Marks given type of weekend day as holiday
          schema:
            $ref: "#/definitions/PostResponse"
  /event/{id}:
    get:
      tags:
        - Events
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Event"
    put:
      tags:
        - Events
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Event"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Events
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
  /event-setting/{id}:
      put:
        tags:
          - Event
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - name: id
            in: path
            type: string
            required: true
          - name: body
            in: body
            required: true
            schema:
              $ref: "#/definitions/EventSetting"
        responses:
          200:
            description: Updates the corresponding object
            schema:
              type: object
              properties:
                message:
                  type: string
#
#///////////////////////////////////
# Public Holiday Endpoints
#///////////////////////////////////
#
  /public-holiday:
    get:
      tags:
        - Events
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all public holiday visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/PublicHoliday"
    post:
      tags:
        - Events
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/PublicHoliday"
      responses:
        200:
          description: Sends the public holiday with id
          schema:
            $ref: "#/definitions/PostResponse"
  /public-holiday/{id}:
    get:
      tags:
        - Events
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/PublicHoliday"
    put:
      tags:
        - Events
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/PublicHoliday"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Events
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string

#
#///////////////////////////////////
# Attendance
#///////////////////////////////////
#
  /leave-type:
    get:
      tags:
        - Leave Type
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all Leave types visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/LeaveType"
    post:
      tags:
        - Leave Type
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/LeaveType"
      responses:
        200:
          description: Sends the leavetype with id
          schema:
            $ref: "#/definitions/PostResponse"
  /leave-type/{id}:
      get:
        tags:
          - Leave Type
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - $ref: "#/parameters/fieldsParam"
          - name: id
            in: path
            type: string
            required: true
        responses:
          200:
            description: Fetches the corresponding object
            schema:
              allOf:
              - $ref: '#/definitions/SingleResponse'
              - type: object
                properties:
                  data:
                    type: array
                    items:
                        $ref: "#/definitions/LeaveType"
      put:
        tags:
          - Leave Type
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - name: id
            in: path
            type: string
            required: true
          - name: body
            in: body
            required: true
            schema:
              $ref: "#/definitions/LeaveType"
        responses:
          200:
            description: Updates the corresponding object
            schema:
              type: object
              properties:
                message:
                  type: string
      delete:
        tags:
          - Leave Type
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - name: id
            in: path
            type: string
            required: true
        responses:
          200:
            description: Deletes the corresponding object
            schema:
              type: object
              properties:
                message:
                  type: string
  /leave-type/list:
    get:
      tags:
        - Leave Type
      responses:
        200:
          description: List all Leave types visible to current user for applying leaves
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      type: string
  /attendance-setting/{id}:
      put:
        tags:
          - Attendance
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - name: id
            in: path
            type: string
            required: true
          - name: body
            in: body
            required: true
            schema:
              $ref: "#/definitions/AttendanceSetting"
        responses:
          200:
            description: Updates the corresponding object
            schema:
              type: object
              properties:
                message:
                  type: string
  /attendance:
    get:
      tags:
        - Attendance
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all attendances visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Attendance"
    post:
      tags:
        - Attendance
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Attendance"
      responses:
        200:
          description: Sends the attendance with id
          schema:
            $ref: "#/definitions/PostResponse"
  /attendance/{id}:
      get:
        tags:
          - Attendance
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - $ref: "#/parameters/fieldsParam"
          - name: id
            in: path
            type: string
            required: true
        responses:
          200:
            description: Fetches the corresponding object
            schema:
              allOf:
              - $ref: '#/definitions/SingleResponse'
              - type: object
                properties:
                  data:
                    type: array
                    items:
                        $ref: "#/definitions/Attendance"
      put:
        tags:
          - Attendance
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - name: id
            in: path
            type: string
            required: true
          - name: body
            in: body
            required: true
            schema:
              $ref: "#/definitions/Attendance"
        responses:
          200:
            description: Updates the corresponding object
            schema:
              type: object
              properties:
                message:
                  type: string
      delete:
        tags:
          - Attendance
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - name: id
            in: path
            type: string
            required: true
        responses:
          200:
            description: Deletes the corresponding object
            schema:
              type: object
              properties:
                message:
                  type: string
  /leave-remaining:
    get:
      tags:
        - Leave Application
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List leaves reamining of employees visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/LeaveRemaining"
  /unpaid-leave:
    get:
      tags:
        - Leave Application
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List of unpaid leaves month and year wise of employees visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/UnpaidLeave"
  /leave-application:
    get:
      tags:
        - Leave Application
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all Leave Applications visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/LeaveApplication"
    post:
      tags:
        - Leave Application
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/LeaveApplication"
      responses:
        200:
          description: Sends the leave application with id
          schema:
            $ref: "#/definitions/PostResponse"
  /leave-application/{id}:
      get:
        tags:
          - Leave Application
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - $ref: "#/parameters/fieldsParam"
          - name: id
            in: path
            type: string
            required: true
        responses:
          200:
            description: Fetches the corresponding object
            schema:
              allOf:
              - $ref: '#/definitions/SingleResponse'
              - type: object
                properties:
                  data:
                    type: array
                    items:
                        $ref: "#/definitions/LeaveApplication"
      put:
        tags:
          - Leave Application
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - name: id
            in: path
            type: string
            required: true
          - name: body
            in: body
            required: true
            schema:
              $ref: "#/definitions/LeaveApplication"
        responses:
          200:
            description: Updates the corresponding object
            schema:
              type: object
              properties:
                message:
                  type: string
      delete:
        tags:
          - Leave Application
        parameters:
          - $ref: '#/parameters/AjaxRequestHeader'
          - $ref: '#/parameters/SubdomainHeader'
          - name: id
            in: path
            type: string
            required: true
        responses:
          200:
            description: Deletes the corresponding object
            schema:
              type: object
              properties:
                message:
                  type: string
              
#
#///////////////////////////////////
# Expense Endpoints
#///////////////////////////////////
#
  /expense:
    get:
      tags:
        - Expense
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all expenses visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Expense"
    post:
      tags:
        - Expense
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Expense"
      responses:
        200:
          description: Sends the expense with id
          schema:
            $ref: "#/definitions/PostResponse"
  /expense/{id}:
    get:
      tags:
        - Expense
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Expense"
    put:
      tags:
        - Expense
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Expense"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Expense
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
  /expense/totals/{currency}/{year}:
    get:
      tags:
        - Expense
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: currency
          in: path
          type: string
          required: true
        - name: year
          in: path
          type: string
          required: true
      responses:
        200:
          description: Get expense with month and year wise total
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Expense"
              
#
#///////////////////////////////////
# Payroll Endpoints
#///////////////////////////////////
#


  /salary-group:
    get:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all salary-groups visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/SalaryGroup"
    post:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/SalaryGroup"
      responses:
        200:
          description: Sends the salary-group with id
          schema:
            $ref: "#/definitions/PostResponse"
  /salary-group/{id}:
    get:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/SalaryGroup"
    put:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/SalaryGroup"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
  
  /salary-head:
    get:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all salary-heads visible to current user
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/SalaryHead"
    post:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/SalaryHead"
      responses:
        200:
          description: Sends the salary-head with id
          schema:
            $ref: "#/definitions/PostResponse"
  /salary-head/{id}:
    get:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/SalaryHead"
    put:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/SalaryHead"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
                 
  /payroll:
    get:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - $ref: "#/parameters/filtersParam"
        - $ref: "#/parameters/limitParam"
        - $ref: "#/parameters/orderParam"
        - $ref: "#/parameters/offsetParam"
      responses:
        200:
          description: List all payrolls visible to current user
          schema:
            allOf:
            - $ref: "#/definitions/Response"
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Payroll"
    post:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Payroll"
      responses:
        200:
          description: Sends the payroll with id
          schema:
            $ref: "#/definitions/PostResponse"
  /payroll/{id}:
    get:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Fetches the corresponding object
          schema:
            allOf:
            - $ref: '#/definitions/SingleResponse'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Payroll"
    put:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Payroll"
      responses:
        200:
          description: Updates the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
    delete:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - name: id
          in: path
          type: string
          required: true
      responses:
        200:
          description: Deletes the corresponding object
          schema:
            type: object
            properties:
              message:
                type: string
  /payroll/generate-payroll:
    post:
      tags:
        - Payroll
      parameters:
        - $ref: '#/parameters/AjaxRequestHeader'
        - $ref: '#/parameters/SubdomainHeader'
        - $ref: "#/parameters/fieldsParam"
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/Payroll"
      responses:
        200:
          description: A list of generates payrolls
          schema:
            allOf:
            - $ref: '#/definitions/Response'
            - type: object
              properties:
                data:
                  type: array
                  items:
                      $ref: "#/definitions/Payroll"
definitions:
#
#//////////////////////////////////
# Responses
#//////////////////////////////////
#
  LoginResponse:
    type: object
    properties:
      message:
        type: string
      token:
        type: string
        description: Auth token for use in subsequent requests
      expires:
        type: string
        format: date-time
        description: ISO 8601 formatted time when this token expires. We need to refresh it before it expires.
      employee:
        type: object
        description: Basic employee data
        properties:
          id:
            type: number
            format: int32
          employee_id:
            type: string
          first_name:
            type: string
          last_name:
            type: string
          name:
            type: string
          email:
            type: string
          profile_image:
            type: string
          profile_image_url:
            type: string
          permissions:
            type: array
            description: array of permissions names provided to this user
            items:
              type: string
  LogoutResponse:
    type: object
    properties:
      message:
        type: string
  ForgotPasswordResponse:
    type: object
    properties:
      message:
        type: string
        default: If your email id belongs to an account, a password resent email has been sent to you email Id
  ResetPasswordResponse:
    type: object
    properties:
      message:
        type: string
  RefreshTokenResponse:
    type: object
    properties:
      message:
        type: string
      token:
        type: string
        description: New refreshed token
      expires:
        type: string
        format: date-time
        description: ISO 8601 formatted time when token is to expire
  PostResponse:
    type: object
    properties:
      message:
        type: string
      id:
        type: number
        format: int32
        description: ID of the newly created object
  Response:
    type: object
    properties:
      meta:
        $ref: "#/definitions/Meta"
  Meta:
    type: object
    properties:
      paging:
        $ref: "#/definitions/Paging"
      time:
        type: number
        format: float
        description: Total time taken for execution of this request (in seconds)
  SingleResponse:
    type: object
    properties:
      meta:
        $ref: "#/definitions/SingleMeta"
  SingleMeta:
    type: object
    properties:
      time:
        type: number
        format: float
        description: Total time taken for execution of this request (in seconds)
  Links:
    type: object
    properties:
      next:
        type: string
        description: |
          A URL to fetch next set of records.
            * All the filters, ordering, fields, etc. are added according to current request.
            * It is **not present** if we are on last page of records.
      prev:
        type: string
  Paging:
    type: object
    properties:
      links:
        $ref: "#/definitions/Links"
      total:
        type: number
        description: Total number of pages.
#
#//////////////////////////////////
# Exceptions
#//////////////////////////////////
#
  ValidationException:
    type: object
    properties:
      message:
        type: string
      code:
        type: number
        format: int32
        default: 422
      details:
        type: object
        description: Laravel validation error messages
      innercode:
        type: object
        description: Innercode is present if error is other than normal laravel validation.
        properties:
          code:
            type: number
            format: int32
            description: |
              * 1010: Related resource not found
  RequestParseException:
    type: object
    properties:
      message:
        type: string
      code:
        type: number
        format: int32
        default: 100
      innercode:
        type: object
        description: Innercode giving more details about this error
        properties:
          code:
            type: number
            format: int32
            description: |
              * 1001: Requested filter not found
              * 1002: Filter defined incorrectly
              * 1003: One of the specified fields does not exist
              * 1004: Applying filter on one of the specified fields is not allowed
              * 1005: Ordering defined incorrectly
              * 1006: Requested more records than maximum limit in single request
              * 1007: Limit cannot be negative or zero
  UnauthorizedException:
    type: object
    properties:
      message:
        type: string
      code:
        type: number
        format: int32
        default: 403
  ResourceNotFoundException:
    type: object
    properties:
      message:
        type: string
      code:
        type: number
        format: int32
        default: 404
  ApiException:
    type: object
    properties:
      message:
        type: string
      code:
        type: number
        format: int32
        default: 1
#
#////////////////////////
# App Endpoint
#////////////////////////
#
  AppResponse:
    type: object
    properties:
      message:
        type: string
      data:
        type: object
        properties:
          id:
            type: number
            format: int32
          name:
            type: string
          logo:
            type: string
          logo_url:
            type: string
          country:
            $ref: "#/definitions/Country"
          status:
            type: string
          settings:
            type: object
            properties:
              currency:
                type: string
              currency_symbol:
                type: string
              timezone:
                type: string
              locale:
                type: string
              locale_name:
                type: string
  Company:
    type: object
    properties:
      id:
        type: number
        format: int32
  CompanySetting:
    type: object
    properties:
      id:
        type: number
        format: int32
  Job:
    type: object
    properties:
      id:
        type: number
        format: int32
  JobApplication:
    type: object
    properties:
      id:
        type: number
        format: int32
  JobApplicationStage:
    type: object
    properties:
      id:
        type: number
        format: int32
  EventSetting:
    type: object
    properties:
      id:
        type: number
        format: int32
  LeaveType:
    type: object
    properties:
      id:
        type: number
        format: int32
  AttendanceSetting:
    type: object
    properties:
      id:
        type: number
        format: int32
  Attendance:
    type: object
    properties:
      id:
        type: number
        format: int32
  LeaveRemaining:
    type: object
    properties:
      id:
        type: number
        format: int32
  UnpaidLeave:
    type: object
    properties:
      id:
        type: number
        format: int32
  LeaveApplication:
    type: object
    properties:
      id:
        type: number
        format: int32
  Expense:
    type: object
    properties:
      id:
        type: number
        format: int32
  Payroll:
    type: object
    properties:
      id:
        type: number
        format: int32
  SalaryGroup:
    type: object
    properties:
      id:
        type: number
        format: int32
  SalaryHead:
    type: object
    properties:
      id:
        type: number
        format: int32
  Country:
    type: object
    properties:
      id:
        type: number
        format: int32
      name:
        type: string
        description: Name of the country
      iso_alpha2:
        type: string
        description: 2 character ISO country code
      currency_code:
        type: string
        description: 3 character ISO currency code
      currency_name:
        type: string
      currency_symbol:
        type: string
      flag_url:
        type: string
        description: URL for flag icon of this country
  Employee:
    type: object
    properties:
      id:
        type: integer
        format: int32
        description: Unique auto-increment id
      employee_id:
        type: string
        description: Alpha numeric ID
      first_name:
        type: string
      last_name:
        type: string
      manager:
        $ref: "#/definitions/Employee"
      email:
        type: string
      profile_image:
        type: string
      profile_image_url:
        type: string
      type:
        type: string
      gender:
        type: string
      marital_status:
        type: string
      address:
        type: string
      contact_number:
        type: string
      emergency_contact_person:
        type: string
      emergency_contact_number:
        type: string
      date_of_birth:
        type: string
        format: date
      marriage_anniversary:
        type: string
        format: date
      designation:
        $ref: "#/definitions/Designation"
      department:
        $ref: "#/definitions/Department"
      location:
        $ref: "#/definitions/Location"
      joining_date:
        type: string
        format: date
      probation_end_date:
        type: string
        format: date
      exit_date:
        type: string
        format: date
      status:
        type: string
      last_login:
        type: string
        format: datetime
      number_of_logins:
        type: number
        format: int32
      email_verified:
        type: string
  Department:
    type: object
    properties:
      id:
        type: number
        format: int32
      name:
        type: string
  Designation:
    type: object
    properties:
      id:
        type: number
        format: int32
      name:
        type: string
  Location:
    type: object
    properties:
      id:
        type: number
        format: int32
      name:
        type: string
      address:
        type: string
  News:
    type: object
    properties:
      id:
        type: number
        format: int32
      title:
        type: string
      description:
        type: string
      status:
        type: string
      creator:
        $ref: "#/definitions/Employee"
      publish_date:
        type: string
        format: date
      employees:
        type: array
        items:
          - $ref: "#/definitions/Employee"
  Award:
    type: object
    properties:
      id:
        type: number
        format: int32
      name:
        type: string
      description:
        type: string
      status:
        type: string
  Appreciation:
    type: object
    properties:
      id:
        type: number
        format: int32
      award:
        $ref: "#/definitions/Award"
      awardee:
        $ref: "#/definitions/Employee"
      date:
        type: string
        format: date
      prizes:
        type: string
      photo:
        type: string
  Event:
    type: object
    properties:
      id:
        type: number
        format: int32
      type:
        type: string
      name:
        type: string
      description:
        type: string
      creator:
        $ref: "#/definitions/Employee"
      start:
        type: string
        format: date
      end:
        type: string
        format: date
      employees:
        type: array
        items:
          - $ref: "#/definitions/Employee"
  Asset:
    type: object
    properties:
      id:
        type: number
        format: int32
      name:
        type: string
      type:
        type: string
      serial_number:
        type: string
      description:
        type: string
      condition:
        type: string
      status:
        type: string
      location:
        $ref: "#/definitions/Location"
  AssetHistory:
    type: object
    properties:
      id:
        type: number
        format: int32
      asset:
        $ref: "#/definitions/Asset"
      employee:
        $ref: "#/definitions/Employee"
      date_given:
        type: string
        format: date
      return_date:
        type: string
        format: date
      date_of_return:
        type: string
        format: date
      notes:
        type: string
  AssetType:
    type: object
    properties:
      id:
        type: number
        format: int32
      name:
        type: string
  PublicHoliday:
    type: object
    properties:
      id:
        type: number
        format: int32
      date:
        type: string
        format: date
      name:
        type: string
      country:
        $ref: "#/definitions/Country"
parameters:
  fieldsParam:
      name: fields
      in: query
      description: Comma seperated list of fields
      type: string
      default: id
  filtersParam:
      name: filters
      in: query
      description: List of filters to be applied
      type: string
  limitParam:
      name: limit
      in: query
      description: Number of results to return
      type: integer
      default: 10
  orderParam:
      name: order
      in: query
      description: Field by which results should be returned
      type: string
      default: id desc
  offsetParam:
      name: offset
      in: query
      description: Position to start results from
      type: integer
      default: 0
  AjaxRequestHeader:
      name: X-REQUEST-WITH
      in: header
      type: string
      default: XMLHttpRequest
      required: true
  SubdomainHeader:
      name: X-SNAPHRM-HOST
      in: header
      type: string
      default: froiden.snaphrm.localhost
      required: true