Add or Update Employee
save_employeeCreate or update an employee in HR Partner using the unique employee code. Only fields provided are modified, and new department, location, position, or status values are added automatically.
Instructions
Create a new employee or update an existing one in HR Partner (upsert by Employee Code). Only supplied fields are modified. Custom fields go in custom_data (only the keys you want to change are needed). New values for department/location/position/employment_status are added to the lookup lists automatically. Note: tags, contacts and addresses can be added/updated but NOT deleted via the API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The unique Employee Code. If it exists the employee is updated, otherwise a new employee is created | |
| tags | No | Array of tag objects to allocate, e.g. [{"tag": "Full Timer"}]. New tags are created automatically | |
| location | No | Location the employee is in (new values are added to the dropdown options) | |
| position | No | Position or job title (new values are added to the dropdown options) | |
| can_logon | No | Whether the employee can log on to their employee portal (true/false) | |
| full_name | No | Combined name of the employee (i.e. 'First Last' or 'Last, First') | |
| is_active | No | Whether the employee is active in HR Partner (true/false) | |
| last_name | No | Surname of the employee | |
| pay_point | No | Reference for the employee's pay point | |
| department | No | Department name the employee belongs to (new values are added to the dropdown options) | |
| reports_to | No | Employee Code of the person this employee reports to | |
| salutation | No | Greeting/salutation used for the employee | |
| started_at | No | Date the employee started with the company (format yyyy-mm-dd) | |
| tax_number | No | SSN, TFN, National ID or other tax identifier | |
| custom_data | No | Object of custom field name -> value. Only included fields are updated. Tip: call get_employee on an existing employee to discover the custom field names. | |
| finished_at | No | Date the employee was terminated/left the company (format yyyy-mm-dd) | |
| first_names | No | First (and optionally middle) name of the employee | |
| date_of_birth | No | Employee's date of birth (format yyyy-mm-dd) | |
| is_terminated | No | Whether the employee is terminated in HR Partner (true/false) | |
| gender_identity | No | M or F, or the full gender identity text if extended gender identities are enabled | |
| portal_username | No | Employee's username for the portal | |
| employee_contacts | No | Contact records to add or update | |
| employment_status | No | Employment status, i.e. Full Time, Part Time, Contractor etc. | |
| employee_addresses | No | Address records to add or update |