/home/desid573/public_html/payment/xero-2/doc/project/Api
Edit: /home/desid573/public_html/payment/xero-2/doc/project/Api/ProjectsApi.md (32074B)
# XeroAPI\XeroPHP\ProjectsApi
All URIs are relative to *https://api.xero.com/projects.xro/2.0*
Method | HTTP request | Description
------------- | ------------- | -------------
[**createProject**](ProjectsApi.md#createProject) | **POST** /projects | create one or more new projects
[**createTimeEntry**](ProjectsApi.md#createTimeEntry) | **POST** /projects/{projectId}/time | Allows you to create a task
[**deleteTimeEntry**](ProjectsApi.md#deleteTimeEntry) | **DELETE** /projects/{projectId}/time/{timeEntryId} | Allows you to delete a time entry
[**getProject**](ProjectsApi.md#getProject) | **GET** /projects/{projectId} | Allows you to retrieve a single project
[**getProjectUsers**](ProjectsApi.md#getProjectUsers) | **GET** /projectsusers | list all project users
[**getProjects**](ProjectsApi.md#getProjects) | **GET** /projects | list all projects
[**getTask**](ProjectsApi.md#getTask) | **GET** /projects/{projectId}/tasks/{taskId} | Allows you to retrieve a single project
[**getTasks**](ProjectsApi.md#getTasks) | **GET** /projects/{projectId}/tasks | Allows you to retrieve a single project
[**getTimeEntries**](ProjectsApi.md#getTimeEntries) | **GET** /projects/{projectId}/time | Allows you to retrieve the time entries associated with a specific project
[**getTimeEntry**](ProjectsApi.md#getTimeEntry) | **GET** /projects/{projectId}/time/{timeEntryId} | Allows you to get a single time entry in a project
[**patchProject**](ProjectsApi.md#patchProject) | **PATCH** /projects/{projectId} | creates a project for the specified contact
[**updateProject**](ProjectsApi.md#updateProject) | **PUT** /projects/{projectId} | update a specific project
[**updateTimeEntry**](ProjectsApi.md#updateTimeEntry) | **PUT** /projects/{projectId}/time/{timeEntryId} | Allows you to update time entry in a project
# **createProject**
> \XeroAPI\XeroPHP\Models\Project\Project createProject($xero_tenant_id, $project_create_or_update)
create one or more new projects
### Example
```php
createProject($xero_tenant_id, $project_create_or_update);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->createProject: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**project_create_or_update** | [**\XeroAPI\XeroPHP\Models\Project\ProjectCreateOrUpdate**](../Model/ProjectCreateOrUpdate.md)| Create a new project with ProjectCreateOrUpdate object |
### Return type
[**\XeroAPI\XeroPHP\Models\Project\Project**](../Model/Project.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **createTimeEntry**
> \XeroAPI\XeroPHP\Models\Project\TimeEntry createTimeEntry($xero_tenant_id, $project_id, $time_entry_create_or_update)
Allows you to create a task
Allows you to create a specific task
### Example
```php
createTimeEntry($xero_tenant_id, $project_id, $time_entry_create_or_update);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->createTimeEntry: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**project_id** | [**string**](../Model/.md)| You can specify an individual project by appending the projectId to the endpoint |
**time_entry_create_or_update** | [**\XeroAPI\XeroPHP\Models\Project\TimeEntryCreateOrUpdate**](../Model/TimeEntryCreateOrUpdate.md)| The time entry object you are creating |
### Return type
[**\XeroAPI\XeroPHP\Models\Project\TimeEntry**](../Model/TimeEntry.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **deleteTimeEntry**
> deleteTimeEntry($xero_tenant_id, $project_id, $time_entry_id)
Allows you to delete a time entry
Allows you to delete a specific time entry
### Example
```php
deleteTimeEntry($xero_tenant_id, $project_id, $time_entry_id);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->deleteTimeEntry: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**project_id** | [**string**](../Model/.md)| You can specify an individual project by appending the projectId to the endpoint |
**time_entry_id** | [**string**](../Model/.md)| You can specify an individual task by appending the id to the endpoint |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **getProject**
> \XeroAPI\XeroPHP\Models\Project\Project getProject($xero_tenant_id, $project_id)
Allows you to retrieve a single project
Allows you to retrieve a specific project
### Example
```php
getProject($xero_tenant_id, $project_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->getProject: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**project_id** | [**string**](../Model/.md)| You can specify an individual project by appending the projectId to the endpoint |
### Return type
[**\XeroAPI\XeroPHP\Models\Project\Project**](../Model/Project.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **getProjectUsers**
> \XeroAPI\XeroPHP\Models\Project\ProjectUsers getProjectUsers($xero_tenant_id, $page, $page_size)
list all project users
Allows you to retrieve the users on a projects.
### Example
```php
getProjectUsers($xero_tenant_id, $page, $page_size);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->getProjectUsers: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**page** | **int**| set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. | [optional] [default to 1]
**page_size** | **int**| Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. | [optional] [default to 50]
### Return type
[**\XeroAPI\XeroPHP\Models\Project\ProjectUsers**](../Model/ProjectUsers.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **getProjects**
> \XeroAPI\XeroPHP\Models\Project\Projects getProjects($xero_tenant_id, $project_ids, $contact_id, $states, $page, $page_size)
list all projects
Allows you to retrieve, create and update projects.
### Example
```php
getProjects($xero_tenant_id, $project_ids, $contact_id, $states, $page, $page_size);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->getProjects: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**project_ids** | [**string[]**](../Model/string.md)| Search for all projects that match a comma separated list of projectIds | [optional]
**contact_id** | [**string**](../Model/.md)| Filter for projects for a specific contact | [optional]
**states** | **string**| Filter for projects in a particular state (INPROGRESS or CLOSED) | [optional]
**page** | **int**| set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. | [optional] [default to 1]
**page_size** | **int**| Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. | [optional] [default to 50]
### Return type
[**\XeroAPI\XeroPHP\Models\Project\Projects**](../Model/Projects.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **getTask**
> \XeroAPI\XeroPHP\Models\Project\Task getTask($xero_tenant_id, $project_id, $task_id)
Allows you to retrieve a single project
Allows you to retrieve a specific project
### Example
```php
getTask($xero_tenant_id, $project_id, $task_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->getTask: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**project_id** | [**string**](../Model/.md)| You can specify an individual project by appending the projectId to the endpoint |
**task_id** | [**string**](../Model/.md)| You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskId} |
### Return type
[**\XeroAPI\XeroPHP\Models\Project\Task**](../Model/Task.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **getTasks**
> \XeroAPI\XeroPHP\Models\Project\Tasks getTasks($xero_tenant_id, $project_id, $page, $page_size, $task_ids)
Allows you to retrieve a single project
Allows you to retrieve a specific project
### Example
```php
getTasks($xero_tenant_id, $project_id, $page, $page_size, $task_ids);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->getTasks: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**project_id** | [**string**](../Model/.md)| You can specify an individual project by appending the projectId to the endpoint |
**page** | **int**| Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. | [optional]
**page_size** | **int**| Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. | [optional]
**task_ids** | **string**| taskIds Search for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskId},{taskId} | [optional]
### Return type
[**\XeroAPI\XeroPHP\Models\Project\Tasks**](../Model/Tasks.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **getTimeEntries**
> \XeroAPI\XeroPHP\Models\Project\TimeEntries getTimeEntries($xero_tenant_id, $project_id, $user_id, $task_id, $invoice_id, $contact_id, $page, $page_size, $states, $is_chargeable, $date_after_utc, $date_before_utc)
Allows you to retrieve the time entries associated with a specific project
Allows you to retrieve the time entries associated with a specific project
### Example
```php
getTimeEntries($xero_tenant_id, $project_id, $user_id, $task_id, $invoice_id, $contact_id, $page, $page_size, $states, $is_chargeable, $date_after_utc, $date_before_utc);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->getTimeEntries: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**project_id** | [**string**](../Model/.md)| Identifier of the project, that the task (which the time entry is logged against) belongs to. |
**user_id** | [**string**](../Model/.md)| The xero user identifier of the person who logged time. | [optional]
**task_id** | [**string**](../Model/.md)| Identifier of the task that time entry is logged against. | [optional]
**invoice_id** | [**string**](../Model/.md)| Finds all time entries for this invoice. | [optional]
**contact_id** | [**string**](../Model/.md)| Finds all time entries for this contact identifier. | [optional]
**page** | **int**| Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. | [optional]
**page_size** | **int**| Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. | [optional]
**states** | [**string[]**](../Model/string.md)| Comma-separated list of states to find. Will find all time entries that are in the status of whatever’s specified. | [optional]
**is_chargeable** | **bool**| Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`. | [optional]
**date_after_utc** | **\DateTime**| ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field. | [optional]
**date_before_utc** | **\DateTime**| ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field. | [optional]
### Return type
[**\XeroAPI\XeroPHP\Models\Project\TimeEntries**](../Model/TimeEntries.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **getTimeEntry**
> \XeroAPI\XeroPHP\Models\Project\TimeEntry getTimeEntry($xero_tenant_id, $project_id, $time_entry_id)
Allows you to get a single time entry in a project
Allows you to upget a single time entry in a project
### Example
```php
getTimeEntry($xero_tenant_id, $project_id, $time_entry_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->getTimeEntry: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**project_id** | [**string**](../Model/.md)| You can specify an individual project by appending the projectId to the endpoint |
**time_entry_id** | [**string**](../Model/.md)| You can specify an individual time entry by appending the id to the endpoint |
### Return type
[**\XeroAPI\XeroPHP\Models\Project\TimeEntry**](../Model/TimeEntry.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **patchProject**
> patchProject($xero_tenant_id, $project_id, $project_patch)
creates a project for the specified contact
Allows you to update a specific projects.
### Example
```php
patchProject($xero_tenant_id, $project_id, $project_patch);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->patchProject: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**project_id** | [**string**](../Model/.md)| You can specify an individual project by appending the projectId to the endpoint |
**project_patch** | [**\XeroAPI\XeroPHP\Models\Project\ProjectPatch**](../Model/ProjectPatch.md)| Update the status of an existing Project |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **updateProject**
> updateProject($xero_tenant_id, $project_id, $project_create_or_update)
update a specific project
Allows you to update a specific projects.
### Example
```php
updateProject($xero_tenant_id, $project_id, $project_create_or_update);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->updateProject: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**project_id** | [**string**](../Model/.md)| You can specify an individual project by appending the projectId to the endpoint |
**project_create_or_update** | [**\XeroAPI\XeroPHP\Models\Project\ProjectCreateOrUpdate**](../Model/ProjectCreateOrUpdate.md)| Request of type ProjectCreateOrUpdate |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **updateTimeEntry**
> updateTimeEntry($xero_tenant_id, $project_id, $time_entry_id, $time_entry_create_or_update)
Allows you to update time entry in a project
Allows you to update time entry in a project
### Example
```php
updateTimeEntry($xero_tenant_id, $project_id, $time_entry_id, $time_entry_create_or_update);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->updateTimeEntry: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**project_id** | [**string**](../Model/.md)| You can specify an individual project by appending the projectId to the endpoint |
**time_entry_id** | [**string**](../Model/.md)| You can specify an individual time entry by appending the id to the endpoint |
**time_entry_create_or_update** | [**\XeroAPI\XeroPHP\Models\Project\TimeEntryCreateOrUpdate**](../Model/TimeEntryCreateOrUpdate.md)| The time entry object you are updating |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)