approveLeaveApplication
Approve a requested leave application by a unique leave application id
/LeaveApplications/{LeaveApplicationID}/approve
Usage and SDK Samples
# configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
oauth2_token=OAuth2Token(
client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
),
),
pool_threads=1,
)
api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
def accounting_approve_leave_application():
api_instance = PayrollAuApi(api_client)
xero_tenant_id = 'xeroTenantId_example'
leave_application_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
idempotency_key = 'KEY_VALUE'
try:
api_response = api_instance.approve_leave_application(xero_tenant_id, leave_application_id, idempotency_key)
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling PayrollAuApi->approveLeaveApplication: %s\n" % e)
Scopes
payroll.employees | Grant read-write access to payroll employees |
Parameters
Name | Description |
---|---|
LeaveApplicationID* |
UUID
(uuid)
Leave Application id for single object
Required
|
Name | Description |
---|---|
Xero-Tenant-Id* |
String
Xero identifier for Tenant
Required
|
Idempotency-Key |
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|