Xero: Retrieves for a payslip by a unique payslip id
Xero payrollAu.getPayslip: arguments, response, policy and SDK examples.
← Payroll au operations · Get started
Operation xero.payroll_au_getpayslip
Provider route: GET /payroll.xro/1.0/Payslip/{PayslipID}. 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"]["getPayslip"]>[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.getPayslip(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_payslip(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.PayslipID | string | Required within parent | Format: uuid |
headers | object | Required within parent | Additional keys: not allowed |
headers.xero-tenant-id | string | Required within parent |
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 Retrieves for a payslip by a unique payslip id — response body |
Referenced models: Retrieves for a payslip by a unique payslip id — response body
Schemas
Section titled “Schemas”4 more schemas are linked from the tables above, on the schema pages.
Retrieves for a payslip by a unique payslip id — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
Payslip | Model | Optional | Expand Retrieves for a payslip by a unique payslip id — response body — Payslip |
Referenced models: Retrieves for a payslip by a unique payslip id — response body — Payslip
Retrieves for a payslip by a unique payslip id — response body — Payslip
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
DeductionLines | array | Optional | |
DeductionLines[] | Model | Each item | Expand Retrieves for a payslip by a unique payslip id — response body — Payslip Deduction Lines item |
Deductions | JSON | Optional | |
Deductions (anyOf 1) | number | Alternative | The Deductions for the Payslip Format: double |
Deductions (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
EarningsLines | array | Optional | |
EarningsLines[] | Model | Each item | Expand Retrieves for a payslip by a unique payslip id — response body — Payslip Earnings Lines item |
EmployeeID | string | Optional | The Xero identifier for an employee Format: uuid |
FirstName | string | Optional | First name of employee |
LastName | string | Optional | Last name of employee |
LeaveAccrualLines | array | Optional | |
LeaveAccrualLines[] | Model | Each item | Expand Retrieves for a payslip by a unique payslip id — response body — Payslip Leave Accrual Lines item |
LeaveEarningsLines | array | Optional | |
LeaveEarningsLines[] | Model | Each item | Expand Retrieves for a payslip by a unique payslip id — response body — Payslip Leave Earnings Lines item |
NetPay | JSON | Optional | |
NetPay (anyOf 1) | number | Alternative | The NetPay for the Payslip Format: double |
NetPay (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
PayslipID | string | Optional | Xero identifier for the payslip Format: uuid |
ReimbursementLines | array | Optional | |
ReimbursementLines[] | Model | Each item | Expand Retrieves for a payslip by a unique payslip id — response body — Payslip Reimbursement Lines item |
Reimbursements | JSON | Optional | |
Reimbursements (anyOf 1) | number | Alternative | The Reimbursements for the Payslip Format: double |
Reimbursements (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Super | JSON | Optional | |
Super (anyOf 1) | number | Alternative | The Super for the Payslip Format: double |
Super (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
SuperannuationLines | array | Optional | |
SuperannuationLines[] | Model | Each item | Expand Retrieves for a payslip by a unique payslip id — response body — Payslip Superannuation Lines item |
Tax | JSON | Optional | |
Tax (anyOf 1) | number | Alternative | The Tax for the Payslip Format: double |
Tax (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
TaxLines | array | Optional | |
TaxLines[] | Model | Each item | Expand Retrieves for a payslip by a unique payslip id — response body — Payslip Tax Lines item |
TimesheetEarningsLines | array | Optional | |
TimesheetEarningsLines[] | Model | Each item | Expand Retrieves for a payslip by a unique payslip id — response body — Payslip Earnings Lines item |
UpdatedDateUTC | string | Optional | Last modified timestamp Read only: true |
Wages | JSON | Optional | |
Wages (anyOf 1) | number | Alternative | The Wages for the Payslip Format: double |
Wages (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Retrieves for a payslip by a unique payslip id — response body — Payslip Deduction Lines item, Retrieves for a payslip by a unique payslip id — response body — Payslip Earnings Lines item, Retrieves for a payslip by a unique payslip id — response body — Payslip Leave Accrual Lines item, Retrieves for a payslip by a unique payslip id — response body — Payslip Leave Earnings Lines item, Retrieves for a payslip by a unique payslip id — response body — Payslip Reimbursement Lines item, Retrieves for a payslip by a unique payslip id — response body — Payslip Superannuation Lines item, Retrieves for a payslip by a unique payslip id — response body — Payslip Tax Lines item
Retrieves for a payslip by a unique payslip id — response body — Payslip Deduction Lines item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
Amount | JSON | Optional | |
Amount (anyOf 1) | number | Alternative | Deduction type amount Format: double |
Amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
CalculationType | string | Optional | Known values: FIXEDAMOUNT, PRETAX, POSTTAX |
DeductionTypeID | string | Required within parent | Xero deduction type identifier Format: uuid |
NumberOfUnits | JSON | Optional | |
NumberOfUnits (anyOf 1) | number | Alternative | Deduction number of units Format: double |
NumberOfUnits (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Percentage | JSON | Optional | |
Percentage (anyOf 1) | number | Alternative | The Percentage of the Deduction Format: double |
Percentage (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Retrieves for a payslip by a unique payslip id — response body — Payslip Earnings Lines item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
Amount | JSON | Optional | |
Amount (anyOf 1) | number | Alternative | Earnings rate amount Format: double |
Amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
AnnualSalary | JSON | Optional | |
AnnualSalary (anyOf 1) | number | Alternative | Annual salary for earnings line Format: double |
AnnualSalary (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
CalculationType | string | Optional | Known values: USEEARNINGSRATE, ENTEREARNINGSRATE, ANNUALSALARY |
EarningsRateID | string | Required within parent | Xero unique id for earnings rate Format: uuid |
FixedAmount | JSON | Optional | |
FixedAmount (anyOf 1) | number | Alternative | Earnings rate amount. Only applicable if the EarningsRate RateType is Fixed Format: double |
FixedAmount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
NormalNumberOfUnits | JSON | Optional | |
NormalNumberOfUnits (anyOf 1) | number | Alternative | Normal number of units for EarningsLine. Applicable when RateType is "MULTIPLE" Format: double |
NormalNumberOfUnits (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
NumberOfUnits | JSON | Optional | |
NumberOfUnits (anyOf 1) | number | Alternative | Earnings rate number of units. Format: double |
NumberOfUnits (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
NumberOfUnitsPerWeek | JSON | Optional | |
NumberOfUnitsPerWeek (anyOf 1) | number | Alternative | number of units for earning line Format: double |
NumberOfUnitsPerWeek (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
RatePerUnit | JSON | Optional | |
RatePerUnit (anyOf 1) | number | Alternative | Rate per unit of the EarningsLine. Format: double |
RatePerUnit (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Retrieves for a payslip by a unique payslip id — response body — Payslip Leave Accrual Lines item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
AutoCalculate | boolean | Optional | If you want to auto calculate leave. |
LeaveTypeID | string | Optional | Xero identifier for the Leave type. Format: uuid |
NumberOfUnits | JSON | Optional | |
NumberOfUnits (anyOf 1) | number | Alternative | Leave Accrual number of units Format: double |
NumberOfUnits (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: xero.payroll_au_getpayslip. Catalog operation: payroll_au.getPayslip. 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.