Employees
Used for querying, inserting, and updating employee records within a Xero organization. Employees are individuals working for the organization and their data includes payroll, tax, and employment information.
Table Specific Information
The Employees table allows you to SELECT, INSERT, and UPDATE employees for a Xero organization.
SELECT
The Xero API allows extensive filtering and ordering. You can define WHERE and ORDER BY clauses in a query to filter and order the results using any non-line-item column.
Note: The Xero API does not support filtering on line items or journal lines.
INSERT
To insert a single row, set the required fields. A new table object is created as a single entry.
To insert a new employee record, the following fields are required: FirstName and LastName.
INSERT INTO Employees (FirstName, LastName) VALUES ('John', 'Doe')
Employees can also be added in bulk by specifying multiple records in the VALUES clause.
INSERT INTO Employees (FirstName, LastName)
VALUES
('John', 'Doe'),
('Jane', 'Doe')
UPDATE
You can update any field that is not read-only.
Note: UPDATE operations will count as two operations against the Xero API. One is required to retrieve the existing record, and another to update the record with new data.
Columns
| Name | Type | ReadOnly | Description |
| EmployeeId [KEY] | String | True |
The unique identifier assigned by Xero to the employee. This ID ensures that each employee can be uniquely identified within the system and is used for referencing the employee's records. |
| Status | String | False |
The current status of the employee. Valid values are 'ACTIVE' (indicating that the employee is currently active and their record is in use) and 'DELETED' (indicating that the employee's record has been deleted or archived and is no longer in use). |
| FirstName | String | False |
The first name of the employee. This field contains the given name of the employee and is used for personal identification and communication purposes. |
| LastName | String | False |
The last name of the employee. This field contains the surname of the employee, used in conjunction with the first name for identification purposes. |
| ExternalLink_URL | String | False |
A URL that points to an external resource related to the employee. This could link to external profiles, documents, or relevant websites. |
| ExternalLink_Description | String | False |
A description of the external link provided in 'ExternalLink_URL'. This field provides context or additional details about the link to help users understand its relevance. |
| UpdatedDateUTC | Datetime | True |
The timestamp (in UTC) indicating when the employee record was last updated. This field tracks changes to the employee's details and serves as a reference for data modifications. |
| TenantId | String | False |
The unique identifier for the tenant, allowing queries to access data specific to a particular tenant, especially useful in multi-tenant environments where data for different tenants is isolated. |