approveTimesheet
Approves a specific timesheet
/Timesheets/{TimesheetID}/Approve
Usage and SDK Samples
import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollUkApi;
import org.openapitools.client.models.payrollUk.*;
import java.io.File;
import java.util.*;
public class PayrollUkApiExample {
private PayrollUkApi apiInstance;
public static void main(String[] args) {
String accessToken = "YOUR_ACCESS_TOKEN";
ApiClient defaultClient = new ApiClient();
apiInstance = AccountingApi.getInstance(defaultClient);
String xeroTenantId = 'xeroTenantId_example';
UUID timesheetID = UUID.fromString("38400000-8cf0-11bd-b23e-10b96e4ef00d");
UUID timesheetID = '38400000-8cf0-11bd-b23e-10b96e4ef00d';
String idempotencyKey = 'KEY_VALUE';
try {
TimesheetObject result = apiInstance.approveTimesheet(accessToken, xeroTenantId, timesheetID, idempotencyKey);
System.out.println(result);
} catch (XeroException e) {
System.err.println("Exception when calling PayrollUkApi#approveTimesheet");
e.printStackTrace();
}
}
}
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.
|