1. U4 ERPx
  2. API Reference
  3. Personnel
  4. Employees

Employees

The Employee API in Unit4 ERPx manages employee-related data - creation, retrieval, updates, and termination (soft-delete) of employee records. It is designed for integration with mobile and other external applications, supporting microservice-based development, testing, and maintenance.

Purpose:
The Employee API manages all aspects of employee data, including creation, update, validation, and soft deletion (termination).

Base URL:
/v1/employees

Authentication:
All APIs require a Client ID and Client Secret.
Refer to the global authentication documentation for details.

System Parameters:
System parameters for this API are available in Online Help → Personnel → Personnel → Fixed Registers → System Parameters.

Supported Methods

HTTP MethodEndpointDescriptionLimits & Notes
POST/v1/employeesCreate a single employee recordOnly 1 employee per call. Can create employments and relations at the same time.
POST/v1/employees/batchCreate multiple employee recordsMax 200 employees per call (hard limit).
POST/v1/employees/validateValidate creation without savingUsed to validate employee data before creation.
GET/v1/employees/{personId}Retrieve single employee dataSupports multiple optional filters. When any of the optional parameters are specified as false, the data retrieved contains less property, allowing a faster response.
PATCH/v1/employees/batchUpdate employee dataAllows modifying employee and related records.
PATCH/v1/employees/validateValidate update without savingUsed to validate data before applying updates.
DELETE/v1/employees/{personId}Terminate (soft-delete) an employeeChanges status to ‘Terminate’.
   

Swagger / Schema

Version v1

   

Method Details

Sample Request

{
  "companyId": "SD1",
  "dateFrom": "2000-01-09T00:00:00.000",
  "dateTo": "2099-01-31T00:00:00.000",
  "nameInformation": {
    "aliasName": "JD",
    "firstName": "John",
    "surname": "Doe"
  },
  "paymentInformation": {
    "payMethod": "CH",
    "supplierGroupId": "1",
    "supplierId": "123"
  },
  "personId": "123",
  "personnelType": "E",
  "status": "N",
  "contactPoints": [{
    "address": {
      "countryCode": "GB",
      "streetAddress": "The Matrix"
    },
    "contactPointType": "1"
  }],
  "relatedValues": [{
    "status": "N",
    "relationId": "C1",
    "relatedValue": "111",
    "dateFrom": "2000-01-09T00:00:00.000",
    "dateTo": "2099-12-31T00:00:00.000"
  }]
}

   

Validation Rules for POST Method

POST_001 - User is not authorised
ElementDetails
Scenario IDPOST_001
Scenario NameUser is not authorised
HTTP Code403
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
POST_002 - Unknown CompanyID
ElementDetails
Scenario IDPOST_002
Scenario NameUnknown CompanyID
HTTP Code403
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTCompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
POST_003 - Missing mandatory fields
ElementDetails
Scenario IDPOST_003
Scenario NameMissing mandatory fields
HTTP Code422
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTA mandatory field is missing
THENEmployee is not created; 422 response is returned
Example Error Message“The {0} field is required.”
POST_004 - Invalid format of fields
ElementDetails
Scenario IDPOST_004
Scenario NameInvalid format of fields
HTTP Code422
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTField format is invalid
THENEmployee is not created; 422 response is returned
Example Error Message“Invalid date time format…” / “Error converting value {0} to type ‘{1}’…”
POST_005 - Unsatisfied model restrictions
ElementDetails
Scenario IDPOST_005
Scenario NameUnsatisfied model restrictions
HTTP Code422
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTField violates model restrictions (length, range, numeric limits)
THENEmployee is not created; 422 response is returned
Example Error Message“The field {0} must be a string with max length {1}” / “{0} must be equal or earlier than {1}”
POST_006 - Duplicate personId
ElementDetails
Scenario IDPOST_006
Scenario NameDuplicate personId
HTTP Code409
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTpersonId already exists within companyId
THENEmployee is not created; 409 response is returned
Example Error Message“Employee with ID {0} already exists within company {1}.”
POST_007 - Invalid data
ElementDetails
Scenario IDPOST_007
Scenario NameInvalid data
HTTP Code422
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTData does not exist on ERP (attribute values, list of possible values)
THENEmployee is not created; 422 response is returned
Example Error Message“{0} is not a legal {1}” / “Illegal {0}”
POST_008 - Missing field on DTO
ElementDetails
Scenario IDPOST_008
Scenario NameMissing field on DTO
HTTP Code400
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTProperty is not present in the request body
THENEmployee is not created; 400 response is returned
Example Error Message
POST_009 - Employee is created
ElementDetails
Scenario IDPOST_009
Scenario NameEmployee is created
HTTP Code201
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUT
THENA new employee is created
Example Error MessageRESPONSE: returns the created employee
POST_009b - Employee is created when RESNO Autonumbering is active and personId is not provided
ElementDetails
Scenario IDPOST_009b
Scenario NameEmployee is created when RESNO Autonumbering is active and personId is not provided
HTTP Code201
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTpersonId is not provided AND Autonumbering for employee is active
THENA new employee is created; response returns assigned personId and supplierId
Example Error MessageRESPONSE: returns the created employee with auto-assigned IDs
POST_010 - Employee is created and Workflow is active
ElementDetails
Scenario IDPOST_010
Scenario NameEmployee is created and Workflow is active
HTTP Code202
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTWorkflow is active when creating a new employee
THENA new record is created and pending for approval; response contains messages for fields awaiting approval
Example Error Message“Field {0} is awaiting approval.”

