POST api/Employees
Terminates the list of employees passed in and optionally you can set the following attributes: Termination Date, Eligible for Rehire, Termination Type and Termination Reason. The attribute, Eligible for Rehire, defaults to false. If you choose to pass in the Termination Type, you must pass either VOL or INVOL meaning Voluntary or Involuntary. If you choose to pass a Termination Reason, then you must call api/company/terminationreasons?companycode={companycode} to get the valid termination reason list.
Request Information
Parameters
Name | Description | Additional information |
---|---|---|
employees | The list of employees to terminate. The only required attribute is EmployeeCode and the rest are optional. |
Define this parameter in the request body. |
Request body formats
application/json, text/json
Sample:
[ { "EmployeeCode": "sample string 1", "TerminationDate": "2024-11-04T10:52:32.5989258-06:00", "TerminationCode": "sample string 2", "TerminationReason": "sample string 3", "Rehire": true }, { "EmployeeCode": "sample string 1", "TerminationDate": "2024-11-04T10:52:32.5989258-06:00", "TerminationCode": "sample string 2", "TerminationReason": "sample string 3", "Rehire": true }, { "EmployeeCode": "sample string 1", "TerminationDate": "2024-11-04T10:52:32.5989258-06:00", "TerminationCode": "sample string 2", "TerminationReason": "sample string 3", "Rehire": true } ]
application/xml, text/xml
Sample:
<ArrayOfTerminateEmployeeDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netchex.API.External.Areas.Employees.Models"> <TerminateEmployeeDto> <EmployeeCode>sample string 1</EmployeeCode> <Rehire>true</Rehire> <TerminationCode>sample string 2</TerminationCode> <TerminationDate>2024-11-04T10:52:32.5989258-06:00</TerminationDate> <TerminationReason>sample string 3</TerminationReason> </TerminateEmployeeDto> <TerminateEmployeeDto> <EmployeeCode>sample string 1</EmployeeCode> <Rehire>true</Rehire> <TerminationCode>sample string 2</TerminationCode> <TerminationDate>2024-11-04T10:52:32.5989258-06:00</TerminationDate> <TerminationReason>sample string 3</TerminationReason> </TerminateEmployeeDto> <TerminateEmployeeDto> <EmployeeCode>sample string 1</EmployeeCode> <Rehire>true</Rehire> <TerminationCode>sample string 2</TerminationCode> <TerminationDate>2024-11-04T10:52:32.5989258-06:00</TerminationDate> <TerminationReason>sample string 3</TerminationReason> </TerminateEmployeeDto> </ArrayOfTerminateEmployeeDto>
Response Information
Response body formats
application/json, text/json, application/xml, text/xml
Sample:
Sample not available.