Xero: Updates a specific leave application
Xero payrollAu.updateLeaveApplication: arguments, response, policy and SDK examples.
← Payroll au operations · Get started
Operation xero.payroll_au_updateleaveapplication
Provider route: POST /payroll.xro/1.0/LeaveApplications/{LeaveApplicationID}. 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"]["updateLeaveApplication"]>[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.updateLeaveApplication(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_leave_application(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.LeaveApplicationID | 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 leave application — request body — body item |
Referenced models: Creates a leave application — 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 leave application — response body |
Referenced models: Creates a leave application — response body
Schemas
Section titled “Schemas”Creates a leave application — request body — body item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
Description | string | Optional | The Description of the Leave |
EmployeeID | string | Optional | The Xero identifier for Payroll Employee Format: uuid |
EndDate | string | Optional | End date of the leave (YYYY-MM-DD) |
LeaveApplicationID | string | Optional | The Xero identifier for Payroll Employee Format: uuid |
LeavePeriods | array | Optional | |
LeavePeriods[] | Model | Each item | Expand Creates a leave application — request body — body item Leave Periods item |
LeaveTypeID | string | Optional | The Xero identifier for Leave Type Format: uuid |
PayOutType | string | Optional | How the requested leave will be paid out, e.g. cashed out. One of: DEFAULT, CASHED_OUT |
StartDate | string | Optional | Start date of the leave (YYYY-MM-DD) |
Title | string | Optional | The title of the leave |
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 |
Referenced models: Creates a leave application — request body — body item Leave Periods item, Retrieves journals — response body — Warnings item
Creates a leave application — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
LeaveApplications | array | Optional | |
LeaveApplications[] | Model | Each item | Expand Creates a leave application — response body — Leave Applications item |
Referenced models: Creates a leave application — response body — Leave Applications item
Creates a leave application — request body — body item Leave Periods item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
LeavePeriodStatus | string | Optional | One of: SCHEDULED, PROCESSED, REQUESTED, REJECTED |
NumberOfUnits | number | Optional | The Number of Units for the leave Format: double |
PayPeriodEndDate | string | Optional | The Pay Period End Date (YYYY-MM-DD) |
PayPeriodStartDate | string | Optional | The Pay Period Start Date (YYYY-MM-DD) |
Retrieves journals — response body — Warnings item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
Message | string | Optional | Validation error message |
Creates a leave application — response body — Leave Applications item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
Description | string | Optional | The Description of the Leave |
EmployeeID | string | Optional | The Xero identifier for Payroll Employee Format: uuid |
EndDate | string | Optional | End date of the leave (YYYY-MM-DD) |
LeaveApplicationID | string | Optional | The Xero identifier for Payroll Employee Format: uuid |
LeavePeriods | array | Optional | |
LeavePeriods[] | Model | Each item | Expand Creates a leave application — response body — Leave Applications item Leave Periods item |
LeaveTypeID | string | Optional | The Xero identifier for Leave Type Format: uuid |
PayOutType | string | Optional | How the requested leave will be paid out, e.g. cashed out. Known values: DEFAULT, CASHED_OUT |
StartDate | string | Optional | Start date of the leave (YYYY-MM-DD) |
Title | string | Optional | The title of the leave |
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 |
Referenced models: Creates a leave application — response body — Leave Applications item Leave Periods item, Retrieves journals — response body — Warnings item
Creates a leave application — response body — Leave Applications item Leave Periods item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
LeavePeriodStatus | string | Optional | Known values: SCHEDULED, PROCESSED, REQUESTED, REJECTED |
NumberOfUnits | JSON | Optional | |
NumberOfUnits (anyOf 1) | number | Alternative | The Number of Units for the leave Format: double |
NumberOfUnits (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
PayPeriodEndDate | string | Optional | The Pay Period End Date (YYYY-MM-DD) |
PayPeriodStartDate | string | Optional | The Pay Period Start Date (YYYY-MM-DD) |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: xero.payroll_au_updateleaveapplication. Catalog operation: payroll_au.updateLeaveApplication. 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.