approveTimesheet
Approves a timesheet
/Timesheets/{TimesheetID}/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_timesheet():
api_instance = PayrollNzApi(api_client)
xero_tenant_id = 'xeroTenantId_example'
timesheet_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d'
idempotency_key = 'KEY_VALUE'
try:
api_response = api_instance.approve_timesheet(xero_tenant_id, timesheet_id, idempotency_key)
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling PayrollNzApi->approveTimesheet: %s\n" % e)
Scopes
payroll.timesheets | Grant read-write access to payroll timesheets |
Parameters
Name | Description |
---|---|
TimesheetID* |
UUID
(uuid)
Identifier for the timesheet
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.
|