Xero: Updates a pay run
Xero payrollAu.updatePayRun: arguments, response, policy and SDK examples.
← Payroll au operations · Get started
Operation xero.payroll_au_updatepayrun
Provider route: POST /payroll.xro/1.0/PayRuns/{PayRunID}. 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"]["updatePayRun"]>[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.updatePayRun(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.update_pay_run(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.PayRunID | string | Required within parent | Format: uuid |
headers | object | Required within parent | Additional keys: not allowed |
headers.xero-tenant-id | string | Required within parent | |
headers.Idempotency-Key | string | Optional | |
body | array | Required within parent | |
body[] | Model | Each item | Expand Creates a pay run — request body — body item |
Referenced models: Creates a pay run — request body — body item
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 run — response body |
Referenced models: Creates a pay run — response body
Schemas
Section titled “Schemas”Creates a pay run — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
PayRuns | array | Optional | |
PayRuns[] | Model | Each item | Expand Creates a pay run — response body — Pay Runs item |
Referenced models: Creates a pay run — response body — Pay Runs item
Creates a pay run — request body — body item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
Deductions | number | Optional | The total Deductions for the Payrun Format: double |
NetPay | number | Optional | The total NetPay for the Payrun Format: double |
PayRunID | string | Optional | Xero identifier for pay run Format: uuid |
PayRunPeriodEndDate | string | Optional | Period End Date for the PayRun (YYYY-MM-DD) |
PayRunPeriodStartDate | string | Optional | Period Start Date for the PayRun (YYYY-MM-DD) |
PayRunStatus | string | Optional | One of: DRAFT, POSTED |
PaymentDate | string | Optional | Payment Date for the PayRun (YYYY-MM-DD) |
PayrollCalendarID | string | Required within parent | Xero identifier for pay run Format: uuid |
PayslipMessage | string | Optional | Payslip message for the PayRun |
Payslips | array | Optional | The payslips in the payrun |
Payslips[] | Model | Each item | Expand Creates a pay run — request body — body item Payslips item |
Reimbursement | number | Optional | The total Reimbursements for the Payrun Format: double |
Super | number | Optional | The total Super for the Payrun Format: double |
Tax | number | Optional | The total Tax for the Payrun Format: double |
UpdatedDateUTC | string | Optional | Last modified timestamp Read only: true |
ValidationErrors | array | Optional | Displays array of validation error messages from the API |
ValidationErrors[] | Model | Each item | Expand Retrieves journals — response body — Warnings item |
Wages | number | Optional | The total Wages for the Payrun Format: double |
Referenced models: Retrieves journals — response body — Warnings item, Creates a pay run — request body — body item Payslips item
Creates a pay run — response body — Pay Runs item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
Deductions | JSON | Optional | |
Deductions (anyOf 1) | number | Alternative | The total Deductions for the Payrun Format: double |
Deductions (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
NetPay | JSON | Optional | |
NetPay (anyOf 1) | number | Alternative | The total NetPay for the Payrun Format: double |
NetPay (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
PayRunID | string | Optional | Xero identifier for pay run Format: uuid |
PayRunPeriodEndDate | string | Optional | Period End Date for the PayRun (YYYY-MM-DD) |
PayRunPeriodStartDate | string | Optional | Period Start Date for the PayRun (YYYY-MM-DD) |
PayRunStatus | string | Optional | Known values: DRAFT, POSTED |
PaymentDate | string | Optional | Payment Date for the PayRun (YYYY-MM-DD) |
PayrollCalendarID | string | Required within parent | Xero identifier for pay run Format: uuid |
PayslipMessage | string | Optional | Payslip message for the PayRun |
Payslips | array | Optional | The payslips in the payrun |
Payslips[] | Model | Each item | Expand Creates a pay run — response body — Pay Runs item Payslips item |
Reimbursement | JSON | Optional | |
Reimbursement (anyOf 1) | number | Alternative | The total Reimbursements for the Payrun Format: double |
Reimbursement (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Super | JSON | Optional | |
Super (anyOf 1) | number | Alternative | The total Super for the Payrun Format: double |
Super (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Tax | JSON | Optional | |
Tax (anyOf 1) | number | Alternative | The total Tax for the Payrun Format: double |
Tax (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
UpdatedDateUTC | string | Optional | Last modified timestamp Read only: true |
ValidationErrors | array | Optional | Displays array of validation error messages from the API |
ValidationErrors[] | Model | Each item | Expand Retrieves journals — response body — Warnings item |
Wages | JSON | Optional | |
Wages (anyOf 1) | number | Alternative | The total Wages for the Payrun Format: double |
Wages (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Creates a pay run — response body — Pay Runs item Payslips item, Retrieves journals — response body — Warnings item
Retrieves journals — response body — Warnings item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
Message | string | Optional | Validation error message |
Creates a pay run — request body — body item Payslips item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
Deductions | number | Optional | The Deductions for the Payslip Format: double |
EmployeeGroup | string | Optional | Employee group name |
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 |
NetPay | number | Optional | The NetPay for the Payslip Format: double |
PayslipID | string | Optional | Xero identifier for the payslip Format: uuid |
Reimbursements | number | Optional | The Reimbursements for the Payslip Format: double |
Super | number | Optional | The Super for the Payslip Format: double |
Tax | number | Optional | The Tax for the Payslip Format: double |
UpdatedDateUTC | string | Optional | Last modified timestamp Read only: true |
Wages | number | Optional | The Wages for the Payslip Format: double |
Creates a pay run — response body — Pay Runs item Payslips item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
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]+)?$ |
EmployeeGroup | string | Optional | Employee group name |
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 |
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 |
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]+)?$ |
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]+)?$ |
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]+)?$ |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: xero.payroll_au_updatepayrun. Catalog operation: payroll_au.updatePayRun. 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.