Sample Request

{
     "companyId": "SD1",
    "dateFrom": "2000-01-09T00:00:00.000",
    "dateTo": "2099-01-31T00:00:00.000",
    "nameInformation": {
        "aliasName": "JD",
        "firstName": "John",
        "surname": "Doe"
    },
    "paymentInformation": {
        "payMethod": "CH",
        "supplierGroupId": "1",
        "supplierId": "123"
    },
    "personId": "123",
    "personnelType": "E",
    "status": "N",
    "contactPoints": [
        {
            "address": {
                "countryCode": "GB",
                "streetAddress": "The Matrix"
            },
            "contactPointType": "1"
        }
    ],
    "relatedValues": [
        {
            "status": "N",
            "relationId": "C1",
            "relatedValue": "111",
            "dateFrom": "2000-01-09T00:00:00.000",
            "dateTo": "2099-12-31T00:00:00.000"
        }
    ]
},
{
    "companyId": "SD1",
    "dateFrom": "2000-01-30T00:00:00.000",
    "dateTo": "2099-01-31T00:00:00.000",
    "nameInformation": {
        "aliasName": "JS",
        "firstName": "Jane",
        "surname": "Smith"
    },
    "paymentInformation": {
        "payMethod": "CH",
        "supplierGroupId": "1",
        "supplierId": "321"
    },
    "personId": "321",
    "personnelType": "E",
    "status": "N",
    "contactPoints": [
        {
            "address": {
                "countryCode": "GB",
                "streetAddress": "Bond Street"
            },
            "contactPointType": "1"
        }
    ],
    "relatedValues": [
        {
            "status": "N",
            "relationId": "C1",
            "relatedValue": "222",
            "dateFrom": "2000-01-30T00:00:00.000",
            "dateTo": "2099-12-31T00:00:00.000"
        }
    ]
}
]
}

   

Validation Rules for POST Method (batch)

