Add a list of incidences
This endpoint allows registering a list of incidences for the same employee.
POST /api/v1/import/incidences
Below is a detailed explanation of each of the fields that can make up the request body, with some being mandatory for the request to be successful.
Mandatory fields are marked with an asterisk (*). |
Request body
JSON Analysis |
---|
Details
|
Request example
Once the analysis of the different fields has been done, an example of the request body is shown:
{
"lag": 0,
"business": "BUSINESSID",
"employeeId": "C14A658",
"incidences": [
{
"type": "01",
"initTime": "09:00",
"endTime": "10:00",
"workedMinutes": 60,
"from": "2024-05-01",
"to": "2024-05-01",
"id": "C14-12547"
},
{
"type": "03",
"workedMinutes": 0,
"from": "2024-05-12",
"to": "2024-05-30",
"id": "C14-12549"
}
]
}
Considerations
This request will generate an atomic operation that can be automatically reversed if there are errors: the error will be displayed in the response of the request.
If an incidence is not defined in the business’s incidence catalog, it cannot be assigned to any employee.