openapi: 3.0. info: version: "3.0.3" title: 'Xero Payroll NZ' description: 'This is the Xero Payroll API for orgs in the NZ 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" tags: - name: PayrollNz servers: - description: Xero Payroll NZ API url: https://api.xero.com/payroll.xro/2.0 paths: /Employees: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.employees, payroll.employees.read] tags: - PayrollNz operationId: getEmployees x-hasPayrollUkProblem: true summary: Retrieves employees parameters: - in: query name: filter description: Filter by first name and/or lastname schema: type: string example: firstName==John,lastName==Smith - 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 responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Employees' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-24T20:16:14.6198711", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 8 }, "problem": null, "employees": [ { "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "firstName": "Casual", "lastName": "Worker", "dateOfBirth": "1990-12-01T00:00:00", "gender": "M", "email": null, "phoneNumber": null, "startDate": "2019-02-07T00:00:00", "address": { "addressLine1": "30 King ST", "addressLine2": null, "city": "Rangiora", "suburb": null, "countryName": "NEW ZEALAND", "postCode": "7400" }, "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "updatedDateUTC": "2019-09-24T05:08:45", "createdDateUTC": "2019-09-22T23:58:23", "endDate": null }, { "employeeID": "1c4f0c92-03ad-43f2-a690-ee51397ece6a", "firstName": "GST", "lastName": "Contractor", "dateOfBirth": null, "gender": null, "email": null, "phoneNumber": null, "startDate": "2019-01-30T00:00:00", "address": { "addressLine1": null, "addressLine2": null, "city": null, "suburb": null, "countryName": null, "postCode": null }, "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "updatedDateUTC": "2019-09-23T00:16:25", "createdDateUTC": "2019-09-23T00:12:16", "endDate": null } ] }' '400': description: validation error for a bad request content: application/json: schema: $ref: '#/components/schemas/Problem' post: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: createEmployee x-hasPayrollUkProblem: true x-example: - dateOfBirthValue: key: dateOfBirth keyPascal: DateOfBirth keySnake: date_of_birth is_date: true object: employee java_datatype: LocalDate csharp_datatype: DateTime default: "LocalDate.of(2000, Month.OCTOBER, 28)" java: "LocalDate.of(2000, Month.OCTOBER, 28)" csharp: "new DateTime(2000, 10, 10)" php: "new DateTime('2000-10-28')" node: "'2000-10-28'" python: "dateutil.parser.parse('2000-10-28T00:00:00Z')" ruby: "'YYYY-MM-DD'" - Address: key: address keyPascal: Address keySnake: address is_object: true - addressLine1: key: addressLine1 keyPascal: AddressLine1 keySnake: address_line_1 default: 123 Test st object: address - city: key: city keyPascal: City keySnake: city object: address default: Rangiora - postCode: key: postCode keyPascal: PostCode keySnake: post_code object: address default: 7400 - countryName: key: countryName keyPascal: CountryName keySnake: country_name default: NEW ZEALAND object: address is_last: true - employee: key: employee keyPascal: Employee is_object: true - firstName: key: firstName keyPascal: FirstName keySnake: first_name default: "Adam" object: employee - lastName: key: lastName keyPascal: LastName keySnake: last_name default: "Adamson" object: employee - dateOfBirth: is_variable: true nonString: true key: dateOfBirth keyPascal: DateOfBirth keySnake: date_of_birth default: dateOfBirth python: date_of_birth ruby: date_of_birth object: employee - setHomeAddress: is_last: true is_variable: true nonString: true key: address keyPascal: Address default: address python: address ruby: address object: employee summary: Creates an employees parameters: - $ref: '#/components/parameters/idempotencyKey' responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-24T20:27:22.5779577", "httpStatusCode": "OK", "pagination": null, "problem": null, "employee": { "employeeID": "658be485-3feb-402e-9e77-ac17623aad42", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01T00:00:00", "gender": "M", "email": "83139@starkindustries.com", "phoneNumber": null, "startDate": null, "address": { "addressLine1": "101 Green St", "addressLine2": null, "city": "San Francisco", "suburb": null, "countryName": null, "postCode": "4351" }, "payrollCalendarID": null, "updatedDateUTC": "2020-08-24T20:27:22", "createdDateUTC": "2020-08-24T20:27:22", "endDate": null } }' '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/Employee' example: '{ "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" }' /Employees/{EmployeeID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.employees, payroll.employees.read] tags: - PayrollNz operationId: getEmployee x-hasPayrollUkProblem: true summary: Retrieves an employees using a unique employee ID parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-24T20:16:15.3542191", "httpStatusCode": "OK", "pagination": null, "problem": null, "employee": { "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "firstName": "Casual", "lastName": "Worker", "dateOfBirth": "1990-12-01T00:00:00", "gender": "M", "email": null, "phoneNumber": null, "startDate": "2019-02-07T00:00:00", "address": { "addressLine1": "30 King ST", "addressLine2": null, "city": "Rangiora", "suburb": null, "countryName": "NEW ZEALAND", "postCode": "7400" }, "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "updatedDateUTC": "2019-09-24T05:08:45", "createdDateUTC": "2019-09-22T23:58:23", "endDate": null } }' put: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: updateEmployee x-hasPayrollUkProblem: true x-example: - dateOfBirthValue: key: dateOfBirth keyPascal: DateOfBirth keySnake: date_of_birth is_date: true object: employee java_datatype: LocalDate csharp_datatype: DateTime default: "LocalDate.of(2000, Month.OCTOBER, 28)" java: "LocalDate.of(2000, Month.OCTOBER, 28)" csharp: "new DateTime(2000, 10, 10)" php: "new DateTime('2000-10-28')" node: "'2000-10-28'" python: "dateutil.parser.parse('2000-10-28T00:00:00Z')" ruby: "'YYYY-MM-DD'" - Address: key: address keyPascal: Address keySnake: address is_object: true - addressLine1: key: addressLine1 keyPascal: AddressLine1 keySnake: address_line_1 default: 123 Test st object: address - city: key: city keyPascal: City keySnake: city object: address default: Rangiora - postCode: key: postCode keyPascal: PostCode keySnake: post_code object: address default: 7400 - countryName: key: countryName keyPascal: CountryName keySnake: country_name default: NEW ZEALAND object: address is_last: true - employee: key: employee keyPascal: Employee is_object: true - firstName: key: firstName keyPascal: FirstName keySnake: first_name default: "Adam" object: employee - lastName: key: lastName keyPascal: LastName keySnake: last_name default: "Adamson" object: employee - dateOfBirth: is_variable: true nonString: true key: dateOfBirth keyPascal: DateOfBirth keySnake: date_of_birth default: dateOfBirth python: date_of_birth ruby: date_of_birth object: employee - setHomeAddress: is_last: true is_variable: true nonString: true key: address keyPascal: Address default: address python: address ruby: address object: employee summary: Updates an existing employee parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: successful response content: application/json: schema: $ref: '#/components/schemas/EmployeeObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-24T20:29:43.3452832", "httpStatusCode": "OK", "pagination": null, "problem": null, "employee": { "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "firstName": "Tony", "lastName": "Starkgtrzgquusrson", "dateOfBirth": "1999-01-01T00:00:00", "gender": "M", "email": "58315@starkindustries.com", "phoneNumber": null, "startDate": "2019-02-07T00:00:00", "address": { "addressLine1": "101 Green St", "addressLine2": null, "city": "San Francisco", "suburb": null, "countryName": null, "postCode": "4432" }, "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "updatedDateUTC": "2020-08-24T20:29:43", "createdDateUTC": "2019-09-22T23:58:23", "endDate": null } }' '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/Employee' example: '{ "title": "Mr", "firstName": "Tony", "lastName": "Starkgtrzgquusrson", "dateOfBirth": "1999-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4432", "countryName": "United Kingdom" }, "email": "58315@starkindustries.com", "gender": "M" }' /Employees/{EmployeeID}/Employment: parameters: - $ref: '#/components/parameters/requiredHeader' post: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: createEmployment x-hasPayrollUkProblem: 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'" - employment: key: employment keyPascal: Employment keySnake: employment is_object: true - payrollCalendarID: key: payrollCalendarID keyPascal: PayrollCalendarID keySnake: payroll_calendar_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: employment - startDate: is_variable: true nonString: true key: startDate keyPascal: StartDate keySnake: start_date default: startDate python: start_date ruby: start_date object: employment is_last: true summary: Creates an employment detail for a specific employee parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmploymentObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-24T20:53:58.8624623", "httpStatusCode": "OK", "pagination": null, "problem": null, "employment": { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02T00:00:00" } }' '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/Employment' example: '{ "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }' /Employees/{EmployeeID}/Tax: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.employees, payroll.employees.read] tags: - PayrollNz operationId: getEmployeeTax x-hasPayrollUkProblem: true summary: Retrieves tax records for a specific employee parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeTaxObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-24T20:57:27.5434491", "httpStatusCode": "OK", "pagination": null, "problem": null, "employeeTax": { "irdNumber": "111111111", "taxCode": "M", "esctRatePercentage": 17.5, "isEligibleForKiwiSaver": true, "hasSpecialStudentLoanRate": false, "specialStudentLoanRatePercentage": null, "specialTaxRatePercentage": null, "kiwiSaverContributions": "MakeContributions", "kiwiSaverOptOutDate": null, "kiwiSaverContributionHolidayEndDate": null, "kiwiSaverEmployeeContributionRatePercentage": 3, "kiwiSaverEmployerContributionRatePercentage": 3, "kiwiSaverEmployerSalarySacrificeContributionRatePercentage": 0, "hasStudentLoanBalance": false, "studentLoanBalance": null, "studentLoanAsAt": null } }' post: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: updateEmployeeTax x-hasPayrollUkProblem: true x-example: - studentLoanAsAtValue: key: studentLoanAsAt keyPascal: StudentLoanAsAt keySnake: student_loan_as_at 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'" - employeeTax: key: employeeTax keyPascal: EmployeeTax keySnake: employee_tax is_object: true - irdNumber: key: irdNumber keyPascal: IrdNumber keySnake: ird_number default: 111111111 object: employeeTax - hasSpecialStudentLoanRate: key: hasSpecialStudentLoanRate keyPascal: HasSpecialStudentLoanRate keySnake: has_special_student_loan_rate nonString: true default: true object: employeeTax - specialStudentLoanRatePercentage: key: specialStudentLoanRatePercentage keyPascal: SpecialStudentLoanRatePercentage keySnake: special_student_loan_rate_percentage nonString: true default: 2 object: employeeTax - isEligibleForKiwiSaver: key: isEligibleForKiwiSaver keyPascal: IsEligibleForKiwiSaver keySnake: is_eligible_for_kiwi_saver nonString: true default: true object: employeeTax - esctRatePercentage: key: esctRatePercentage keyPascal: EsctRatePercentage keySnake: esct_rate_percentage default: 17.5 nonString: true is_money: true object: employeeTax - kiwiSaverContributions: key: kiwiSaverContributions keyPascal: KiwiSaverContributions keySnake: kiwi_saver_contributions nonString: true default: "DeductionCategory.NzOther" php: XeroAPI\XeroPHP\Models\PayrollNz\EmployeeTax\KiwiSaverContributionsEnum.MakeContributions node: EmployeeTax.KiwiSaverContributionsEnum.MakeContributions ruby: XeroRuby::PayrollNz::EmployeeTax::kiwi_saver_contributions_enum::MAKECONTRIBUTIONS python: kiwi_saver_contributions_enum::MAKECONTRIBUTIONS java: com.xero.models.payrollnz.EmployeeTax.KiwiSaverContributionsEnum.MakeContributions csharp: EmployeeTax.KiwiSaverContributionsEnum.MakeContributions object: employeeTax - kiwiSaverEmployeeContributionRatePercentage: key: kiwiSaverEmployeeContributionRatePercentage keyPascal: KiwiSaverEmployeeContributionRatePercentage keySnake: kiwi_saver_employee_contribution_rate_percentage default: 4 is_money: true nonString: true object: employeeTax - kiwiSaverEmployerSalarySacrificeContributionRatePercentage: key: kiwiSaverEmployerSalarySacrificeContributionRatePercentage keyPascal: KiwiSaverEmployerSalarySacrificeContributionRatePercentage keySnake: kiwi_saver_employer_salary_sacrifice_contribution_rate_percentage default: 2 nonString: true object: employeeTax - taxCode: key: taxCode keyPascal: TaxCode keySnake: tax_code nonString: true default: TaxCode.MSL php: XeroAPI\XeroPHP\Models\PayrollNz\TaxCode\MSL node: TaxCode.MSL ruby: XeroRuby::PayrollNz::TaxCode::MSL python: tax_code:::MSL java: com.xero.models.payrollnz.TaxCode.MSL csharp: TaxCode.MSL object: employeeTax - hasStudentLoanBalance: key: hasStudentLoanBalance keyPascal: HasStudentLoanBalance keySnake: has_student_loan_balance nonString: true default: true object: employeeTax - studentLoanBalance: key: studentLoanBalance keyPascal: StudentLoanBalance keySnake: student_loan_balance default: 30.0000 nonString: true is_money: true object: employeeTax - studentLoanAsAt: key: studentLoanAsAt keyPascal: StudentLoanAsAt keySnake: student_loan_as_at is_variable: true nonString: true default: studentLoanAsAt python: student_loan_as_at ruby: student_loan_as_at object: employeeTax is_last: true summary: Updates the tax records for a specific employee parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeTaxObject' example: '' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmployeeTax' example: '' /Employees/{EmployeeID}/openingBalances: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.employees, payroll.employees.read] tags: - PayrollNz operationId: getEmployeeOpeningBalances x-hasPayrollUkProblem: true summary: Retrieves the opening balance for a specific employee parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeOpeningBalancesObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T20:00:07.7343966", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 8 }, "problem": null, "openingBalances": [ { "periodEndDate": "2020-10-01T00:00:00", "daysPaid": 3, "unpaidWeeks": 2, "grossEarnings": 40 } ] }' post: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: createEmployeeOpeningBalances x-hasPayrollUkProblem: true summary: Creates opening balances for a specific employee x-example: - periodEndDateValue: key: periodEndDate keyPascal: PeriodEndDate keySnake: period_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'" - employeeOpeningBalance: key: employeeOpeningBalance keyPascal: EmployeeOpeningBalance keySnake: employee_opening_balance is_object: true - periodEndDate: is_variable: true nonString: true key: periodEndDate keyPascal: PeriodEndDate keySnake: period_end_date default: periodEndDate python: period_end_date ruby: period_end_date object: employeeOpeningBalance - daysPaid: key: daysPaid keyPascal: DaysPaid keySnake: days_paid default: 5 nonString: true object: employeeOpeningBalance - unpaidWeeks: key: unpaidWeeks keyPascal: UnpaidWeeks keySnake: unpaid_weeks default: 0 nonString: true object: employeeOpeningBalance - grossEarnings: key: grossEarnings keyPascal: GrossEarnings keySnake: gross_earnings default: 1730.77 is_money: true nonString: true object: employeeOpeningBalance is_last: true - employeeOpeningBalances: is_list: true key: employeeOpeningBalances keyPascal: EmployeeOpeningBalances keySnake: employee_opening_balances csharp: EmployeeOpeningBalance java: EmployeeOpeningBalance - addEmployeeOpeningBalance: is_last: true is_list_add: true key: employeeOpeningBalances keyPascal: EmployeeOpeningBalances keySnake: employee_opening_balances java: EmployeeOpeningBalances python: employee_opening_balance ruby: employee_opening_balance csharp: EmployeeOpeningBalance object: employeeOpeningBalance parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeOpeningBalancesObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T19:55:36.539949", "httpStatusCode": "OK", "pagination": null, "problem": null, "openingBalances": [ { "periodEndDate": "2020-10-01T00:00:00", "daysPaid": 3, "unpaidWeeks": 2, "grossEarnings": 40 } ] }' '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/EmployeeOpeningBalances' example: '[{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]' /Employees/{EmployeeID}/Leave: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.employees, payroll.employees.read] tags: - PayrollNz operationId: getEmployeeLeaves x-hasPayrollUkProblem: true summary: Retrieves leave records for a specific employee parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaves' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-26T16:57:18.4657329", "httpStatusCode": "OK", "pagination": null, "problem": null, "leave": [ { "leaveID": "e311d45f-122e-4fbf-b068-4e3f92dd2729", "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", "description": "Holiday Pay Payout", "startDate": "2019-07-01T00:00:00", "endDate": "2019-07-07T00:00:00", "periods": [ { "periodStartDate": "2019-07-01T00:00:00", "periodEndDate": "2019-07-07T00:00:00", "numberOfUnits": 36, "periodStatus": "Completed" } ], "updatedDateUTC": "2019-09-24T05:08:44" } ] }' post: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: createEmployeeLeave x-hasPayrollUkProblem: 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'" - employeeLeave: key: employeeLeave keyPascal: EmployeeLeave keySnake: employee_leave is_object: true - leaveTypeID: key: leaveTypeID keyPascal: LeaveTypeID keySnake: leave_type_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: employeeLeave - startDate: is_variable: true nonString: true key: startDate keyPascal: StartDate keySnake: start_date default: startDate python: start_date ruby: start_date object: employeeLeave - 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: employeeLeave summary: Creates leave records for a specific employee parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-26T20:29:55.4086404", "httpStatusCode": "OK", "pagination": null, "problem": null, "leave": { "leaveID": "82a04ba6-a5cc-4e7d-86d4-b9f381a494e8", "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Description", "startDate": "2020-04-24T00:00:00", "endDate": "2020-04-26T00:00:00", "periods": [ { "periodStartDate": "2020-04-20T00:00:00", "periodEndDate": "2020-04-26T00:00:00", "numberOfUnits": 0, "periodStatus": "Approved" } ], "updatedDateUTC": "2020-08-26T20:29:55.2151561" } }' '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/EmployeeLeave' example: '{ "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Description", "startDate": "2020-04-24", "endDate": "2020-04-26" }' /Employees/{EmployeeID}/Leave/{LeaveID}: parameters: - $ref: '#/components/parameters/requiredHeader' put: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: updateEmployeeLeave x-hasPayrollUkProblem: 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'" - employeeLeave: key: employeeLeave keyPascal: EmployeeLeave keySnake: employee_leave is_object: true - leaveTypeID: key: leaveTypeID keyPascal: LeaveTypeID keySnake: leave_type_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: employeeLeave - startDate: is_variable: true nonString: true key: startDate keyPascal: StartDate keySnake: start_date default: startDate python: start_date ruby: start_date object: employeeLeave - 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: employeeLeave summary: Updates leave records for a specific employee parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c - name: LeaveID x-snake: leave_id in: path required: true description: Leave id for single object schema: type: string format: uuid example: c4be24e5-e840-4c92-9eaa-2d86cd596314 responses: '200': description: successful response content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-26T20:29:55.8432792", "httpStatusCode": "OK", "pagination": null, "problem": null, "leave": { "leaveID": "82a04ba6-a5cc-4e7d-86d4-b9f381a494e8", "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Description", "startDate": "2020-04-24T00:00:00", "endDate": "2020-04-26T00:00:00", "periods": [ { "periodStartDate": "2020-04-20T00:00:00", "periodEndDate": "2020-04-26T00:00:00", "numberOfUnits": 1, "periodStatus": "Approved" } ], "updatedDateUTC": "2020-08-26T20:29:55.8854536" } }' '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/EmployeeLeave' example: '{ "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Description", "startDate": "2020-04-24", "endDate": "2020-04-26", "periods": [ { "periodStartDate": "2020-04-20", "periodEndDate": "2020-04-26", "numberOfUnits": 1, "periodStatus": "Approved" } ] }' delete: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: deleteEmployeeLeave x-hasPayrollUkProblem: true summary: Deletes a leave record for a specific employee parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c - name: LeaveID x-snake: leave_id in: path required: true description: Leave id for single object schema: type: string format: uuid example: c4be24e5-e840-4c92-9eaa-2d86cd596314 responses: '200': description: successful response content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-26T22:11:10.809249", "httpStatusCode": "OK", "pagination": null, "problem": null }' /Employees/{EmployeeID}/LeaveBalances: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.employees, payroll.employees.read] tags: - PayrollNz operationId: getEmployeeLeaveBalances x-hasPayrollUkProblem: true summary: Retrieves leave balances for a specific employee parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveBalances' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-26T22:26:48.0448356", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 4 }, "problem": null, "leaveBalances": [ { "name": "Holiday Pay", "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", "balance": 0, "typeOfUnits": "Dollars" }, { "name": "Annual Leave", "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "balance": 0, "typeOfUnits": "Hours" }, { "name": "Sick Leave", "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719", "balance": 0, "typeOfUnits": "Hours" }, { "name": "Alternative Holidays", "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3", "balance": 0, "typeOfUnits": "Hours" } ] }' /Employees/{EmployeeID}/LeavePeriods: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.employees, payroll.employees.read] tags: - PayrollNz operationId: getEmployeeLeavePeriods x-hasPayrollUkProblem: true summary: Retrieves leave periods for a specific employee parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c - in: query name: startDate x-snake: start_date description: Filter by start date schema: type: string format: date - in: query name: endDate x-snake: end_date description: Filter by end date schema: type: string format: date example: Johnson responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeavePeriods' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T13:35:49.4407417", "httpStatusCode": "OK", "pagination": null, "problem": null, "periods": [ { "periodStartDate": "2020-02-24T00:00:00", "periodEndDate": "2020-03-01T00:00:00", "numberOfUnits": 0, "periodStatus": null }, { "periodStartDate": "2020-03-02T00:00:00", "periodEndDate": "2020-03-08T00:00:00", "numberOfUnits": 0, "periodStatus": null } ] }' '400': description: validation error for a bad request content: application/json: schema: $ref: '#/components/schemas/Problem' /Employees/{EmployeeID}/leaveSetup: parameters: - $ref: '#/components/parameters/requiredHeader' post: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: createEmployeeLeaveSetup x-hasPayrollUkProblem: true x-example: - employeeLeaveSetup: key: employeeLeaveSetup keyPascal: EmployeeLeaveSetup keySnake: employee_leave_setup is_object: true - includeHolidayPay: key: includeHolidayPay keyPascal: IncludeHolidayPay keySnake: include_holiday_pay nonString: true default: false object: employeeLeaveSetup - holidayPayOpeningBalance: key: holidayPayOpeningBalance keyPascal: HolidayPayOpeningBalance keySnake: holiday_pay_opening_balance nonString: true default: 10.50 is_money: true object: employeeLeaveSetup - annualLeaveOpeningBalance: key: annualLeaveOpeningBalance keyPascal: AnnualLeaveOpeningBalance keySnake: annual_leave_opening_balance nonString: true default: 25.89 is_money: true object: employeeLeaveSetup - sickLeaveHoursToAccrueAnnually: key: sickLeaveHoursToAccrueAnnually keyPascal: SickLeaveHoursToAccrueAnnually keySnake: sick_leave_hours_to_accrue_annually nonString: true default: 100.0 is_money: true object: employeeLeaveSetup - sickLeaveMaximumHoursToAccrue: key: sickLeaveMaximumHoursToAccrue keyPascal: SickLeaveMaximumHoursToAccrue keySnake: sick_leave_maximum_hours_to_accrue is_money: true nonString: true default: 200.0 object: employeeLeaveSetup - sickLeaveOpeningBalance: key: sickLeaveOpeningBalance keyPascal: SickLeaveOpeningBalance keySnake: sick_leave_opening_balance is_money: true nonString: true default: 10.50 object: employeeLeaveSetup is_last: true summary: Creates a leave set-up for a specific employee. This is required before viewing, configuring and requesting leave for an employee parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveSetupObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-26T16:50:48.7245664", "httpStatusCode": "OK", "pagination": null, "problem": null, "leaveSetup": { "includeHolidayPay": null, "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "negativeAnnualLeaveBalancePaidAmount": null, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveMaximumHoursToAccrue": null, "sickLeaveOpeningBalance": 10 } }' '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/EmployeeLeaveSetup' example: '{ "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }' /Employees/{EmployeeID}/LeaveTypes: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.employees, payroll.employees.read] tags: - PayrollNz operationId: getEmployeeLeaveTypes x-hasPayrollUkProblem: true summary: Retrieves leave types for a specific employee parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveTypes' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T14:25:16.004485", "httpStatusCode": "OK", "pagination": null, "problem": null, "leaveTypes": [ { "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", "scheduleOfAccrual": "PercentageOfGrossEarnings", "hoursAccruedAnnually": 0, "maximumToAccrue": 0, "openingBalance": 0, "rateAccruedHourly": null, "percentageOfGrossEarnings": 8, "includeHolidayPayEveryPay": true, "showAnnualLeaveInAdvance": null, "annualLeaveTotalAmountPaid": null } ] }' '400': description: validation error for a bad request content: application/json: schema: $ref: '#/components/schemas/Problem' post: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: createEmployeeLeaveType x-hasPayrollUkProblem: true summary: Creates leave type records for a specific employee x-example: - employeeLeaveType: key: employeeLeaveType keyPascal: EmployeeLeaveType keySnake: employee_leave_type is_object: true - leaveTypeID: key: leaveTypeID keyPascal: LeaveTypeID keySnake: leave_type_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: employeeLeaveType - scheduleOfAccrual: key: scheduleOfAccrual keyPascal: ScheduleOfAccrual keySnake: schedule_of_accrual nonString: true default: "DeductionCategory.NzOther" php: XeroAPI\XeroPHP\Models\PayrollNz\EmployeeLeaveType\ScheduleOfAccrualEnum.PercentageOfGrossEarnings node: EmployeeLeaveType.ScheduleOfAccrualEnum.PercentageOfGrossEarnings ruby: XeroRuby::PayrollNz::EmployeeLeaveType::schedule_of_accrual::PERCENTAGEOFGROSSEARNINGS python: schedule_of_accrual::PERCENTAGEOFGROSSEARNINGS java: com.xero.models.payrollnz.EmployeeLeaveType.ScheduleOfAccrualEnum.PercentageOfGrossEarnings csharp: EmployeeLeaveType.ScheduleOfAccrualEnum.PercentageOfGrossEarnings object: employeeLeaveType - openingBalance: key: openingBalance keyPascal: OpeningBalance keySnake: opening_balance is_money: true nonString: true default: 5.25 object: employeeLeaveType is_last: true parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveTypeObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T14:31:54.3370081", "httpStatusCode": "OK", "pagination": null, "problem": null, "leaveType": { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": null, "percentageOfGrossEarnings": 0, "includeHolidayPayEveryPay": null, "showAnnualLeaveInAdvance": null, "annualLeaveTotalAmountPaid": null } }' '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/EmployeeLeaveType' example: '{ "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }' /Employees/{EmployeeID}/PaymentMethods: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.employees, payroll.employees.read] tags: - PayrollNz operationId: getEmployeePaymentMethod x-hasPayrollUkProblem: true summary: Retrieves available payment methods for a specific employee parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PaymentMethodObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-26T23:34:53.6856317", "httpStatusCode": "OK", "pagination": null, "problem": null, "paymentMethod": { "bankAccounts": [ { "accountName": "Casual Worker", "accountNumber": "0607050201419000", "sortCode": null, "particulars": null, "code": null, "dollarAmount": null, "reference": "", "calculationType": "Balance" } ] } }' '400': description: validation error for a bad request content: application/json: schema: $ref: '#/components/schemas/Problem' post: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: createEmployeePaymentMethod x-hasPayrollUkProblem: true x-example: - bankAccount: key: bankAccount keyPascal: BankAccount keySnake: bank_account is_object: true - accountName: key: accountName keyPascal: AccountName keySnake: account_name default: Charlotte Danes object: bankAccount - accountNumber: key: accountNumber keyPascal: AccountNumber keySnake: account_number nonString: true default: 123456 object: bankAccount - sortCode: key: sortCode keyPascal: SortCode keySnake: sort_code default: 123411 is_last: true object: bankAccount - bankAccounts: is_list: true key: bankAccounts keyPascal: BankAccounts keySnake: bank_accounts csharp: BankAccount java: BankAccount object: bankAccount - addBankAccount: is_last: true is_list_add: true key: bankAccounts keyPascal: BankAccounts keySnake: bank_accounts java: BankAccounts python: bank_account ruby: bank_account csharp: BankAccount object: bankAccount - paymentMethod: key: paymentMethod keyPascal: PaymentMethod keySnake: payment_method is_object: true - setBankAccount: is_last: true is_variable: true nonString: true key: bankAccounts keyPascal: BankAccounts default: bankAccounts object: paymentMethod summary: Creates a payment method for an employee parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PaymentMethodObject' example: '' '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/PaymentMethod' example: '' /Employees/{EmployeeID}/PayTemplates: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.employees, payroll.employees.read] tags: - PayrollNz operationId: getEmployeePayTemplates x-hasPayrollUkProblem: true summary: Retrieves pay templates for a specific employee parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeePayTemplates' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T15:09:19.0627389", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 0, "itemCount": 0 }, "problem": null, "payTemplate": { "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "earningTemplates": [ { "payTemplateEarningID": "1527cf6c-93db-41bf-aba2-9d6af1d3c499", "ratePerUnit": 20, "numberOfUnits": 8, "fixedAmount": null, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "Ordinary Time" } ] } }' '400': description: validation error for a bad request content: application/json: schema: $ref: '#/components/schemas/Problem' /Employees/{EmployeeID}/PayTemplates/earnings: parameters: - $ref: '#/components/parameters/requiredHeader' post: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: createEmployeeEarningsTemplate x-hasPayrollUkProblem: true x-example: - earningsTemplate: key: earningsTemplate keyPascal: EarningsTemplate keySnake: earnings_template is_object: true - payTemplateEarningID: key: payTemplateEarningID keyPascal: PayTemplateEarningID keySnake: pay_template_earning_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: earningsTemplate - ratePerUnit: key: ratePerUnit keyPascal: RatePerUnit keySnake: rate_per_unit nonString: true default: 14.25 object: earningsTemplate is_money: true - numberOfUnits: key: numberOfUnits keyPascal: NumberOfUnits keySnake: number_of_units default: 35.50 nonString: true is_money: true object: earningsTemplate - fixedAmount: key: fixedAmount keyPascal: FixedAmount keySnake: fixed_amount default: 50 nonString: true object: earningsTemplate - earningsRateId: key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: earningsTemplate - name: key: name keyPascal: Name keySnake: name default: Overtime Hours object: earningsTemplate is_last: true - earningsTemplates: is_list: true key: earningsTemplates keyPascal: EarningsTemplates keySnake: earnings_templates csharp: EarningsTemplate java: EarningsTemplate - addEarningsTemplate: is_last: true is_list_add: true key: earningsTemplates keyPascal: EarningsTemplates keySnake: earnings_templates java: EarningsTemplates python: earnings_template ruby: earnings_template csharp: EarningsTemplate object: earningsTemplate summary: Creates earnings template records for an employee parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsTemplateObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T14:48:24.6032145", "httpStatusCode": "OK", "pagination": null, "problem": null, "earningTemplate": { "payTemplateEarningID": "11b4e492-5d56-4eac-a9ce-687d7b9a4a84", "ratePerUnit": 20, "numberOfUnits": 8, "fixedAmount": null, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "Ordinary Time" } }' '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/EarningsTemplate' example: '{ "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }' /Employees/{EmployeeID}/PayTemplates/earnings/{PayTemplateEarningID}: parameters: - $ref: '#/components/parameters/requiredHeader' put: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: updateEmployeeEarningsTemplate x-hasPayrollUkProblem: true x-example: - earningsTemplate: key: earningsTemplate keyPascal: EarningsTemplate keySnake: earnings_template is_object: true - payTemplateEarningID: key: payTemplateEarningID keyPascal: PayTemplateEarningID keySnake: pay_template_earning_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: earningsTemplate - ratePerUnit: key: ratePerUnit keyPascal: RatePerUnit keySnake: rate_per_unit nonString: true default: 14.25 object: earningsTemplate is_money: true - numberOfUnits: key: numberOfUnits keyPascal: NumberOfUnits keySnake: number_of_units default: 35.50 nonString: true is_money: true object: earningsTemplate - fixedAmount: key: fixedAmount keyPascal: FixedAmount keySnake: fixed_amount default: 50 nonString: true object: earningsTemplate - earningsRateId: key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: earningsTemplate - name: key: name keyPascal: Name keySnake: name default: Overtime Hours object: earningsTemplate is_last: true - earningsTemplates: is_list: true key: earningsTemplates keyPascal: EarningsTemplates keySnake: earnings_templates csharp: EarningsTemplate java: EarningsTemplate - addEarningsTemplate: is_last: true is_list_add: true key: earningsTemplates keyPascal: EarningsTemplates keySnake: earnings_templates java: EarningsTemplates python: earnings_template ruby: earnings_template csharp: EarningsTemplate object: earningsTemplate summary: Updates an earnings template records for an employee parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c - name: PayTemplateEarningID x-snake: pay_template_earning_id in: path required: true description: Id for single pay template earnings object schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsTemplateObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T18:54:08.6524341", "httpStatusCode": "OK", "pagination": null, "problem": null, "earningTemplate": { "payTemplateEarningID": "1527cf6c-93db-41bf-aba2-9d6af1d3c499", "ratePerUnit": 25, "numberOfUnits": 4, "fixedAmount": null, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "Ordinary Time" } }' '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/EarningsTemplate' example: '{ "ratePerUnit": 25, "numberOfUnits": 4, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5" }' delete: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: deleteEmployeeEarningsTemplate summary: Deletes an employee's earnings template record parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c - name: PayTemplateEarningID x-snake: pay_template_earning_id in: path required: true description: Id for single pay template earnings object schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: '200': description: deletion successful content: application/json: schema: $ref: '#/components/schemas/EarningsTemplateObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T18:54:09.1368544", "httpStatusCode": "OK", "pagination": null, "problem": null }' /Employees/{EmployeeID}/paytemplateearnings: parameters: - $ref: '#/components/parameters/requiredHeader' post: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: createMultipleEmployeeEarningsTemplate x-hasPayrollUkProblem: true x-example: - earningsTemplate: key: earningsTemplate keyPascal: EarningsTemplate keySnake: earnings_template is_object: true - payTemplateEarningID: key: payTemplateEarningID keyPascal: PayTemplateEarningID keySnake: pay_template_earning_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: earningsTemplate - ratePerUnit: key: ratePerUnit keyPascal: RatePerUnit keySnake: rate_per_unit nonString: true default: 14.25 object: earningsTemplate is_money: true - numberOfUnits: key: numberOfUnits keyPascal: NumberOfUnits keySnake: number_of_units default: 35.50 nonString: true is_money: true object: earningsTemplate - fixedAmount: key: fixedAmount keyPascal: FixedAmount keySnake: fixed_amount default: 50 nonString: true object: earningsTemplate - earningsRateId: key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: earningsTemplate - name: key: name keyPascal: Name keySnake: name default: Overtime Hours object: earningsTemplate is_last: true - earningsTemplates: is_list: true key: earningsTemplates keyPascal: EarningsTemplates keySnake: earnings_templates csharp: EarningsTemplate java: EarningsTemplate - addEarningsTemplate: is_last: true is_list_add: true key: earningsTemplates keyPascal: EarningsTemplates keySnake: earnings_templates java: EarningsTemplates python: earnings_template ruby: earnings_template csharp: EarningsTemplate object: earningsTemplate summary: Creates multiple employee earnings template records for a specific employee parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeEarningsTemplates' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T15:01:52.9369043", "httpStatusCode": "OK", "pagination": null, "problem": null, "earningTemplates": [ { "payTemplateEarningID": "1527cf6c-93db-41bf-aba2-9d6af1d3c499", "ratePerUnit": 20, "numberOfUnits": 8, "fixedAmount": null, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "Ordinary Time" }, { "payTemplateEarningID": "92e757cc-b026-404d-804e-9dc2047a03e6", "ratePerUnit": 0, "numberOfUnits": 8, "fixedAmount": null, "earningsRateID": "65b83d94-f20f-45e1-85ae-387fcf460c26", "name": "Salary" } ] }' '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/EarningsTemplates' example: '[{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}]' /Deductions: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getDeductions x-hasPayrollUkProblem: true summary: Retrieves deductions for a specific employee 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 responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Deductions' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T20:43:53.931198", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 4 }, "problem": null, "deductions": [ { "deductionId": "a3760fe4-68a4-4e38-8326-fe616af7dc74", "deductionName": "KiwiSaver Voluntary Contributions", "deductionCategory": "KiwiSaverVoluntaryContributions", "liabilityAccountId": "26c57f04-0436-40cc-9cd9-1a21185d88bb", "currentRecord": true, "standardAmount": null }, { "deductionId": "a131596e-2f83-4f6c-9573-99c4cbfcefd1", "deductionName": "Rent", "deductionCategory": "NzOther", "liabilityAccountId": "26c57f04-0436-40cc-9cd9-1a21185d88bb", "currentRecord": true, "standardAmount": 200 } ] }' post: security: - OAuth2: [payroll.settings] tags: - PayrollNz operationId: createDeduction x-hasPayrollUkProblem: true x-example: - deduction: key: deduction keyPascal: Deduction keySnake: deduction is_object: true - deductionName: key: deductionName keyPascal: DeductionName keySnake: deduction_name default: Deduction test object: deduction - deductionCategory: key: deductionCategory keyPascal: DeductionCategory keySnake: deduction_category nonString: true default: "DeductionCategory.NzOther" php: XeroAPI\XeroPHP\Models\PayrollNz\Deduction\DEDUCTION_CATEGORY_NZ_OTHER node: Deduction.DeductionCategoryEnum.NzOther ruby: XeroRuby::PayrollNz::Deduction::deduction_category::NZ_OTHER python: deduction_category.NzOther java: com.xero.models.payrollnz.Deduction.DeductionCategoryEnum.NZOTHER csharp: Deduction.DeductionCategoryEnum.NzOther object: deduction - liabilityAccountId: is_uuid: true key: liabilityAccountId keyPascal: LiabilityAccountId keySnake: liability_account_id default: 00000000-0000-0000-0000-000000000000 object: deduction is_last: true summary: Creates a new deduction for a specific employee parameters: - $ref: '#/components/parameters/idempotencyKey' responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/DeductionObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T20:43:54.9563295", "httpStatusCode": "OK", "pagination": null, "problem": null, "deduction": { "deductionId": "0ee805eb-f5b0-4061-9b35-d9ea550da04e", "deductionName": "My new deduction", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "currentRecord": true, "standardAmount": null } }' '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/Deduction' example: '{ "deductionName": "My new deduction", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }' /Deductions/{deductionId}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getDeduction x-hasPayrollUkProblem: true summary: Retrieves a single deduction by using a unique deduction ID parameters: - in: path name: deductionId x-snake: deduction_id required: true description: Identifier for the deduction schema: type: string format: uuid responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/DeductionObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T20:43:54.846821", "httpStatusCode": "OK", "pagination": null, "problem": null, "deduction": { "deductionId": "a3760fe4-68a4-4e38-8326-fe616af7dc74", "deductionName": "KiwiSaver Voluntary Contributions", "deductionCategory": "KiwiSaverVoluntaryContributions", "liabilityAccountId": "26c57f04-0436-40cc-9cd9-1a21185d88bb", "currentRecord": true, "standardAmount": null } }' /StatutoryDeductions: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getStatutoryDeductions summary: Retrieves statutory deductions 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 responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/StatutoryDeductions' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T23:46:21.0212854", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 8 }, "problem": null, "statutoryDeductions": [ { "id": "00000000-0000-0000-0000-000000000000", "name": "Child Support", "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "statutoryDeductionCategory": "ChildSupport", "currentRecord": true }, { "id": "00000000-0000-0000-0000-000000000000", "name": "Student Loan", "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "statutoryDeductionCategory": "StudentLoan", "currentRecord": true } ] }' /StatutoryDeductions/{id}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getStatutoryDeduction summary: Retrieves a specific statutory deduction by using a unique statutory deductions id parameters: - in: path name: id required: true description: Identifier for the statutory deduction schema: type: string format: uuid responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/StatutoryDeductionObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T00:01:57.6562992", "httpStatusCode": "OK", "pagination": null, "problem": null, "statutoryDeduction": { "id": "00000000-0000-0000-0000-000000000000", "name": "Child Support", "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "statutoryDeductionCategory": "ChildSupport", "currentRecord": true } }' /Superannuations: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getSuperannuations summary: Retrieves superannuations 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 responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Superannuations' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-09-14T22:35:14.6806088", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 2 }, "problem": null, "benefits": [ { "id": "00000000-0000-0000-0000-000000000000", "name": "KiwiSaver", "category": "KiwiSaver", "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "expenseAccountId": "b343c3b0-5941-4166-82b4-dd926622e0e2", "standardAmount": null, "percentage": 3, "calculationTypeNZ": "PercentageOfTaxableEarnings", "currentRecord": true, "companyMax": null }, { "id": "00000000-0000-0000-0000-000000000000", "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "standardAmount": 10, "percentage": null, "calculationTypeNZ": "FixedAmount", "currentRecord": true, "companyMax": null } ] }' post: security: - OAuth2: [payroll.settings] tags: - PayrollNz operationId: createSuperannuation x-hasPayrollUkProblem: true x-example: - benefit: key: benefit keyPascal: Benefit keySnake: benefit is_object: true - category: key: category keyPascal: Category keySnake: category php: XeroAPI\XeroPHP\Models\PayrollNz\Benefit\CategoryEnum.ComplyingFund node: Benefit.CategoryEnum.ComplyingFund ruby: XeroRuby::PayrollNz::Benefit::CategoryEnum::COMPLYINGFUND python_string: COMPLYINGFUND java: com.xero.models.payrollnz.Benefit.CategoryEnum.ComplyingFund csharp: Benefit.CategoryEnum.ComplyingFund default: ComplyingFund nonString: true object: benefit - caluclationTypeNZ: key: calculationTypeNZ keyPascal: CalculationTypeNZ keySnake: calculation_type_nz php: XeroAPI\XeroPHP\Models\PayrollNz\Benefit\CalculationTypeNZ.PercentageOfTaxableEarnings node: Benefit.CalculationTypeNZ.PercentageOfTaxableEarnings ruby: XeroRuby::PayrollNz::Benefit::CalculationTypeNZ::PERCENTAGEOFTAXABLEEARNINGS python_string: PERCENTAGEOFTAXABLEEARNINGS java: com.xero.models.payrollnz.Benefit.CalculationTypeNZ.PercentageOfTaxableEarnings csharp: Benefit.CalculationTypeNZ.PercentageOfTaxableEarnings default: PercentageOfTaxableEarnings nonString: true object: benefit - liabilityAccountId: key: liabilityAccountId keyPascal: LiabilityAccountId keySnake: liability_account_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: benefit - expenseAccountId: key: expenseAccountId keyPascal: ExpenseAccountId keySnake: expense_account_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: benefit - percentage: key: percentage keyPascal: Percentage keySnake: percentage default: 3 object: benefit nonString: true - standardAmount: key: standardAmount keyPascal: StandardAmount keySnake: standard_amount default: 100 nonString: true object: benefit is_last: true summary: Creates a new superannuation parameters: - $ref: '#/components/parameters/idempotencyKey' responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SuperannuationObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-09-11T00:36:31.7680431", "httpStatusCode": "OK", "pagination": null, "problem": null, "benefit": { "id": "00000000-0000-0000-0000-000000000000", "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "standardAmount": 10, "percentage": null, "calculationTypeNZ": "FixedAmount", "currentRecord": true, "companyMax": null } }' '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/Benefit' example: '{ "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }' /Superannuations/{SuperannuationID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getSuperannuation summary: Retrieves a specific superannuation using a unique superannuation ID parameters: - in: path name: SuperannuationID x-snake: superannuation_id required: true description: Identifier for the superannuation schema: type: string format: uuid responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SuperannuationObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-09-11T00:36:29.5745157", "httpStatusCode": "OK", "pagination": null, "problem": null, "benefit": { "id": "00000000-0000-0000-0000-000000000000", "name": "KiwiSaver", "category": "KiwiSaver", "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "expenseAccountId": "b343c3b0-5941-4166-82b4-dd926622e0e2", "standardAmount": null, "percentage": 3, "calculationTypeNZ": "PercentageOfTaxableEarnings", "currentRecord": true, "companyMax": null } }' /EarningsRates: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getEarningsRates x-hasPayrollUkProblem: true summary: Retrieves earnings rates 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 responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsRates' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T18:25:57.0647738", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 15 }, "problem": null, "earningsRates": [ { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "Ordinary Time", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "currentRecord": true, "expenseAccountID": "1c91e520-a12b-45cc-8194-99950858e5bf", "fixedAmount": null, "ratePerUnit": null, "multipleOfOrdinaryEarningsRate": null }, { "earningsRateID": "31407b3e-0967-4ae0-a7f1-3df4e6481a2e", "name": "ACC (First Week)", "earningsType": "OtherGrossEarnings", "rateType": "MultipleOfOrdinaryEarningsRate", "typeOfUnits": "hours", "currentRecord": true, "expenseAccountID": "1c91e520-a12b-45cc-8194-99950858e5bf", "fixedAmount": null, "ratePerUnit": null, "multipleOfOrdinaryEarningsRate": 0.8 }, { "earningsRateID": "6e5a4cf2-aa38-4558-a46e-f6998dad239b", "name": "Directors Fees", "earningsType": "WithholdingIncome", "rateType": "FixedAmount", "typeOfUnits": null, "currentRecord": true, "expenseAccountID": "1c91e520-a12b-45cc-8194-99950858e5bf", "fixedAmount": 1000, "ratePerUnit": null, "multipleOfOrdinaryEarningsRate": null } ] }' post: security: - OAuth2: [payroll.settings] tags: - PayrollNz operationId: createEarningsRate x-hasPayrollUkProblem: true x-example: - earningsRate: key: earningsRate keyPascal: EarningsRate keySnake: earnings_rate is_object: true - earningsType: key: earningsType keyPascal: EarningsType keySnake: earnings_type php: XeroAPI\XeroPHP\Models\PayrollNz\EarningsRate\EarningsTypeEnum.RegularEarnings node: EarningsRate.EarningsTypeEnum.REGULAREARNINGS ruby: XeroRuby::PayrollNz::EarningsRate::EarningsTypeEnum::REGULAREARNINGS python_string: REGULAREARNINGS java: com.xero.models.payrollnz.EarningsRate.EarningsTypeEnum.RegularEarnings csharp: EarningsRate.EarningsTypeEnum.RegularEarnings default: RegularEarnings nonString: true object: earningsRate - rateType: key: rateType keyPascal: RateType keySnake: rate_type php: XeroAPI\XeroPHP\Models\PayrollNz\EarningsRate\RateTypeEnum.RatePerUnit node: EarningsRate.RateTypeEnum.RatePerUnit ruby: XeroRuby::PayrollNz::EarningsRate::RateTypeEnum::ACCPAYCREDIT python_string: RATEPERUNIT java: com.xero.models.payrollnz.EarningsRate.RateTypeEnum.RATEPERUNIT csharp: EarningsRate.RateTypeEnum.RatePerUnit default: RatePerUnit object: earningsRate nonString: true - expenseAccountId: key: expenseAccountID keyPascal: ExpenseAccountID keySnake: expense_account_ID is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: earningsRate is_last: true summary: Creates a new earnings rate parameters: - $ref: '#/components/parameters/idempotencyKey' responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsRateObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T18:25:57.8141393", "httpStatusCode": "OK", "pagination": null, "problem": null, "earningsRate": { "earningsRateID": "4369b0ef-a64d-42e1-bb6d-f2fc984de133", "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "currentRecord": true, "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "fixedAmount": null, "ratePerUnit": null, "multipleOfOrdinaryEarningsRate": null } }' '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/EarningsRate' example: '{ "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }' /EarningsRates/{EarningsRateID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getEarningsRate x-hasPayrollUkProblem: true summary: Retrieves a specific earnings rates by using a unique earnings rate id parameters: - in: path name: EarningsRateID x-snake: earnings_rate_id required: true description: Identifier for the earnings rate schema: type: string format: uuid responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsRateObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T18:25:57.8191994", "httpStatusCode": "OK", "pagination": null, "problem": null, "earningsRate": { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "Ordinary Time", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "currentRecord": true, "expenseAccountID": "1c91e520-a12b-45cc-8194-99950858e5bf", "fixedAmount": null, "ratePerUnit": null, "multipleOfOrdinaryEarningsRate": null } }' /LeaveTypes: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getLeaveTypes x-hasPayrollUkProblem: true summary: Retrieves leave types 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 - in: query name: ActiveOnly x-snake: active_only description: Filters leave types by active status. By default the API returns all leave types. example: true x-example-python: "True" schema: type: boolean responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeaveTypes' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T20:49:58.4095603", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 15 }, "problem": null, "leaveTypes": [ { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "name": "Annual Leave", "isPaidLeave": true, "showOnPayslip": true, "updatedDateUTC": "2019-09-22T23:09:32", "isActive": true }, { "leaveTypeID": "71b548db-6e40-4b64-be8b-f6a71455d8ab", "name": "Annual Leave - Cash Up", "isPaidLeave": true, "showOnPayslip": true, "updatedDateUTC": "2019-09-22T23:09:32", "isActive": true } ] }' post: security: - OAuth2: [payroll.settings] tags: - PayrollNz operationId: createLeaveType x-hasPayrollUkProblem: true x-example: - leaveType: key: leaveType keyPascal: LeaveType keySnake: leave_type is_object: true - name: key: name keyPascal: Name keySnake: name object: leaveType default: LeaveType - isPaidLeave: key: isPaidLeave keyPascal: IsPaidLeave keySnake: is_paid_leave nonString: true object: leaveType default: true - showOnPayslip: key: showOnPayslip keyPascal: ShowOnPayslip keySnake: show_on_payslip nonString: true object: leaveType default: true is_last: true summary: Creates a new leave type parameters: - $ref: '#/components/parameters/idempotencyKey' responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeaveTypeObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T20:49:59.9135451", "httpStatusCode": "OK", "pagination": null, "problem": null, "leaveType": { "leaveTypeID": "80464f55-b5c9-4d05-84c7-219d98baa3e2", "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true, "updatedDateUTC": "2020-08-27T20:49:59.8315619", "isActive": true } }' '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/LeaveType' example: '{ "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }' /LeaveTypes/{LeaveTypeID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getLeaveType x-hasPayrollUkProblem: true summary: Retrieves a specific leave type by using a unique leave type ID parameters: - in: path name: LeaveTypeID x-snake: leave_type_id required: true description: Identifier for the leave type schema: type: string format: uuid responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeaveTypeObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T20:49:58.7293665", "httpStatusCode": "OK", "pagination": null, "problem": null, "leaveType": { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "name": "Annual Leave", "isPaidLeave": true, "showOnPayslip": true, "updatedDateUTC": "2019-09-22T23:09:32", "isActive": true } }' /Reimbursements: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getReimbursements x-hasPayrollUkProblem: true summary: Retrieves reimbursements 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 responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Reimbursements' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T21:59:44.5592312", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 3 }, "problem": null, "reimbursements": [ { "reimbursementID": "ddf9b572-5861-4f97-a109-9d612df52242", "name": "Mileage", "accountID": "36d33c5d-7dea-4911-9ed0-7fccc16f2b5f", "currentRecord": true, "standardAmount": null, "standardTypeOfUnits": "km", "standardRatePerUnit": 0.79, "reimbursementCategory": "NoGST", "calculationType": "RatePerUnit" } ] }' post: security: - OAuth2: [payroll.settings] tags: - PayrollNz operationId: createReimbursement x-hasPayrollUkProblem: true x-example: - reimbursement: key: reimbursement keyPascal: Reimbursement keySnake: reimbursement is_object: true - name: key: name keyPascal: Name keySnake: name default: Test Reimbursement object: reimbursement - accountID: key: accountID keyPascal: AccountID keySnake: account_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: reimbursement is_last: true - calculationType: key: calculationType keyPascal: CalculationType keySnake: calculation_type nonString: true default: Reimbursement.CalculationTypeEnum.FixedAmount php: XeroAPI\XeroPHP\Models\PayrollNz\Reimbursement\CalculationTypeEnum.FIXEDAMOUNT node: Reimbursement.CalculationTypeEnum.FixedAmount ruby: XeroRuby::PayrollNz::Reimbursement::calculation_type_enum::FIXEDAMOUNT python: calculation_type_enum.FixedAmount java: com.xero.models.payrollnz.Reimbursement.CalculationTypeEnum.FIXEDAMOUNT csharp: Reimbursement.CalculationTypeEnum.FixedAmount object: reimbursement - reimbursementCategory: key: reimbursementCategory keyPascal: ReimbursementCategory keySnake: reimbursement_category nonString: true default: Reimbursement.ReimbursementCategoryEnum.GST php: XeroAPI\XeroPHP\Models\PayrollNz\Reimbursement\ReimbursementCategoryEnum.GST node: Reimbursement.ReimbursementCategoryEnum.GST ruby: XeroRuby::PayrollNz::Reimbursement::reimbursement_category_enum::GST python: reimbursement_category_enum.GST java: com.xero.models.payrollnz.Reimbursement.ReimbursementCategoryEnum.GST csharp: Reimbursement.ReimbursementCategoryEnum.GST object: reimbursement is_last: true summary: Creates a new reimbursement parameters: - $ref: '#/components/parameters/idempotencyKey' responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/ReimbursementObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T23:25:30.5238274", "httpStatusCode": "OK", "pagination": null, "problem": null, "reimbursement": { "reimbursementID": "c7a8e7fd-b4f1-4f7b-9256-1b3edaa72de7", "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "currentRecord": true, "standardAmount": null, "standardTypeOfUnits": null, "standardRatePerUnit": null, "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" } }' '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/Reimbursement' example: '{ "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }' /Reimbursements/{ReimbursementID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getReimbursement x-hasPayrollUkProblem: true summary: Retrieves a specific reimbursement by using a unique reimbursement ID parameters: - in: path name: ReimbursementID x-snake: reimbursement_id required: true description: Identifier for the reimbursement schema: type: string format: uuid responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/ReimbursementObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T21:59:46.5643076", "httpStatusCode": "OK", "pagination": null, "problem": null, "reimbursement": { "reimbursementID": "0d4e5476-1147-4a2c-9db4-ab6a15f81f1d", "name": "GST", "accountID": null, "currentRecord": true, "standardAmount": null, "standardTypeOfUnits": null, "standardRatePerUnit": null, "reimbursementCategory": "GST", "calculationType": null } }' /Timesheets: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.timesheets, payroll.timesheets.read] tags: - PayrollNz operationId: getTimesheets x-hasPayrollUkProblem: 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": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T21:07:39.0921081", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 1 }, "problem": null, "timesheets": [ { "timesheetID": "f2a2aff0-9944-411e-bc58-44f22304188d", "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197", "employeeID": "272a7559-1b8f-4d3a-977b-d05578cb9546", "startDate": "2020-08-01T00:00:00", "endDate": "2020-08-31T00:00:00", "status": "Draft", "totalHours": 17, "updatedDateUTC": "2020-08-28T20:50:40" } ] }' post: security: - OAuth2: [payroll.timesheets] tags: - PayrollNz operationId: createTimesheet x-hasPayrollUkProblem: 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" - employeeID: key: employeeID keyPascal: EmployeeID keySnake: employee_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" - 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": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T21:07:41.7980254", "httpStatusCode": "OK", "pagination": null, "problem": null, "timesheet": { "timesheetID": "d227445a-4188-453a-a196-48163a38188c", "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13T00:00:00", "endDate": "2020-04-19T00:00:00", "status": "Draft", "totalHours": 14, "updatedDateUTC": "2020-08-28T21:07:41.9676218", "timesheetLines": [ { "timesheetLineID": "ebeda184-6f42-4c44-a19c-3c0308578153", "date": "2020-04-15T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "trackingItemID": null, "numberOfUnits": 6 }, { "timesheetLineID": "e8e9d84f-d01d-4ab9-9584-3996c898b89c", "date": "2020-04-13T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "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": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] }' /Timesheets/{TimesheetID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.timesheets, payroll.timesheets.read] tags: - PayrollNz operationId: getTimesheet x-hasPayrollUkProblem: true summary: Retrieves 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": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T21:07:39.0637818", "httpStatusCode": "OK", "pagination": null, "problem": null, "timesheet": { "timesheetID": "f2a2aff0-9944-411e-bc58-44f22304188d", "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197", "employeeID": "272a7559-1b8f-4d3a-977b-d05578cb9546", "startDate": "2020-08-01T00:00:00", "endDate": "2020-08-31T00:00:00", "status": "Draft", "totalHours": 17, "updatedDateUTC": "2020-08-28T20:50:40", "timesheetLines": [ { "timesheetLineID": "3397aab1-6cac-4804-a72b-00f396b04a08", "date": "2020-08-01T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "trackingItemID": null, "numberOfUnits": 7 }, { "timesheetLineID": "11f3608f-c53a-474d-ba17-053849de318b", "date": "2020-08-02T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "trackingItemID": null, "numberOfUnits": 5 }, { "timesheetLineID": "f5b416b7-d431-4d54-baff-9cd6de620c70", "date": "2020-08-03T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "trackingItemID": null, "numberOfUnits": 5 } ] } }' delete: security: - OAuth2: [payroll.timesheets] tags: - PayrollNz operationId: deleteTimesheet summary: Deletes a 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' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T21:07:41.4217222", "httpStatusCode": "OK", "pagination": null, "problem": null }' '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: - PayrollNz operationId: createTimesheetLine x-hasPayrollUkProblem: 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: Create a new timesheet line for a specific time sheet 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": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T21:07:39.5955147", "httpStatusCode": "OK", "pagination": null, "problem": null, "timesheetLine": { "timesheetLineID": "10c3c63e-6cd0-4630-861f-08a2baa657fa", "date": "2020-08-03T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "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-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }' /Timesheets/{TimesheetID}/Approve: parameters: - $ref: '#/components/parameters/requiredHeader' post: security: - OAuth2: [payroll.timesheets] tags: - PayrollNz operationId: approveTimesheet x-hasPayrollUkProblem: true summary: Approves a 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": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T21:07:40.3918669", "httpStatusCode": "OK", "pagination": null, "problem": null, "timesheet": { "timesheetID": "f2a2aff0-9944-411e-bc58-44f22304188d", "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197", "employeeID": "272a7559-1b8f-4d3a-977b-d05578cb9546", "startDate": "2020-08-01T00:00:00", "endDate": "2020-08-31T00:00:00", "status": "Approved", "totalHours": 13, "updatedDateUTC": "2020-08-28T21:07:40.5613405", "timesheetLines": [ { "timesheetLineID": "10c3c63e-6cd0-4630-861f-08a2baa657fa", "date": "2020-08-03T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "trackingItemID": null, "numberOfUnits": 1 }, { "timesheetLineID": "3397aab1-6cac-4804-a72b-00f396b04a08", "date": "2020-08-04T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "trackingItemID": null, "numberOfUnits": 2 }, { "timesheetLineID": "11f3608f-c53a-474d-ba17-053849de318b", "date": "2020-08-02T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "trackingItemID": null, "numberOfUnits": 5 }, { "timesheetLineID": "f5b416b7-d431-4d54-baff-9cd6de620c70", "date": "2020-08-03T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "trackingItemID": null, "numberOfUnits": 5 } ] } }' '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: - PayrollNz operationId: revertTimesheet x-hasPayrollUkProblem: true summary: Reverts a 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": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T21:07:41.3053619", "httpStatusCode": "OK", "pagination": null, "problem": null, "timesheet": { "timesheetID": "f2a2aff0-9944-411e-bc58-44f22304188d", "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197", "employeeID": "272a7559-1b8f-4d3a-977b-d05578cb9546", "startDate": "2020-08-01T00:00:00", "endDate": "2020-08-31T00:00:00", "status": "Draft", "totalHours": 13, "updatedDateUTC": "2020-08-28T21:07:41.2608622", "timesheetLines": [ { "timesheetLineID": "10c3c63e-6cd0-4630-861f-08a2baa657fa", "date": "2020-08-03T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "trackingItemID": null, "numberOfUnits": 1 }, { "timesheetLineID": "3397aab1-6cac-4804-a72b-00f396b04a08", "date": "2020-08-04T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "trackingItemID": null, "numberOfUnits": 2 }, { "timesheetLineID": "11f3608f-c53a-474d-ba17-053849de318b", "date": "2020-08-02T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "trackingItemID": null, "numberOfUnits": 5 }, { "timesheetLineID": "f5b416b7-d431-4d54-baff-9cd6de620c70", "date": "2020-08-03T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "trackingItemID": null, "numberOfUnits": 5 } ] } }' '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: - PayrollNz operationId: updateTimesheetLine x-hasPayrollUkProblem: true summary: Updates a timesheet line for a specific timesheet 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 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": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T21:07:39.9074596", "httpStatusCode": "OK", "pagination": null, "problem": null, "timesheetLine": { "timesheetLineID": "3397aab1-6cac-4804-a72b-00f396b04a08", "date": "2020-08-04T00:00:00", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "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-08-04", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 2 }' delete: security: - OAuth2: [payroll.timesheets] tags: - PayrollNz operationId: deleteTimesheetLine summary: Deletes a timesheet line for a specific timesheet 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' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T22:01:51.861069", "httpStatusCode": "OK", "pagination": null, "problem": null }' '400': description: validation error for a bad request content: application/json: schema: $ref: '#/components/schemas/Problem' /PayRunCalendars: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getPayRunCalendars x-hasPayrollUkProblem: true summary: Retrieves payrun calendars 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 responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunCalendars' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-26T23:54:48.3357097", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 2 }, "problem": null, "payRunCalendars": [ { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "name": "Weekly", "calendarType": "Weekly", "periodStartDate": "2019-07-08T00:00:00", "periodEndDate": "2019-07-14T00:00:00", "paymentDate": "2019-07-16T00:00:00", "updatedDateUTC": "2019-09-24T05:08:45" }, { "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197", "name": "Monthly", "calendarType": "Monthly", "periodStartDate": "2019-08-01T00:00:00", "periodEndDate": "2019-08-31T00:00:00", "paymentDate": "2019-08-23T00:00:00", "updatedDateUTC": "2019-09-24T03:11:16" } ] }' post: security: - OAuth2: [payroll.settings] tags: - PayrollNz operationId: createPayRunCalendar x-hasPayrollUkProblem: 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'" - paymentDateValue: key: paymentDate keyPascal: PaymentDate keySnake: payment_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'" - payRunCalendar: key: payRunCalendar keyPascal: PayRunCalendar keySnake: pay_run_calendar is_object: true - calendarType: key: calendarType keyPascal: CalendarType keySnake: calendar_type nonString: true default: CalendarType.Weekly php: XeroAPI\XeroPHP\Models\PayrollNz\CalendarType.WEEKLY node: CalendarType.Weekly ruby: XeroRuby::PayrollNz::calendar_type::WEEKLY python: calendar_type.WEEKLY java: com.xero.models.payrollnz.CalendarType.WEEKLY csharp: CalendarType.Weekly object: payRunCalendar - periodStartDate: key: periodStartDate keyPascal: PeriodStartDate keySnake: period_start_date is_variable: true nonString: true default: startDate python: start_date ruby: start_date object: payRunCalendar - paymentDate: key: paymentDate keyPascal: PaymentDate keySnake: payment_date is_last: true is_variable: true nonString: true default: paymentDate python: payment_date ruby: payment_date object: payRunCalendar summary: Creates a new payrun calendar parameters: - $ref: '#/components/parameters/idempotencyKey' responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunCalendarObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-26T23:54:49.3159839", "httpStatusCode": "OK", "pagination": null, "problem": null, "payRunCalendar": { "payrollCalendarID": "54e9706a-c4e8-45ff-9c63-6fcac7ee7cde", "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01T00:00:00", "periodEndDate": "2020-05-07T00:00:00", "paymentDate": "2020-05-15T00:00:00", "updatedDateUTC": "2020-08-26T23:54:49.4863322" } }' '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/PayRunCalendar' example: '{ "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }' /PayRunCalendars/{PayrollCalendarID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getPayRunCalendar x-hasPayrollUkProblem: true summary: Retrieves a specific payrun calendar by using a unique payroll calendar ID parameters: - in: path name: PayrollCalendarID x-snake: payroll_calendar_id required: true description: Identifier for the payrun calendars schema: type: string format: uuid responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunCalendarObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-26T23:54:48.4398063", "httpStatusCode": "OK", "pagination": null, "problem": null, "payRunCalendar": { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "name": "Weekly", "calendarType": "Weekly", "periodStartDate": "2019-07-08T00:00:00", "periodEndDate": "2019-07-14T00:00:00", "paymentDate": "2019-07-16T00:00:00", "updatedDateUTC": "2019-09-24T05:08:45" } }' /Employees/{EmployeeID}/SalaryAndWages: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.employees, payroll.employees.read] tags: - PayrollNz operationId: getEmployeeSalaryAndWages x-hasPayrollUkProblem: true summary: Retrieves an employee's salary and wages parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c - 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 responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SalaryAndWages' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T00:25:03.6697493", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 2 }, "problem": null, "salaryAndWages": [ { "salaryAndWagesID": "b0026f5a-fa8e-43aa-95e4-cec3c0972e39", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 0, "ratePerUnit": 25, "numberOfUnitsPerDay": 0, "daysPerWeek": 0, "effectiveFrom": "2019-02-07T00:00:00", "annualSalary": 25, "status": "Active", "paymentType": "Hourly" }, { "salaryAndWagesID": "0211c70c-93d5-4da1-a570-b66d8df2ca15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": null, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01T00:00:00", "annualSalary": 100, "status": "Active", "paymentType": "Salary" } ] }' '400': description: validation error for a bad request content: application/json: schema: $ref: '#/components/schemas/Problem' post: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: createEmployeeSalaryAndWage x-hasPayrollUkProblem: true x-example: - salaryAndWage: key: salaryAndWage keyPascal: SalaryAndWage keySnake: salary_and_wage is_object: true - earningsRateID: key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: salaryAndWage - numberOfUnitsPerDay: key: numberOfUnitsPerDay keyPascal: NumberOfUnitsPerDay keySnake: number_of_units_per_day default: 0 nonString: true object: salaryAndWage - daysPerWeek: key: daysPerWeek keyPascal: DaysPerWeek keySnake: days_per_week default: 0 nonString: true object: salaryAndWage - paymentType: key: paymentType keyPascal: PaymentType keySnake: payment_type nonString: true default: SalaryAndWage.PaymentTypeEnum.Hourly php: XeroAPI\XeroPHP\Models\PayrollNz\SalaryAndWage\PaymentTypeEnum.HOURLY node: SalaryAndWage.PaymentTypeEnum.Hourly ruby: XeroRuby::PayrollNz::SalaryAndWage::payment_type_enum::HOURLY python: payment_type_enum.Hourly java: com.xero.models.payrollnz.SalaryAndWage.PaymentTypeEnum.HOURLY csharp: SalaryAndWage.PaymentTypeEnum.Hourly object: salaryAndWage is_last: true summary: Creates an employee salary and wage record parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SalaryAndWageObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T00:22:47.464262", "httpStatusCode": "OK", "pagination": null, "problem": null, "salaryAndWages": { "salaryAndWagesID": "0211c70c-93d5-4da1-a570-b66d8df2ca15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": null, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01T00:00:00", "annualSalary": 100, "status": "Active", "paymentType": "Salary" } }' '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/SalaryAndWage' example: '{ "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" }' /Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.employees, payroll.employees.read] tags: - PayrollNz operationId: getEmployeeSalaryAndWage x-hasPayrollUkProblem: true summary: Retrieves an employee's salary and wages record by using a unique salary and wage ID parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c - name: SalaryAndWagesID x-snake: salary_and_wages_id in: path required: true description: Id for single pay template earnings object schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SalaryAndWages' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T00:25:03.8641784", "httpStatusCode": "OK", "pagination": null, "problem": null, "salaryAndWages": [ { "salaryAndWagesID": "b0026f5a-fa8e-43aa-95e4-cec3c0972e39", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 0, "ratePerUnit": 25, "numberOfUnitsPerDay": 0, "daysPerWeek": 0, "effectiveFrom": "2019-02-07T00:00:00", "annualSalary": 25, "status": "Active", "paymentType": "Hourly" } ] }' put: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: updateEmployeeSalaryAndWage x-hasPayrollUkProblem: true x-example: - salaryAndWage: key: salaryAndWage keyPascal: SalaryAndWage keySnake: salary_and_wage is_object: true - earningsRateID: key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: salaryAndWage - numberOfUnitsPerDay: key: numberOfUnitsPerDay keyPascal: NumberOfUnitsPerDay keySnake: number_of_units_per_day default: 0 nonString: true object: salaryAndWage - daysPerWeek: key: daysPerWeek keyPascal: DaysPerWeek keySnake: days_per_week default: 0 nonString: true object: salaryAndWage - paymentType: key: paymentType keyPascal: PaymentType keySnake: payment_type nonString: true default: SalaryAndWage.PaymentTypeEnum.Hourly php: XeroAPI\XeroPHP\Models\PayrollNz\SalaryAndWage\PaymentTypeEnum.HOURLY node: SalaryAndWage.PaymentTypeEnum.Hourly ruby: XeroRuby::PayrollNz::SalaryAndWage::payment_type_enum::HOURLY python: payment_type_enum.Hourly java: com.xero.models.payrollnz.SalaryAndWage.PaymentTypeEnum.HOURLY csharp: SalaryAndWage.PaymentTypeEnum.Hourly object: salaryAndWage is_last: true summary: Updates an employee's salary and wages record parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c - name: SalaryAndWagesID x-snake: salary_and_wages_id in: path required: true description: Id for single pay template earnings object schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SalaryAndWageObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T00:25:11.4976642", "httpStatusCode": "OK", "pagination": null, "problem": null, "salaryAndWages": { "salaryAndWagesID": "1912d614-99d0-43e6-8d63-5b539dcfe358", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 3, "ratePerUnit": null, "numberOfUnitsPerDay": 3, "daysPerWeek": 1, "effectiveFrom": "2020-05-15T00:00:00", "annualSalary": 101, "status": "Active", "paymentType": "Salary" } }' '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/SalaryAndWage' example: '{ "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 3, "ratePerUnit": 11, "numberOfUnitsPerDay": 3, "daysPerWeek": 1, "effectiveFrom": "2020-05-15", "annualSalary": 101, "status": "Active", "paymentType": "Salary" }' delete: security: - OAuth2: [payroll.employees] tags: - PayrollNz operationId: deleteEmployeeSalaryAndWage summary: Deletes an employee's salary and wages record parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c - name: SalaryAndWagesID x-snake: salary_and_wages_id in: path required: true description: Id for single salary and wages object schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: '200': description: deletion successful content: application/json: schema: $ref: '#/components/schemas/SalaryAndWageObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-27T00:25:11.5391097", "httpStatusCode": "OK", "pagination": null, "problem": null }' /PayRuns: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.payruns, payroll.payruns.read] tags: - PayrollNz operationId: getPayRuns x-hasPayrollUkProblem: true summary: Retrieves pay runs 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 - in: query name: status description: By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. schema: type: string enum: - Draft - Posted responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRuns' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T23:01:56.762619", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 1 }, "problem": null, "payRuns": [ { "payRunID": "8ba9831d-38e4-43d4-808e-472a5d195bce", "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2019-06-10T00:00:00", "periodEndDate": "2019-06-16T00:00:00", "paymentDate": "2019-06-18T00:00:00", "totalCost": 6735.81, "totalPay": 4524.81, "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly", "postedDateTime": null, "payslipMessage": null } ] }' post: security: - OAuth2: [payroll.payruns] tags: - PayrollNz operationId: createPayRun x-hasPayrollUkProblem: true x-example: - payRun: key: payRun keyPascal: PayRun keySnake: pay_run is_object: true - payRunType: key: payRunType keyPascal: PayRunType keySnake: pay_run_type nonString: true default: PayRun.PayRunTypeEnum.Scheduled php: XeroAPI\XeroPHP\Models\PayrollNz\PayRun\PayRunTypeEnum.SCHEDULED node: PayRun.PayRunTypeEnum.Scheduled ruby: XeroRuby::PayrollNz::PayRun::pay_run_type_enum::SCHEDULED python: pay_run_type_enum.Scheduled java: com.xero.models.payrollnz.PayRun.PayRunTypeEnum.SCHEDULED csharp: PayRun.PayRunTypeEnum.Scheduled object: payRun - payrollCalendarId: key: payrollCalendarID keyPascal: PayrollCalendarID keySnake: payroll_calendar_id is_uuid: true object: payRun default: "00000000-0000-0000-0000-000000000000" is_last: true summary: Creates a pay run parameters: - $ref: '#/components/parameters/idempotencyKey' responses: '200': description: created payrun results content: application/json: schema: $ref: '#/components/schemas/PayRunObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-09-10T23:56:16.2964746", "httpStatusCode": "OK", "pagination": null, "problem": null, "payRun": { "payRunID": "591dbf2f-786b-4814-8c61-93bebaee47f9", "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2019-06-17T00:00:00", "periodEndDate": "2019-06-23T00:00:00", "paymentDate": "2019-06-25T00:00:00", "totalCost": 9416.7, "totalPay": 6137.2, "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly", "postedDateTime": null, "paySlips": [ { "paySlipID": "8b3a099c-2309-480a-a6ee-1dc4f4b2668b", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "lastEdited": null, "firstName": "Tony", "lastName": "Starkwpjgdjxdvwson", "totalEarnings": 3628.8, "grossEarnings": 3628.8, "totalPay": 2462.72, "totalEmployerTaxes": 18.9, "totalEmployeeTaxes": 1057.22, "totalDeductions": 0, "totalReimbursements": 0, "totalStatutoryDeductions": 108.86, "totalSuperannuation": 108.86, "bacsHash": null, "paymentMethod": "Electronically" }, { "paySlipID": "87ab8047-7066-4609-906a-5b6ee1dc1886", "employeeID": "1c4f0c92-03ad-43f2-a690-ee51397ece6a", "lastEdited": null, "firstName": "GST", "lastName": "Contractor", "totalEarnings": 480, "grossEarnings": 480, "totalPay": 456, "totalEmployerTaxes": 0, "totalEmployeeTaxes": 96, "totalDeductions": 0, "totalReimbursements": 72, "totalStatutoryDeductions": 0, "totalSuperannuation": 0, "bacsHash": null, "paymentMethod": "Electronically" } ], "payslipMessage": null, "invalidPayeeIDs": null } }' '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/PayRun' example: '{ "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" }' /PayRuns/{PayRunID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.payruns, payroll.payruns.read] tags: - PayrollNz operationId: getPayRun x-hasPayrollUkProblem: true summary: Retrieves a specific pay run by using a unique pay run ID parameters: - in: path name: PayRunID x-snake: pay_run_id required: true description: Identifier for the pay run schema: type: string format: uuid responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T23:01:57.3773969", "httpStatusCode": "OK", "pagination": null, "problem": null, "payRun": { "payRunID": "8ba9831d-38e4-43d4-808e-472a5d195bce", "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2019-06-10T00:00:00", "periodEndDate": "2019-06-16T00:00:00", "paymentDate": "2019-06-18T00:00:00", "totalCost": 6735.81, "totalPay": 4524.81, "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly", "postedDateTime": null, "paySlips": [ { "paySlipID": "51a01760-cf9d-4ba1-bf3a-2065d4f8e073", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "lastEdited": "2020-08-28T21:58:08", "firstName": "Tony", "lastName": "Starkmzamlagmdison", "totalEarnings": 648, "grossEarnings": 648, "totalPay": 525, "totalEmployerTaxes": 3.32, "totalEmployeeTaxes": 103.56, "totalDeductions": 0, "totalReimbursements": 0, "totalStatutoryDeductions": 19.44, "totalSuperannuation": 19.44, "bacsHash": null, "paymentMethod": "Electronically" } ], "payslipMessage": null, "invalidPayeeIDs": null } }' put: security: - OAuth2: [payroll.payruns] tags: - PayrollNz operationId: updatePayRun x-hasPayrollUkProblem: 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'" - paymentDateValue: key: paymentDate keyPascal: PaymentDate keySnake: payment_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'" - payRunCalendar: key: payRunCalendar keyPascal: PayRunCalendar keySnake: pay_run_calendar is_object: true - calendarType: key: calendarType keyPascal: CalendarType keySnake: calendar_type nonString: true default: CalendarType.Weekly php: XeroAPI\XeroPHP\Models\PayrollNz\CalendarType.WEEKLY node: CalendarType.Weekly ruby: XeroRuby::PayrollNz::calendar_type::WEEKLY python: calendar_type.WEEKLY java: com.xero.models.payrollnz.CalendarType.WEEKLY csharp: CalendarType.Weekly object: payRunCalendar - periodStartDate: key: periodStartDate keyPascal: PeriodStartDate keySnake: period_start_date is_variable: true nonString: true default: startDate python: start_date ruby: start_date object: payRunCalendar - paymentDate: key: paymentDate keyPascal: PaymentDate keySnake: payment_date is_last: true is_variable: true nonString: true default: paymentDate python: payment_date ruby: payment_date object: payRunCalendar summary: Updates a pay run parameters: - $ref: '#/components/parameters/idempotencyKey' - in: path name: PayRunID x-snake: pay_run_id required: true description: Identifier for the pay run schema: type: string format: uuid responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-09-10T17:38:14.8294283", "httpStatusCode": "OK", "pagination": null, "problem": null, "payRun": { "payRunID": "8ba9831d-38e4-43d4-808e-472a5d195bce", "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2019-06-10T00:00:00", "periodEndDate": "2019-06-16T00:00:00", "paymentDate": "2019-07-01T00:00:00", "totalCost": 9806.03, "totalPay": 6362.53, "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly", "postedDateTime": null, "paySlips": [ { "paySlipID": "51a01760-cf9d-4ba1-bf3a-2065d4f8e073", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "lastEdited": "2020-09-10T17:20:23", "firstName": "Tony", "lastName": "Starkwpjgdjxdvwson", "totalEarnings": 3628.8, "grossEarnings": 3628.8, "totalPay": 2362.72, "totalEmployerTaxes": 18.9, "totalEmployeeTaxes": 1057.22, "totalDeductions": 100, "totalReimbursements": 0, "totalStatutoryDeductions": 108.86, "totalSuperannuation": 108.86, "bacsHash": null, "paymentMethod": "Electronically" }, { "paySlipID": "499bb866-40fd-44ea-a2d9-91e79e5ac08e", "employeeID": "1c4f0c92-03ad-43f2-a690-ee51397ece6a", "lastEdited": "2019-09-24T03:14:29", "firstName": "GST", "lastName": "Contractor", "totalEarnings": 800, "grossEarnings": 800, "totalPay": 760, "totalEmployerTaxes": 0, "totalEmployeeTaxes": 160, "totalDeductions": 0, "totalReimbursements": 120, "totalStatutoryDeductions": 0, "totalSuperannuation": 0, "bacsHash": null, "paymentMethod": "Electronically" }, { "paySlipID": "f98b6411-7755-41f7-8d89-a3475eadf866", "employeeID": "2e63a4ff-e911-44fc-8290-a65ec7299b30", "lastEdited": "2019-09-24T03:14:06", "firstName": "Dairy", "lastName": "Milker", "totalEarnings": 1353.85, "grossEarnings": 1353.85, "totalPay": 726.83, "totalEmployerTaxes": 22.11, "totalEmployeeTaxes": 290.97, "totalDeductions": 200, "totalReimbursements": 21.33, "totalStatutoryDeductions": 157.38, "totalSuperannuation": 67.69, "bacsHash": null, "paymentMethod": "Electronically" }, { "paySlipID": "0923bc21-900e-4660-b37c-127c59bd4b12", "employeeID": "9126967a-99a1-4b46-a0f3-43e28737756e", "lastEdited": "2019-09-24T03:14:15", "firstName": "General", "lastName": "Manager", "totalEarnings": 1730.77, "grossEarnings": 1730.77, "totalPay": 1151.71, "totalEmployerTaxes": 22.77, "totalEmployeeTaxes": 410.6, "totalDeductions": 30, "totalReimbursements": 0, "totalStatutoryDeductions": 138.46, "totalSuperannuation": 69.23, "bacsHash": null, "paymentMethod": "Electronically" }, { "paySlipID": "df88d132-3cd6-43f3-8c4a-28ca53406138", "employeeID": "ae679eeb-8708-4e3b-afe9-2de117a7f68f", "lastEdited": "2019-09-24T03:18:06", "firstName": "Part-time", "lastName": "Worker", "totalEarnings": 450, "grossEarnings": 450, "totalPay": 339.45, "totalEmployerTaxes": 2.27, "totalEmployeeTaxes": 66.15, "totalDeductions": 0, "totalReimbursements": 0, "totalStatutoryDeductions": 44.4, "totalSuperannuation": 13.5, "bacsHash": null, "paymentMethod": "Electronically" }, { "paySlipID": "ae8d94e8-c30f-4b19-88df-a68c1bda2b90", "employeeID": "45e50e4b-7979-4d3b-b943-8c4f0cb9df3d", "lastEdited": "2019-09-24T03:18:25", "firstName": "Permanent", "lastName": "Worker", "totalEarnings": 1400, "grossEarnings": 1400, "totalPay": 1021.82, "totalEmployerTaxes": 13.86, "totalEmployeeTaxes": 300.18, "totalDeductions": 22, "totalReimbursements": 0, "totalStatutoryDeductions": 56, "totalSuperannuation": 42, "bacsHash": null, "paymentMethod": "Electronically" } ], "payslipMessage": null, "invalidPayeeIDs": null } }' '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/PayRun' example: '{ "paymentDate": "2019-07-01" }' /PaySlips: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.payslip, payroll.payslip.read] tags: - PayrollNz operationId: getPaySlips x-hasPayrollUkProblem: true summary: Retrieves payslips 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 - in: query required: true name: PayRunID x-snake: pay_run_id description: PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. schema: type: string format: uuid responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PaySlips' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T22:55:58.6809685", "httpStatusCode": "OK", "pagination": { "page": 1, "pageSize": 100, "pageCount": 1, "itemCount": 6 }, "problem": null, "paySlips": [ { "paySlipID": "17d88883-686a-400f-9551-34fa366effc4", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "payRunID": "be103bd8-321b-419f-8177-48280560771a", "lastEdited": "2019-09-23T02:13:29", "firstName": "Tony", "lastName": "Starkmzamlagmdison", "totalEarnings": 162, "grossEarnings": 162, "totalPay": 137.88, "totalEmployerTaxes": 0.7, "totalEmployeeTaxes": 19.26, "totalDeductions": 0, "totalReimbursements": 0, "totalStatutoryDeductions": 4.86, "totalSuperannuation": 4.86, "bacsHash": null, "paymentMethod": "Electronically", "earningsLines": [ { "earningsLineID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "displayName": "Ordinary Time", "ratePerUnit": 25, "numberOfUnits": 6, "fixedAmount": null, "amount": 150, "isLinkedToTimesheet": false, "isAverageDailyPayRate": null, "isSystemGenerated": true } ], "leaveEarningsLines": [ { "earningsLineID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", "earningsRateID": "39b3560a-5d2f-4538-924a-4349dc86396e", "displayName": "Holiday Pay", "ratePerUnit": null, "numberOfUnits": null, "fixedAmount": 12, "amount": 12, "isLinkedToTimesheet": false, "isAverageDailyPayRate": null, "isSystemGenerated": true } ], "timesheetEarningsLines": [], "deductionLines": [], "reimbursementLines": [], "leaveAccrualLines": [ { "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", "numberOfUnits": 12 }, { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "numberOfUnits": 0 }, { "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719", "numberOfUnits": 0 }, { "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3", "numberOfUnits": 0 } ], "superannuationLines": [ { "superannuationTypeID": "563273ea-0dae-4f82-86a4-e0db77c008ea", "displayName": "KiwiSaver", "amount": 4.86, "fixedAmount": null, "percentage": 3, "manualAdjustment": false } ], "paymentLines": [ { "paymentLineID": "a300f7c3-e934-4e67-84c5-d8687cf4a2b4", "amount": 137.88, "accountNumber": "0607050201419000", "sortCode": null, "accountName": "Casual Worker" } ], "employeeTaxLines": [ { "taxLineID": "1d7c6670-c227-4de9-a7fc-fbf7ec16a804", "description": null, "amount": 19.26, "globalTaxTypeID": 11, "manualAdjustment": false } ], "employerTaxLines": [ { "taxLineID": "b790f489-9bbf-4979-a987-53dddf8b648f", "description": null, "amount": 0.7, "globalTaxTypeID": 10, "manualAdjustment": false } ], "statutoryDeductionLines": [ { "statutoryDeductionTypeID": "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3", "amount": 4.86, "fixedAmount": null, "manualAdjustment": null } ], "taxSettings": { "periodUnits": 1.0, "periodType": "weeks", "taxCode": "M", "specialTaxRate": null, "lumpSumTaxCode": "SB", "lumpSumAmount": null }, "grossEarningsHistory": { "daysPaid": 1, "unpaidWeeks": 0 } } ] }' /PaySlips/{PaySlipID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.payslip, payroll.payslip.read] tags: - PayrollNz operationId: getPaySlip x-hasPayrollUkProblem: true summary: Retrieves a specific payslip by a unique pay slip ID parameters: - in: path name: PaySlipID x-snake: pay_slip_id required: true description: Identifier for the payslip schema: type: string format: uuid responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PaySlipObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T22:55:59.3854985", "httpStatusCode": "OK", "pagination": null, "problem": null, "paySlip": { "paySlipID": "17d88883-686a-400f-9551-34fa366effc4", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "payRunID": "be103bd8-321b-419f-8177-48280560771a", "lastEdited": "2019-09-23T02:13:29", "firstName": "Tony", "lastName": "Starkmzamlagmdison", "totalEarnings": 162, "grossEarnings": 162, "totalPay": 137.88, "totalEmployerTaxes": 0.7, "totalEmployeeTaxes": 19.26, "totalDeductions": 0, "totalReimbursements": 0, "totalStatutoryDeductions": 4.86, "totalSuperannuation": 4.86, "bacsHash": null, "paymentMethod": "Electronically", "earningsLines": [ { "earningsLineID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "displayName": "Ordinary Time", "ratePerUnit": 25, "numberOfUnits": 6, "fixedAmount": null, "amount": 150, "isLinkedToTimesheet": false, "isAverageDailyPayRate": null, "isSystemGenerated": true } ], "leaveEarningsLines": [ { "earningsLineID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", "earningsRateID": "39b3560a-5d2f-4538-924a-4349dc86396e", "displayName": "Holiday Pay", "ratePerUnit": null, "numberOfUnits": null, "fixedAmount": 12, "amount": 12, "isLinkedToTimesheet": false, "isAverageDailyPayRate": null, "isSystemGenerated": true } ], "timesheetEarningsLines": [], "deductionLines": [], "reimbursementLines": [], "leaveAccrualLines": [ { "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", "numberOfUnits": 12 }, { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "numberOfUnits": 0 }, { "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719", "numberOfUnits": 0 }, { "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3", "numberOfUnits": 0 } ], "superannuationLines": [ { "superannuationTypeID": "563273ea-0dae-4f82-86a4-e0db77c008ea", "displayName": "KiwiSaver", "amount": 4.86, "fixedAmount": null, "percentage": 3, "manualAdjustment": false } ], "paymentLines": [ { "paymentLineID": "a300f7c3-e934-4e67-84c5-d8687cf4a2b4", "amount": 137.88, "accountNumber": "0607050201419000", "sortCode": null, "accountName": "Casual Worker" } ], "employeeTaxLines": [ { "taxLineID": "1d7c6670-c227-4de9-a7fc-fbf7ec16a804", "description": null, "amount": 19.26, "globalTaxTypeID": 11, "manualAdjustment": false } ], "employerTaxLines": [ { "taxLineID": "b790f489-9bbf-4979-a987-53dddf8b648f", "description": null, "amount": 0.7, "globalTaxTypeID": 10, "manualAdjustment": false } ], "statutoryDeductionLines": [ { "statutoryDeductionTypeID": "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3", "amount": 4.86, "fixedAmount": null, "manualAdjustment": null } ], "taxSettings": { "periodUnits": 1.0, "periodType": "weeks", "taxCode": "M", "specialTaxRate": null, "lumpSumTaxCode": "SB", "lumpSumAmount": null }, "grossEarningsHistory": { "daysPaid": 1, "unpaidWeeks": 0 } } }' put: security: - OAuth2: [payroll.payslip] tags: - PayrollNz operationId: updatePaySlipLineItems x-hasPayrollUkProblem: true x-example: - earningsLine: key: earningsLine keyPascal: EarningsLine keySnake: earnings_line is_object: true - earningsLineID: key: earningsLineID keyPascal: EarningsLineID keySnake: earnings_line_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: earningsLine - earningsRateID: key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true default: "00000000-0000-0000-0000-000000000000" object: earningsLine - ratePerUnit: key: ratePerUnit keyPascal: RatePerUnit keySnake: rate_per_unit nonString: true default: 14.25 is_money: true object: earningsLine - numberOfUnits: key: numberOfUnits keyPascal: NumberOfUnits keySnake: number_of_units default: 35.50 nonString: true is_money: true object: earningsLine - isAverageDailyPayRate: key: isAverageDailyPayRate keyPascal: IsAverageDailyPayRate keySnake: is_average_daily_pay_rate nonString: true default: true object: earningsLine - isSystemGenerated: key: isSystemGenerated keyPascal: IsSystemGenerated keySnake: is_system_generated default: true nonString: true is_last: true object: earningsLine - earningsLines: is_list: true key: earningsLines keyPascal: EarningsLines keySnake: earnings_lines csharp: EarningsLine java: EarningsLine - addEarningsLine: is_last: true is_list_add: true key: earningsLines keyPascal: EarningsLines keySnake: earnings_lines java: EarningsLines python: earnings_line ruby: earnings_line csharp: EarningsLine object: earningsLine - paySlip: key: paySlip keyPascal: PaySlip keySnake: pay_slip is_object: true - setEarningsLines: is_last: true is_variable: true nonString: true key: earningsLines keyPascal: EarningsLines default: earningsLines python: earnings_lines ruby: earnings_lines object: paySlip summary: Creates an employee pay slip parameters: - $ref: '#/components/parameters/idempotencyKey' - in: path name: PaySlipID x-snake: pay_slip_id required: true description: Identifier for the payslip schema: type: string format: uuid responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PaySlipObject' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-09-10T17:20:24.2970169", "httpStatusCode": "OK", "pagination": null, "problem": null, "paySlip": { "paySlipID": "51a01760-cf9d-4ba1-bf3a-2065d4f8e073", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "payRunID": "8ba9831d-38e4-43d4-808e-472a5d195bce", "lastEdited": "2020-09-10T17:20:23.7335017", "firstName": "Tony", "lastName": "Starkwpjgdjxdvwson", "totalEarnings": 3628.8, "grossEarnings": 3628.8, "totalPay": 2362.72, "totalEmployerTaxes": 18.9, "totalEmployeeTaxes": 1057.22, "totalDeductions": 100, "totalReimbursements": 0, "totalStatutoryDeductions": 108.86, "totalSuperannuation": 108.86, "bacsHash": null, "paymentMethod": "Electronically", "earningsLines": [ { "earningsLineID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "displayName": "Ordinary Time", "ratePerUnit": 25, "numberOfUnits": 0, "fixedAmount": null, "amount": 0, "isLinkedToTimesheet": false, "isAverageDailyPayRate": null, "isSystemGenerated": true }, { "earningsLineID": "65b83d94-f20f-45e1-85ae-387fcf460c26", "earningsRateID": "65b83d94-f20f-45e1-85ae-387fcf460c26", "displayName": "Salary", "ratePerUnit": 0, "numberOfUnits": 8, "fixedAmount": null, "amount": 0, "isLinkedToTimesheet": false, "isAverageDailyPayRate": null, "isSystemGenerated": false } ], "leaveEarningsLines": [ { "earningsLineID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", "earningsRateID": "39b3560a-5d2f-4538-924a-4349dc86396e", "displayName": "Holiday Pay", "ratePerUnit": null, "numberOfUnits": null, "fixedAmount": 268.8, "amount": 268.8, "isLinkedToTimesheet": false, "isAverageDailyPayRate": null, "isSystemGenerated": true } ], "timesheetEarningsLines": [], "deductionLines": [ { "deductionTypeID": "a3760fe4-68a4-4e38-8326-fe616af7dc74", "displayName": "KiwiSaver Voluntary Contributions", "amount": 100, "subjectToTax": null, "percentage": null } ], "reimbursementLines": [], "leaveAccrualLines": [ { "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", "numberOfUnits": 268.8 }, { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "numberOfUnits": 0 }, { "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719", "numberOfUnits": 0 }, { "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3", "numberOfUnits": 0 } ], "superannuationLines": [ { "superannuationTypeID": "563273ea-0dae-4f82-86a4-e0db77c008ea", "displayName": "KiwiSaver", "amount": 108.86, "fixedAmount": 3, "percentage": 3, "manualAdjustment": false } ], "paymentLines": [ { "paymentLineID": "6dc42925-2a11-4041-ac9a-4098e77791d5", "amount": 2262.72, "accountNumber": "0607050201419000", "sortCode": null, "accountName": "Casual Worker" }, { "paymentLineID": "30d6d414-426b-417d-8d0d-d05ca0e5bc88", "amount": 100, "accountNumber": "1234448494848373", "sortCode": null, "accountName": "test" } ], "employeeTaxLines": [ { "taxLineID": "2faf8f5d-6446-4bea-a2cd-d5cd7e8b9384", "description": null, "amount": 1057.22, "globalTaxTypeID": 11, "manualAdjustment": false } ], "employerTaxLines": [ { "taxLineID": "caa8d4fa-0949-460d-90f5-f43ec9f3db12", "description": null, "amount": 18.9, "globalTaxTypeID": 10, "manualAdjustment": false } ], "statutoryDeductionLines": [ { "statutoryDeductionTypeID": "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3", "amount": 108.86, "fixedAmount": null, "manualAdjustment": null } ], "taxSettings": { "periodUnits": 1.0, "periodType": "weeks", "taxCode": "M", "specialTaxRate": null, "lumpSumTaxCode": "SB", "lumpSumAmount": null }, "grossEarningsHistory": { "daysPaid": 3, "unpaidWeeks": 0 } } }' '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/PaySlip' example: '{ "earningsLines": [ { "earningsLineID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "displayName": "Ordinary Time", "ratePerUnit": 25, "numberOfUnits": 0, "amount": 0, "isLinkedToTimesheet": false, "isSystemGenerated": true }, { "earningsLineID": "65b83d94-f20f-45e1-85ae-387fcf460c26", "earningsRateID": "65b83d94-f20f-45e1-85ae-387fcf460c26", "displayName": "Salary", "ratePerUnit": 0, "numberOfUnits": 8, "amount": 0, "isLinkedToTimesheet": false, "isSystemGenerated": false } ], "leaveEarningsLines": [ { "earningsLineID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", "earningsRateID": "39b3560a-5d2f-4538-924a-4349dc86396e", "displayName": "Holiday Pay", "fixedAmount": 268.8, "amount": 268.8, "isLinkedToTimesheet": false, "isSystemGenerated": true } ], "deductionLines": [ { "deductionTypeID": "a3760fe4-68a4-4e38-8326-fe616af7dc74", "amount": 100 } ], "leaveAccrualLines": [ { "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", "numberOfUnits": 268.8 }, { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "numberOfUnits": 0 }, { "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719", "numberOfUnits": 0 }, { "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3", "numberOfUnits": 0 } ], "superannuationLines": [ { "superannuationTypeID": "563273ea-0dae-4f82-86a4-e0db77c008ea", "displayName": "KiwiSaver", "amount": 108.86, "fixedAmount": 3, "percentage": 3, "manualAdjustment": false } ], "employeeTaxLines": [ { "taxLineID": "1084146b-e890-489c-aed3-06de80f63d84", "amount": 1057.22, "globalTaxTypeID": "11", "manualAdjustment": false } ], "employerTaxLines": [ { "taxLineID": "6f9eb8cd-0f4a-440b-939c-bdb0f6ad694c", "amount": 18.9, "globalTaxTypeID": "10", "manualAdjustment": false } ], "statutoryDeductionLines": [ { "statutoryDeductionTypeID": "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3", "amount": 108.86 } ], "grossEarningsHistory": { "daysPaid": 3, "unpaidWeeks": 0 } }' /Settings: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getSettings x-hasPayrollUkProblem: true summary: Retrieves settings responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Settings' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T22:18:40.4518638", "httpStatusCode": "OK", "pagination": null, "problem": null, "settings": { "accounts": [ { "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "type": "PAYELIABILITY", "code": "825", "name": "PAYE Payable" }, { "accountID": "e529775e-ea49-4a19-86f0-8d3e1ecda2cd", "type": "WAGESPAYABLE", "code": "814", "name": "Wages Payable - Payroll" }, { "accountID": "1c91e520-a12b-45cc-8194-99950858e5bf", "type": "WAGESEXPENSE", "code": "477", "name": "Salaries" }, { "accountID": "ac993f75-035b-433c-82e0-7b7a2d40802c", "type": "BANK", "code": "090", "name": "Business Bank Account" } ] } }' /Settings/TrackingCategories: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - OAuth2: [payroll.settings, payroll.settings.read] tags: - PayrollNz operationId: getTrackingCategories x-hasPayrollUkProblem: true summary: Retrieves tracking categories responses: '200': description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TrackingCategories' example: '{ "id": "00000000-0000-0000-0000-000000000000", "providerName": "provider-name", "dateTimeUTC": "2020-08-28T22:18:50.0075482", "httpStatusCode": "OK", "pagination": null, "problem": null, "trackingCategories": { "employeeGroupsTrackingCategoryID": "351953c4-8127-4009-88c3-f9cd8c9cbe9f", "timesheetTrackingCategoryID": "f8c0b291-be04-497a-a083-dd9cd19658b5" } }' 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.employees: Grant read-write access to payroll employees payroll.employees.read: Grant read-only access to payroll employees payroll.payruns: Grant read-write access to payroll payruns payroll.payruns.read: Grant read-only access to payroll payruns payroll.payslip: Grant read-write access to payroll payslips payroll.payslip.read: Grant read-only access to payroll payslips payroll.settings: Grant read-write access to payroll settings payroll.settings.read: Grant read-only access to payroll settings 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. Employees: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' employees: type: array items: $ref: '#/components/schemas/Employee' EmployeeObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' employee: $ref: '#/components/schemas/Employee' problem: $ref: '#/components/schemas/Problem' Employee: type: object required: - FirstName - LastName - DateOfBirth - Address properties: employeeID: description: Xero unique identifier for the employee type: string format: uuid example: d90457c4-f1be-4f2e-b4e3-f766390a7e30 title: description: Title of the employee type: string example: Mrs firstName: description: First name of employee type: string example: Karen lastName: description: Last name of employee type: string example: Jones dateOfBirth: description: Date of birth of the employee (YYYY-MM-DD) type: string format: date example: 2019-01-02 x-is-date: true address: $ref: '#/components/schemas/Address' email: description: The email address for the employee type: string example: developer@me.com gender: description: The employee’s gender type: string enum: - M - F example: F phoneNumber: description: Employee phone number type: string example: 415-555-1212 startDate: description: Employment start date of the employee at the time it was requested type: string format: date example: 2020-01-19 x-is-date: true endDate: description: Employment end date of the employee at the time it was requested type: string format: date example: 2020-01-19 x-is-date: true payrollCalendarID: description: Xero unique identifier for the payroll calendar of the employee type: string format: uuid updatedDateUTC: description: UTC timestamp of last update to the employee type: string format: date-time x-is-datetime: true createdDateUTC: description: UTC timestamp when the employee was created in Xero type: string format: date-time x-is-datetime: true jobTitle: description: Employee's job title type: string example: General Manager EmploymentObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' employment: $ref: '#/components/schemas/Employment' Employment: type: object required: - PayrollCalendarID - StartDate properties: payrollCalendarID: description: Xero unique identifier for the payroll calendar of the employee type: string format: uuid payRunCalendarID: description: Xero unique identifier for the payrun calendar for the employee (Deprecated in version 1.1.6) type: string format: uuid startDate: description: Start date of the employment (YYYY-MM-DD) type: string format: date x-is-date: true EmployeeTaxObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' employeeTax: $ref: '#/components/schemas/EmployeeTax' EmployeeTax: type: object properties: irdNumber: description: The IRD Number. type: string example: 111111111 taxCode: $ref: '#/components/schemas/TaxCode' specialTaxRatePercentage: description: Special tax rate percentage. type: number format: double x-is-money: true example: 17.5 hasSpecialStudentLoanRate: description: Does the employee has a special student loan rate? type: boolean example: true specialStudentLoanRatePercentage: description: The employee student loan rate percentage. type: number format: double x-is-money: true example: 2.0 isEligibleForKiwiSaver: description: The employee eligibility for KiwiSaver. type: boolean example: true esctRatePercentage: description: Employer superannuation contribution tax rate. type: number format: double x-is-money: true example: 1.0 kiwiSaverContributions: description: Contribution Option which can be 'MakeContributions' 'OptOut', 'OnAContributionsHoliday', 'OnASavingsSuspension', 'NotCurrentlyAKiwiSaverMember' for employees without a KiwiSaver membership type: string example: MakeContributions enum: - MakeContributions - OptOut - OnAContributionsHoliday - OnASavingsSuspension - NotCurrentlyAKiwiSaverMember kiwiSaverEmployeeContributionRatePercentage: description: Employee Contribution percentage. type: number format: double x-is-money: true example: 4.0 kiwiSaverEmployerContributionRatePercentage: description: Employer Contribution percentage. type: number format: double x-is-money: true example: 10.0 kiwiSaverEmployerSalarySacrificeContributionRatePercentage: description: Employer Contribution through Salary Sacrifice percentage. type: number format: double x-is-money: true example: 2.0 kiwiSaverOptOutDate: description: Opt Out Date. type: string format: date x-is-date: true example: "2020-06-01T00:00:00" kiwiSaverContributionHolidayEndDate: description: Contribution holiday expiry date or end date. type: string format: date x-is-date: true example: "2019-06-01T00:00:00" hasStudentLoanBalance: description: Does the employee have a remaining student loan balance? Set a remaining balance if you have received a letter from IR. type: boolean example: false studentLoanBalance: description: The employee's student loan balance shown on the letter from IR. type: number format: double x-is-money: true example: 30.0000 studentLoanAsAt: description: The date of the letter from IR. type: string format: date x-is-date: true example: "2020-07-01T00:00:00" TaxCode: description: Tax codes used for employee tax type: string enum: - ND - M - ME - MSL - MESL - SB - S - SH - ST - SBSL - SSL - SHSL - STSL - WT - CAE - EDW - NSW - STC - STCSL EmployeeOpeningBalancesObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' openingBalances: type: array items: $ref: '#/components/schemas/EmployeeOpeningBalance' EmployeeOpeningBalances: type: array items: $ref: '#/components/schemas/EmployeeOpeningBalance' EmployeeOpeningBalance: type: object properties: periodEndDate: description: The opening balance period end date. type: string format: date x-is-date: true example: "2020-07-01T00:00:00" daysPaid: description: The paid number of days. type: integer format: int32 unpaidWeeks: description: The number of unpaid weeks. type: integer format: int32 grossEarnings: description: The gross earnings during the period. type: number format: double x-is-money: true EmployeeLeaves: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' leave: type: array items: $ref: '#/components/schemas/EmployeeLeave' EmployeeLeaveObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' leave: $ref: '#/components/schemas/EmployeeLeave' EmployeeLeave: type: object required: - leaveTypeID - description - startDate - endDate properties: leaveID: description: The Xero identifier for LeaveType type: string format: uuid leaveTypeID: description: The Xero identifier for LeaveType type: string format: uuid description: description: The description of the leave (max length = 50) type: string startDate: description: Start date of the leave (YYYY-MM-DD) type: string format: date x-is-date: true endDate: description: End date of the leave (YYYY-MM-DD) type: string format: date x-is-date: true periods: description: The leave period information. The StartDate, EndDate and NumberOfUnits needs to be specified when you do not want to calculate NumberOfUnits automatically. Using incorrect period StartDate and EndDate will result in automatic computation of the NumberOfUnits. type: array items: $ref: '#/components/schemas/LeavePeriod' updatedDateUTC: description: UTC timestamp of last update to the leave type note type: string format: date-time x-is-datetime: true LeavePeriods: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' periods: type: array items: $ref: '#/components/schemas/LeavePeriod' LeavePeriod: type: object properties: periodStartDate: description: The Pay Period Start Date (YYYY-MM-DD) type: string format: date x-is-date: true periodEndDate: description: The Pay Period End Date (YYYY-MM-DD) type: string format: date x-is-date: true numberOfUnits: description: The Number of Units for the leave type: number format: double x-is-money: true periodStatus: description: Period Status type: string enum: - Approved - Completed EmployeeLeaveBalances: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' leaveBalances: type: array items: $ref: '#/components/schemas/EmployeeLeaveBalance' EmployeeLeaveBalance: type: object properties: name: description: Name of the leave type. type: string example: Holiday leaveTypeID: description: The Xero identifier for leave type type: string format: uuid balance: description: The employees current balance for the corresponding leave type. type: number format: double x-is-money: true typeOfUnits: description: The type of the units of the leave. type: string example: hours EmployeeStatutoryLeaveBalanceObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' leaveBalance: $ref: '#/components/schemas/EmployeeStatutoryLeaveBalance' EmployeeStatutoryLeaveBalance: type: object properties: leaveType: description: The type of statutory leave type: string enum: - Sick - Adoption - Maternity - Paternity - Sharedparental balanceRemaining: description: The balance remaining for the corresponding leave type as of specified date. type: number format: double x-is-money: true units: description: The units will be "Hours" type: string enum: - Hours EmployeeStatutoryLeavesSummaries: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' statutoryLeaves: type: array items: $ref: '#/components/schemas/EmployeeStatutoryLeaveSummary' EmployeeStatutoryLeaveSummary: type: object properties: statutoryLeaveID: description: The unique identifier (guid) of a statutory leave. type: string format: uuid employeeID: description: The unique identifier (guid) of the employee type: string format: uuid type: description: The category of statutory leave type: string enum: - Sick - Adoption - Maternity - Paternity - Sharedparental startDate: description: The date when the leave starts type: string format: date x-is-date: true endDate: description: The date when the leave ends type: string format: date x-is-date: true isEntitled: description: Whether the leave was entitled to receive payment type: boolean status: description: The status of the leave type: string enum: - Pending - In-Progress - Completed EmployeeStatutorySickLeaves: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' statutorySickLeave: type: array items: $ref: '#/components/schemas/EmployeeStatutorySickLeave' EmployeeStatutorySickLeaveObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' statutorySickLeave: $ref: '#/components/schemas/EmployeeStatutorySickLeave' EmployeeStatutorySickLeave: type: object required: - employeeID - startDate - endDate - workPattern - leaveTypeID - isPregnancyRelated - sufficientNotice properties: statutoryLeaveID: description: The unique identifier (guid) of a statutory leave type: string format: uuid employeeID: description: The unique identifier (guid) of the employee type: string format: uuid leaveTypeID: description: The unique identifier (guid) of the "Statutory Sick Leave (non-pensionable)" pay item type: string format: uuid startDate: description: The date when the leave starts type: string format: date x-is-date: true endDate: description: The date when the leave ends type: string format: date x-is-date: true type: description: the type of statutory leave type: string example: "Sick" status: description: the type of statutory leave type: string example: "Pending" workPattern: description: The days of the work week the employee is scheduled to work at the time the leave is taken type: array items: type: string isPregnancyRelated: description: Whether the sick leave was pregnancy related type: boolean sufficientNotice: description: Whether the employee provided sufficient notice and documentation as required by the employer supporting the sick leave request type: boolean isEntitled: description: Whether the leave was entitled to receive payment type: boolean entitlementWeeksRequested: description: The amount of requested time (in weeks) type: number format: double x-is-money: true entitlementWeeksQualified: description: The amount of statutory sick leave time off (in weeks) that is available to take at the time the leave was requested type: number format: double x-is-money: true entitlementWeeksRemaining: description: A calculated amount of time (in weeks) that remains for the statutory sick leave period type: number format: double x-is-money: true overlapsWithOtherLeave: description: Whether another leave (Paternity, Shared Parental specifically) occurs during the requested leave's period. While this is allowed it could affect payment amounts type: boolean entitlementFailureReasons: description: If the leave requested was considered "not entitled", the reasons why are listed here. type: array items: type: string enum: - UnableToCalculateAwe - AweLowerThanLel - NotQualifiedInPreviousPiw - ExceededMaximumEntitlementWeeksOfSsp - ExceededMaximumDurationOfPiw - SufficientNoticeNotGiven EmployeeLeaveTypes: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' leaveTypes: type: array items: $ref: '#/components/schemas/EmployeeLeaveType' EmployeeLeaveSetupObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' leaveSetup: $ref: '#/components/schemas/EmployeeLeaveSetup' EmployeeLeaveSetup: type: object properties: includeHolidayPay: description: Identifier if holiday pay will be included in each payslip type: boolean example: false holidayPayOpeningBalance: description: Initial holiday pay balance. A percentage — usually 8% — of gross earnings since their last work anniversary. type: number format: double x-is-money: true example: 10.5 annualLeaveOpeningBalance: description: Initial annual leave balance. The balance at their last anniversary, less any leave taken since then and excluding accrued annual leave. type: number format: double x-is-money: true example: 25.89 negativeAnnualLeaveBalancePaidAmount: description: The dollar value of annual leave opening balance if negative. type: number format: double x-is-money: true example: 10.0 sickLeaveHoursToAccrueAnnually: description: Number of hours accrued annually for sick leave. Multiply the number of days they're entitled to by the hours worked per day type: number format: double x-is-money: true example: 100.5 sickLeaveMaximumHoursToAccrue: description: Maximum number of hours accrued annually for sick leave. Multiply the maximum days they can accrue by the hours worked per day type: number format: double x-is-money: true example: 200.5 sickLeaveOpeningBalance: description: Initial sick leave balance. This will be positive unless they've taken sick leave in advance type: number format: double x-is-money: true example: 10.5 EmployeeLeaveTypeObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' leaveType: $ref: '#/components/schemas/EmployeeLeaveType' EmployeeLeaveType: type: object properties: leaveTypeID: description: The Xero identifier for leave type type: string format: uuid scheduleOfAccrual: description: The schedule of accrual type: string enum: - AnnuallyAfter6Months - OnAnniversaryDate - PercentageOfGrossEarnings - NoAccruals hoursAccruedAnnually: description: The number of hours accrued for the leave annually. This is 0 when the scheduleOfAccrual chosen is "OnHourWorked" type: number format: double x-is-money: true maximumToAccrue: description: The maximum number of hours that can be accrued for the leave type: number format: double x-is-money: true openingBalance: description: The initial number of hours assigned when the leave was added to the employee type: number format: double x-is-money: true rateAccruedHourly: description: The number of hours added to the leave balance for every hour worked by the employee. This is normally 0, unless the scheduleOfAccrual chosen is "OnHourWorked" type: number format: double x-is-money: true percentageOfGrossEarnings: description: Specific for scheduleOfAccrual having percentage of gross earnings. Identifies how much percentage of gross earnings is accrued per pay period. type: number format: double x-is-money: true includeHolidayPayEveryPay: description: Specific to Holiday pay. Flag determining if pay for leave type is added on each pay run. type: boolean showAnnualLeaveInAdvance: description: Specific to Annual Leave. Flag to include leave available to take in advance in the balance in the payslip type: boolean annualLeaveTotalAmountPaid: description: Specific to Annual Leave. Annual leave balance in dollars type: number format: double x-is-money: true EmployeePayTemplateObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' payTemplate: $ref: '#/components/schemas/EmployeePayTemplate' EmployeePayTemplates: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' payTemplate: $ref: '#/components/schemas/EmployeePayTemplate' EmployeeEarningsTemplates: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' earningTemplates: type: array items: $ref: '#/components/schemas/EarningsTemplate' EmployeePayTemplate: type: object required: - EarningTemplates properties: employeeID: description: Unique identifier for the employee type: string format: uuid earningTemplates: $ref: '#/components/schemas/EarningsTemplates' EarningsTemplates: type: array items: $ref: '#/components/schemas/EarningsTemplate' EarningsTemplateObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' earningTemplate: $ref: '#/components/schemas/EarningsTemplate' EarningsTemplate: type: object properties: payTemplateEarningID: description: The Xero identifier for the earnings template type: string format: uuid ratePerUnit: description: The rate per unit type: number format: double x-is-money: true numberOfUnits: description: The rate per unit type: number format: double x-is-money: true fixedAmount: description: The fixed amount per period type: number format: double x-is-money: true earningsRateID: description: The corresponding earnings rate identifier type: string format: uuid name: description: The read-only name of the Earning Template. type: string Superannuations: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' benefits: type: array items: $ref: '#/components/schemas/Benefit' SuperannuationObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' benefit: $ref: '#/components/schemas/Benefit' Benefit: type: object required: - name - category - liabilityAccountId - expenseAccountId properties: id: description: The Xero identifier for superannuation type: string format: uuid name: description: Name of the superannuations type: string category: description: Superannuations Category type type: string enum: - KiwiSaver - ComplyingFund - Other liabilityAccountId: description: Xero identifier for Liability Account type: string format: uuid expenseAccountId: description: Xero identifier for Expense Account type: string format: uuid calculationTypeNZ: description: Calculation Type of the superannuation either FixedAmount or PercentageOfTaxableEarnings type: string enum: - FixedAmount - PercentageOfTaxableEarnings standardAmount: description: Standard amount of the superannuation type: number format: double x-is-money: true percentage: description: Percentage of Taxable Earnings of the superannuation type: number format: double x-is-money: true companyMax: description: Company Maximum amount of the superannuation type: number format: double x-is-money: true currentRecord: description: Identifier of a record is active or not. type: boolean Deductions: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' deductions: type: array items: $ref: '#/components/schemas/Deduction' DeductionObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' deduction: $ref: '#/components/schemas/Deduction' Deduction: type: object required: - deductionName - deductionCategory - liabilityAccountId - calculationType properties: deductionId: description: The Xero identifier for Deduction type: string format: uuid deductionName: description: Name of the deduction type: string deductionCategory: description: Deduction Category type type: string enum: - PayrollGiving - KiwiSaverVoluntaryContributions - Superannuation - NzOther liabilityAccountId: description: Xero identifier for Liability Account type: string format: uuid currentRecord: description: Identifier of a record is active or not. type: boolean standardAmount: description: Standard amount of the deduction. type: number format: double x-is-money: true StatutoryDeductions: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' statutoryDeductions: type: array items: $ref: '#/components/schemas/StatutoryDeduction' StatutoryDeductionObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' statutoryDeduction: $ref: '#/components/schemas/StatutoryDeduction' StatutoryDeduction: type: object properties: id: description: The Xero identifier for earnings order type: string format: uuid name: description: Name of the earnings order type: string statutoryDeductionCategory: $ref: '#/components/schemas/StatutoryDeductionCategory' liabilityAccountId: description: Xero identifier for Liability Account type: string format: uuid currentRecord: description: Identifier of a record is active or not. type: boolean StatutoryDeductionCategory: description: Statutory Deduction Category type: string enum: - PriorityOrder - NonPriorityOrder - TableBased - ChildSupport - CourtFines - InlandRevenueArrears - MsdRepayments - StudentLoan - AdditionalStudentLoan - VoluntaryStudentLoan - KiwiSaver EarningsOrders: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' statutoryDeductions: type: array items: $ref: '#/components/schemas/EarningsOrder' EarningsOrderObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' statutoryDeduction: $ref: '#/components/schemas/EarningsOrder' EarningsOrder: type: object required: - name properties: id: description: Xero unique identifier for an earning rate type: string format: uuid name: description: Name of the earning order type: string statutoryDeductionCategory: $ref: '#/components/schemas/StatutoryDeductionCategory' liabilityAccountId: description: Xero identifier for Liability Account type: string format: uuid currentRecord: description: Identifier of a record is active or not. type: boolean default: true EarningsRates: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' earningsRates: type: array items: $ref: '#/components/schemas/EarningsRate' EarningsRateObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' earningsRate: $ref: '#/components/schemas/EarningsRate' EarningsRate: type: object required: - name - earningsType - rateType - typeOfUnits - expenseAccountID properties: earningsRateID: description: Xero unique identifier for an earning rate type: string format: uuid name: description: Name of the earning rate type: string earningsType: description: Indicates how an employee will be paid when taking this type of earning type: string enum: - Allowance - Backpay - Bonus - Commission - DiscretionaryPayments - HolidayPay - LumpSum - OtherEarnings - OtherGrossEarnings - OvertimeEarnings - RegularEarnings - SalarySacrificeForKiwiSaver - Tips(Direct) - Tips(Non-Direct) - WithholdingIncome rateType: description: Indicates the type of the earning rate type: string enum: - RatePerUnit - MultipleOfOrdinaryEarningsRate - FixedAmount typeOfUnits: description: The type of units used to record earnings type: string currentRecord: description: Indicates whether an earning type is active type: boolean expenseAccountID: description: The account that will be used for the earnings rate type: string format: uuid ratePerUnit: description: Default rate per unit (optional). Only applicable if RateType is RatePerUnit type: number format: double x-is-money: true multipleOfOrdinaryEarningsRate: description: This is the multiplier used to calculate the rate per unit, based on the employee’s ordinary earnings rate. For example, for time and a half enter 1.5. Only applicable if RateType is MultipleOfOrdinaryEarningsRate type: number format: double x-is-money: true fixedAmount: description: Optional Fixed Rate Amount. Applicable for FixedAmount Rate type: number format: double x-is-money: true LeaveTypes: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' leaveTypes: type: array items: $ref: '#/components/schemas/LeaveType' LeaveTypeObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' leaveType: $ref: '#/components/schemas/LeaveType' LeaveType: type: object required: - name - isPaidLeave - showOnPayslip properties: leaveTypeID: description: Xero unique identifier for the leave type type: string format: uuid name: description: Name of the leave type type: string isPaidLeave: description: Indicate that an employee will be paid when taking this type of leave type: boolean showOnPayslip: description: Indicate that a balance for this leave type to be shown on the employee’s payslips type: boolean updatedDateUTC: description: UTC timestamp of last update to the leave type note type: string format: date-time x-is-datetime: true isActive: description: Shows whether the leave type is active or not type: boolean Reimbursements: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' reimbursements: type: array items: $ref: '#/components/schemas/Reimbursement' ReimbursementObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' reimbursement: $ref: '#/components/schemas/Reimbursement' Reimbursement: type: object required: - name - accountID properties: reimbursementID: description: Xero unique identifier for a reimbursement type: string format: uuid name: description: Name of the reimbursement type: string accountID: description: Xero unique identifier for the account used for the reimbursement type: string format: uuid currentRecord: description: Indicates that whether the reimbursement is active type: boolean reimbursementCategory: description: See Reimbursement Categories type: string enum: - GST - NoGST - GSTInclusive calculationType: description: See Calculation Types type: string enum: - Unknown - FixedAmount - RatePerUnit standardAmount: description: Optional Fixed Rate Amount. Applicable when calculation type is Fixed Amount type: string standardTypeOfUnits: description: Optional Type Of Units. Applicable when calculation type is Rate Per Unit type: string enum: - Hours - km standardRatePerUnit: description: Optional Rate Per Unit. Applicable when calculation type is Rate Per Unit type: number format: double x-is-money: true 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 - Requested totalHours: description: The Total Hours of the Timesheet type: number format: double x-is-money: true 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 x-is-money: true PayRunCalendars: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' payRunCalendars: type: array items: $ref: '#/components/schemas/PayRunCalendar' PayRunCalendarObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' payRunCalendar: $ref: '#/components/schemas/PayRunCalendar' PayRunCalendar: type: object required: - name - calendarType - periodStartDate - paymentDate properties: payrollCalendarID: description: Xero unique identifier for the payroll calendar type: string format: uuid name: description: Name of the calendar type: string calendarType: $ref: '#/components/schemas/CalendarType' periodStartDate: description: Period start date of the calendar type: string format: date x-is-date: true periodEndDate: description: Period end date of the calendar type: string format: date x-is-date: true paymentDate: description: Payment date of the calendar type: string format: date x-is-date: true updatedDateUTC: description: UTC timestamp of the last update to the pay run calendar type: string format: date-time x-is-datetime: true PaymentMethodObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' paymentMethod: $ref: '#/components/schemas/PaymentMethod' PaymentMethod: type: object properties: paymentMethod: description: The payment method code type: string enum: - Cheque - Electronically - Manual bankAccounts: type: array items: $ref: '#/components/schemas/BankAccount' SalaryAndWages: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' salaryAndWages: type: array items: $ref: '#/components/schemas/SalaryAndWage' SalaryAndWageObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' salaryAndWages: $ref: '#/components/schemas/SalaryAndWage' SalaryAndWage: type: object required: - earningsRateID - numberOfUnitsPerWeek - numberOfUnitsPerDay - effectiveFrom - annualSalary - status - paymentType properties: salaryAndWagesID: description: Xero unique identifier for a salary and wages record type: string format: uuid earningsRateID: description: Xero unique identifier for an earnings rate type: string format: uuid numberOfUnitsPerWeek: description: The Number of Units per week for the corresponding salary and wages type: number format: double x-is-money: true ratePerUnit: description: The rate of each unit for the corresponding salary and wages type: number format: double x-is-money: true numberOfUnitsPerDay: description: The Number of Units per day for the corresponding salary and wages type: number format: double x-is-money: true daysPerWeek: description: The days per week for the salary. type: number format: double x-is-money: true effectiveFrom: description: The effective date of the corresponding salary and wages type: string format: date x-is-date: true annualSalary: description: The annual salary type: number format: double x-is-money: true status: description: The current status of the corresponding salary and wages type: string enum: - Active - Pending - History paymentType: description: The type of the payment of the corresponding salary and wages type: string enum: - Salary - Hourly PayRuns: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' payRuns: type: array items: $ref: '#/components/schemas/PayRun' PayRunObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' payRun: $ref: '#/components/schemas/PayRun' PayRun: type: object properties: payRunID: description: Xero unique identifier for the pay run type: string format: uuid payrollCalendarID: description: Xero unique identifier for the payroll calendar type: string format: uuid periodStartDate: description: Period start date of the payroll calendar type: string format: date x-is-date: true periodEndDate: description: Period end date of the payroll calendar type: string format: date x-is-date: true paymentDate: description: Payment date of the pay run type: string format: date x-is-date: true totalCost: description: Total cost of the pay run type: number format: double x-is-money: true totalPay: description: Total pay of the pay run type: number format: double x-is-money: true payRunStatus: description: Pay run status type: string enum: - Draft - Posted payRunType: description: Pay run type type: string enum: - Scheduled - Unscheduled - EarlierYearUpdate calendarType: $ref: '#/components/schemas/CalendarType' postedDateTime: description: Posted date time of the pay run type: string format: date x-is-date: true paySlips: type: array items: $ref: '#/components/schemas/PaySlip' CalendarType: description: Calendar type of the pay run type: string enum: - Weekly - Fortnightly - FourWeekly - Monthly - Annual - Quarterly - TwiceMonthly PaySlipObject: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' paySlip: $ref: '#/components/schemas/PaySlip' PaySlips: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' paySlips: type: array items: $ref: '#/components/schemas/PaySlip' PaySlip: type: object properties: paySlipID: description: The Xero identifier for a PaySlip type: string format: uuid employeeID: description: The Xero identifier for payroll employee type: string format: uuid payRunID: description: The Xero identifier for the associated payrun type: string format: uuid lastEdited: description: The date payslip was last updated type: string format: date x-is-datetime: true firstName: description: Employee first name type: string lastName: description: Employee last name type: string totalEarnings: description: Total earnings before any deductions. Same as gross earnings for NZ. type: number format: double x-is-money: true grossEarnings: description: Total earnings before any deductions. Same as total earnings for NZ. type: number format: double x-is-money: true totalPay: description: The employee net pay type: number format: double x-is-money: true totalEmployerTaxes: description: The employer's tax obligation type: number format: double x-is-money: true totalEmployeeTaxes: description: The part of an employee's earnings that is deducted for tax purposes type: number format: double x-is-money: true totalDeductions: description: Total amount subtracted from an employee's earnings to reach total pay type: number format: double x-is-money: true totalReimbursements: description: Total reimbursements are nontaxable payments to an employee used to repay out-of-pocket expenses when the person incurs those expenses through employment type: number format: double x-is-money: true totalStatutoryDeductions: description: Total amounts required by law to subtract from the employee's earnings type: number format: double x-is-money: true totalSuperannuation: description: Benefits (also called fringe benefits, perquisites or perks) are various non-earnings compensations provided to employees in addition to their normal earnings or salaries type: number format: double x-is-money: true bacsHash: description: BACS Service User Number type: string paymentMethod: description: The payment method code type: string enum: - Cheque - Electronically - Manual earningsLines: $ref: '#/components/schemas/EarningsLines' leaveEarningsLines: $ref: '#/components/schemas/LeaveEarningsLines' timesheetEarningsLines: $ref: '#/components/schemas/TimesheetEarningsLines' deductionLines: $ref: '#/components/schemas/DeductionLines' reimbursementLines: $ref: '#/components/schemas/ReimbursementLines' leaveAccrualLines: $ref: '#/components/schemas/LeaveAccrualLines' superannuationLines: $ref: '#/components/schemas/SuperannuationLines' paymentLines: $ref: '#/components/schemas/PaymentLines' employeeTaxLines: $ref: '#/components/schemas/TaxLines' employerTaxLines: $ref: '#/components/schemas/TaxLines' statutoryDeductionLines: $ref: '#/components/schemas/StatutoryDeductionLines' taxSettings: $ref: '#/components/schemas/TaxSettings' grossEarningsHistory: $ref: '#/components/schemas/GrossEarningsHistory' EarningsLines: type: array items: $ref: '#/components/schemas/EarningsLine' EarningsLine: type: object properties: earningsLineID: description: Xero identifier for payroll earnings line type: string format: uuid earningsRateID: description: Xero identifier for payroll earnings rate type: string format: uuid displayName: description: name of earnings rate for display in UI type: string ratePerUnit: description: Rate per unit for earnings line type: number format: double x-is-money: true numberOfUnits: description: Earnings number of units type: number format: double x-is-money: true fixedAmount: description: Earnings fixed amount. Only applicable if the EarningsRate RateType is Fixed type: number format: double x-is-money: true amount: description: The amount of the earnings line. type: number format: double x-is-money: true isLinkedToTimesheet: description: Identifies if the earnings is taken from the timesheet. False for earnings line type: boolean isAverageDailyPayRate: description: Identifies if the earnings is using an average daily pay rate type: boolean isSystemGenerated: description: Flag to identify whether the earnings line is system generated or not. type: boolean LeaveEarningsLines: type: array items: $ref: '#/components/schemas/LeaveEarningsLine' LeaveEarningsLine: type: object properties: earningsLineID: description: Xero identifier for payroll earnings line type: string format: uuid earningsRateID: description: Xero identifier for payroll leave earnings rate type: string format: uuid displayName: description: name of earnings rate for display in UI type: string ratePerUnit: description: Rate per unit for leave earnings line type: number format: double x-is-money: true numberOfUnits: description: Leave earnings number of units type: number format: double x-is-money: true fixedAmount: description: Leave earnings fixed amount. Only applicable if the EarningsRate RateType is Fixed type: number format: double x-is-money: true amount: description: The amount of the earnings line. type: number format: double x-is-money: true isLinkedToTimesheet: description: Identifies if the leave earnings is taken from the timesheet. False for leave earnings line type: boolean isAverageDailyPayRate: description: Identifies if the earnings is using an average daily pay rate type: boolean isSystemGenerated: description: Flag to identify whether the earnings line is system generated or not. type: boolean TimesheetEarningsLines: type: array items: $ref: '#/components/schemas/TimesheetEarningsLine' TimesheetEarningsLine: type: object properties: earningsLineID: description: Xero identifier for payroll earnings line type: string format: uuid earningsRateID: description: Xero identifier for payroll leave earnings rate type: string format: uuid displayName: description: name of earnings rate for display in UI type: string ratePerUnit: description: Rate per unit for leave earnings line type: number format: double x-is-money: true numberOfUnits: description: Leave earnings number of units type: number format: double x-is-money: true fixedAmount: description: Leave earnings fixed amount. Only applicable if the EarningsRate RateType is Fixed type: number format: double x-is-money: true amount: description: The amount of the earnings line. type: number format: double x-is-money: true isLinkedToTimesheet: description: Identifies if the leave earnings is taken from the timesheet. False for leave earnings line type: boolean isAverageDailyPayRate: description: Identifies if the earnings is using an average daily pay rate type: boolean isSystemGenerated: description: Flag to identify whether the earnings line is system generated or not. type: boolean DeductionLines: type: array items: $ref: '#/components/schemas/DeductionLine' DeductionLine: type: object properties: deductionTypeID: description: Xero identifier for payroll deduction type: string format: uuid displayName: description: name of earnings rate for display in UI type: string amount: description: The amount of the deduction line type: number format: double x-is-money: true subjectToTax: description: Identifies if the deduction is subject to tax type: boolean percentage: description: Deduction rate percentage type: number format: double x-is-money: true ReimbursementLines: type: array items: $ref: '#/components/schemas/ReimbursementLine' ReimbursementLine: type: object properties: reimbursementTypeID: description: Xero identifier for payroll reimbursement type: string format: uuid description: description: Reimbursement line description type: string amount: description: Reimbursement amount type: number format: double x-is-money: true ratePerUnit: description: Rate per unit for leave earnings line type: number format: double x-is-money: true numberOfUnits: description: Leave earnings number of units type: number format: double x-is-money: true LeaveAccrualLines: type: array items: $ref: '#/components/schemas/LeaveAccrualLine' LeaveAccrualLine: type: object properties: leaveTypeID: description: Xero identifier for the Leave type type: string format: uuid numberOfUnits: description: Leave accrual number of units type: number format: double x-is-money: true SuperannuationLines: type: array items: $ref: '#/components/schemas/SuperannuationLine' SuperannuationLine: type: object properties: superannuationTypeID: description: Xero identifier for payroll superannuation type type: string format: uuid displayName: description: Benefit display name type: string amount: description: The amount of the superannuation line type: number format: double x-is-money: true fixedAmount: description: Superannuation fixed amount type: number format: double x-is-money: true percentage: description: Superannuation rate percentage type: number format: double x-is-money: true manualAdjustment: description: manual adjustment made type: boolean PaymentLines: type: array items: $ref: '#/components/schemas/PaymentLine' PaymentLine: type: object properties: paymentLineID: description: Xero identifier for payroll payment line type: string format: uuid amount: description: The amount of the payment line type: number format: double x-is-money: true accountNumber: description: The account number type: string sortCode: description: The account sort code type: string accountName: description: The account name type: string TaxLines: type: array items: $ref: '#/components/schemas/TaxLine' TaxLine: type: object properties: taxLineID: description: Xero identifier for payroll tax line type: string format: uuid description: description: Tax line description type: string amount: description: The amount of the tax line type: number format: double x-is-money: true globalTaxTypeID: description: Tax type ID type: string manualAdjustment: description: Identifies if the tax line is a manual adjustment type: boolean StatutoryDeductionLines: type: array items: $ref: '#/components/schemas/StatutoryDeductionLine' StatutoryDeductionLine: type: object properties: statutoryDeductionTypeID: description: Xero identifier for payroll statutory deduction type type: string format: uuid amount: description: The amount of the statutory deduction line type: number format: double x-is-money: true fixedAmount: description: Fixed Amount type: number format: double x-is-money: true manualAdjustment: description: Identifies if the tax line is a manual adjustment type: boolean TaxSettings: type: object properties: periodUnits: description: The number of units for the period type type: number format: double x-is-money: true periodType: description: The type of period ("weeks" or "months") type: string enum: - weeks - months example: "weeks" taxCode: $ref: '#/components/schemas/TaxCode' specialTaxRate: description: Tax rate for STC and WT type: string lumpSumTaxCode: description: Tax code for a lump sum amount type: string lumpSumAmount: description: The total of the lump sum amount type: string GrossEarningsHistory: type: object properties: daysPaid: description: Number of days the employee worked in the pay period (0 - 365) type: integer format: int32 unpaidWeeks: description: Number of full weeks the employee didn't work in the pay period (0 - 52) type: integer format: int32 Settings: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' settings: $ref: '#/components/schemas/Accounts' Accounts: type: object properties: accounts: type: array items: $ref: '#/components/schemas/Account' Account: type: object properties: accountID: description: The Xero identifier for Settings. type: string format: uuid type: description: The assigned AccountType type: string enum: - PAYELIABILITY - WAGESPAYABLE - WAGESEXPENSE - BANK code: description: A unique 3 digit number for each Account type: string name: description: Name of the Account. type: string Address: type: object required: - addressLine1 - city - postCode properties: addressLine1: description: Address line 1 for employee home address type: string example: 19 Taranaki Street addressLine2: description: Address line 2 for employee home address type: string example: Apt 4 city: description: Suburb for employee home address type: string example: Wellington suburb: description: Suburb for employee home address type: string example: Te Aro postCode: description: PostCode for employee home address type: string example: 6011 countryName: description: Country of HomeAddress type: string example: NEW ZEALAND BankAccounts: type: array items: $ref: '#/components/schemas/BankAccount' BankAccount: type: object required: - accountName - accountNumber - sortCode properties: accountName: description: Bank account name (max length = 32) type: string accountNumber: description: Bank account number (digits only; max length = 8) type: string sortCode: description: Bank account sort code (6 digits) type: string particulars: description: Particulars that appear on the statement. type: string code: description: Code of a transaction that appear on the statement. type: string dollarAmount: description: Dollar amount of a transaction. type: number format: double x-is-money: true reference: description: Statement Text/reference for a transaction that appear on the statement. type: string calculationType: description: Calculation type for the transaction can be 'Fixed Amount' or 'Balance' type: string enum: - FixedAmount - Balance TrackingCategories: type: object properties: pagination: $ref: '#/components/schemas/Pagination' problem: $ref: '#/components/schemas/Problem' trackingCategories: $ref: '#/components/schemas/TrackingCategory' TrackingCategory: type: object properties: employeeGroupsTrackingCategoryID: description: The Xero identifier for Employee groups tracking category. type: string format: uuid timesheetTrackingCategoryID: description: The Xero identifier for Timesheet tracking category. type: string format: uuid