POST_001 - User is not authorised
ElementDetails
Scenario IDPOST_001
Scenario NameUser is not authorised
HTTP Code403
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
POST_002 - Unknown companyID
ElementDetails
Scenario IDPOST_002
Scenario NameUnknown companyID
HTTP Code403
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
POST_003 - Missing mandatory fields
ElementDetails
Scenario IDPOST_003
Scenario NameMissing mandatory fields
HTTP Code422
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTA mandatory field is missing
THENEmployee is not created; 422 response is returned
Example Error Message“The {0} field is required.”
POST_004 - Invalid format of fields
ElementDetails
Scenario IDPOST_004
Scenario NameInvalid format of fields
HTTP Code422
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTField format is invalid
THENEmployee is not created; 422 response is returned
Example Error Message“Invalid date time format…” / “Error converting value {0} to type ‘{1}’…”
POST_005 - Unsatisfied model restrictions
ElementDetails
Scenario IDPOST_005
Scenario NameUnsatisfied model restrictions
HTTP Code422
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTField violates model restrictions (length, range, numeric limits)
THENEmployee is not created; 422 response is returned
Example Error Message“The field {0} must be a string with max length {1}” / “{0} must be equal or earlier than {1}”
POST_006 - Duplicate personId
ElementDetails
Scenario IDPOST_006
Scenario NameDuplicate personId
HTTP Code409
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTpersonId already exists within companyId
THENEmployee is not created; 409 response is returned
Example Error Message“Employee with ID {0} already exists within company {1}.”
POST_007 - Invalid data
ElementDetails
Scenario IDPOST_007
Scenario NameInvalid data
HTTP Code422
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTData does not exist on ERP (attribute values, list of possible values)
THENEmployee is not created; 422 response is returned
Example Error Message“{0} is not a legal {1}” / “Illegal {0}”
POST_008 - Missing field on DTO
ElementDetails
Scenario IDPOST_008
Scenario NameMissing field on DTO
HTTP Code400
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTProperty is not present in the request body
THENEmployee is not created; 400 response is returned
Example Error Message
POST_009 - CompanyId is different in more than one employee
ElementDetails
Scenario IDPOST_009
Scenario NameCompanyId is different in more than one employee
HTTP Code403
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTCompanyIds are different inside the request
THENEmployee is not created; 403 response is returned
Example Error Message“WebAPI: There is a mismatch between the url parameter and the passed object.”
POST_010 - Employees are created
ElementDetails
Scenario IDPOST_010
Scenario NameEmployees are created
HTTP Code201
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUT
THENA new employee is created
Example Error MessageRESPONSE: returns the created employees
POST_011 - Employee is created when RESNO Autonumbering is ACTIVE and personId is not provided (multiple employees)
ElementDetails
Scenario IDPOST_011
Scenario NameEmployee is created when RESNO Autonumbering is ACTIVE and personId is not provided (multiple employees)
HTTP Code201
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTpersonId is not provided AND Autonumbering for Employees is active
THENA new employee is created
Example Error MessageRESPONSE: returns the created employees AND each DTO contains personId and supplierId with the ID assigned to each employee
POST_012 - Employee is created when RESNO Autonumbering is ACTIVE and personId is not provided (single employee)
ElementDetails
Scenario IDPOST_012
Scenario NameEmployee is created when RESNO Autonumbering is ACTIVE and personId is not provided (single employee)
HTTP Code201
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTpersonId is not provided AND Autonumbering for Employee is active
THENA new employee is created
Example Error MessageRESPONSE: returns the created employee AND personId and supplierId contain the ID assigned to this new employee
POST_013 - Employee is created and Workflow is active
ElementDetails
Scenario IDPOST_013
Scenario NameEmployee is created and Workflow is active
HTTP Code202
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTWorkflow is active when creating a new employee
THENA new record is created and pending for approval; response contains messages on fields awaiting approval
Example Error Message“Field {0} is awaiting approval.”

Sample Request

{
    "companyId": "SD1",
    "dateFrom": "2000-01-09T00:00:00.000",
    "dateTo": "2099-01-31T00:00:00.000",
    "nameInformation": {
        "aliasName": "JD",
        "firstName": "John",
        "surname": "Doe"
    },
    "paymentInformation": {
        "payMethod": "CH",
        "supplierGroupId": "1",
        "supplierId": "123"
    },
    "personId": "123",
    "personnelType": "E",
    "status": "N",
    "contactPoints": [
        {
            "address": {
                "countryCode": "GB",
                "streetAddress": "The Matrix"
            },
            "contactPointType": "1"
        }
    ],
    "relatedValues": [
        {
            "status": "N",
            "relationId": "C1",
            "relatedValue": "111",
            "dateFrom": "2000-01-09T00:00:00.000",
            "dateTo": "2099-12-31T00:00:00.000"
        }
    ]
}

   

