Add an incidence
This endpoint allows registering the information of an incidence for an employee.
POST /api/v1/import/incidence
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 |
---|
json Details
|
Request example
Once the analysis of the different fields has been done, an example of the request body is shown:
{
"business": "BUSINESSID",
"employeeId": "C14A658",
"type": "01",
"initTime": "08:30",
"endTime": "09:30",
"workedMinutes": 30,
"from": "2024-04-15",
"to": "2024-04-15",
"id": "C14-12545"
}
Considerations
This request will generate an atomic operation that can be automatically rolled back 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.
If the incidence overlaps with another incidence previously registered in the system, the request will return a 400 Bad Request
error indicating error.incidence_overlapped.
Useful links
What is an incidence?