Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Xero PayrollNz API

The PayrollNz API from Xero — 46 operation(s) for payrollnz.

Xero PayrollNz API is one of 10 APIs that Xero publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

Tagged areas include PayrollNz. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and an AsyncAPI specification.

This API exposes 71 operations across 46 paths, and defines 109 schemas. It is described by OpenAPI 3.0.0, at version 11.1.0.

Requests are made against a single base URL, https://api.xero.com/api.xro/2.0.

71 operations 46 paths 109 schemas 6 DELETE36 GET23 POST6 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
API Version
11.1.0
Base URL
https://api.xero.com/api.xro/2.0
Authentication
OAuth 2.0
Terms of Service
Resource Areas
1

Authentication & Security 1

Xero PayrollNz API declares 1 security scheme for authenticating requests. It supports OAuth 2.0 (OAuth2) using the authorizationCode flow, exposing 16 scopes.

  • OAuth2 — For more information

Paths & Operations 71

Across 46 paths, the API surfaces 71 operations — 6 DELETE, 36 GET, 23 POST, 6 PUT. Each is listed below with its method, path, parameters, and response codes.

PayrollNz 71
GET
/Employees
Retrieves employees
getEmployees 3 params → 200400
POST
/Employees
Creates an employees
createEmployee 2 params body → 200400
GET
/Employees/{EmployeeID}
Retrieves an employees using a unique employee ID
getEmployee 2 params → 200
PUT
/Employees/{EmployeeID}
Updates an existing employee
updateEmployee 3 params body → 200400
POST
/Employees/{EmployeeID}/Employment
Creates an employment detail for a specific employee
createEmployment 3 params body → 200400
GET
/Employees/{EmployeeID}/Tax
Retrieves tax records for a specific employee
getEmployeeTax 2 params → 200
POST
/Employees/{EmployeeID}/Tax
Updates the tax records for a specific employee
updateEmployeeTax 3 params body → 200
GET
/Employees/{EmployeeID}/OpeningBalances
Retrieves the opening balance for a specific employee
getEmployeeOpeningBalances 2 params → 200
POST
/Employees/{EmployeeID}/OpeningBalances
Creates opening balances for a specific employee
createEmployeeOpeningBalances 3 params body → 200400
GET
/Employees/{EmployeeID}/Leave
Retrieves leave records for a specific employee
getEmployeeLeaves 2 params → 200
POST
/Employees/{EmployeeID}/Leave
Creates leave records for a specific employee
createEmployeeLeave 3 params body → 200400
PUT
/Employees/{EmployeeID}/Leave/{LeaveID}
Updates leave records for a specific employee
updateEmployeeLeave 4 params body → 200400
DELETE
/Employees/{EmployeeID}/Leave/{LeaveID}
Deletes a leave record for a specific employee
deleteEmployeeLeave 3 params → 200
GET
/Employees/{EmployeeID}/LeaveBalances
Retrieves leave balances for a specific employee
getEmployeeLeaveBalances 2 params → 200
GET
/Employees/{EmployeeID}/LeavePeriods
Retrieves leave periods for a specific employee
getEmployeeLeavePeriods 4 params → 200400
POST
/Employees/{EmployeeID}/LeaveSetup
Creates a leave set-up for a specific employee. This is required before viewing, configuring and requesting leave for an employee
createEmployeeLeaveSetup 3 params body → 200400
GET
/Employees/{EmployeeID}/LeaveTypes
Retrieves leave types for a specific employee
getEmployeeLeaveTypes 2 params → 200400
POST
/Employees/{EmployeeID}/LeaveTypes
Creates leave type records for a specific employee
createEmployeeLeaveType 3 params body → 200400
GET
/Employees/{EmployeeID}/PaymentMethods
Retrieves available payment methods for a specific employee
getEmployeePaymentMethod 2 params → 200400
POST
/Employees/{EmployeeID}/PaymentMethods
Creates a payment method for an employee
createEmployeePaymentMethod 3 params body → 200400
GET
/Employees/{EmployeeID}/PayTemplates
Retrieves pay templates for a specific employee
getEmployeePayTemplates 2 params → 200400
POST
/Employees/{EmployeeID}/PayTemplates/Earnings
Creates earnings template records for an employee
createEmployeeEarningsTemplate 3 params body → 200400
PUT
/Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID}
Updates an earnings template records for an employee
updateEmployeeEarningsTemplate 4 params body → 200400
DELETE
/Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID}
Deletes an employee's earnings template record
deleteEmployeeEarningsTemplate 3 params → 200
POST
/Employees/{EmployeeID}/PayTemplateEarnings
Creates multiple employee earnings template records for a specific employee
createMultipleEmployeeEarningsTemplate 3 params body → 200400
GET
/Deductions
Retrieves deductions for a specific employee
getDeductions 2 params → 200
POST
/Deductions
Creates a new deduction for a specific employee
createDeduction 2 params body → 200400
GET
/Deductions/{deductionId}
Retrieves a single deduction by using a unique deduction ID
getDeduction 2 params → 200
GET
/StatutoryDeductions
Retrieves statutory deductions
getStatutoryDeductions 2 params → 200
GET
/StatutoryDeductions/{id}
Retrieves a specific statutory deduction by using a unique statutory deductions id
getStatutoryDeduction 2 params → 200
GET
/Superannuations
Retrieves superannuations
getSuperannuations 2 params → 200
POST
/Superannuations
Creates a new superannuation
createSuperannuation 2 params body → 200400
GET
/Superannuations/{SuperannuationID}
Retrieves a specific superannuation using a unique superannuation ID
getSuperannuation 2 params → 200
GET
/EarningsRates
Retrieves earnings rates
getEarningsRates 2 params → 200
POST
/EarningsRates
Creates a new earnings rate
createEarningsRate 2 params body → 200400
GET
/EarningsRates/{EarningsRateID}
Retrieves a specific earnings rates by using a unique earnings rate id
getEarningsRate 2 params → 200
GET
/LeaveTypes
Retrieves leave types
getLeaveTypes 3 params → 200
POST
/LeaveTypes
Creates a new leave type
createLeaveType 2 params body → 200400
GET
/LeaveTypes/{LeaveTypeID}
Retrieves a specific leave type by using a unique leave type ID
getLeaveType 2 params → 200
GET
/Reimbursements
Retrieves reimbursements
getReimbursements 2 params → 200
POST
/Reimbursements
Creates a new reimbursement
createReimbursement 2 params body → 200400
GET
/Reimbursements/{ReimbursementID}
Retrieves a specific reimbursement by using a unique reimbursement ID
getReimbursement 2 params → 200
GET
/Timesheets
Retrieves timesheets
getTimesheets 7 params → 200
POST
/Timesheets
Creates a new timesheet
createTimesheet 2 params body → 200400
GET
/Timesheets/{TimesheetID}
Retrieves a specific timesheet by using a unique timesheet ID
getTimesheet 2 params → 200
DELETE
/Timesheets/{TimesheetID}
Deletes a timesheet
deleteTimesheet 2 params → 200400
POST
/Timesheets/{TimesheetID}/Lines
Create a new timesheet line for a specific time sheet
createTimesheetLine 3 params body → 200400
POST
/Timesheets/{TimesheetID}/Approve
Approves a timesheet
approveTimesheet 3 params → 200400
POST
/Timesheets/{TimesheetID}/RevertToDraft
Reverts a timesheet to draft
revertTimesheet 3 params → 200400
PUT
/Timesheets/{TimesheetID}/Lines/{TimesheetLineID}
Updates a timesheet line for a specific timesheet
updateTimesheetLine 4 params body → 200400
DELETE
/Timesheets/{TimesheetID}/Lines/{TimesheetLineID}
Deletes a timesheet line for a specific timesheet
deleteTimesheetLine 3 params → 200400
GET
/PayRunCalendars
Retrieves payrun calendars
getPayRunCalendars 2 params → 200
POST
/PayRunCalendars
Creates a new payrun calendar
createPayRunCalendar 2 params body → 200400
GET
/PayRunCalendars/{PayrollCalendarID}
Retrieves a specific payrun calendar by using a unique payroll calendar ID
getPayRunCalendar 2 params → 200
GET
/Employees/{EmployeeID}/SalaryAndWages
Retrieves an employee's salary and wages
getEmployeeSalaryAndWages 3 params → 200400
POST
/Employees/{EmployeeID}/SalaryAndWages
Creates an employee salary and wage record
createEmployeeSalaryAndWage 3 params body → 200400
GET
/Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID}
Retrieves an employee's salary and wages record by using a unique salary and wage ID
getEmployeeSalaryAndWage 3 params → 200
PUT
/Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID}
Updates an employee's salary and wages record
updateEmployeeSalaryAndWage 4 params body → 200400
DELETE
/Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID}
Deletes an employee's salary and wages record
deleteEmployeeSalaryAndWage 3 params → 200
GET
/PayRuns
Retrieves pay runs
getPayRuns 3 params → 200
POST
/PayRuns
Creates a pay run
createPayRun 2 params body → 200400
GET
/PayRuns/{PayRunID}
Retrieves a specific pay run by using a unique pay run ID
getPayRun 2 params → 200
GET
/PaySlips
Retrieves payslips
getPaySlips 3 params → 200
GET
/PaySlips/{PaySlipID}
Retrieves a specific payslip by a unique pay slip ID
getPaySlip 2 params → 200
PUT
/PaySlips/{PaySlipID}
Creates an employee pay slip
updatePaySlipLineItems 3 params body → 200400
GET
/Settings
Retrieves settings
getSettings 1 param → 200
GET
/Settings/TrackingCategories
Retrieves tracking categories
getTrackingCategories 1 param → 200
GET
/Employees/{EmployeeID}/Working-Patterns
Retrieves employee's working patterns
getEmployeeWorkingPatterns 2 params → 200
POST
/Employees/{EmployeeID}/Working-Patterns
Creates an employee working pattern
createEmployeeWorkingPattern 3 params body → 200400
GET
/Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID}
Retrieves employee's working patterns
getEmployeeWorkingPattern 3 params → 200
DELETE
/Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID}
deletes employee's working patterns
deleteEmployeeWorkingPattern 3 params → 200400

