approveTimesheet
Approves a timesheet
/Timesheets/{TimesheetID}/Approve
Usage and SDK Samples
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
new GuzzleHttp\Client(),
$config
);
$xeroTenantId = "xeroTenantId_example";
$timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d";
try {
$result = $apiInstance->approveTimesheet($xeroTenantId, $timesheetID);
} catch (Exception $e) {
echo 'Exception when calling PayrollNzApi->approveTimesheet: ', $e->getMessage(), PHP_EOL;
}
?>
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
|