Validation Rules for POST Method (validate)

POST_001 - User is not authorised
ElementDetails
Scenario IDPOST_001
Scenario NameUser is not authorised
HTTP Code403
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
POST_002 - Unknown companyID
ElementDetails
Scenario IDPOST_002
Scenario NameUnknown companyID
HTTP Code403
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
POST_003 - Missing mandatory fields
ElementDetails
Scenario IDPOST_003
Scenario NameMissing mandatory fields
HTTP Code422
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTA mandatory field is missing
THENEmployee is not created; 422 response is returned
Example Error Message“The {0} field is required.”
POST_004 - Invalid format of fields
ElementDetails
Scenario IDPOST_004
Scenario NameInvalid format of fields
HTTP Code422
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTField format is invalid
THENEmployee is not created; 422 response is returned
Example Error Message“Invalid date time format…” / “Error converting value {0} to type ‘{1}’…”
POST_005 - Unsatisfied model restrictions
ElementDetails
Scenario IDPOST_005
Scenario NameUnsatisfied model restrictions
HTTP Code422
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTField violates model restrictions (length, range, numeric limits)
THENEmployee is not created; 422 response is returned
Example Error Message“The field {0} must be a string with max length {1}” / “{0} must be equal or earlier than {1}”
POST_006 - Duplicate personId
ElementDetails
Scenario IDPOST_006
Scenario NameDuplicate personId
HTTP Code409
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTpersonId already exists within companyId
THENEmployee is not created; 409 response is returned
Example Error Message“Employee with ID {0} already exists within company {1}.”
POST_007 - Invalid data
ElementDetails
Scenario IDPOST_007
Scenario NameInvalid data
HTTP Code422
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTData does not exist on ERP (attribute values, list of possible values)
THENEmployee is not created; 422 response is returned
Example Error Message“{0} is not a legal {1}” / “Illegal {0}”
POST_008 - Employee is created
ElementDetails
Scenario IDPOST_008
Scenario NameEmployee is created
HTTP Code201
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTNo error is found
THENA new employee is created
Example Error MessageRESPONSE: returns the JSON
POST_009 - Missing field on DTO
ElementDetails
Scenario IDPOST_009
Scenario NameMissing field on DTO
HTTP Code400
GIVENA new employee needs to be created
WHENCalling the POST method of the API
BUTA property is not present on the body
THENEmployee is not created; 400 response is returned
Example Error Message

Sample Request

N/A

   

Additional Parameters

The following parameters help retrieve basic information about an employee:

ParameterValueDescriptionData TypeDefault Value
includeHistoryoptionalSpecify if you wish to include or exclude retrieval of historical information related to a specific personId.booleantrue
getDescriptionsoptionalSpecify if you wish to retrieve descriptions of field values related to a specific personId.booleantrue
includeFlexiFieldsoptionalSpecify if you wish to include or exclude retrieval of information from flexi-fields related to a specific personId.booleantrue
includeRelatedValuesoptionalSpecify if you wish to include or exclude retrieval of related values for a specific personId.booleantrue

   

Validation Rules for GET Method

