From 56ab261c48e84c5d5306b15fd1c05d48f57c0e58 Mon Sep 17 00:00:00 2001 From: Kurt Lim Date: Thu, 20 Nov 2025 15:29:56 +1300 Subject: [PATCH 1/3] [TIME-3146] Create new xero-payroll-au-v2.yaml spec This implements the 2.0 endpoints for Timesheets in AU Payroll (cherry picked from commit 636eabb1b9e357380450d7668f450ed813cfd7cd) --- manifest.json | 4 + xero-payroll-au-v2.yaml | 927 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 931 insertions(+) create mode 100644 xero-payroll-au-v2.yaml diff --git a/manifest.json b/manifest.json index d5897c8e6..b5034a216 100644 --- a/manifest.json +++ b/manifest.json @@ -27,6 +27,10 @@ "path": "/xero-payroll-au.yaml", "canPreview": true }, + "payrollAuV2": { + "path": "/xero-payroll-au-v2.yaml", + "canPreview": true + }, "payrollNz": { "path": "/xero-payroll-nz.yaml", "canPreview": true diff --git a/xero-payroll-au-v2.yaml b/xero-payroll-au-v2.yaml new file mode 100644 index 000000000..858191f62 --- /dev/null +++ b/xero-payroll-au-v2.yaml @@ -0,0 +1,927 @@ +openapi: 3.0.0 +info: + version: 9.3.0 + title: Xero Payroll AU API 2.0 + description: This is the Xero Payroll API 2.0 for orgs in Australia region. + termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/ + contact: + name: Xero Platform Team + email: api@xero.com + url: https://developer.xero.com + license: + name: MIT + url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE +servers: + - description: Xero Payroll AU API 2.0 + url: https://api.xero.com/payroll.xro/2.0 +tags: + - name: PayrollAu + description: Operations available to regular developers +paths: + /Timesheets: + parameters: + - $ref: "#/components/parameters/requiredHeader" + get: + security: + - OAuth2: + - payroll.timesheets + - payroll.timesheets.read + tags: + - PayrollAu + operationId: getTimesheets + x-hasPayrollAuProblem: true + summary: Retrieves timesheets + parameters: + - in: query + name: page + description: Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + schema: + type: integer + example: 5 + - in: query + name: filter + description: Filter by employeeId and/or payrollCalendarId + schema: + type: string + example: employeeId==00000000-0000-0000-0000-000000000000,payrollCalendarId==00000000-0000-0000-0000-000000000000 + - in: query + name: status + description: filter results by any timesheets with a matching timesheet status + schema: + type: string + example: Draft + - in: query + name: startDate + x-snake: start_date + description: filter results by any timesheets with a startDate on or after the provided date + schema: + type: string + example: "2019-01-02" + - in: query + name: endDate + x-snake: end_date + description: filter results by any timesheets with a endDate on or before the provided date + schema: + type: string + example: "2020-01-02" + - in: query + name: sort + description: sort the order of timesheets returned. The default is based on the timesheets createdDate, sorted oldest to newest. Currently, the only other option is to reverse the order based on the timesheets startDate, sorted newest to oldest. + schema: + type: string + example: startDate + responses: + "200": + description: search results matching criteria + content: + application/json: + schema: + $ref: "#/components/schemas/Timesheets" + example: + id: d81c2087-3ecb-4d91-b775-73d85f593370 + providerName: provider-name + dateTimeUTC: 2020-04-13T21:54:01.8865016 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 1 + problem: null + timesheets: + - timesheetID: 0c94d453-3d8c-4167-8c25-b4025121d18b + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + startDate: 2020-04-13T00:00:00 + endDate: 2020-04-19T00:00:00 + status: Approved + totalHours: 16 + updatedDateUTC: 2020-04-13T21:53:39 + post: + security: + - OAuth2: + - payroll.timesheets + tags: + - PayrollAu + operationId: createTimesheet + x-hasPayrollAuProblem: true + x-example: + - startDateValue: + key: startDate + keyPascal: StartDate + keySnake: start_date + is_date: true + java_datatype: LocalDate + csharp_datatype: DateTime + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: "'2020-10-28'" + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: "'YYYY-MM-DD'" + - endDateValue: + key: endDate + keyPascal: EndDate + keySnake: end_date + is_date: true + java_datatype: LocalDate + csharp_datatype: DateTime + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: "'2020-10-30'" + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: "'YYYY-MM-DD'" + - timesheet: + key: timesheet + keyPascal: Timesheet + keySnake: timesheet + is_object: true + - payrollCalendarID: + key: payrollCalendarID + keyPascal: PayrollCalendarID + keySnake: payroll_calendar_id + is_uuid: true + default: 00000000-0000-0000-0000-000000000000 + object: timesheet + - employeeID: + key: employeeID + keyPascal: EmployeeID + keySnake: employee_id + is_uuid: true + default: 00000000-0000-0000-0000-000000000000 + object: timesheet + - startDate: + is_variable: true + nonString: true + key: startDate + keyPascal: StartDate + keySnake: start_date + default: startDate + python: start_date + ruby: start_date + object: timesheet + - endDate: + is_last: true + is_variable: true + nonString: true + key: endDate + keyPascal: EndDate + keySnake: end_date + default: endDate + python: end_date + ruby: end_date + object: timesheet + summary: Creates a new timesheet + parameters: + - $ref: "#/components/parameters/idempotencyKey" + responses: + "200": + description: search results matching criteria + content: + application/json: + schema: + $ref: "#/components/schemas/TimesheetObject" + example: + id: ef0aa7e2-6f7f-43f6-9186-af670dce7c69 + providerName: provider-name + dateTimeUTC: 2020-04-21T03:07:37.0148822 + httpStatusCode: OK + pagination: null + problem: null + timesheet: + timesheetID: 88d2038a-06f7-4b8a-bdab-809804c0aa1d + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + startDate: 2020-04-13T00:00:00 + endDate: 2020-04-19T00:00:00 + status: Draft + totalHours: 14 + updatedDateUTC: 2020-04-21T03:07:36.8132834 + timesheetLines: + - timesheetLineID: 03060d0c-b14a-4339-aced-51cb2e5313b7 + date: 2020-04-15T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 6 + - timesheetLineID: 53ebdb54-b604-4d15-8c42-5162a7fe88e6 + date: 2020-04-13T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 8 + "400": + description: validation error for a bad request + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Timesheet" + example: + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + startDate: "2020-04-13" + endDate: "2020-04-19" + timesheetLines: + - date: "2020-04-13" + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnits: 8 + - date: "2020-04-15" + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnits: 6 + /Timesheets/{TimesheetID}: + parameters: + - $ref: "#/components/parameters/requiredHeader" + get: + security: + - OAuth2: + - payroll.timesheets + - payroll.timesheets.read + tags: + - PayrollAu + operationId: getTimesheet + x-hasPayrollAuProblem: true + summary: Retrieve a specific timesheet by using a unique timesheet ID + parameters: + - in: path + name: TimesheetID + x-snake: timesheet_id + required: true + description: Identifier for the timesheet + schema: + type: string + format: uuid + responses: + "200": + description: search results matching criteria + content: + application/json: + schema: + $ref: "#/components/schemas/TimesheetObject" + example: + id: 504259ac-df26-482e-bd0a-d792d96453bb + providerName: provider-name + dateTimeUTC: 2020-04-14T16:41:00.5013526 + httpStatusCode: OK + pagination: null + problem: null + timesheet: + timesheetID: 25c59963-5df2-43c3-88f6-25a3caa63084 + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + startDate: 2020-04-13T00:00:00 + endDate: 2020-04-19T00:00:00 + status: Draft + totalHours: 14 + updatedDateUTC: 2020-04-14T16:31:35 + timesheetLines: + - timesheetLineID: 6cc1e5c3-f080-4dbc-a82b-bea256ef939f + date: 2020-04-13T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 8 + - timesheetLineID: 3d900df1-9859-492b-9b00-155860158c0d + date: 2020-04-15T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 6 + delete: + security: + - OAuth2: + - payroll.timesheets + tags: + - PayrollAu + operationId: deleteTimesheet + summary: Deletes a specific timesheet + parameters: + - in: path + name: TimesheetID + x-snake: timesheet_id + required: true + description: Identifier for the timesheet + schema: + type: string + format: uuid + responses: + "200": + description: search results matching criteria + content: + application/json: + schema: + $ref: "#/components/schemas/TimesheetLine" + "400": + description: validation error for a bad request + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + /Timesheets/{TimesheetID}/Lines: + parameters: + - $ref: "#/components/parameters/requiredHeader" + post: + security: + - OAuth2: + - payroll.timesheets + tags: + - PayrollAu + operationId: createTimesheetLine + x-hasPayrollAuProblem: true + x-example: + - dateValue: + key: date + keyPascal: Date + keySnake: date + is_date: true + java_datatype: LocalDate + csharp_datatype: DateTime + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: "'2020-10-28'" + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: "'YYYY-MM-DD'" + - timesheetLine: + key: timesheetLine + keyPascal: TimesheetLine + keySnake: timesheet_line + is_object: true + - timesheetLineID: + key: timesheetLineID + keyPascal: TimesheetLineID + keySnake: timesheet_line_id + is_uuid: true + default: 00000000-0000-0000-0000-000000000000 + object: timesheetLine + - date: + key: date + keyPascal: Date + keySnake: date + default: date + python: date + ruby: date + is_variable: true + nonString: true + object: timesheetLine + - earningsRateID: + key: earningsRateID + keyPascal: EarningsRateID + keySnake: earnings_rate_id + is_uuid: true + default: 00000000-0000-0000-0000-000000000000 + object: timesheetLine + - trackingItemID: + key: trackingItemID + keyPascal: TrackingItemID + keySnake: tracking_item_id + is_uuid: true + default: 00000000-0000-0000-0000-000000000000 + object: timesheetLine + - numberOfUnits: + key: numberOfUnits + keyPascal: NumberOfUnits + keySnake: number_of_units + default: 6 + object: timesheetLine + nonString: true + is_last: true + summary: Creates a new timesheet line for a specific timesheet using a unique timesheet ID + parameters: + - $ref: "#/components/parameters/idempotencyKey" + - in: path + name: TimesheetID + x-snake: timesheet_id + required: true + description: Identifier for the timesheet + schema: + type: string + format: uuid + responses: + "200": + description: search results matching criteria + content: + application/json: + schema: + $ref: "#/components/schemas/TimesheetLineObject" + example: + id: cf701261-529e-47cd-8156-5ec9ab3394ff + providerName: provider-name + dateTimeUTC: 2020-04-14T17:19:22.8599292 + httpStatusCode: OK + pagination: null + problem: null + timesheetLine: + timesheetLineID: 56fce87e-7f0d-4c19-8f74-7f5656651c81 + date: 2020-04-14T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 1 + "400": + description: validation error for a bad request + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TimesheetLine" + example: + date: "2020-04-14" + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnits: 1 + /Timesheets/{TimesheetID}/Approve: + parameters: + - $ref: "#/components/parameters/requiredHeader" + post: + security: + - OAuth2: + - payroll.timesheets + tags: + - PayrollAu + operationId: approveTimesheet + x-hasPayrollAuProblem: true + summary: Approves a specific timesheet + parameters: + - $ref: "#/components/parameters/idempotencyKey" + - in: path + name: TimesheetID + x-snake: timesheet_id + required: true + description: Identifier for the timesheet + schema: + type: string + format: uuid + responses: + "200": + description: search results matching criteria + content: + application/json: + schema: + $ref: "#/components/schemas/TimesheetObject" + example: + id: 94c27148-2749-4d85-bc1a-986e6de230ae + providerName: provider-name + dateTimeUTC: 2020-06-01T20:32:19.7577043 + httpStatusCode: OK + pagination: null + problem: null + timesheet: + timesheetID: 62bd8b5f-8e90-4868-a0e6-62f994f7d659 + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + startDate: 2020-04-13T00:00:00 + endDate: 2020-04-19T00:00:00 + status: Approved + totalHours: 9 + updatedDateUTC: 2020-06-01T20:32:19.9534744 + timesheetLines: + - timesheetLineID: ce6db38f-efe9-49dc-ae42-7e6bad3cb167 + date: 2020-04-14T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 2 + - timesheetLineID: bc8004d2-5965-4f4e-8e46-0519040b4a05 + date: 2020-04-15T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 6 + - timesheetLineID: fd00cd5a-7d0c-4cb7-85ff-66bd3ed2439a + date: 2020-04-14T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 1 + "400": + description: validation error for a bad request + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + /Timesheets/{TimesheetID}/RevertToDraft: + parameters: + - $ref: "#/components/parameters/requiredHeader" + post: + security: + - OAuth2: + - payroll.timesheets + tags: + - PayrollAu + operationId: revertTimesheet + x-hasPayrollAuProblem: true + summary: Reverts a specific timesheet to draft + parameters: + - $ref: "#/components/parameters/idempotencyKey" + - in: path + name: TimesheetID + x-snake: timesheet_id + required: true + description: Identifier for the timesheet + schema: + type: string + format: uuid + responses: + "200": + description: search results matching criteria + content: + application/json: + schema: + $ref: "#/components/schemas/TimesheetObject" + example: + id: a774530a-a50c-4480-a094-358cf80a7d98 + providerName: provider-name + dateTimeUTC: 2020-04-14T17:49:23.1119111 + httpStatusCode: OK + pagination: null + problem: null + timesheet: + timesheetID: 0fd483c0-3302-48c6-bbd5-7247c9a02460 + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + startDate: 2020-04-13T00:00:00 + endDate: 2020-04-19T00:00:00 + status: Draft + totalHours: 15 + updatedDateUTC: 2020-04-14T17:49:23.2188538 + timesheetLines: + - timesheetLineID: 17a08549-1ed1-416b-83e2-c65040119a02 + date: 2020-04-13T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 8 + - timesheetLineID: 0e912b7d-dc3f-4b95-a466-3f0f5c8581cb + date: 2020-04-15T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 6 + - timesheetLineID: d0faac99-f2d4-42b9-ab00-9c2bc6e8fe3a + date: 2020-04-14T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 1 + "400": + description: validation error for a bad request + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + /Timesheets/{TimesheetID}/Lines/{TimesheetLineID}: + parameters: + - $ref: "#/components/parameters/requiredHeader" + put: + security: + - OAuth2: + - payroll.timesheets + tags: + - PayrollAu + operationId: updateTimesheetLine + x-hasPayrollAuProblem: true + x-example: + - dateValue: + key: date + keyPascal: Date + keySnake: date + is_date: true + java_datatype: LocalDate + csharp_datatype: DateTime + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: "'2020-10-28'" + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: "'YYYY-MM-DD'" + - timesheetLine: + key: timesheetLine + keyPascal: TimesheetLine + keySnake: timesheet_line + is_object: true + - timesheetLineID: + key: timesheetLineID + keyPascal: TimesheetLineID + keySnake: timesheet_line_id + is_uuid: true + default: 00000000-0000-0000-0000-000000000000 + object: timesheetLine + - date: + key: date + keyPascal: Date + keySnake: date + default: date + python: date + ruby: date + is_variable: true + nonString: true + object: timesheetLine + - earningsRateID: + key: earningsRateID + keyPascal: EarningsRateID + keySnake: earnings_rate_id + is_uuid: true + default: 00000000-0000-0000-0000-000000000000 + object: timesheetLine + - trackingItemID: + key: trackingItemID + keyPascal: TrackingItemID + keySnake: tracking_item_id + is_uuid: true + default: 00000000-0000-0000-0000-000000000000 + object: timesheetLine + - numberOfUnits: + key: numberOfUnits + keyPascal: NumberOfUnits + keySnake: number_of_units + default: 6 + object: timesheetLine + nonString: true + is_last: true + summary: Updates a specific timesheet line for a specific timesheet + parameters: + - $ref: "#/components/parameters/idempotencyKey" + - in: path + name: TimesheetID + x-snake: timesheet_id + required: true + description: Identifier for the timesheet + schema: + type: string + format: uuid + - in: path + name: TimesheetLineID + x-snake: timesheet_line_id + required: true + description: Identifier for the timesheet line + schema: + type: string + format: uuid + responses: + "200": + description: search results matching criteria + content: + application/json: + schema: + $ref: "#/components/schemas/TimesheetLineObject" + example: + id: 582b87a6-14f3-409b-be89-f9b9c49db983 + providerName: provider-name + dateTimeUTC: 2020-04-14T18:07:30.718153 + httpStatusCode: OK + pagination: null + problem: null + timesheetLine: + timesheetLineID: c88edcad-af32-4536-a682-9a4772c21c8d + date: 2020-04-14T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 2 + "400": + description: validation error for a bad request + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TimesheetLine" + example: + date: "2020-04-14" + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnits: 2 + delete: + security: + - OAuth2: + - payroll.timesheets + tags: + - PayrollAu + operationId: deleteTimesheetLine + summary: Deletes a specific timesheet line + parameters: + - in: path + name: TimesheetID + x-snake: timesheet_id + required: true + description: Identifier for the timesheet + schema: + type: string + format: uuid + - in: path + name: TimesheetLineID + x-snake: timesheet_line_id + required: true + description: Identifier for the timesheet line + schema: + type: string + format: uuid + responses: + "200": + description: search results matching criteria + content: + application/json: + schema: + $ref: "#/components/schemas/TimesheetLine" + "400": + description: validation error for a bad request + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" +components: + securitySchemes: + OAuth2: + type: oauth2 + description: For more information visit https://developer.xero.com/documentation/oauth2/overview + flows: + authorizationCode: + authorizationUrl: https://login.xero.com/identity/connect/authorize + tokenUrl: https://identity.xero.com/connect/token + scopes: + payroll.timesheets: Grant read-write access to payroll timesheets + payroll.timesheets.read: Grant read-only access to payroll timesheets + parameters: + requiredHeader: + in: header + name: Xero-Tenant-Id + x-snake: xero_tenant_id + description: Xero identifier for Tenant + schema: + type: string + required: true + idempotencyKey: + in: header + name: Idempotency-Key + x-snake: idempotency_key + description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. + example: KEY_VALUE + schema: + type: string + schemas: + Pagination: + properties: + page: + type: integer + example: 1 + pageSize: + type: integer + example: 10 + pageCount: + type: integer + example: 1 + itemCount: + type: integer + example: 2 + Problem: + description: The object returned for a bad request + type: object + properties: + type: + description: The type of error format + type: string + example: application/problem+json + title: + description: The type of the error + type: string + example: BadRequest + status: + description: The error status code + type: string + example: 400 + detail: + description: A description of the error + type: string + example: Validation error occurred. + instance: + type: string + invalidFields: + type: array + items: + $ref: "#/components/schemas/InvalidField" + InvalidField: + type: object + properties: + name: + description: The name of the field that caused the error + type: string + example: DateOfBirth + reason: + description: The reason the error occurred + type: string + example: The Date of Birth is required. + Timesheets: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + problem: + $ref: "#/components/schemas/Problem" + timesheets: + type: array + items: + $ref: "#/components/schemas/Timesheet" + TimesheetObject: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + problem: + $ref: "#/components/schemas/Problem" + timesheet: + $ref: "#/components/schemas/Timesheet" + Timesheet: + type: object + required: + - payrollCalendarID + - employeeID + - startDate + - endDate + properties: + timesheetID: + description: The Xero identifier for a Timesheet + type: string + format: uuid + payrollCalendarID: + description: The Xero identifier for the Payroll Calendar that the Timesheet applies to + type: string + format: uuid + employeeID: + description: The Xero identifier for the Employee that the Timesheet is for + type: string + format: uuid + startDate: + description: The Start Date of the Timesheet period (YYYY-MM-DD) + type: string + format: date + x-is-date: true + endDate: + description: The End Date of the Timesheet period (YYYY-MM-DD) + type: string + format: date + x-is-date: true + status: + description: Status of the timesheet + type: string + enum: + - Draft + - Approved + - Completed + totalHours: + description: The Total Hours of the Timesheet + type: number + format: double + updatedDateUTC: + description: The UTC date time that the Timesheet was last updated + type: string + format: date-time + x-is-datetime: true + timesheetLines: + $ref: "#/components/schemas/TimesheetLines" + TimesheetLines: + type: array + items: + $ref: "#/components/schemas/TimesheetLine" + TimesheetLineObject: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + problem: + $ref: "#/components/schemas/Problem" + timesheetLine: + $ref: "#/components/schemas/TimesheetLine" + TimesheetLine: + type: object + required: + - date + - earningsRateID + - numberOfUnits + properties: + timesheetLineID: + description: The Xero identifier for a Timesheet Line + type: string + format: uuid + date: + description: The Date that this Timesheet Line is for (YYYY-MM-DD) + type: string + format: date + x-is-date: true + earningsRateID: + description: The Xero identifier for the Earnings Rate that the Timesheet is for + type: string + format: uuid + trackingItemID: + description: The Xero identifier for the Tracking Item that the Timesheet is for + type: string + format: uuid + numberOfUnits: + description: The Number of Units of the Timesheet Line + type: number + format: double From 35504ef278075e115b26d0f013d1b41df51bbc4b Mon Sep 17 00:00:00 2001 From: Kurt Lim Date: Mon, 9 Feb 2026 10:34:35 +1300 Subject: [PATCH 2/3] chore: bump version to 10.1.0 --- xero-payroll-au-v2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xero-payroll-au-v2.yaml b/xero-payroll-au-v2.yaml index 858191f62..f054ba193 100644 --- a/xero-payroll-au-v2.yaml +++ b/xero-payroll-au-v2.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: 9.3.0 + version: 10.1.0 title: Xero Payroll AU API 2.0 description: This is the Xero Payroll API 2.0 for orgs in Australia region. termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/ From d2f055c4980274560696ee36fc3904d5b2102acc Mon Sep 17 00:00:00 2001 From: Kurt Lim Date: Fri, 13 Feb 2026 17:03:27 +1300 Subject: [PATCH 3/3] chore: update tag with version for payroll au v2 --- xero-payroll-au-v2.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/xero-payroll-au-v2.yaml b/xero-payroll-au-v2.yaml index f054ba193..34e55d1b2 100644 --- a/xero-payroll-au-v2.yaml +++ b/xero-payroll-au-v2.yaml @@ -15,7 +15,7 @@ servers: - description: Xero Payroll AU API 2.0 url: https://api.xero.com/payroll.xro/2.0 tags: - - name: PayrollAu + - name: PayrollAuV2 description: Operations available to regular developers paths: /Timesheets: @@ -27,7 +27,7 @@ paths: - payroll.timesheets - payroll.timesheets.read tags: - - PayrollAu + - PayrollAuV2 operationId: getTimesheets x-hasPayrollAuProblem: true summary: Retrieves timesheets @@ -102,7 +102,7 @@ paths: - OAuth2: - payroll.timesheets tags: - - PayrollAu + - PayrollAuV2 operationId: createTimesheet x-hasPayrollAuProblem: true x-example: @@ -244,7 +244,7 @@ paths: - payroll.timesheets - payroll.timesheets.read tags: - - PayrollAu + - PayrollAuV2 operationId: getTimesheet x-hasPayrollAuProblem: true summary: Retrieve a specific timesheet by using a unique timesheet ID @@ -296,7 +296,7 @@ paths: - OAuth2: - payroll.timesheets tags: - - PayrollAu + - PayrollAuV2 operationId: deleteTimesheet summary: Deletes a specific timesheet parameters: @@ -329,7 +329,7 @@ paths: - OAuth2: - payroll.timesheets tags: - - PayrollAu + - PayrollAuV2 operationId: createTimesheetLine x-hasPayrollAuProblem: true x-example: @@ -446,7 +446,7 @@ paths: - OAuth2: - payroll.timesheets tags: - - PayrollAu + - PayrollAuV2 operationId: approveTimesheet x-hasPayrollAuProblem: true summary: Approves a specific timesheet @@ -513,7 +513,7 @@ paths: - OAuth2: - payroll.timesheets tags: - - PayrollAu + - PayrollAuV2 operationId: revertTimesheet x-hasPayrollAuProblem: true summary: Reverts a specific timesheet to draft @@ -580,7 +580,7 @@ paths: - OAuth2: - payroll.timesheets tags: - - PayrollAu + - PayrollAuV2 operationId: updateTimesheetLine x-hasPayrollAuProblem: true x-example: @@ -702,7 +702,7 @@ paths: - OAuth2: - payroll.timesheets tags: - - PayrollAu + - PayrollAuV2 operationId: deleteTimesheetLine summary: Deletes a specific timesheet line parameters: