Skip to content

Xero: Searches payroll employees

Xero payrollAu.getEmployees: arguments, response, policy and SDK examples.

← Payroll au operations · Get started

Operation xero.payroll_au_getemployees

Provider route: GET /payroll.xro/1.0/Employees. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/xero with npm, or alter-sdk-xero with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { XeroIntegration } from "@alter-ai/xero";
async function execute(input: Parameters<XeroIntegration["payrollAu"]["getEmployees"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new XeroIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.payrollAu.getEmployees(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_xero import XeroIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = XeroIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.payroll_au.get_employees(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.wherestringOptional
query.orderstringOptional
query.pageintegerOptional
headersobjectRequired within parentAdditional keys: not allowed
headers.xero-tenant-idstringRequired within parent
headers.If-Modified-SincestringOptionalFormat: date-time

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Creates a payroll employee — response body

Referenced models: Creates a payroll employee — response body

12 more schemas are linked from the tables above, on the schema pages.

Creates a payroll employee — response body
FieldTypePresenceDescription and constraints
$objectRoot
EmployeesarrayOptional
Employees[]ModelEach itemExpand Creates a payroll employee — response body — Employees item

Referenced models: Creates a payroll employee — response body — Employees item

Creates a payroll employee — response body — Employees item
FieldTypePresenceDescription and constraints
$objectRoot
BankAccountsarrayOptional
BankAccounts[]ModelEach itemExpand Creates a payroll employee — response body — Employees item Bank Accounts item
ClassificationstringOptionalEmployees classification
CountryOfResidenceModelOptionalExpand Creates a payroll employee — response body — Employees item Country Of Residence
DateOfBirthstringRequired within parentDate of birth of the employee (YYYY-MM-DD)
EmailstringOptionalThe email address for the employee
EmployeeGroupNamestringOptionalThe Employee Group allows you to report on payroll expenses and liabilities for each group of employees
EmployeeIDstringOptionalXero unique identifier for an Employee
Format: uuid
EmploymentTypestringOptionalKnown values: EMPLOYEE, CONTRACTOR
FirstNamestringRequired within parentFirst name of employee
GenderstringOptionalThe employee’s gender. See Employee Gender
Known values: N, M, F, I
HomeAddressModelOptionalExpand Creates a payroll employee — response body — Employees item Home Address
IncomeTypestringOptionalKnown values: SALARYANDWAGES, WORKINGHOLIDAYMAKER, NONEMPLOYEE, CLOSELYHELDPAYEES, LABOURHIRE
IsAuthorisedToApproveLeavebooleanOptionalAuthorised to approve other employees' leave requests
IsAuthorisedToApproveTimesheetsbooleanOptionalAuthorised to approve timesheets
IsSTP2QualifiedbooleanOptionalIndicates if the employee has been updated for STP Phase 2 compliance. Doesn't indicate that the employee is payable.
JobTitlestringOptionalJobTitle of the employee
LastNamestringRequired within parentLast name of employee
LeaveBalancesarrayOptional
LeaveBalances[]ModelEach itemExpand Creates a payroll employee — response body — Employees item Leave Balances item
MiddleNamesstringOptionalMiddle name(s) of the employee
MobilestringOptionalEmployee mobile number
OpeningBalancesModelOptionalExpand Creates a payroll employee — response body — Employees item Opening Balances
OrdinaryEarningsRateIDstringOptionalXero unique identifier for earnings rate
Format: uuid
PayTemplateModelOptionalExpand Creates a payroll employee — response body — Employees item Pay Template
PayrollCalendarIDstringOptionalXero unique identifier for payroll calendar for the employee
Format: uuid
PhonestringOptionalEmployee phone number
StartDatestringOptionalStart date for an employee (YYYY-MM-DD)
StatusstringOptionalEmployee Status Types
Known values: ACTIVE, TERMINATED
SuperMembershipsarrayOptional
SuperMemberships[]ModelEach itemExpand Creates a payroll employee — request body — body item Super Memberships item
TaxDeclarationModelOptionalExpand Creates a payroll employee — response body — Employees item Tax Declaration
TerminationDatestringOptionalEmployee Termination Date (YYYY-MM-DD)
TerminationReasonstringOptional* `V` Voluntary cessation - An employee resignation, retirement, domestic or pressing necessity or abandonment of employment
* `I` Ill health - An employee resignation due to medical condition that prevents the continuation of employment, such as for illness, ill-health, medical unfitness or total permanent disability
* `D` Deceased - The death of an employee
* `R` Redundancy - An employer-initiated termination of employment due to a genuine redundancy or approved early retirement scheme
* `F` Dismissal - An employer-initiated termination of employment due to dismissal, inability to perform the required work, misconduct or inefficiency
* `C` Contract cessation - The natural conclusion of a limited employment relationship due to contract/engagement duration or task completion, seasonal work completion, or to cease casuals that are no longer required
* `T` Transfer - The administrative arrangements performed to transfer employees across payroll systems, move them temporarily to another employer (machinery of government for public servants), transfer of business, move them to outsourcing arrangements or other such technical activities.

Known values: V, I, D, R, F, C, T
TitlestringOptionalTitle of the employee
TwitterUserNamestringOptionalEmployee’s twitter name
UpdatedDateUTCstringOptionalLast modified timestamp
Read only: true
ValidationErrorsarrayOptionalDisplays array of validation error messages from the API
ValidationErrors[]ModelEach itemExpand Retrieves journals — response body — Warnings item

Referenced models: Creates a payroll employee — response body — Employees item Bank Accounts item, Creates a payroll employee — response body — Employees item Country Of Residence, Creates a payroll employee — response body — Employees item Home Address, Creates a payroll employee — response body — Employees item Leave Balances item, Creates a payroll employee — response body — Employees item Opening Balances, Creates a payroll employee — response body — Employees item Pay Template, Creates a payroll employee — request body — body item Super Memberships item, Creates a payroll employee — response body — Employees item Tax Declaration, Retrieves journals — response body — Warnings item

Creates a payroll employee — response body — Employees item Bank Accounts item
FieldTypePresenceDescription and constraints
$objectRoot
AccountNamestringOptionalThe name of the account
AccountNumberstringOptionalThe account number
AmountJSONOptional
Amount (anyOf 1)numberAlternativeFixed amounts (for example, if an employee wants to have $100 of their salary transferred to one account, and the remaining amount to another)
Format: double
Amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
BSBstringOptionalThe BSB number of the account
RemainderbooleanOptionalIf this account is the Remaining bank account
StatementTextstringOptionalThe text that will appear on your employee's bank statement when they receive payment
Creates a payroll employee — response body — Employees item Country Of Residence
FieldTypePresenceDescription and constraints
$stringRootCountry of residence as a valid ISO 3166-1 alpha-2 country code e.g. "AU", "NZ", "CA". Only applicable, and mandatory if income type is WORKINGHOLIDAYMAKER.
Known values: AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, AN, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SK, SI, SB, SO, ZA, GS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW, BQ, CW, SX, SS
Creates a payroll employee — response body — Employees item Home Address
FieldTypePresenceDescription and constraints
$objectRoot
AddressLine1stringRequired within parentAddress line 1 for employee home address
AddressLine2stringOptionalAddress line 2 for employee home address
CitystringOptionalSuburb for employee home address
CountrystringOptionalCountry of HomeAddress
PostalCodestringOptionalPostCode for employee home address
RegionstringOptionalState abbreviation for employee home address
Known values: ACT, NSW, NT, QLD, SA, TAS, VIC, WA
Creates a payroll employee — response body — Employees item Leave Balances item
FieldTypePresenceDescription and constraints
$objectRoot
LeaveNamestringOptionalThe name of the leave type
LeaveTypeIDstringOptionalIdentifier of the leave type (see PayItems)
NumberOfUnitsJSONOptional
NumberOfUnits (anyOf 1)numberAlternativeThe balance of the leave available
Format: double
NumberOfUnits (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
TypeOfUnitsstringOptionalThe type of units as specified by the LeaveType (see PayItems)

SDK function policy ID: xero.payroll_au_getemployees. Catalog operation: payroll_au.getEmployees. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.