create_xero_timesheet
create_xero_timesheetProposes a DRAFT timesheet for one employee/period, for Australian, New Zealand or United Kingdom organisations - it does NOT touch Xero itself, and never will on its own. This queues a pending change that a human must explicitly approve (your Xero MCP connector - the exact link is this response's own approvalUrl field) before Xero is touched at all; you have no way to approve it yourself. employeeId and payrollCalendarId must both come from list_xero_payroll_employees (never invented) - use that SAME employee's own payrollCalendarId field. lines is date-keyed: one entry per day actually worked, each naming an earningsRateId and how many hours. For Australia, use that SAME employee's own ordinaryEarningsRateId (from list_xero_payroll_employees) unless the user names a different rate. For New Zealand and the United Kingdom, an employee record carries no earnings rate of its own - call list_xero_payroll_earnings_rates first and use the RegularEarnings-type rate unless the user names a different one. For New Zealand and the United Kingdom, startDate/endDate must span the employee's WHOLE payroll-calendar period (e.g. Monday to Sunday on a weekly calendar), not just the days actually worked - a shorter period was refused live even though every line inside it was valid; days with no hours simply carry no line (observed live 12 September 2026, not stated in Xero's own spec). The created timesheet starts as a Xero-side DRAFT once approved - a human remains free to review or change it inside Xero afterwards, unlike post_xero_pay_run. This tool cannot say whether Xero will accept the earnings rate or the calendar for this employee - a mismatch is refused, cleanly, only once a human approves.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | One entry per day actually worked - omit days with no hours rather than including a zero. | |
| endDate | Yes | End of the timesheet period, YYYY-MM-DD. If the user wrote a bare numeric date with no month name ("9/8", "08/09"), do NOT settle it on your own judgement - it is 9 August to most of the world and 8 September in the US, and nothing downstream of this field can tell which you meant once it is a date. Follow the DATES instruction in this tool's description. For New Zealand and the United Kingdom, this period must span the employee's WHOLE payroll-calendar period (for example, Monday to Sunday on a weekly calendar), not just the days actually worked - a shorter period was refused live even though every line inside it was valid. Days with no hours simply carry no line at all; the period itself still has to cover the full calendar cycle. Observed live 12 September 2026, not stated in Xero's own API specification. | |
| startDate | Yes | Start of the timesheet period, YYYY-MM-DD (AU: exactly 7 days including endDate). If the user wrote a bare numeric date with no month name ("9/8", "08/09"), do NOT settle it on your own judgement - it is 9 August to most of the world and 8 September in the US, and nothing downstream of this field can tell which you meant once it is a date. Follow the DATES instruction in this tool's description. For New Zealand and the United Kingdom, this period must span the employee's WHOLE payroll-calendar period (for example, Monday to Sunday on a weekly calendar), not just the days actually worked - a shorter period was refused live even though every line inside it was valid. Days with no hours simply carry no line at all; the period itself still has to cover the full calendar cycle. Observed live 12 September 2026, not stated in Xero's own API specification. | |
| employeeId | Yes | Get this from list_xero_payroll_employees first - never invent one. | |
| organisation | No | The Xero organisation to use, by its display name. Only needed if this connection reaches more than one organisation - omit it when there is only one. | |
| payrollCalendarId | Yes | Get this from the SAME employee's own payrollCalendarId field on list_xero_payroll_employees - never invent one. |