createProject
Create one or more new projects
/Projects
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\ProjectApi(
new GuzzleHttp\Client(),
$config
);
$xeroTenantId = "xeroTenantId_example";
try {
$result = $apiInstance->createProject($xeroTenantId, $projectCreateOrUpdate);
} catch (Exception $e) {
echo 'Exception when calling ProjectApi->createProject: ', $e->getMessage(), PHP_EOL;
}
?>
Scopes
projects | Grant read-write access to projects |
Parameters
Name | Description |
---|---|
Xero-Tenant-Id* |
String
Xero identifier for Tenant
Required
|
Name | Description |
---|---|
projectCreateOrUpdate * |
ProjectCreateOrUpdate
Create a new project with ProjectCreateOrUpdate object
Required
|