Xero Payroll NZ
This is the Xero Payroll API for orgs in the NZ region.
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
This is the Xero Payroll API for orgs in the NZ region.
Endpoints 71
PayrollNz
- GETRetrieves employees
/Employees?filter=firstName==John,lastName==Smith&page=5 - POSTCreates an employees
/Employees - GETRetrieves an employees using a unique employee ID
/Employees/:EmployeeID - PUTUpdates an existing employee
/Employees/:EmployeeID - POSTCreates an employment detail for a specific employee
/Employees/:EmployeeID/Employment - GETRetrieves tax records for a specific employee
/Employees/:EmployeeID/Tax - POSTUpdates the tax records for a specific employee
/Employees/:EmployeeID/TaxReplaces the entire EmployeeTax record. This is not a partial update. Any field omitted from the request is treated as null and overwrites the stored value.… - GETRetrieves the opening balance for a specific employee
/Employees/:EmployeeID/OpeningBalances - POSTCreates opening balances for a specific employee
/Employees/:EmployeeID/OpeningBalances - GETRetrieves leave records for a specific employee
/Employees/:EmployeeID/Leave - POSTCreates leave records for a specific employee
/Employees/:EmployeeID/Leave - PUTUpdates leave records for a specific employee
/Employees/:EmployeeID/Leave/:LeaveID - DELETEDeletes a leave record for a specific employee
/Employees/:EmployeeID/Leave/:LeaveID - GETRetrieves leave balances for a specific employee
/Employees/:EmployeeID/LeaveBalances - GETRetrieves leave periods for a specific employee
/Employees/:EmployeeID/LeavePeriods?startDate=2024-01-01&endDate=Johnson - POSTCreates a leave set-up for a specific employee. This is required before viewing, configuring and requesting leave for an employee
/Employees/:EmployeeID/LeaveSetup - GETRetrieves leave types for a specific employee
/Employees/:EmployeeID/LeaveTypes - POSTCreates leave type records for a specific employee
/Employees/:EmployeeID/LeaveTypes - GETRetrieves available payment methods for a specific employee
/Employees/:EmployeeID/PaymentMethods - POSTCreates a payment method for an employee
/Employees/:EmployeeID/PaymentMethods - GETRetrieves pay templates for a specific employee
/Employees/:EmployeeID/PayTemplates - POSTCreates earnings template records for an employee
/Employees/:EmployeeID/PayTemplates/Earnings - PUTUpdates an earnings template records for an employee
/Employees/:EmployeeID/PayTemplates/Earnings/:PayTemplateEarningID - DELETEDeletes an employee's earnings template record
/Employees/:EmployeeID/PayTemplates/Earnings/:PayTemplateEarningID - POSTCreates multiple employee earnings template records for a specific employee
/Employees/:EmployeeID/PayTemplateEarnings - GETRetrieves deductions for a specific employee
/Deductions?page=0 - POSTCreates a new deduction for a specific employee
/Deductions - GETRetrieves a single deduction by using a unique deduction ID
/Deductions/:deductionId - GETRetrieves statutory deductions
/StatutoryDeductions?page=0 - GETRetrieves a specific statutory deduction by using a unique statutory deductions id
/StatutoryDeductions/:id - GETRetrieves superannuations
/Superannuations?page=0 - POSTCreates a new superannuation
/Superannuations - GETRetrieves a specific superannuation using a unique superannuation ID
/Superannuations/:SuperannuationID - GETRetrieves earnings rates
/EarningsRates?page=0 - POSTCreates a new earnings rate
/EarningsRates - GETRetrieves a specific earnings rates by using a unique earnings rate id
/EarningsRates/:EarningsRateID - GETRetrieves leave types
/LeaveTypes?page=0&ActiveOnly=true - POSTCreates a new leave type
/LeaveTypes - GETRetrieves a specific leave type by using a unique leave type ID
/LeaveTypes/:LeaveTypeID - GETRetrieves reimbursements
/Reimbursements?page=0 - POSTCreates a new reimbursement
/Reimbursements - GETRetrieves a specific reimbursement by using a unique reimbursement ID
/Reimbursements/:ReimbursementID - GETRetrieves timesheets
/Timesheets?page=5&filter=employeeId==00000000-0000-0000-0000-000000000000,payrollCalendarId==00000000-0000-0000-0000-000000000000&status=Draft&startDate=2019-01-02&endDate=2020-01-02&sort=startDate - POSTCreates a new timesheet
/Timesheets - GETRetrieves a specific timesheet by using a unique timesheet ID
/Timesheets/:TimesheetID - DELETEDeletes a timesheet
/Timesheets/:TimesheetID - POSTCreate a new timesheet line for a specific time sheet
/Timesheets/:TimesheetID/Lines - POSTApproves a timesheet
/Timesheets/:TimesheetID/Approve - POSTReverts a timesheet to draft
/Timesheets/:TimesheetID/RevertToDraft - PUTUpdates a timesheet line for a specific timesheet
/Timesheets/:TimesheetID/Lines/:TimesheetLineID - DELETEDeletes a timesheet line for a specific timesheet
/Timesheets/:TimesheetID/Lines/:TimesheetLineID - GETRetrieves payrun calendars
/PayRunCalendars?page=0 - POSTCreates a new payrun calendar
/PayRunCalendars - GETRetrieves a specific payrun calendar by using a unique payroll calendar ID
/PayRunCalendars/:PayrollCalendarID - GETRetrieves an employee's salary and wages
/Employees/:EmployeeID/SalaryAndWages?page=0 - POSTCreates an employee salary and wage record
/Employees/:EmployeeID/SalaryAndWages - GETRetrieves an employee's salary and wages record by using a unique salary and wage ID
/Employees/:EmployeeID/SalaryAndWages/:SalaryAndWagesID - PUTUpdates an employee's salary and wages record
/Employees/:EmployeeID/SalaryAndWages/:SalaryAndWagesID - DELETEDeletes an employee's salary and wages record
/Employees/:EmployeeID/SalaryAndWages/:SalaryAndWagesID - GETRetrieves pay runs
/PayRuns?page=0&status=Draft - POSTCreates a pay run
/PayRuns - GETRetrieves a specific pay run by using a unique pay run ID
/PayRuns/:PayRunID - GETRetrieves payslips
/PaySlips?page=0&PayRunID=3fa85f64-5717-4562-b3fc-2c963f66afa6 - GETRetrieves a specific payslip by a unique pay slip ID
/PaySlips/:PaySlipID - PUTCreates an employee pay slip
/PaySlips/:PaySlipID - GETRetrieves settings
/Settings - GETRetrieves tracking categories
/Settings/TrackingCategories - GETRetrieves employee's working patterns
/Employees/:EmployeeID/Working-Patterns - POSTCreates an employee working pattern
/Employees/:EmployeeID/Working-Patterns - GETRetrieves employee's working patterns
/Employees/:EmployeeID/Working-Patterns/:EmployeeWorkingPatternID - DELETEdeletes employee's working patterns
/Employees/:EmployeeID/Working-Patterns/:EmployeeWorkingPatternID
API details
- Base URL
https://api.xero.com/payroll.xro/2.0- Authentication
- OAuth 2.0 (authorization code flow) with 10 scopes
- Operations
- 71 operations on 46 pathsGET 36POST 23PUT 6DELETE 6
- Main resources
- PayrollNz 71
- Response formats
application/json- Description format
- OpenAPI 3.0.0, API version
20.1.0 - Links
- OpenAPI document · Terms of service · Support
- Listed from
- Xero's published OpenAPI description (XeroAPI/Xero-OpenAPI) (MIT)
How to test the Xero Payroll NZ in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Xero Payroll NZ collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 10 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Retrieves employees” (GET /Employees?filter=firstName==John,lastName==Smith&page=5), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Xero Payroll NZ?
This is the Xero Payroll API for orgs in the NZ region. It is listed under Finance & banking and has 71 endpoints.
Who publishes the Xero Payroll NZ?
It is listed from Xero's public API description (an OpenAPI document), not published by Xero on Swastik Codes. Anyone who controls xero.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Xero Payroll NZ?
Requests go to https://api.xero.com/payroll.xro/2.0. Endpoint paths are added to this base URL.
How do I authenticate with the Xero Payroll NZ?
With OAuth 2.0 (authorization code flow) with 10 scopes.
How many endpoints does the Xero Payroll NZ have?
71 operations on 46 paths (36 GET, 23 POST, 6 PUT, 6 DELETE). The largest groups are PayrollNz.
Is forking the Xero Payroll NZ free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.