Update Schedules Associated with a Human Resource

This endpoint allows you to update the association of work schedules for a human resource, enabling, disabling, or toggling their status. Identification can be done using IDs or codes, and if the state (active) is not specified, the association is automatically toggled.

Input Parameters

ParameterTypeRequiredDescription
human_resource_id IntegerYes*Unique identifier of the human resource.
human_resource_code StringYes*Code of the human resource.
schedule_id IntegerYes*Unique identifier of the work schedule.
schedule_description StringYes*Description or name of the work schedule.
active BooleanNoDefines the state of the association: true enables, false disables. If omitted, the state is automatically toggled (True -> False, False -> True).

Note: One of the two fields must be sent to identify the human resource (human_resource_id or human_resource_code) and one of the two fields to identify the schedule (schedule_id or schedule_description).

Output Parameters

ParameterTypeDescription
human_resource_id IntegerIdentifier of the human resource.
human_resource_code StringCode of the human resource.
schedule_id IntegerIdentifier of the associated work schedule.
schedule_description StringDescription of the associated work schedule.
enabled BooleanIndicates if the schedule association is enabled.
working_days ArrayList of working days defined in the schedule (Monday to Sunday).

Example:

Request: (PUT)[https://app.fracttal.com/api/teams_collaborators_working_days

{
    "human_resource_code": "HR-001",
    "schedule_description": "Morning Shift",
    "active": true
}
{
  "success": true,
  "message": "200",
  "total": 1,
  "data": {
    "human_resource_id": 45,
    "human_resource_code": "HR-001",
    "schedule_id": 3,
    "schedule_description": "Morning Shift",
    "enabled": true,
    "working_days": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
  }
}
Response
200
Language
LoadingLoading…