Create or update employee (simplified)

This endpoint is a simplification of Create or update employee (complex). It allows creating or modifying an employee by including only information about the person, their service associations, and their contracts.

PUT /api/v1/businesses/{businessId}/import/simple/employee

A detailed explanation of each field that can make up the request body is provided below.

Required fields are marked with (*).

Accepted values for Enum type fields are shown in the collapsible details.

Request body

JSON analysis

Object person*

Contains the personal data of the employee identified by their employeeId.

"person": {
      "name": "string",
      "surname": "string",
      "group": "string",
      "email": "string",
      "birthday": "yyyy-MM-dd",
      "employeeId": "string",
      "seniority": "yyyy-MM-dd"
    }
Details
  • name*. Employee’s first name.

  • surname*. Employee’s last name(s).

  • group. Group the employee belongs to.

  • email. Employee’s email address, in the correct format.

  • birthday. Date of birth in yyyy-MM-dd format.

  • employeeId*. Employee identifier in the external system.

  • seniority. Employee’s seniority date in yyyy-MM-dd format.

Object serviceAssociations

Contains information about the service associations established for the employee.

"serviceAssociations": [
      {
        "ownerProduct": "string",
        "product": "string",
        "from": "yyyy-MM-dd",
        "to": "yyyy-MM-dd",
        "splitPresence": true,
        "unplannable": true,
        "disponibility": [
          {
            "from": "yyyy-MM-dd",
            "to": "yyyy-MM-dd",
            "ranges": [
              {
                "dayType": "string",
                "startMinuteDay": 0,
                "duration": 0
              }
            ],
            "type": "Enum",
            "timeFramePatternId": "string",
            "weekStart": 0,
            "blockedType": "Enum"
          }
        ],
        "id": "string"
      }
    ]
Details
  • ownerProduct*. External identifier of the product or section the employee belongs to.

  • product*. External identifier of the product or section where the employee will work. It can be the same as ownerProduct; if different, it represents a cession.

  • from*. Start date of the service association in yyyy-MM-dd format.

  • to. End date of the service association in yyyy-MM-dd format. Can be null, indicating no end date has been set.

  • splitPresence. Determines whether this is a split shift. The default value is true.

  • unplannable. Determines whether the employee will be ignored by the scheduler and must therefore be planned manually. The default value is false.

  • disponibility. Employee availability during a specific interval. If not defined, the employee’s availability is total. To change it, the following information must be provided.

    • from*. Start date of the availability period in yyyy-MM-dd format.

    • to. End date of the availability period in yyyy-MM-dd format. It can be null as long as the service association also does not have an end date.

    • ranges*. List of availabilities by day type. For each type, include the following information:

      • dayType*. Day type to which the availability applies. It can be a system day type (ALL, WEEKENDS, MONDAY, TUESDAY, WEDNESDAY, etc.) or one defined at the business level.

      • startMinuteDay*. Start of availability in minutes from 00:00 local time. For example, 600 for 10:00.

      • duration*. Duration of the range in minutes.

    • type. Effective availability type: DAY_TYPE, SHIFT_PATTERN or CALENDAR.

    • timeFramePatternId. Internal identifier of the applied shift or availability pattern. Only for SHIFT_PATTERN availability type.

    • weekStart. Start week. Only for SHIFT_PATTERN availability type.

    • blockedType. Type of block applied to the pattern (NONE, EXTENSIBLE_WORK, NON_EXTENSIBLE_WORK, EXTENSIBLE_TIME, NON_EXTENSIBLE_TIME, DAILY_WORKED, FREE, WORKING_HOURS). Only for SHIFT_PATTERN availability type.

  • id. External identifier of the service association. Must be unique.

Object contracts

Contains information about the contracts applied to the employee, in terms of hours worked, labour limitations, etc.

"contracts": [
      {
        "from": "yyyy-MM-dd",
        "to": "yyyy-MM-dd",
        "regularMinutes": 0,
        "countingDays": "Enum",
        "additionalMinutes": 0,
        "regularControlPeriod": "Enum",
        "additionalControlPeriod": "Enum",
        "calendarDaysOff": true,
        "numberOfHolidays": 0,
        "numberOfPublicHolidays": 0,
        "weeklyDaysInvolved": "Enum",
        "metadata": {},
        "costPerHour": 0,
        "personCategory": "string",
        "id": "string",
        "contractTypeId": "string"
      }
    ]
Details
  • from*. Contract start date in yyyy-MM-dd format.

  • to. Contract end date in yyyy-MM-dd format. Can be sent as null if no end date has been set.

  • regularMinutes*. Regular hours (in minutes) established in the contract. The value is interpreted based on the defined time base: annual, weekly, or daily.

  • countingDays. In a daily contract, indicates which days count as worked. Its value can be MONDAY_SUNDAY, MONDAY_SATURDAY, LABOR_DAYS, LABOR_MONDAY_SATURDAY or WEEKENDS_AND_HOLIDAYS.

  • additionalMinutes*. Complementary hours (in minutes) established in the contract. The value is interpreted based on the defined time base: annual, weekly, or daily.

  • regularControlPeriod*. Control period for the regular hours established in the contract. Can be WEEKLY, MONTHLY or YEARLY.

  • additionalControlPeriod*. Control period for complementary hours. Can be WEEKLY, MONTHLY or YEARLY.

  • calendarDaysOff*. Determines whether holidays will be processed as calendar days (true) or working days (false).

  • numberOfHolidays*. Number of holiday days the employee has in their contract.

  • numberOfPublicHolidays*. Number of public holidays the employee has in their contract.

  • weeklyDaysInvolved*. Days of the week that will be counted (week type). This field can be defined as MONDAY_SUNDAY, MONDAY_SATURDAY, LABOR_DAYS, LABOR_MONDAY_SATURDAY or WEEKENDS_AND_HOLIDAYS.

  • metadata. Any additional data related to the contract. The structure of this metadata must be previously configured by the Orquest team.

  • costPerHour. Employee’s cost per hour worked.

  • personCategory*. External identifier of the employee’s category. Can be consulted here.

  • id. External identifier of the contract. Must be unique. Limited to 200 characters.

  • contractTypeId. Identifier of the contract type to be applied. If included, the contract’s characteristics will be overridden by those of the contract type (more information here). If not specified, contract type filters may be applied to assign one.

Request example

Once the analysis of the various fields has been completed, an example of the request body is provided:

{
    "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
                        }
                    ],
                    "type": "SHIFT_PATTERN",
                    "timeFramePatternId": "d01e1e08-b2e4-48d1-aa3c-ec43d74e1507",
                    "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

This request will generate an atomic operation that can be automatically reverted if there are any errors: the error will be displayed in the response of the request.

If the employee category (personCategory) specified in the request body does not exist in the system, a new category is automatically created (Business configuration > Employee categories). In this case, the name and external identifier of the new category will match the value provided in this field. Therefore, it is recommended to review existing categories before making the request to avoid unnecessary creation of additional categories.