GET_001 - User is not authorised
ElementDetails
Scenario IDGET_001
Scenario NameUser is not authorised
HTTP Code403
GIVENData from an existing employee needs to be retrieved
WHENCalling the GET method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_002 - Unknown companyID
ElementDetails
Scenario IDGET_002
Scenario NameUnknown companyID
HTTP Code403
GIVENData from an existing employee needs to be retrieved
WHENCalling the GET method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_003 - Missing mandatory fields
ElementDetails
Scenario IDGET_003
Scenario NameMissing mandatory fields
HTTP Code405
GIVENData from an existing employee needs to be retrieved
WHENCalling the GET method of the API
BUTpersonId is not indicated
THENEmployee is not retrieved; 405 response is returned
Example Error Message(Empty message)
GET_004 - personId does not exist
ElementDetails
Scenario IDGET_004
Scenario NamepersonId does not exist
HTTP Code404
GIVENData from an existing employee needs to be retrieved
WHENCalling the GET method of the API
BUTpersonId does not exist for the companyId
THENEmployee is not retrieved; 404 response is returned
Example Error Message“The entity of the following parameters [Company: {0}, Employee: {1}] was not found.”
GET_005 - Employee exists
ElementDetails
Scenario IDGET_005
Scenario NameEmployee exists
HTTP Code200
GIVENData from an existing employee needs to be retrieved
WHENCalling the GET method of the API
BUT
THEN200 response is returned together with the information of the employee
Example Error MessageRESPONSE: Employee information is retrieved
GET_006 - Employee exists BUT without Flexi-fields
ElementDetails
Scenario IDGET_006
Scenario NameEmployee exists BUT without Flexi-fields
HTTP Code200
GIVENData from an existing employee needs to be retrieved
WHENCalling the GET method of the API AND additional parameter includeFlexiFields is false
BUT
THEN200 response is returned together with the information of the employee WITHOUT information of their flexi-fields (customFieldGroups is not part of the response, not even as customFieldGroups: [])
Example Error MessageRESPONSE: Employee information is retrieved

   

Sample Request

  employees/123
    {
        "path": "employments",
        "op": "RemovedById",
        "value": {
          "positionId": "0009",
          "startDate": "2024-08-01",
          "endDate": "2025-10-14"
        }
  }
  
  employees/123?childEndAtEndDate=true
{
        "path": "employments",
        "op": "AddOrReplaceById",
        "value": {
          "positionId": "0009",
          "startDate": "2024-08-01",
          "endDate": "2025-10-14"
        }
  }

   

Additional Parameters

The following parameters help retrieve or update basic information about an employee:

ParameterValueDescriptionData TypeDefault Value
childStrategyoptionalUsed for patching Employments and their relations. Within a specified Date Range, you must decide which Child Entities to update and whether to create new Entities if required.
Possible values: "AddOrUpdate", "Add", "UpdateValidAsOfStartDate"
stringAddOrUpdate
childEndAtEndDateoptionalUsed for patching Employments and their relations. Specify if you wish to populate the End Date for a specific personId or its relations.booleantrue
includeFlexiFieldsoptionalSpecify if you wish to include or exclude retrieval of information from flexi-fields related to a specific personId.booleantrue
includeRelatedValuesoptionalSpecify if you wish to include or exclude retrieval of related values for a specific personId.booleantrue

   

Limits & Notes

  • One employee per call.

  • Possibility to update several fields per call.

  • Possibility to add, update, and remove employments, and update or remove relations.

  • childStrategy parameter is only valid for Employments and their relations. The possible values are:

    • AddOrUpdate – Add or update connections between given start-date and end-date (e.g. update and/or fill/stretch to guarantee coverage between the given start and end-date).
      Typically used to create new connections or to extend/update existing connections while ensuring coverage for the specified interval.

    • Update – Update existing connections between given start-date and end-date without adding or filling intervals where no connection exists.
      Typically used when existing connection intervals need updating for periods that already exist — the user doesn’t have to specify each employment interval in detail.

    • UpdateValidAsOfStartDate – Update the connection valid as of the given start-date. Returns an error if not found.
      Applies the changes only to the one existing connection valid as per the start-date (while preserving history).

  • Patch operators for employee’s relations: AddOrReplaceById and RemoveById

    • Keys on employee-relations: dateFrom, dateTo, relationId
    • Other properties may help identify unique employee relations
  • Patch operators for employments and their relations: AddOrReplaceById and RemoveById

    • Keys on employment: positionId, startDate, endDate
    • Keys on employment-relations: positionId, dateFrom, dateTo, relationId
    • Other properties may help identify the uniqueness of the employment and/or employment relations
  • If the relation being modified or deleted belongs to an attributeId marked as Duplicate, additional fields (e.g. relatedValue) must be provided to identify the correct column to modify.

  • The startDate of an employment cannot be amended (using AddOrReplaceByID) to a date after the existing startDate.
    In this case, include the date where the employment is no longer valid and use a RemoveById operation instead.

   

