put
https://app.fracttal.com/api/teams_collaborators_working_days/
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
| Parameter | Type | Required | Description |
|---|---|---|---|
human_resource_id | Integer | Yes* | Unique identifier of the human resource. |
human_resource_code | String | Yes* | Code of the human resource. |
schedule_id | Integer | Yes* | Unique identifier of the work schedule. |
schedule_description | String | Yes* | Description or name of the work schedule. |
active | Boolean | No | Defines 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
| Parameter | Type | Description |
|---|---|---|
human_resource_id | Integer | Identifier of the human resource. |
human_resource_code | String | Code of the human resource. |
schedule_id | Integer | Identifier of the associated work schedule. |
schedule_description | String | Description of the associated work schedule. |
enabled | Boolean | Indicates if the schedule association is enabled. |
working_days | Array | List 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"]
}
} 200