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
Below is a detailed explanation of each of the fields that can make up the request body, with some of them being mandatory for the request to be successful.
Mandatory fields are marked with an asterisk (*). |
Request body
Object person* Includes personal data of the employee identified through their employeeId. |
Details
|
Object serviceAssociations Includes information regarding the service associations established for the employee. |
Details
|
Object contracts Includes information regarding the contracts applied to the employee, in terms of working hours, labor limitations, etc. |
Details
|
Request example
After analyzing the different fields, an example of the request body is shown:
[
{
"person": {
"name": "Brian",
"surname": "Cohen",
"group": "01",
"email": "brian@orquest.com",
"birthday": "1987-12-01",
"employeeId": "021298521",
"seniority": "2021-12-01",
"aptitudes": [
{
"productId": "C14",
"aptitudes": [
{
"locationId": "101",
"level": 3
},
{
"locationId": "102",
"level": 2
}
]
}
]
},
"serviceAssociations": [
{
"ownerProduct": "C14",
"product": "C14",
"from": "2024-04-11",
"to": null,
"splitPresence": true,
"unplannable": false,
"disponibility": [
{
"from": "2024-04-11",
"to": null,
"ranges": [
{
"dayType": "ALL",
"startMinuteDay": 600,
"duration": 300
}
]
}
],
"id": "asb1415"
}
],
"contracts": [
{
"from": "2024-04-11",
"to": "2027-04-11",
"regularMinutes": 2400,
"countingDays": "MONDAY_SUNDAY",
"additionalMinutes": 360,
"regularControlPeriod": "WEEKLY",
"additionalControlPeriod": "WEEKLY",
"calendarDaysOff": true,
"numberOfHolidays": 25,
"numberOfPublicHolidays": 7,
"weeklyDaysInvolved": "MONDAY_SUNDAY",
"metadata": {
"full": true,
"days": 215,
"taxProfit": "none"
},
"costPerHour": 200.34,
"personCategory": "DE125",
"id": "321abc654def",
"contractTypeId": "07H"
}
]
}
]
Considerations
Each entity in the list has its own state, meaning each element of the list has its own set of attributes or properties that can be independently updated. No more than 30 elements are allowed in the request body.
Each entity will generate an atomic operation that can be automatically reverted if there are errors: the error will be displayed in the response of the request.
If data from the user object is included, the existence of that user in Orquest is validated, establishing the following scenarios:
-
If the user does not exist, it is created and linked to the employee.
-
If the user exists and is already linked to the employee in the request, the information is updated.
-
If the user exists and is linked to another employee, the operation is canceled and returns
HTTP 409 - Conflict
, indicating the conflict with details of the error in the response body.
If the employee category ( |