Xero: Retrieves pay items
Xero payrollAu.getPayItems: arguments, response, policy and SDK examples.
← Payroll au operations · Get started
Operation xero.payroll_au_getpayitems
Provider route: GET /payroll.xro/1.0/PayItems. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/xero with npm, or alter-sdk-xero with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { XeroIntegration } from "@alter-ai/xero";
async function execute(input: Parameters<XeroIntegration["payrollAu"]["getPayItems"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new XeroIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.payrollAu.getPayItems(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_xero import XeroIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = XeroIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.payroll_au.get_pay_items(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.where | string | Optional | |
query.order | string | Optional | |
query.page | integer | Optional | |
headers | object | Required within parent | Additional keys: not allowed |
headers.xero-tenant-id | string | Required within parent | |
headers.If-Modified-Since | string | Optional | Format: date-time |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Creates a pay item — response body |
Referenced models: Creates a pay item — response body
Schemas
Section titled “Schemas”Creates a pay item — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
PayItems | Model | Optional | Expand Creates a pay item — response body — Pay Items |
Referenced models: Creates a pay item — response body — Pay Items
Creates a pay item — response body — Pay Items
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
DeductionTypes | array | Optional | |
DeductionTypes[] | Model | Each item | Expand Creates a pay item — response body — Pay Items Deduction Types item |
EarningsRates | array | Optional | |
EarningsRates[] | Model | Each item | Expand Creates a pay item — response body — Pay Items Earnings Rates item |
LeaveTypes | array | Optional | |
LeaveTypes[] | Model | Each item | Expand Creates a pay item — response body — Pay Items Leave Types item |
ReimbursementTypes | array | Optional | |
ReimbursementTypes[] | Model | Each item | Expand Creates a pay item — request body — body Reimbursement Types item |
Referenced models: Creates a pay item — response body — Pay Items Deduction Types item, Creates a pay item — response body — Pay Items Earnings Rates item, Creates a pay item — response body — Pay Items Leave Types item, Creates a pay item — request body — body Reimbursement Types item
Creates a pay item — response body — Pay Items Deduction Types item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
AccountCode | string | Optional | See Accounts |
CurrentRecord | boolean | Optional | Is the current record |
DeductionCategory | string | Optional | Known values: NONE, UNIONFEES, WORKPLACEGIVING |
DeductionTypeID | string | Optional | Xero identifier Format: uuid |
IsExemptFromW1 | boolean | Optional | Boolean to determine if the deduction type is reportable or exempt from W1 |
Name | string | Optional | Name of the earnings rate (max length = 100) Maximum length: 100 |
ReducesSuper | boolean | Optional | Most deductions don’t reduce your superannuation guarantee contribution liability, so typically you will not set any value for this. |
ReducesTax | boolean | Optional | Indicates that this is a pre-tax deduction that will reduce the amount of tax you withhold from an employee. |
UpdatedDateUTC | string | Optional | Last modified timestamp Read only: true |
Creates a pay item — response body — Pay Items Earnings Rates item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
AccountCode | string | Optional | See Accounts |
AccrueLeave | boolean | Optional | Indicates that this earnings rate should accrue leave. Only applicable if RateType is MULTIPLE |
AllowanceCategory | string | Optional | Known values: NONDEDUCTIBLE, UNIFORM, PRIVATEVEHICLE, HOMEOFFICE, TRANSPORT, GENERAL, OTHER |
AllowanceContributesToAnnualLeaveRate | boolean | Optional | Boolean to determine if the allowance earnings rate contributes towards annual leave rate. Only applicable if EarningsType is ALLOWANCE and RateType is RATEPERUNIT |
AllowanceContributesToOvertimeRate | boolean | Optional | Boolean to determine if the allowance earnings rate contributes towards overtime allowance rate. Only applicable if EarningsType is ALLOWANCE and RateType is RATEPERUNIT |
AllowanceType | string | Optional | Known values: CAR, TRANSPORT, LAUNDRY, MEALS, TRAVEL, OTHER, TOOLS, TASKS, QUALIFICATIONS |
Amount | JSON | Optional | |
Amount (anyOf 1) | number | Alternative | Optional Amount for FIXEDAMOUNT RateType EarningsRate Format: double |
Amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
CurrentRecord | boolean | Optional | Is the current record |
EarningsRateID | string | Optional | Xero identifier Format: uuid |
EarningsType | string | Optional | Known values: FIXED, ORDINARYTIMEEARNINGS, OVERTIMEEARNINGS, ALLOWANCE, LUMPSUMD, EMPLOYMENTTERMINATIONPAYMENT, LUMPSUMA, LUMPSUMB, BONUSESANDCOMMISSIONS, LUMPSUME, LUMPSUMW, DIRECTORSFEES, PAIDPARENTALLEAVE, WORKERSCOMPENSATION |
EmploymentTerminationPaymentType | string | Optional | Known values: O, R |
IsExemptFromSuper | boolean | Optional | See the ATO website for details of which payments are exempt from SGC |
IsExemptFromTax | boolean | Optional | Most payments are subject to tax, so you should only set this value if you are sure that a payment is exempt from PAYG withholding |
IsQualifyingEarnings | boolean | Required within parent | Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations |
IsReportableAsW1 | boolean | Optional | Boolean to determine if the earnings rate is reportable or exempt from W1 |
Multiplier | JSON | Optional | |
Multiplier (anyOf 1) | number | Alternative | 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 MULTIPLE Format: double |
Multiplier (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Name | string | Optional | Name of the earnings rate (max length = 100) Maximum length: 100 |
RatePerUnit | string | Optional | Default rate per unit (optional). Only applicable if RateType is RATEPERUNIT. |
RateType | string | Optional | Known values: FIXEDAMOUNT, MULTIPLE, RATEPERUNIT |
TypeOfUnits | string | Optional | Type of units used to record earnings (max length = 50). Only When RateType is RATEPERUNIT Maximum length: 50 |
UpdatedDateUTC | string | Optional | Last modified timestamp Read only: true |
Creates a pay item — response body — Pay Items Leave Types item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
CurrentRecord | boolean | Optional | Is the current record |
IsPaidLeave | boolean | Optional | Set this to indicate that an employee will be paid when taking this type of leave |
IsQualifyingEarnings | boolean | Required within parent | Boolean to determine if the leave type is considered as qualifying earnings for superannuation guarantee calculations |
LeaveCategoryCode | string | Optional | Code used to identify the Leave Category Known values: ANNUALLEAVE, LONGSERVICELEAVE, PERSONALSICKCARERSLEAVE, ROSTEREDDAYOFF, TIMEOFFINLIEU, COMPASSIONATEANDBEREAVEMENTLEAVE, STUDYLEAVE, FAMILYANDDOMESTICVIOLENCELEAVE, SPECIALPAIDLEAVE, COMMUNITYSERVICELEAVE, JURYDUTYLEAVE, DEFENCERESERVELEAVE |
LeaveLoadingRate | JSON | Optional | |
LeaveLoadingRate (anyOf 1) | number | Alternative | Enter an amount here if your organisation pays an additional percentage on top of ordinary earnings when your employees take leave (typically 17.5%) Format: double |
LeaveLoadingRate (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
LeaveTypeID | string | Optional | Xero identifier Format: uuid |
Name | string | Optional | Name of the earnings rate (max length = 100) Maximum length: 100 |
NormalEntitlement | JSON | Optional | |
NormalEntitlement (anyOf 1) | number | Alternative | The number of units the employee is entitled to each year Format: double |
NormalEntitlement (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
SGCExempt | boolean | Optional | Set this to indicate that the leave type is exempt from superannuation guarantee contribution |
ShowOnPayslip | boolean | Optional | Set this if you want a balance for this leave type to be shown on your employee’s payslips |
TypeOfUnits | string | Optional | The type of units by which leave entitlements are normally tracked. These are typically the same as the type of units used for the employee’s ordinary earnings rate |
UpdatedDateUTC | string | Optional | Last modified timestamp Read only: true |
Creates a pay item — request body — body Reimbursement Types item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
AccountCode | string | Optional | See Accounts |
CurrentRecord | boolean | Optional | Is the current record |
Name | string | Optional | Name of the earnings rate (max length = 100) Maximum length: 100 |
ReimbursementTypeID | string | Optional | Xero identifier Format: uuid |
UpdatedDateUTC | string | Optional | Last modified timestamp Read only: true |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: xero.payroll_au_getpayitems. Catalog operation: payroll_au.getPayItems. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.