# Employees _(Realtime-enabled)_

`GET` `POST` `PATCH` `DELETE` _(Table: Employee)_

```
eOne/core/v1.0/employees
```

Create or update the employees an expense report is filed for and a reimbursement is paid to, with their name, address, contact details and employee posting group.

Resolve an employee by `number`, `id` or `integrationId`. Sending `integrationId` lets SmartConnect keep the key your expense or payroll system already uses. An expense report then arrives carrying that key, not a Business Central number your source system never sees.

Set `employeePostingGroup` before you send expenses for someone. It decides which payables account an employee-balanced expense posts to, and an expense without it stops in error rather than reaching the ledger.

## Personal HR data is not exposed

The published columns cover identity, address, contact and posting group. Social security number, birth date, gender, union code and union membership number are deliberately left off the contract, and no other personal HR field is exposed. An integration that never carries that data cannot leak it.

`email` is the employee's company email address. The private email address on the employee card is not published.

## Resolving an employee on a document

Two endpoints resolve an employee by the key you set here:

- [Expenses](https://eonesolutions.github.io/eone-bc-integration/core-expenses.md): send `employeeIntegrationId` to set the report's balancing account to that employee, instead of sending `balancingAccountType` and `balancingAccountNumber`.
- [Employee Payments](https://eonesolutions.github.io/eone-bc-integration/core-employeePayments.md): send `employeeIntegrationId` in place of `employeeNumber` to name the person the reimbursement pays.

Employees are also a valid `parentType` on [Document Attachments](https://eonesolutions.github.io/eone-bc-integration/core-documentAttachments.md) and [Notes](https://eonesolutions.github.io/eone-bc-integration/core-notes.md), so receipts and paperwork can hang off the person rather than only off the staged document.

## Seeding ids for employees that already exist

Employees usually exist in Business Central before the integration does. The Integration Id migration tool copies an existing field into `integrationId` in bulk, so you do not have to PATCH each employee by hand. See [Integration Id migration](https://eonesolutions.github.io/eone-bc-integration/integration-id-migration.md).

> **Caution:** PATCHing `number` **renames** the employee, carrying their ledger history, rather than creating a new one.

## Employees fields

_API column → BC field._

**Legend**

- _(req)_ required on create
- _(res)_ resolver
- _(cur)_ currency-translated
- _(ro)_ read-only
- _(ext)_ added to this endpoint by another extension (BC field name shown; its API column name is not known here)

| API | BC field | Notes |
| --- | --- | --- |
| `id` | SystemId | BC record GUID. _(ro)_ |
| `bcCompanyId` | bcCompanyId | The company this row belongs to - the same GUID that appears in the request URL. Present on every endpoint so a store pooling several companies can keep them apart without relying on which URL it called. _(ro)_ |
| `bcCompanyName` | bcCompanyName | The name of the company this row belongs to. _(ro)_ |
| `number` | No. | Primary key. Leave blank on create to take the next number from the employee no. series; PATCH renames. |
| `integrationId` | EONE Integration Id | Your external key for this employee. Expenses and employee payments resolve the employee by this value. |
| `displayName` | displayName | The employee's full name as Business Central composes it from the name parts. Read-only convenience column - write firstName, middleName and lastName. _(ro)_ |
| `firstName` | First Name | Given name. |
| `middleName` | Middle Name | Middle name. |
| `lastName` | Last Name | Family name. Send it on create so the employee is identifiable on the documents that reference them. _(req)_ |
| `jobTitle` | Job Title | Job title. |
| `address` | Address | Address line 1. |
| `address2` | Address 2 | Address line 2. |
| `city` | City | City. |
| `county` | County | County, or the state in a US-style address. Named county to match the customers and vendors endpoints. |
| `postCode` | Post Code | Postal or ZIP code. |
| `countryRegionCode` | Country/Region Code | Country or region code; must already exist in Business Central. |
| `phoneNumber` | Phone No. | Work telephone number. |
| `mobilePhoneNumber` | Mobile Phone No. | Mobile telephone number. |
| `email` | Company E-Mail | The employee's company email address. The private email address on the employee card is not exposed. |
| `status` | Status | Employment status: Active, Inactive or Terminated. Use it to stop sending expenses for someone who has left. |
| `employeePostingGroup` | Employee Posting Group | Decides which payables account an expense or reimbursement for this employee posts to; required before an employee-balanced expense can reach the ledger. |
| `createdDateTime` | SystemCreatedAt | When the record was created. _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | When the record last changed. _(ro)_ |
