This is the Xero Payroll API for orgs in Australia region.
Bring your own key. This API needs your own Xero Payroll AU API key - get one from the provider, add it once below, and the proxy injects it on every call. Your OmniStream plan covers the unified SDK, key storage, and proxy - the provider's own rate limits still apply to your key.
This is a community listing. If you own this API, you can request ownership.
npm install omnistream-sdkimport { OmniClient } from "omnistream-sdk";
const omni = new OmniClient({ token: process.env.OMNI_KEY! });
// One key reaches every API on the marketplace.
const data = await omni.call("xero/getEmployees");One install, one key - the same client calls every API on the marketplace.
Xero identifier for Tenant
Only records created or modified since this timestamp will be returned
Filter by an any element
Order by an any element
e.g. page=1 – Up to 100 employees will be returned in a single API call
Searches payroll employees
Creates a payroll employee
Retrieves an employee's detail by unique employee id
Updates an employee's detail
Retrieves leave applications
/**
* XeroPayrollAUAPI - generated by OmniStream from Xero Payroll AU API's OpenAPI spec.
* One typed method per endpoint. A single Omni key reaches the API.
*/
const DEFAULT_BASE = "https://grid.skinvaults.online/v1/proxy/xero";
export class XeroPayrollAUAPIError extends Error {
status: number;
code?: string;
constructor(status: number, code: string | undefined, message?: string) {
super(message || `XeroPayrollAUAPI error ${status}`);
this.name = "XeroPayrollAUAPIError";
this.status = status;
this.code = code;
}
}
export interface XeroPayrollAUAPIOptions {
baseUrl?: string;
fetch?: typeof fetch;
timeoutMs?: number;
}
export class XeroPayrollAUAPI {
/** @param token Your OmniStream key (one key for every API). */
constructor(private token: string, private opts: XeroPayrollAUAPIOptions = {}) {
if (!token) throw new Error("XeroPayrollAUAPI: token is required");
}
rateLimit: { remainingMinute?: number; remainingDay?: number } | null = null;
private async _request(method: string, path: string, { params, body }: { params?: Record<string, unknown>; body?: unknown } = {}): Promise<any> {
const f = this.opts.fetch ?? globalThis.fetch;
const url = new URL((this.opts.baseUrl ?? DEFAULT_BASE).replace(/\/+$/, "") + path);
if (params) for (const [k, v] of Object.entries(params)) if (v != null) url.searchParams.set(k, String(v));
const headers: Record<string, string> = { "x-omni-key": this.token };
if (body !== undefined) headers["content-type"] = "application/json";
const res = await f(url, { method, headers, body: body !== undefined ? JSON.stringify(body) : undefined });
this.rateLimit = {
remainingMinute: Number(res.headers.get("x-ratelimit-remaining-minute")) || undefined,
remainingDay: Number(res.headers.get("x-ratelimit-remaining-day")) || undefined,
};
const data = await res.json().catch(() => ({}));
if (!res.ok) throw new XeroPayrollAUAPIError(res.status, data?.error?.code, data?.error?.message);
return data.data ?? data;
}
/** Searches payroll employees */
getEmployees(params: { "Xero-Tenant-Id": string; "If-Modified-Since"?: string; "where"?: string; "order"?: string; "page"?: number }): Promise<any> {
return this._request("GET", "/Employees", { params });
}
/** Creates a payroll employee */
createEmployee(body: unknown, params: { "Xero-Tenant-Id": string }): Promise<any> {
return this._request("POST", "/Employees", { body, params });
}
/** Retrieves an employee's detail by unique employee id */
getEmployee(params: { "Xero-Tenant-Id": string; "EmployeeID": string }): Promise<any> {
return this._request("GET", "/Employees/{EmployeeID}", { params });
}
/** Updates an employee's detail */
updateEmployee(body: unknown, params: { "Xero-Tenant-Id": string; "EmployeeID": string }): Promise<any> {
return this._request("POST", "/Employees/{EmployeeID}", { body, params });
}
/** Retrieves leave applications */
getLeaveApplications(params: { "Xero-Tenant-Id": string; "If-Modified-Since"?: string; "where"?: string; "order"?: string; "page"?: number }): Promise<any> {
return this._request("GET", "/LeaveApplications", { params });
}
/** Creates a leave application */
createLeaveApplication(body: unknown, params: { "Xero-Tenant-Id": string }): Promise<any> {
return this._request("POST", "/LeaveApplications", { body, params });
}
/** Retrieves a leave application by a unique leave application id */
getLeaveApplication(params: { "Xero-Tenant-Id": string; "LeaveApplicationID": string }): Promise<any> {
return this._request("GET", "/LeaveApplications/{LeaveApplicationID}", { params });
}
/** Updates a specific leave application */
updateLeaveApplication(body: unknown, params: { "Xero-Tenant-Id": string; "LeaveApplicationID": string }): Promise<any> {
return this._request("POST", "/LeaveApplications/{LeaveApplicationID}", { body, params });
}
/** Retrieves pay items */
getPayItems(params: { "Xero-Tenant-Id": string; "If-Modified-Since"?: string; "where"?: string; "order"?: string; "page"?: number }): Promise<any> {
return this._request("GET", "/PayItems", { params });
}
/** Creates a pay item */
createPayItem(body: unknown, params: { "Xero-Tenant-Id": string }): Promise<any> {
return this._request("POST", "/PayItems", { body, params });
}
/** Retrieves pay runs */
getPayRuns(params: { "Xero-Tenant-Id": string; "If-Modified-Since"?: string; "where"?: string; "order"?: string; "page"?: number }): Promise<any> {
return this._request("GET", "/PayRuns", { params });
}
/** Creates a pay run */
createPayRun(body: unknown, params: { "Xero-Tenant-Id": string }): Promise<any> {
return this._request("POST", "/PayRuns", { body, params });
}
/** Retrieves a pay run by using a unique pay run id */
getPayRun(params: { "Xero-Tenant-Id": string; "PayRunID": string }): Promise<any> {
return this._request("GET", "/PayRuns/{PayRunID}", { params });
}
/** Updates a pay run */
updatePayRun(body: unknown, params: { "Xero-Tenant-Id": string; "PayRunID": string }): Promise<any> {
return this._request("POST", "/PayRuns/{PayRunID}", { body, params });
}
/** Retrieves payroll calendars */
getPayrollCalendars(params: { "Xero-Tenant-Id": string; "If-Modified-Since"?: string; "where"?: string; "order"?: string; "page"?: number }): Promise<any> {
return this._request("GET", "/PayrollCalendars", { params });
}
/** Creates a Payroll Calendar */
createPayrollCalendar(body: unknown, params: { "Xero-Tenant-Id": string }): Promise<any> {
return this._request("POST", "/PayrollCalendars", { body, params });
}
/** Retrieves payroll calendar by using a unique payroll calendar ID */
getPayrollCalendar(params: { "Xero-Tenant-Id": string; "PayrollCalendarID": string }): Promise<any> {
return this._request("GET", "/PayrollCalendars/{PayrollCalendarID}", { params });
}
/** Retrieves for a payslip by a unique payslip id */
getPayslip(params: { "Xero-Tenant-Id": string; "PayslipID": string }): Promise<any> {
return this._request("GET", "/Payslip/{PayslipID}", { params });
}
/** Updates a payslip */
updatePayslip(body: unknown, params: { "Xero-Tenant-Id": string; "PayslipID": string }): Promise<any> {
return this._request("POST", "/Payslip/{PayslipID}", { body, params });
}
/** Retrieves payroll settings */
getSettings(params: { "Xero-Tenant-Id": string }): Promise<any> {
return this._request("GET", "/Settings", { params });
}
/** Retrieves superfund products */
getSuperfundProducts(params: { "Xero-Tenant-Id": string; "ABN"?: string; "USI"?: string }): Promise<any> {
return this._request("GET", "/SuperfundProducts", { params });
}
/** Retrieves superfunds */
getSuperfunds(params: { "Xero-Tenant-Id": string; "If-Modified-Since"?: string; "where"?: string; "order"?: string; "page"?: number }): Promise<any> {
return this._request("GET", "/Superfunds", { params });
}
/** Creates a superfund */
createSuperfund(body: unknown, params: { "Xero-Tenant-Id": string }): Promise<any> {
return this._request("POST", "/Superfunds", { body, params });
}
/** Retrieves a superfund by using a unique superfund ID */
getSuperfund(params: { "Xero-Tenant-Id": string; "SuperFundID": string }): Promise<any> {
return this._request("GET", "/Superfunds/{SuperFundID}", { params });
}
/** Updates a superfund */
updateSuperfund(body: unknown, params: { "Xero-Tenant-Id": string; "SuperFundID": string }): Promise<any> {
return this._request("POST", "/Superfunds/{SuperFundID}", { body, params });
}
/** Retrieves timesheets */
getTimesheets(params: { "Xero-Tenant-Id": string; "If-Modified-Since"?: string; "where"?: string; "order"?: string; "page"?: number }): Promise<any> {
return this._request("GET", "/Timesheets", { params });
}
/** Creates a timesheet */
createTimesheet(body: unknown, params: { "Xero-Tenant-Id": string }): Promise<any> {
return this._request("POST", "/Timesheets", { body, params });
}
/** Retrieves a timesheet by using a unique timesheet id */
getTimesheet(params: { "Xero-Tenant-Id": string; "TimesheetID": string }): Promise<any> {
return this._request("GET", "/Timesheets/{TimesheetID}", { params });
}
/** Updates a timesheet */
updateTimesheet(body: unknown, params: { "Xero-Tenant-Id": string; "TimesheetID": string }): Promise<any> {
return this._request("POST", "/Timesheets/{TimesheetID}", { body, params });
}
}
export default XeroPayrollAUAPI;
No reviews yet. Be the first to rate this API.
Yes. Xero Payroll AU API uses bearer authentication, so you bring your own key from the provider. You store it once on OmniStream and the proxy injects it into every call, so your code only ever sends your Omni key.
This is the Xero Payroll API for orgs in Australia region. It exposes 29 endpoints over GET, POST, including GET /Employees, POST /Employees, GET /Employees/{EmployeeID}.
Install the OmniStream SDK for your language and call Xero Payroll AU API through it. The client is generated from this API's OpenAPI spec, so parameters and responses are fully typed, and the same client also calls every other API in the marketplace.
You can start on the free plan. OmniStream charges for the unified SDK, key storage and proxy rather than for Xero Payroll AU API itself, and Xero Payroll AU API's own rate limits still apply to your provider key.
ExchangeRate-API: Fetch the latest currency exchange rates via API. ExchangeRate-API is free and unlimited.
Creates a leave application
Retrieves a leave application by a unique leave application id
Updates a specific leave application
Retrieves pay items
Creates a pay item
Retrieves pay runs
Creates a pay run
Retrieves a pay run by using a unique pay run id
Updates a pay run
Retrieves payroll calendars
Creates a Payroll Calendar
Retrieves payroll calendar by using a unique payroll calendar ID
Retrieves for a payslip by a unique payslip id
Updates a payslip
Retrieves payroll settings
Retrieves superfund products
Retrieves superfunds
Creates a superfund
Retrieves a superfund by using a unique superfund ID
Updates a superfund
Retrieves timesheets
Creates a timesheet
Retrieves a timesheet by using a unique timesheet id
Updates a timesheet