approveTimesheet
Approves a timesheet
/Timesheets/{TimesheetID}/Approve
Usage and SDK Samples
import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollNzApi;
import org.openapitools.client.models.payrollNz.*;
import java.io.File;
import java.util.*;
public class PayrollNzApiExample {
private PayrollNzApi 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");
try {
TimesheetObject result = apiInstance.approveTimesheet(accessToken, xeroTenantId, timesheetID);
System.out.println(result);
} catch (XeroException e) {
System.err.println("Exception when calling PayrollNzApi#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
|