Schemas 109

The contract defines 109 schemas that model the data the API accepts and returns. The most detailed are PaySlip (30 properties), Employee (17 properties), EmployeeTax (16 properties), EmployeeLeaveType (13 properties). Each schema is shown below with its type and property counts.

Pagination
object
4 properties
BankAccount
object
8 properties 3 required
Timesheets
object
3 properties
EmployeeEarningsTemplates
object
3 properties
TaxCode
string
Tax codes used for employee tax
Accounts
object
1 property
EmployeeLeaveBalances
object
3 properties
StatutoryDeduction
object
5 properties
PaymentMethodObject
object
3 properties
PayRun
object
12 properties
ReimbursementLines
array
EmployeeWorkingPatternWithWorkingWeeks
object
3 properties 2 required
PaymentLines
array
EarningsTemplate
object
6 properties
TimesheetLine
object
5 properties 3 required
Reimbursement
object
9 properties 2 required
EmployeeLeaveTypes
object
3 properties
TimesheetEarningsLines
array
Deductions
object
3 properties
TimesheetObject
object
3 properties
EmployeeWorkingPatternWithWorkingWeeksObject
object
3 properties
EmployeeWorkingPatterns
array
Benefit
object
10 properties 4 required
StatutoryDeductionObject
object
3 properties
LeaveTypeObject
object
3 properties
EarningsRateObject
object
3 properties
SuperannuationLine
object
6 properties
EarningsRate
object
10 properties 5 required
EmployeeLeaveObject
object
3 properties
EmployeeOpeningBalancesObject
object
3 properties
StatutoryDeductionLine
object
4 properties
PaySlips
object
3 properties
StatutoryDeductionCategory
string
Statutory Deduction Category
SalaryAndWage
object
11 properties 7 required
WorkingWeeks
array
Employee
object
17 properties 4 required
Employees
object
3 properties
LeaveType
object
8 properties 3 required
EmployeePayTemplate
object
2 properties 1 required
LeaveAccrualLine
object
2 properties
EmployeeWorkingPatternsObject
object
3 properties
ReimbursementObject
object
3 properties
PayRuns
object
3 properties
Problem
object
The object returned for a bad request
6 properties
EmployeeTax
object
16 properties
EarningsRates
object
3 properties
EmployeeLeave
object
7 properties 4 required
TimesheetLineObject
object
3 properties
SalaryAndWages
object
3 properties
Deduction
object
6 properties 3 required
Reimbursements
object
3 properties
InvalidField
object
2 properties
Superannuations
object
3 properties
Settings
object
3 properties
EarningsLines
array
SuperannuationLines
array
PaymentMethod
object
2 properties
WorkingWeek
object
7 properties 7 required
SalaryAndWageObject
object
3 properties
TimesheetEarningsLine
object
10 properties
LeaveAccrualLines
array
PaymentLine
object
5 properties
PayRunCalendar
object
7 properties 4 required
LeaveTypes
object
3 properties
EmployeeWorkingPatternWithWorkingWeeksRequest
object
2 properties 2 required
EmployeeLeaveSetupObject
object
3 properties
DeductionLines
array
TrackingCategories
object
3 properties
CalendarType
string
Calendar type of the pay run
EmployeeLeaveType
object
13 properties
EmployeePayTemplates
object
3 properties
Timesheet
object
9 properties 4 required
EmployeeObject
object
3 properties
TaxLines
array
StatutoryDeductions
object
3 properties
Account
object
4 properties
EmployeeOpeningBalances
array
PaySlipObject
object
3 properties
EmployeeOpeningBalance
object
4 properties
TimesheetLines
array
EmployeeLeaveSetup
object
10 properties
TaxSettings
object
6 properties
SuperannuationObject
object
3 properties
EmployeeLeaveBalance
object
4 properties
GrossEarningsHistory
object
2 properties
PayRunCalendarObject
object
3 properties
TaxLine
object
5 properties
LeavePeriods
object
3 properties
EarningsLine
object
10 properties
EmployeeTaxObject
object
3 properties
LeavePeriod
object
7 properties
PaySlip
object
30 properties
EmploymentObject
object
3 properties
PayRunCalendars
object
3 properties
DeductionObject
object
3 properties
EmployeeLeaves
object
3 properties
EmployeeWorkingPattern
object
2 properties 2 required
DeductionLine
object
5 properties
LeaveEarningsLine
object
10 properties
ReimbursementLine
object
5 properties
EmployeeLeaveTypeObject
object
3 properties
TrackingCategory
object
2 properties
LeaveEarningsLines
array
Address
object
6 properties 3 required
StatutoryDeductionLines
array
EarningsTemplates
array
Employment
object
5 properties 3 required
EarningsTemplateObject
object
3 properties
PayRunObject
object
3 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

xero-payrollnz-api-openapi.yml Raw ↑

Other APIs Xero publishes across the network.

Xero Accounting API
Xero Asset API
Xero BankFeeds API
Xero Files API
Xero Finance API
Xero Identity API
Xero PayrollAu API
Xero PayrollUk API
Xero Project API