Xero

Xero Payroll UK

This is the Xero Payroll API for orgs in the UK region.

Finance & banking#openapi

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 UK region.

Endpoints 69

PayrollUk

  • GETRetrieves employees/Employees?filter=firstName==John,lastName==Smith,isOffPayrollWorker==false&page=5
  • POSTCreates employees/Employees
  • GETRetrieves specific employees by using a unique employee ID/Employees/:EmployeeID
  • PUTUpdates a specific employee's detail/Employees/:EmployeeID
  • POSTCreates employment detail for a specific employee using a unique employee ID/Employees/:EmployeeID/Employment
  • GETRetrieves tax records for a specific employee using a unique employee ID/Employees/:EmployeeID/Tax
  • GETRetrieves a specific employee's openingbalances using a unique employee ID/Employees/:EmployeeID/ukopeningbalances
  • PUTUpdates a specific employee's opening balances/Employees/:EmployeeID/ukopeningbalances
  • POSTCreates an opening balance for a specific employee/Employees/:EmployeeID/ukopeningbalances
  • GETRetrieves a specific employee's leave records using a unique employee ID/Employees/:EmployeeID/Leave
  • POSTCreates leave records for a specific employee/Employees/:EmployeeID/Leave
  • GETRetrieves a specific employee's leave record using a unique employee ID/Employees/:EmployeeID/Leave/:LeaveID
  • PUTUpdates a specific employee's leave records/Employees/:EmployeeID/Leave/:LeaveID
  • DELETEDeletes a specific employee's leave record/Employees/:EmployeeID/Leave/:LeaveID
  • GETRetrieves a specific employee's leave balances using a unique employee ID/Employees/:EmployeeID/LeaveBalances
  • GETRetrieves a specific employee's leave balances using a unique employee ID/Employees/:EmployeeID/StatutoryLeaveBalance?LeaveType=sick&AsOfDate=2024-01-01
  • GETRetrieves a specific employee's summary of statutory leaves using a unique employee ID/StatutoryLeaves/Summary/:EmployeeID?activeOnly=true
  • POSTCreates statutory sick leave records/StatutoryLeaves/Sick
  • GETRetrieves a statutory sick leave for an employee/StatutoryLeaves/Sick/:StatutorySickLeaveID
  • GETRetrieves a specific employee's leave periods using a unique employee ID/Employees/:EmployeeID/LeavePeriods?startDate=2024-01-01&endDate=2024-01-01
  • GETRetrieves a specific employee's leave types using a unique employee ID/Employees/:EmployeeID/LeaveTypes
  • POSTCreates employee leave type records/Employees/:EmployeeID/LeaveTypes
  • GETRetrieves a specific employee's payment method using a unique employee ID/Employees/:EmployeeID/PaymentMethods
  • POSTCreates an employee payment method/Employees/:EmployeeID/PaymentMethods
  • GETRetrieves a specific employee pay templates using a unique employee ID/Employees/:EmployeeID/PayTemplates
  • POSTCreates an earnings template records for a specific employee/Employees/:EmployeeID/PayTemplates/earnings
  • PUTUpdates a specific employee's earnings template records/Employees/:EmployeeID/PayTemplates/earnings/:PayTemplateEarningID
  • DELETEDeletes a specific employee's earnings template record/Employees/:EmployeeID/PayTemplates/earnings/:PayTemplateEarningID
  • POSTCreates multiple earnings template records for a specific employee using a unique employee ID/Employees/:EmployeeID/paytemplateearnings
  • GETRetrieves employee benefits/Benefits?page=0
  • POSTCreates a new employee benefit/Benefits
  • GETRetrieves a specific benefit by using a unique benefit ID/Benefits/:id
  • GETRetrieves deductions/Deductions?page=0
  • POSTCreates a new deduction/Deductions
  • GETRetrieves a specific deduction by using a unique deduction ID/Deductions/:deductionId
  • GETRetrieves earnings orders/EarningsOrders?page=0
  • GETRetrieves a specific earnings orders by using a unique earnings orders id/EarningsOrders/:id
  • 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
  • GETRetrieve a specific timesheet by using a unique timesheet ID/Timesheets/:TimesheetID
  • DELETEDeletes a specific timesheet/Timesheets/:TimesheetID
  • POSTCreates a new timesheet line for a specific timesheet using a unique timesheet ID/Timesheets/:TimesheetID/Lines
  • POSTApproves a specific timesheet/Timesheets/:TimesheetID/Approve
  • POSTReverts a specific timesheet to draft/Timesheets/:TimesheetID/RevertToDraft
  • PUTUpdates a specific timesheet line for a specific timesheet/Timesheets/:TimesheetID/Lines/:TimesheetLineID
  • DELETEDeletes a specific timesheet line/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 payrun calendar ID/PayRunCalendars/:PayRunCalendarID
  • GETRetrieves a specific employee's salary and wages by using a unique employee ID/Employees/:EmployeeID/SalaryAndWages?page=0
  • POSTCreates a salary and wage record for a specific employee/Employees/:EmployeeID/SalaryAndWages
  • GETRetrieves a specific salary and wages record for a specific employee using a unique salary and wage id/Employees/:EmployeeID/SalaryAndWages/:SalaryAndWagesID
  • PUTUpdates salary and wages record for a specific employee/Employees/:EmployeeID/SalaryAndWages/:SalaryAndWagesID
  • DELETEDeletes a salary and wages record for a specific employee/Employees/:EmployeeID/SalaryAndWages/:SalaryAndWagesID
  • GETRetrieves pay runs/PayRuns?page=0&status=Draft
  • 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 using a unique payslip ID/Payslips/:PayslipID
  • GETRetrieves payroll settings/Settings
  • GETRetrieves tracking categories/Settings/trackingCategories

API details

Base URL
https://api.xero.com/payroll.xro/2.0
Authentication
OAuth 2.0 (authorization code flow) with 10 scopes
Operations
69 operations on 47 pathsGET 38POST 20PUT 6DELETE 5
Main resources
PayrollUk 69
Response formats
application/json
Description format
OpenAPI 3.0.0, API version 20.1.0

How to test the Xero Payroll UK in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Xero Payroll UK collection, without the publisher's secrets.
  3. 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.
  4. Send a requestPick an endpoint, for example “Retrieves employees” (GET /Employees?filter=firstName==John,lastName==Smith,isOffPayrollWorker==false&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 UK?

This is the Xero Payroll API for orgs in the UK region. It is listed under Finance & banking and has 69 endpoints.

Who publishes the Xero Payroll UK?

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 UK?

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 UK?

With OAuth 2.0 (authorization code flow) with 10 scopes.

How many endpoints does the Xero Payroll UK have?

69 operations on 47 paths (38 GET, 20 POST, 6 PUT, 5 DELETE). The largest groups are PayrollUk.

Is forking the Xero Payroll UK free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.