Validation Rules for PATCH Method Details

PATCH_001 - User is not authorised
ElementDetails
Scenario IDPATCH_001
Scenario NameUser is not authorised
HTTP Code403
GIVENData from an existing employee needs to be modified
WHENCalling PATCH method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 response is returned
Example Error Message“User is not authorised.”
PATCH_002 - Missing mandatory fields
ElementDetails
Scenario IDPATCH_002
Scenario NameMissing mandatory fields
HTTP Code422
GIVENData from an existing employee needs to be modified
WHENCalling PATCH method of the API
BUTA mandatory field is missing
THENData is not updated; 422 response is returned
Example Error Message“The {0} field is required.”
PATCH_003 - Invalid format of fields
ElementDetails
Scenario IDPATCH_003
Scenario NameInvalid format of fields
HTTP Code422
GIVENData from an existing employee needs to be modified
WHENCalling PATCH method of the API
BUTField format is invalid
THENData is not updated; 422 response is returned
Example Error Message“Invalid date time format…” / “Error converting value {0} to type ‘{1}’…”
PATCH_004 - Unsatisfied model restrictions
ElementDetails
Scenario IDPATCH_004
Scenario NameUnsatisfied model restrictions
HTTP Code422
GIVENData from an existing employee needs to be modified
WHENCalling PATCH method of the API
BUTField violates model restrictions
THENData is not updated; 422 response is returned
Example Error Message“The date must be between {0} and {1}” / “The field {0} must be a string with max length {1}”
PATCH_005 - Unknown companyID
ElementDetails
Scenario IDPATCH_005
Scenario NameUnknown companyID
HTTP Code422
GIVENData from an existing employee needs to be modified
WHENCalling PATCH method of the API
BUTInvalid companyID
THENData is not updated; 422 response is returned
Example Error Message“Unknown {0}.”
PATCH_006 - Unknown personId
ElementDetails
Scenario IDPATCH_006
Scenario NameUnknown personId
HTTP Code404
GIVENData from an existing employee needs to be modified
WHENCalling PATCH method of the API
BUTpersonId does not exist
THENData is not updated; 404 response is returned
Example Error Message“Employee with ID {0} was not found within the company {1}.”
PATCH_007 - Update an employment without mandatory parameters
ElementDetails
Scenario IDPATCH_007
Scenario NameUpdate an employment AND request doesn’t have the mandatory parameters
HTTP Code400
GIVENEmployment data from an existing employee needs to be modified
WHENCalling PATCH method of the API with addOrReplaceById operation
BUTpositionId OR startDate OR endDate is not present on the request
THENData is not updated; 400 response is returned
Example Error Message“The {0}-property of the patch-element must be given….”
PATCH_008 - Delete an employment without mandatory parameters
ElementDetails
Scenario IDPATCH_008
Scenario NameDelete an employment AND request doesn’t have the mandatory parameters
HTTP Code400
GIVENEmployment data from an existing employee needs to be deleted
WHENCalling PATCH method of the API with removeById operation
BUTpositionId OR startDate OR endDate is not present on the request
THENData is not updated; 400 response is returned
Example Error Message“The {0}-property of the patch-element must be given….”
PATCH_009 - Changing first name when part of name definition
ElementDetails
Scenario IDPATCH_009
Scenario NameChanging the first name of an employee AND the first name is part of the name definition (System parameters)
HTTP Code200
GIVENData from an existing employee needs to be modified
WHENCalling PATCH method of the API
BUTfirstName field is part of the active System parameter “HS_NAME” value
THEN200 response is returned together with the information of the employee and name property is automatically updated according to the System parameter “HS_NAME” value
Example Error MessageRESPONSE: Employee information is retrieved
PATCH_010 - Delete an employment that already existed
ElementDetails
Scenario IDPATCH_010
Scenario NameDelete an employment that already existed
HTTP Code200
GIVENEmployment data from an existing employee needs to be deleted
WHENCalling PATCH method of the API
BUTThe given positionId does not exist for the employment
THEN200 response is returned
Example Error MessageN/A

