Create or update employee list (simplified)
This endpoint is a simplified version of Create or update employee list (complex). It allows creating or modifying the list of employees including only information about the person, their service associations, and their contracts.
PUT /api/v1/businesses/{businessId}/import/simple/employees
A detailed explanation of each field that can make up the request body is provided below.
|
Required fields are marked with (*). Accepted values for |
Request body
| JSON analysis |
|---|
Object person* Contains the personal data of the employee identified by their employeeId. |
Details
|
Object serviceAssociations Contains information about the service associations established for the employee. |
Details
|
Object contracts Contains information about the contracts applied to the employee, in terms of hours worked, labour limitations, etc. |
Details
|
Request example
After analyzing the different fields, an example of the request body is shown:
[
{
"person": {
"name": "Jane",
"surname": "Santos",
"employeeId": "010203",
"seniority": "2018-03-01"
},
"serviceAssociations": [
{
"ownerProduct": "0001-G",
"product": "0001-G",
"from": "2024-01-01",
"to": null,
"disponibility": [
{
"from": "2026-01-01",
"ranges": [
{
"dayType": "ALL",
"startMinuteDay": 0,
"duration": 1440,
"available": false
}
],
"type": "SHIFT_PATTERN",
"timeFramePatternId": "d01e1e08-b2e4-48d1",
"weekStart": 1,
"blockedType": "NON_EXTENSIBLE_TIME"
}
]
}
],
"contracts": [
{
"from": "2026-01-01",
"to": null,
"regularMinutes": 0,
"additionalMinutes": 0,
"regularControlPeriod": "WEEKLY",
"additionalControlPeriod": "WEEKLY",
"calendarDaysOff": false,
"numberOfHolidays": 0,
"numberOfPublicHolidays": 0,
"weeklyDaysInvolved": "MONDAY_SUNDAY",
"personCategory": "AV",
"contractTypeId": "JC40"
}
]
}
]
Considerations
|
Unlike the complex list, here the validation is performed as a block: if any element of the list fails its validation, none of them is imported, not just the invalid element. |
An empty list body ([]) is valid and does nothing, returning 200 OK.
|
If the employee category ( |
Error codes
|
Since validation happens as a block, if any element of the list incurs any of the codes in this table, the entire response is |
In addition to the common errors, this endpoint can return the following codes:
| Code | Message | Description |
|---|---|---|
|
- |
The request body is not valid JSON or cannot be read. |
Time frame patter not found |
The shift pattern identifier ( |
|
Calendar disponibility type is not enabled for business |
The |
|
ContractType not found in business |
The contract type identifier ( |
|
|
- |
A field marked as required is missing within an object present in the request ( |
- |
A numeric field receives a negative value. |
|
- |
In a contract or a service association, the start date ( |
|
- |
The value of an enumerated field does not match any of the defined values. |
|
- |
The list sent exceeds the allowed limit of 30 elements. It is recommended to split the request into smaller batches. |
|
The |
|
It is recommended to review the response body in case of an error, as it includes relevant information for diagnosis and debugging, such as invalid fields or unrecognized values. |