Authenticate with Xero using OAuth 2.0 with the payroll.read scope (and payroll.write if you need to create records); obtain an access token via the standard authorization code flow.
Set the Xero-Tenant-Id header to the NZ organization's tenant ID obtained from GET https://api.xero.com/connections.
Retrieve employees via GET https://api.xero.com/payroll.xro/2.0/Employees — note the base path is /payroll.xro/2.0 for both NZ and UK; only AU Payroll uses /payroll.xro/1.0.
Retrieve payslips for a specific employee and pay period via GET https://api.xero.com/payroll.xro/2.0/Payslip/{PayslipID} or list all payslips for a pay run via GET /payroll.xro/2.0/PayRuns/{PayRunID}/payslips.
Parse the response — employees and payslip line items differ between NZ and AU schemas; check the current Xero Payroll NZ API docs for the exact field names in the NZ model.
Known gotchas
The NZ and UK Payroll APIs both use the /payroll.xro/2.0 base path — do not use /payroll.xro/1.0 for NZ; that path is for AU Payroll only.
NZ payroll requires the payroll.read OAuth 2.0 scope; using the accounting.read scope alone will return 403 on payroll endpoints.
Xero Payroll NZ payslip data includes tax codes specific to New Zealand (e.g., M, ME, SH) — validate against current NZ IRD tax code definitions before display or calculation.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp