openapi: 3.0.0 info: title: IT Corpo API version: 1.0.0 description: > API for managing IT corporation resources. For full documentation, please visit [the readme](https://github.com/ducin-public/itcorpo-api). servers: - url: http://localhost:3000 description: Local development server paths: /auth: get: summary: Get JWT authentication token operationId: getAuthToken tags: - Auth responses: '200': description: Successfully generated JWT token content: application/json: schema: type: object required: - token properties: token: type: string description: JWT token signed with server's secret '401': description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /health: get: summary: Health Check operationId: HealthCheck tags: - System description: Endpoint to check the health of the API responses: '200': description: API is healthy content: application/json: schema: $ref: '#/components/schemas/HealthStatus' '500': description: API is not healthy content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '503': description: Server is unhealthy or temporarily unavailable. content: application/json: schema: oneOf: - $ref: '#/components/schemas/HealthStatus' - $ref: '#/components/schemas/ErrorResponse' /license: get: summary: Get license information description: Returns the license text for the API tags: - System parameters: - in: header name: Content-Type required: true schema: type: string enum: ["text/plain"] description: Must be text/plain responses: '200': description: License text retrieved successfully content: text/plain: schema: type: string '400': description: > Invalid Content-Type requested content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: Access to license file forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '503': description: License file not available content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /benefits/services: get: summary: List all available benefit services operationId: getBenefitServices tags: - Benefits responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/BenefitService' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /benefits/charges: get: summary: List all benefit charges operationId: getBenefitCharges tags: - Benefits parameters: - name: subscriptionId in: query required: false schema: $ref: '#/components/schemas/BenefitChargesSearchCriteria/properties/subscriptionId' - name: providerServiceCode in: query required: false schema: $ref: '#/components/schemas/BenefitChargesSearchCriteria/properties/providerServiceCode' - name: status in: query required: false schema: $ref: '#/components/schemas/BenefitChargesSearchCriteria/properties/status' - name: billingPeriodFrom in: query required: false schema: $ref: '#/components/schemas/BenefitChargesSearchCriteria/properties/billingPeriodFrom' - name: billingPeriodTo in: query required: false schema: $ref: '#/components/schemas/BenefitChargesSearchCriteria/properties/billingPeriodTo' responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/BenefitCharge' '400': description: > Invalid benefit charges search criteria @see {@link BenefitChargesSearchCriteria} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /benefits: get: summary: List all benefits subscriptions operationId: getBenefitSubscriptions tags: - Benefits parameters: - name: serviceName in: query required: false schema: $ref: '#/components/schemas/BenefitsSearchCriteria/properties/serviceName' - name: categories in: query required: false schema: $ref: '#/components/schemas/BenefitsSearchCriteria/properties/categories' - name: employeeId in: query required: false schema: $ref: '#/components/schemas/BenefitsSearchCriteria/properties/employeeId' - name: feeFrom in: query required: false schema: $ref: '#/components/schemas/BenefitsSearchCriteria/properties/feeFrom' - name: feeTo in: query required: false schema: $ref: '#/components/schemas/BenefitsSearchCriteria/properties/feeTo' - name: status in: query required: false schema: $ref: '#/components/schemas/BenefitsSearchCriteria/properties/status' responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/BenefitSubscription' '400': description: > Invalid benefit subscriptions search criteria @see {@link BenefitsSearchCriteria} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' post: summary: Create a new benefit operationId: createBenefit tags: - Benefits requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BenefitSubscriptionInput' responses: '201': description: Benefit created successfully content: application/json: schema: $ref: '#/components/schemas/BenefitSubscription' '400': description: > Invalid benefit subscription input request body @see {@link BenefitSubscriptionInput} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '409': description: Benefit already exists for this employee and service content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /benefits/count: get: summary: Get total number of benefits operationId: getBenefitsCount tags: - Benefits parameters: - name: serviceName in: query required: false schema: $ref: '#/components/schemas/BenefitsSearchCriteria/properties/serviceName' - name: employeeId in: query required: false schema: $ref: '#/components/schemas/BenefitsSearchCriteria/properties/employeeId' - name: feeFrom in: query required: false schema: $ref: '#/components/schemas/BenefitsSearchCriteria/properties/feeFrom' - name: feeTo in: query required: false schema: $ref: '#/components/schemas/BenefitsSearchCriteria/properties/feeTo' - name: status in: query required: false schema: $ref: '#/components/schemas/BenefitsSearchCriteria/properties/status' responses: '200': description: Successful operation content: application/json: schema: type: integer example: 42 '400': description: > Invalid benefit subscriptions search criteria @see {@link BenefitsSearchCriteria} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /benefits/{benefitId}: get: summary: Get benefit by ID operationId: getBenefitById tags: - Benefits parameters: - name: benefitId in: path required: true schema: type: string responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/BenefitSubscription' '404': description: Benefit not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' put: summary: Update benefit operationId: updateBenefit tags: - Benefits parameters: - name: benefitId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BenefitSubscriptionInput' responses: '200': description: Benefit updated successfully content: application/json: schema: $ref: '#/components/schemas/BenefitSubscription' '400': description: > Invalid benefit subscription input request body @see {@link BenefitSubscriptionInput} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Benefit not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' patch: summary: Cancel or renew benefit subscription operationId: updateBenefitSubscriptionStatus tags: - Benefits parameters: - name: benefitId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object required: - operation properties: operation: type: string enum: ["CANCEL", "RENEW"] responses: '200': description: Benefit subscription status updated successfully content: application/json: schema: $ref: '#/components/schemas/BenefitSubscription' '400': description: > Invalid benefit subscription status update @see {@link BenefitSubscriptionInput} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Benefit subscription not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Invalid operation for current subscription state content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /benefits/{benefitId}/charges: get: summary: List all benefit charges for a specific subscription operationId: getBenefitSubscriptionCharges tags: - Benefits parameters: - name: benefitId in: path required: true schema: type: string - name: providerServiceCode in: query required: false schema: $ref: '#/components/schemas/BenefitChargesSearchCriteria/properties/providerServiceCode' - name: status in: query required: false schema: $ref: '#/components/schemas/BenefitChargesSearchCriteria/properties/status' - name: billingPeriodFrom in: query required: false schema: $ref: '#/components/schemas/BenefitChargesSearchCriteria/properties/billingPeriodFrom' - name: billingPeriodTo in: query required: false schema: $ref: '#/components/schemas/BenefitChargesSearchCriteria/properties/billingPeriodTo' responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/BenefitCharge' '400': description: Invalid benefit charges search criteria @see {@link BenefitChargesSearchCriteria} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Benefit subscription not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /departments: get: summary: List all departments operationId: getDepartments tags: - Departments responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/Department' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' post: summary: Create a new department operationId: createDepartment tags: - Departments requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DepartmentInput' responses: '201': description: Department created successfully content: application/json: schema: $ref: '#/components/schemas/Department' '400': description: > Invalid department input request body @see {@link DepartmentInput} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /departments/count: get: summary: Get total number of departments operationId: getDepartmentsCount tags: - Departments responses: '200': description: Successful operation content: application/json: schema: type: integer example: 8 '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /departments/{departmentId}: get: summary: Get department by ID operationId: getDepartmentById tags: - Departments parameters: - name: departmentId in: path required: true schema: type: integer responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Department' '404': description: Department not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' put: summary: Update department operationId: updateDepartment tags: - Departments parameters: - name: departmentId in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DepartmentInput' responses: '200': description: Department updated successfully content: application/json: schema: $ref: '#/components/schemas/Department' '400': description: > Invalid department input request body @see {@link DepartmentInput} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Department not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' delete: summary: Delete department operationId: deleteDepartment tags: - Departments parameters: - name: departmentId in: path required: true schema: type: integer responses: '204': description: Department deleted successfully '404': description: Department not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /employees: get: summary: List all employees operationId: getEmployees tags: - Employees parameters: - name: employeeName in: query required: false schema: $ref: '#/components/schemas/EmployeesSearchCriteria/properties/employeeName' - name: departmentId in: query required: false schema: $ref: '#/components/schemas/EmployeesSearchCriteria/properties/departmentId' - name: skills in: query required: false schema: $ref: '#/components/schemas/EmployeesSearchCriteria/properties/skills' - name: skillsFiltering in: query required: false schema: $ref: '#/components/schemas/EmployeesSearchCriteria/properties/skillsFiltering' - name: salaryFrom in: query required: false schema: $ref: '#/components/schemas/EmployeesSearchCriteria/properties/salaryFrom' - name: salaryTo in: query required: false schema: $ref: '#/components/schemas/EmployeesSearchCriteria/properties/salaryTo' responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/Employee' '400': description: > Invalid employees search criteria @see {@link EmployeesSearchCriteria} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' post: summary: Create a new employee operationId: createEmployee tags: - Employees requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmployeeInput' responses: '201': description: Employee created successfully content: application/json: schema: $ref: '#/components/schemas/Employee' '400': description: > Invalid employee input request body @see {@link EmployeeInput} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /employees/count: get: summary: Get total number of employees operationId: getEmployeesCount tags: - Employees parameters: - name: employeeName in: query required: false schema: $ref: '#/components/schemas/EmployeesSearchCriteria/properties/employeeName' - name: departmentId in: query required: false schema: $ref: '#/components/schemas/EmployeesSearchCriteria/properties/departmentId' - name: skills in: query required: false schema: $ref: '#/components/schemas/EmployeesSearchCriteria/properties/skills' - name: skillsFiltering in: query required: false schema: $ref: '#/components/schemas/EmployeesSearchCriteria/properties/skillsFiltering' - name: salaryFrom in: query required: false schema: $ref: '#/components/schemas/EmployeesSearchCriteria/properties/salaryFrom' - name: salaryTo in: query required: false schema: $ref: '#/components/schemas/EmployeesSearchCriteria/properties/salaryTo' responses: '200': description: Successful operation content: application/json: schema: type: integer example: 1250 '400': description: > Invalid employees search criteria @see {@link EmployeesSearchCriteria} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /employees/{employeeId}: get: summary: Get employee by ID operationId: getEmployeeById tags: - Employees parameters: - name: employeeId in: path required: true schema: type: integer responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Employee' '404': description: Employee not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' put: summary: Update employee operationId: updateEmployee tags: - Employees parameters: - name: employeeId in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmployeeInput' responses: '200': description: Employee updated successfully content: application/json: schema: $ref: '#/components/schemas/Employee' '400': description: > Invalid employee input request body @see {@link EmployeeInput} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Employee not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' delete: summary: Delete employee operationId: deleteEmployee tags: - Employees parameters: - name: employeeId in: path required: true schema: type: integer responses: '204': description: Employee deleted successfully '404': description: Employee not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /expenses: get: summary: List all expenses operationId: getExpenses tags: - Expenses responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/Expense' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' post: summary: Create a new expense operationId: createExpense tags: - Expenses requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ExpenseInput' responses: '201': description: Expense created successfully content: application/json: schema: $ref: '#/components/schemas/Expense' '400': description: > Invalid expense input request body @see {@link ExpenseInput} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /expenses/count: get: summary: Get total number of expenses operationId: getExpensesCount tags: - Expenses responses: '200': description: Successful operation content: application/json: schema: type: integer example: 523 '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /expenses/{expenseId}: get: summary: Get expense by ID operationId: getExpenseById tags: - Expenses parameters: - name: expenseId in: path required: true schema: type: string responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Expense' '404': description: Expense not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' put: summary: Update expense operationId: updateExpense tags: - Expenses parameters: - name: expenseId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ExpenseInput' responses: '200': description: Expense updated successfully content: application/json: schema: $ref: '#/components/schemas/Expense' '400': description: > Invalid expense input request body @see {@link ExpenseInput} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Expense not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' delete: summary: Delete expense operationId: deleteExpense tags: - Expenses parameters: - name: expenseId in: path required: true schema: type: string responses: '204': description: Expense deleted successfully '404': description: Expense not found '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /geo: get: summary: Get geographical data description: Returns a dictionary of country codes and country names tags: - Geo operationId: getGeo responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Geo' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /offices/amenities: get: summary: Retrieve list of possible office amenities description: Returns an array of office amenity objects that can be assigned to offices operationId: getOfficeAmenities tags: - Offices responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/OfficeAmenity' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /offices/amenities/count: get: summary: Get total number of office amenities operationId: getOfficeAmenitiesCount tags: - Offices responses: '200': description: Successful operation content: application/json: schema: type: integer example: 15 '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /offices: get: summary: List all offices operationId: getOffices tags: - Offices parameters: - name: countries in: query required: false schema: $ref: '#/components/schemas/OfficesSearchCriteria/properties/countries' - name: amenities in: query required: false schema: $ref: '#/components/schemas/OfficesSearchCriteria/properties/amenities' - name: phrase in: query required: false schema: $ref: '#/components/schemas/OfficesSearchCriteria/properties/phrase' responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/Office' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' post: summary: Create a new office operationId: createOffice tags: - Offices requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OfficeInput' responses: '201': description: Office created successfully content: application/json: schema: $ref: '#/components/schemas/Office' '400': description: > Invalid office input request body @see {@link OfficeInput} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /offices/count: get: summary: Get total number of offices operationId: getOfficesCount tags: - Offices parameters: - name: countries in: query required: false schema: $ref: '#/components/schemas/OfficesSearchCriteria/properties/countries' - name: amenities in: query required: false schema: $ref: '#/components/schemas/OfficesSearchCriteria/properties/amenities' - name: phrase in: query required: false schema: $ref: '#/components/schemas/OfficesSearchCriteria/properties/phrase' responses: '200': description: Successful operation content: application/json: schema: type: integer example: 25 '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /offices/{officeCode}: get: summary: Get office by office code operationId: getOfficeByCode tags: - Offices parameters: - name: officeId in: path required: true schema: type: string responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Office' '404': description: Office not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' put: summary: Update office operationId: updateOffice tags: - Offices parameters: - name: officeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OfficeInput' responses: '200': description: Office updated successfully content: application/json: schema: $ref: '#/components/schemas/Office' '400': description: > Invalid office input request body @see {@link OfficeInput} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Office not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' delete: summary: Delete office operationId: deleteOffice tags: - Offices parameters: - name: officeId in: path required: true schema: type: string responses: '204': description: Office deleted successfully '404': description: Office not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /projects: get: summary: List all projects operationId: getProjects tags: - Projects parameters: - name: projectName in: query required: false schema: $ref: '#/components/schemas/ProjectsSearchCriteria/properties/projectName' - name: status in: query required: false schema: $ref: '#/components/schemas/ProjectsSearchCriteria/properties/status' - name: teamMembers in: query required: false schema: $ref: '#/components/schemas/ProjectsSearchCriteria/properties/teamMembers' - name: teamMembersFiltering in: query required: false schema: $ref: '#/components/schemas/ProjectsSearchCriteria/properties/teamMembersFiltering' - name: budgetFrom in: query required: false schema: $ref: '#/components/schemas/ProjectsSearchCriteria/properties/budgetFrom' - name: budgetTo in: query required: false schema: $ref: '#/components/schemas/ProjectsSearchCriteria/properties/budgetTo' responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/Project' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' post: summary: Create a new project operationId: createProject tags: - Projects requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProjectInput' responses: '201': description: Project created successfully content: application/json: schema: $ref: '#/components/schemas/Project' '400': description: > Invalid project input request body @see {@link ProjectInput} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /projects/count: get: summary: Get total number of projects operationId: getProjectsCount tags: - Projects parameters: - name: projectName in: query required: false schema: $ref: '#/components/schemas/ProjectsSearchCriteria/properties/projectName' - name: status in: query required: false schema: $ref: '#/components/schemas/ProjectsSearchCriteria/properties/status' - name: teamMembers in: query required: false schema: $ref: '#/components/schemas/ProjectsSearchCriteria/properties/teamMembers' - name: teamMembersFiltering in: query required: false schema: $ref: '#/components/schemas/ProjectsSearchCriteria/properties/teamMembersFiltering' - name: budgetFrom in: query required: false schema: $ref: '#/components/schemas/ProjectsSearchCriteria/properties/budgetFrom' - name: budgetTo in: query required: false schema: $ref: '#/components/schemas/ProjectsSearchCriteria/properties/budgetTo' responses: '200': description: Successful operation content: application/json: schema: type: integer example: 156 '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' /projects/{projectId}: get: summary: Get project by ID operationId: getProjectById tags: - Projects parameters: - name: projectId in: path required: true schema: type: string responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Project' '404': description: Project not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' put: summary: Update project operationId: updateProject tags: - Projects parameters: - name: projectId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProjectInput' responses: '200': description: Project updated successfully content: application/json: schema: $ref: '#/components/schemas/Project' '400': description: > Invalid project input request body @see {@link ProjectInput} content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Project not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' delete: summary: Delete project operationId: deleteProject tags: - Projects parameters: - name: projectId in: path required: true schema: type: string responses: '204': description: Project deleted successfully '404': description: Project not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailable' components: links: HealthCheck: operationId: healthCheck parameters: status: $ref: '#/components/schemas/HealthStatus' requestBody: required: false responses: NotAuthorized: description: The requester is unauthorized. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' InternalServerError: description: An internal server error occurred. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' ServiceUnavailable: description: The service is temporarily unavailable. Maybe there is maintenance? content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' schemas: Money: type: number description: Monetary value in EUR DateString: type: string format: date-time description: ISO 8601 date-time string Email: type: string format: email description: Email address string Phone: type: string description: Phone number string ErrorResponse: type: object properties: code: type: string description: An application-level error code (**not** HTTP status code) message: type: string description: Text description of the error that has occurred required: - code - message HealthStatus: type: object properties: status: type: string enum: ["HEALTHY", "DEGRADED", "UNHEALTHY"] example: "HEALTHY" message: type: string example: "All systems operational" additionalProperties: type: string BenefitCategory: type: string enum: - "HEALTHCARE" - "SPORT_WELLNESS" - "LUNCH_FOOD" - "CULTURE_RECREATION" example: "HEALTHCARE" BenefitService: type: object required: - code - name - category - provider - description - availableCountries properties: code: type: string name: type: string description: Display name of the service example: "Medicover Healthcare Premium" category: $ref: '#/components/schemas/BenefitCategory' provider: type: object required: - name - website - contactEmail - supportPhone properties: name: type: string example: "Medicover" website: type: string format: uri example: "https://medicover.com" contactEmail: $ref: '#/components/schemas/Email' supportPhone: $ref: '#/components/schemas/Phone' description: type: string description: type: string example: "Premium healthcare package including dental and specialist care" availableCountries: type: array items: type: string example: ["PL", "DE", "NL"] details: type: string description: Combined features and limitations in a formatted text example: "Features:\n- Dental care\n- 24/7 hotline\n- Mobile app\n\nLimitations:\n- 14 days waiting period\n- Excludes pre-existing conditions" cancellationPolicy: type: string example: "1 month notice required" BenefitSubscription: type: object required: - id - beneficiary - category - country - city - service - monthlyFee - subscribedAtDate properties: id: type: string service: type: object required: - name - provider properties: name: type: string provider: type: string beneficiary: type: object required: - name - email properties: name: type: string email: type: string format: email category: $ref: '#/components/schemas/BenefitCategory' country: type: string city: type: string monthlyFee: $ref: '#/components/schemas/Money' subscribedAtDate: type: string format: date cancelledAtDate: type: string format: date example: id: "60965cfccf2844a6" beneficiary: name: "Eva Koster" email: "evko@softix.nl" city: "Utrecht" country: "Netherlands" service: name: "MultiSport Active Plus" provider: "Benefit Systems" monthlyFee: 250 subscribedAtDate: "2016-01-01" cancelledAtDate: "2016-05-31" BenefitSubscriptionInput: type: object required: - beneficiary - country - city - service - monthlyFee - subscribedAtDate properties: beneficiary: type: object required: - name - email properties: name: type: string email: type: string format: email country: type: string city: type: string service: type: string monthlyFee: $ref: '#/components/schemas/Money' subscribedAtDate: type: string format: date cancelledAtDate: type: string format: date BenefitSubscriptionSearchStatus: type: string enum: ["ALL", "ACTIVE", "CANCELLED"] description: Status filter for benefit subscriptions example: "ACTIVE" BenefitsSearchCriteria: type: object description: Criteria for filtering benefit subscriptions properties: serviceName: type: string description: Filter benefits by service name example: "MultiSport" categories: type: string description: > Comma-separated list of category codes to filter by. The search result will return benefits that match any of the provided categories (`ANY`). example: "HEALTHCARE,SPORT_WELLNESS" employeeId: type: string description: The employee whom this benefit is subscribed to example: "123" feeFrom: type: string description: Minimum monthly fee amount example: "100" feeTo: type: string description: Maximum monthly fee amount example: "500.50" status: $ref: '#/components/schemas/BenefitSubscriptionSearchStatus' example: "ACTIVE" BenefitChargeStatus: type: string description: Payment status of a benefit charge enum: - "PENDING" - "PAID" - "OVERDUE" - "CANCELLED" - "REFUNDED" BenefitCharge: type: object required: - id - employeeId - subscriptionId - providerServiceCode - billingPeriodStart - billingPeriodEnd - amount - status properties: id: type: string format: uuid employeeId: type: integer subscriptionId: type: string providerServiceCode: type: string billingPeriodStart: type: string format: date billingPeriodEnd: type: string format: date amount: $ref: '#/components/schemas/Money' status: $ref: '#/components/schemas/BenefitChargeStatus' BenefitChargesSearchCriteria: type: object description: Criteria for filtering benefit charges properties: subscriptionId: type: string description: Filter charges by subscription ID example: 'zc9b3b4c-1b1d-4b3e-8b3b-4c1b1d4b3e8b' employeeId: type: integer description: Filter charges by subscription ID example: 91720 providerServiceCode: type: string description: Filter charges by provider service code example: "MEDICOVER_PREMIUM" status: $ref: '#/components/schemas/BenefitChargeStatus' description: Filter charges by status example: "PAID" billingPeriodFrom: type: string format: date description: Filter charges with billing period starting from this date example: "2023-01-01" billingPeriodTo: type: string format: date description: Filter charges with billing period ending before this date example: "2023-12-31" Department: type: object required: - id - name properties: id: type: integer name: type: string example: id: 1 name: "Management" DepartmentInput: type: object required: - name properties: name: type: string Nationality: type: string description: > Nationality of employee as an ISO 3166-1 alpha-2 country code enum: - "US" - "UK" - "FR" - "DE" - "NL" - "PL" - "IT" - "ES" example: "US" ContractType: type: string description: Type of employment contract enum: - "CONTRACT" - "PERMANENT" example: "PERMANENT" Skill: type: string description: Employee skill name example: "JavaScript" Employee: type: object required: - id - nationality - department - keycardId - account - salary - office - firstName - lastName - title - contractType - email - hiredAt - expiresAt - personalInfo - skills - bio properties: id: type: integer example: 91720 nationality: $ref: '#/components/schemas/Nationality' department: type: string keycardId: type: string account: type: string salary: $ref: '#/components/schemas/Money' office: type: array minItems: 2 maxItems: 2 items: type: string firstName: type: string lastName: type: string title: type: string contractType: $ref: '#/components/schemas/ContractType' email: $ref: '#/components/schemas/Email' hiredAt: $ref: '#/components/schemas/DateString' expiresAt: $ref: '#/components/schemas/DateString' personalInfo: type: object required: - age - phone - email - dateOfBirth - address properties: age: type: integer minimum: 0 phone: $ref: '#/components/schemas/Phone' email: $ref: '#/components/schemas/Email' dateOfBirth: $ref: '#/components/schemas/DateString' address: type: object required: - street - city - country properties: street: type: string city: type: string country: type: string skills: type: array items: $ref: '#/components/schemas/Skill' bio: type: string imgURL: type: string example: id: 1234 nationality: "DE" department: Marketing keycardId: "KC-9876" account: "DE89 3704 0044 0532 0130 00" salary: 75000 office: ["Berlin", "HQ"] firstName: "Hans" lastName: "Schmidt" title: "Senior Developer" contractType: "PERMANENT" email: "hans.schmidt@itcorpo.com" hiredAt: "2020-01-15T00:00:00.000Z" expiresAt: "2025-01-14T23:59:59.999Z" personalInfo: age: 35 phone: "+49 123 456789" email: "hans.schmidt@gmail.com" dateOfBirth: "1988-05-20T00:00:00.000Z" address: street: "Alexanderplatz 1" city: "Berlin" country: "Germany" skills: ["JavaScript", "TypeScript", "React"] bio: "Experienced developer with focus on frontend technologies" imgURL: "hans-schmidt-profile.jpg" EmployeeInput: type: object required: - nationality - department - keycardId - account - salary - office - firstName - lastName - title - contractType - email - hiredAt - expiresAt - personalInfo - skills - bio properties: nationality: $ref: '#/components/schemas/Nationality' department: type: string keycardId: type: string account: type: string salary: $ref: '#/components/schemas/Money' office: type: array minItems: 2 maxItems: 2 items: type: string firstName: type: string lastName: type: string title: type: string contractType: $ref: '#/components/schemas/ContractType' email: $ref: '#/components/schemas/Email' hiredAt: $ref: '#/components/schemas/DateString' expiresAt: $ref: '#/components/schemas/DateString' personalInfo: type: object required: - age - phone - email - dateOfBirth - address properties: age: type: integer minimum: 0 phone: $ref: '#/components/schemas/Phone' email: $ref: '#/components/schemas/Email' dateOfBirth: $ref: '#/components/schemas/DateString' address: type: object required: - street - city - country properties: street: type: string city: type: string country: type: string skills: type: array items: $ref: '#/components/schemas/Skill' bio: type: string imgURL: type: string EmployeesSearchCriteria: type: object description: Criteria for filtering employees properties: employeeName: type: string description: Filter employees by name example: "John Doe" departmentId: type: string description: Filter employees by department ID example: "123" skills: type: string description: Filter employees by skills according to `skillsFiltering` example: "JavaScript,React" skillsFiltering: type: string enum: ["ANY", "ALL"] default: "ANY" description: If more than one skill is passed, return either employees with any of the skills (`ANY`) or with all of them (`ALL`) example: "ANY" salaryFrom: type: string description: Minimum salary amount example: "5000" salaryTo: type: string description: Maximum salary amount example: "10000" Expense: type: object required: - id - amount - title - payerAccount - beneficiaryAccount - beneficiaryAddress - scheduledAt properties: id: type: string amount: $ref: '#/components/schemas/Money' title: type: string payerAccount: type: string beneficiaryAccount: type: string beneficiaryAddress: type: string scheduledAt: type: string format: date-time example: id: "f1c436a7-d9f5-4214-9be1-79766750b53b" amount: 10927 title: "salary" payerAccount: "DE89 3704 0044 0532 0130 00" beneficiaryAccount: "PL61 1090 1014 0000 0712 1981 2874" beneficiaryAddress: "445 Mount Eden Road, Mount Eden, Auckland" scheduledAt: "2017-02-17T22:01:36.530Z" ExpenseInput: type: object required: - amount - title - payerAccount - beneficiaryAccount - beneficiaryAddress - scheduledAt properties: amount: $ref: '#/components/schemas/Money' title: type: string payerAccount: type: string beneficiaryAccount: type: string beneficiaryAddress: type: string scheduledAt: type: string format: date-time Geo: type: object additionalProperties: type: string example: "US": "United States" "UK": "United Kingdom" "DE": "Germany" OfficeAmenity: type: object required: - code - name properties: code: type: string description: Unique code identifier of the amenity name: type: string description: Display name of the amenity example: code: "parking" name: "PARKING" Office: type: object required: - code - country - city - address - capacity - estate - amenities - monthlyRental properties: code: type: string country: type: string city: type: string address: type: string capacity: type: integer minimum: 1 monthlyRental: $ref: '#/components/schemas/Money' estate: type: object required: - owner - phone - account properties: owner: type: string phone: type: string account: type: string amenities: type: array items: type: string imgURL: type: string example: country: "Netherlands" city: "Amsterdam" address: "Damrak 81" capacity: 150 monthlyRental: 10000 estate: owner: "B2C Estates and Sons" phone: "(7364) 079343" account: "NL86 AMUJ 9303 4156 60" amenities: - code: "OUTDOOR_SEATING" name: "Outdoor seating" - code: "OPEN_SPACE" name: "Open space" imgURL: "amsterdam-6Uf6-XCKJ-qTKq-ISt2-B3SE.jpg" OfficeInput: type: object required: - code - country - city - address - capacity - estate - amenities - monthlyRental properties: code: type: string country: type: string city: type: string address: type: string capacity: type: integer minimum: 1 monthlyRental: $ref: '#/components/schemas/Money' estate: type: object required: - owner - phone - account properties: owner: type: string phone: type: string account: type: string amenities: type: array items: $ref: '#/components/schemas/OfficeAmenity' imgURL: type: string OfficesSearchCriteria: type: object description: Criteria for filtering offices properties: countries: type: string description: Comma-separated list of country codes to filter by example: "PL,US" amenities: type: string description: Comma-separated list of amenity codes to filter by example: "FREE_PARKING,SHOWER" amenitiesFiltering: type: string enum: ["ANY", "ALL"] default: "ANY" description: If more than one amenity is passed, return either offices with any of the amenities (`ANY`) or with all of them (`ALL`) example: "ANY" phrase: type: string description: Full text search across country, city, address and estate owner fields example: "Amsterdam central" ProjectStatus: type: string description: Status of the ongoing project's workflow enum: - "PLANNING" - "ACTIVE" - "COMPLETED" - "ON_HOLD" example: "ACTIVE" Project: type: object required: - id - name - status - budget - startDate - endDate - team - manager - description properties: id: type: string name: type: string status: $ref: '#/components/schemas/ProjectStatus' budget: $ref: '#/components/schemas/Money' startDate: type: string format: date endDate: type: string format: date team: type: array items: type: object required: - id - name properties: id: type: integer name: type: string manager: type: integer description: type: string example: id: "579ef28f-c539-41ff-abe2-e4f6b1c1afed" name: "Licensed Cotton Pants" status: "on-hold" budget: 490000 startDate: "2013-04-16" endDate: "2019-04-27" team: - id: 4247456 name: "Anna Bahringer" manager: 67429059 description: "Deleniti rerum impedit.\nCum sed eaque quo accusantium." ProjectInput: type: object required: - name - status - budget - startDate - endDate - team - manager - description properties: name: type: string status: $ref: '#/components/schemas/ProjectStatus' budget: $ref: '#/components/schemas/Money' startDate: type: string format: date endDate: type: string format: date team: type: array items: type: object required: - id - name properties: id: type: integer name: type: string manager: type: integer description: type: string ProjectsSearchCriteria: type: object description: Criteria for filtering projects properties: projectName: type: string description: Filter projects by name example: "Cloud migration" status: $ref: '#/components/schemas/ProjectStatus' description: Filter projects by status example: "ACTIVE" teamMembers: type: string description: Filter projects by team member IDs according to `teamMembersFiltering` example: "123,456,789" teamMembersFiltering: type: string enum: ["ANY", "ALL"] default: "ANY" description: If more than one ID is passed, return either projects with any of the team members (`ANY`) or with all of them (`ALL`) example: "ANY" budgetFrom: type: string description: Minimum project budget amount example: "10000" budgetTo: type: string description: Maximum project budget amount example: "50000"