Create schedules in the Human Resources auxiliary catalog

This endpoint allows you to create a new schedule in the Human Resources auxiliary catalog, within the Configuration module. The schedule defines working days and the available time blocks that make up the workday, allowing one or more time slots to be registered per day.

Input Parameters

The following information must be sent in the body of the request.

ParameterTypeRequiredDescription
account_code TextYesUnique code that identifies the account to which the schedule configuration belongs.
name TextYesDescriptive name of the schedule or work calendar.
week_days ArrayYesDays of the week to which the schedule applies. Represented as numbers from 1 to 7, where 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday, and 7 = Sunday.
working_days_times ArrayYesList of work schedule configurations associated with the days indicated in week_days.

Parameters of working_days_times

ParameterTypeRequiredDescription
available BooleanYesIndicates whether the schedule is enabled (true) or not available (false).
name TextYesName or label that identifies the time block (e.g., “Morning Schedule”, “Afternoon Shift”).
start_time TextYesStart time of the work schedule in HH:mm format (24-hour).
end_time TextYesEnd time of the work schedule in HH:mm format (24-hour).

Output Parameters

ParameterTypeDescription
id NumberIdentifier of the created schedule
id_company NumberIdentifier of the company
name TextDescription of the schedule
is_active BooleanStatus flag of the schedule (Active/Inactive)
week_days ArrayDays of the week to which the schedule applies.

Example:

Request: **(POST)[https://app.fracttal.com/api/teams_work_schedules

{
    "account_code": "A1",
    "name": "Turno mañana",
    "week_days": [
        1,
        2,
        3,
        4
    ],
    "working_days_times": [
        {
            "available": true,
            "name": "Time 1",
            "start_time": "2025-12-16 07:00",
            "end_time": "2025-12-16 15:00"
        },
        {
            "available": true,
            "name": "Time 2",
            "start_time": "2025-12-16 15:00",
            "end_time": "2025-12-16 21:00"
        },
    ]
}
{
    "success": true,
    "message": "200",
    "data": {
        "id": 0,
        "id_company": 111,
        "name": "Turno mañana",
        "is_active": true,
        "week_days": [
            1,
            2,
            3,
            4
        ]
    },
    "total": 0
}
Response
200
Language
LoadingLoading…