Authenticate with OAuth 2.0 with payroll.read and payroll.write scopes; confirm you are using the AU Payroll tenant with Xero-Tenant-Id header.
Retrieve leave types for the organization: GET https://api.xero.com/payroll.xro/1.0/LeaveTypes to find the LeaveTypeID for Annual Leave, Sick Leave, etc.
Retrieve the employee's current leave balances: GET /payroll.xro/1.0/Employees/{EmployeeID} and inspect the LeaveBalances array in the response.
Create a leave application for the employee: POST /payroll.xro/1.0/LeaveApplications with body fields: EmployeeID, LeaveTypeID, StartDate, EndDate, Title, and optionally Description.
The leave application is initially in Draft status; approve it by updating via POST /payroll.xro/1.0/LeaveApplications with the LeaveApplicationID and Status: PROCESSED — leave accruals will be adjusted in the next pay run.
Known gotchas
AU Payroll uses the /payroll.xro/1.0 base path; sending leave requests to the /payroll.xro/2.0 path will return 404.
Leave dates must fall within the current or future pay period; backdated leave applications beyond the last posted pay run may require manual journal adjustments to correctly reflect the impact on leave balances.
Xero calculates leave loading (where applicable) automatically based on the leave type setup; if the organization has custom leave loading rules, verify the LeaveType configuration matches the enterprise agreement before relying on automated calculations.
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