approveTimesheet
Approves a timesheet
/Timesheets/{TimesheetID}/Approve
Usage and SDK Samples
using System;
using System.Diagnostics;
using Xero.NetStandard.OAuth2.Api;
using Xero.NetStandard.OAuth2.Client;
using Xero.NetStandard.OAuth2.Model;
namespace Example
{
public class ApproveTimesheetExample
{
public async Task Main()
{
var accessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new PayrollNzApi();
var xeroTenantId = "xeroTenantId_example";
var timesheetID = Guid.Parse("38400000-8cf0-11bd-b23e-10b96e4ef00d");
var idempotencyKey = "KEY_VALUE";
try {
var result = await apiInstance.ApproveTimesheetAsync(accessToken, xeroTenantId, timesheetID, idempotencyKey);
Console.WriteLine(result);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling apiInstance.ApproveTimesheet: " + e.Message );
}
}
}
}
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.
|