Sample Request

{
    "companyId": "SD1",
    "dateFrom": "2000-01-09T00:00:00.000",
    "dateTo": "2099-01-31T00:00:00.000",
    "nameInformation": {
        "aliasName": "JD",
        "firstName": "John",
        "surname": "Doe"
    },
    "paymentInformation": {
        "payMethod": "CH",
        "supplierGroupId": "1",
        "supplierId": "123"
    },
    "personId": "123",
    "personnelType": "E",
    "status": "N",
    "contactPoints": [
        {
            "address": {
                "countryCode": "GB",
                "streetAddress": "The Matrix"
            },
            "contactPointType": "1"
        }
    ],
    "relatedValues": [
        {
            "status": "N",
            "relationId": "C1",
            "relatedValue": "111",
            "dateFrom": "2000-01-09T00:00:00.000",
            "dateTo": "2099-12-31T00:00:00.000"
        }
    ]
}

   

Additional Parameters

The following parameters help retrieve or update basic information about an employee:

ParameterValueDescriptionData TypeDefault Value
childStrategyoptionalUsed for patching Employments and their relations. Within a specified Date Range, you must decide which Child Entities to update and whether to create new Entities if required.
Possible values: "AddOrUpdate", "Add", "UpdateValidAsOfStartDate"
stringAddOrUpdate
childEndAtEndDateoptionalUsed for patching Employments and their relations. Specify if you wish to populate the End Date for a specific personId or its relations.booleantrue
includeFlexiFieldsoptionalSpecify if you wish to include or exclude retrieval of information from flexi-fields related to a specific personId.booleantrue
includeRelatedValuesoptionalSpecify if you wish to include or exclude retrieval of related values for a specific personId.booleantrue

   

Validation Rules for PATCH Method (validate)

Same scenarios as the single employee patch

   

Sample Request

{
    DELETE employees/123
}

   

Validation Rules for DELETE Method

DEL_001 - User is not authorised
ElementDetails
Scenario IDDEL_001
Scenario NameUser is not authorised
HTTP Code403
GIVENEmployee needs to be ‘Terminated’
WHENCalling DELETE method of the API
BUTUser is not authorised
THENAPI is not reached; 403 response is returned
Example Error Message or Response“User is not authorised.”
DEL_002 - Missing required parameters
ElementDetails
Scenario IDDEL_002
Scenario NameMissing required parameters
HTTP Code404
GIVENEmployee needs to be ‘Terminated’
WHENCalling DELETE method of the API
BUTRequired parameter is missing
THENAPI is not reached; 404 response is returned
Example Error Message or Response“No HTTP resource was found matching {0}”
DEL_003 - Employee does not exist
ElementDetails
Scenario IDDEL_003
Scenario NameEmployee does not exist
HTTP Code404
GIVENEmployee needs to be ‘Terminated’
WHENCalling DELETE method of the API
BUTpersonId does not exist
THENNo deletion; 404 response is returned
Example Error Message or Response“Employee with ID {0} was not found within the company {1}.”
DEL_004 - Employee exists
ElementDetails
Scenario IDDEL_004
Scenario NameEmployee exists
HTTP Code200
GIVENEmployee needs to be ‘Terminated’
WHENCalling DELETE method of the API
BUT
THENEmployee is ‘Terminated’; 200 response is returned
Example Error Message or ResponseEmpty message

   

Best Practices

  • If you plan to create several employees, use the batch endpoint to help identify possible errors in all employees.
  • Respect hard limits:
    • POST: Maximum 200 employees
  • Use Swagger UI for testing and schema validation before production calls.
  • Handle error codes gracefully; implement retry/backoff according to global rate limits.
  • Always check for deprecation alerts on this endpoint version.
  • Validate employees before sending DELETE requests to avoid unintentional data loss.    

Action APIs


Query APIs (Read-Only)