v1

latestOpenAPI 3.0.02026-07-14800227.2 KB
Employees

Update the work schedule section for a given employee id.

This endpoint updates the employee work schedule section for a given employee id. The operation only updates the fields provided in the body.

Automatic recalculation:

  • If any working day field (mondayWorkingDay, ..., sundayWorkingDay) is modified, the system automatically recalculates and updates the employee's weeklyDays field in the work section based on the total number of TRUE values.
  • This ensures consistency between the work schedule configuration and the contracted weekly days count.
put/employees/{employeeId}/work-schedules

Path parameters

employeeIdstring required
Example:60a2db290da29e126a18789a

The _id of the employee to update.

Headers

Authorizationstring required
Example:Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FwaS5rZW5qby5pbyIsInN1YiI6IjYwZjBhOTE2MjE0OTg3MjU2YmU5YzhmZiIsImF1ZCI6Imh0dHBzOi8vYXBpLmtlbmpvLmlvIiwiaWF0IjoxNjI2Mzg1MTE1LCJuYmYiOjE2MjYzODUxMTUsImV4cCI6MTYyNjU1NzkxNSwiYWNjZXNzVHlwZSI6IkFwaUFjY2VzcyIsInNfb3JnSWQiOiI2MGYwNGVhN2RmN2JhMjFlY2U0YmYzYzIifQ.cxG_7dIS-VbmDXdJuLkekoyuyCIzQG2fMcgc0nkfbWE8cihhcb5FnALbQkjU9b5-qVcEoMHZlSuUA-jMEBMMVQ

A valid bearer token.

Request body

mondayWorkingDayboolean

Allow to indicate if mondays are working days for the employee.

tuesdayWorkingDayboolean

Allow to indicate if tuesdays are working days for the employee.

wednesdayWorkingDayboolean

Allow to indicate if wednesdays are working days for the employee.

thursdayWorkingDayboolean

Allow to indicate if thursdays are working days for the employee.

fridayWorkingDayboolean

Allow to indicate if fridays are working days for the employee.

saturdayWorkingDayboolean

Allow to indicate if saturdays are working days for the employee.

sundayWorkingDayboolean

Allow to indicate if sundays are working days for the employee.

Example request

{
  "mondayWorkingDay": true,
  "tuesdayWorkingDay": true,
  "wednesdayWorkingDay": true,
  "thursdayWorkingDay": true
}

Response

OK

_idstring

The employee Kenjo _id.

mondayWorkingDayboolean

Allow to indicate if mondays are working days for the employee.

tuesdayWorkingDayboolean

Allow to indicate if tuesdays are working days for the employee.

wednesdayWorkingDayboolean

Allow to indicate if wednesdays are working days for the employee.

thursdayWorkingDayboolean

Allow to indicate if thursdays are working days for the employee.

fridayWorkingDayboolean

Allow to indicate if fridays are working days for the employee.

saturdayWorkingDayboolean

Allow to indicate if saturdays are working days for the employee.

sundayWorkingDayboolean

Allow to indicate if sundays are working days for the employee.

Example response

{
  "_id": "60a2db290da29e126a18789a",
  "mondayWorkingDay": true,
  "tuesdayWorkingDay": true,
  "wednesdayWorkingDay": true,
  "thursdayWorkingDay": true
}