All URIs are relative to https://tripletex.no/v2
| Method | HTTP request | Description |
|---|---|---|
| delete | DELETE /timesheet/entry/{id} | Delete timesheet entry by ID. |
| get | GET /timesheet/entry/{id} | Find timesheet entry by ID. |
| getRecentActivities | GET /timesheet/entry/>recentActivities | Find recently used timesheet activities. |
| getRecentProjects | GET /timesheet/entry/>recentProjects | Find projects with recent activities (timesheet entry registered). |
| getTotalHours | GET /timesheet/entry/>totalHours | Find total hours registered on an employee in a specific period. |
| post | POST /timesheet/entry | Add new timesheet entry. Only one entry per employee/date/activity/project combination is supported. |
| postList | POST /timesheet/entry/list | Add new timesheet entry. Multiple objects for several users can be sent in the same request. |
| put | PUT /timesheet/entry/{id} | Update timesheet entry by ID. Note: Timesheet entry object fields which are present but not set, or set to 0, will be nulled. |
| putList | PUT /timesheet/entry/list | Update timesheet entry. Multiple objects for different users can be sent in the same request. |
| search | GET /timesheet/entry | Find timesheet entry corresponding with sent data. |
delete($id, $version)
Delete timesheet entry by ID.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\TimesheetentryApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 56; // int | Element ID
$version = 56; // int | Number of current version
try {
$apiInstance->delete($id, $version);
} catch (Exception $e) {
echo 'Exception when calling TimesheetentryApi->delete: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Element ID | |
| version | int | Number of current version | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperTimesheetEntry get($id, $fields)
Find timesheet entry by ID.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\TimesheetentryApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 56; // int | Element ID
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->get($id, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TimesheetentryApi->get: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Element ID | |
| fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ResponseWrapperTimesheetEntry
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ListResponseActivity getRecentActivities($project_id, $employee_id, $from, $count, $sorting, $fields)
Find recently used timesheet activities.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\TimesheetentryApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 56; // int | ID of project to find activities for
$employee_id = 56; // int | ID of employee to find activities for. Defaults to ID of token owner.
$from = 56; // int | From index
$count = 56; // int | Number of elements to return
$sorting = "sorting_example"; // string | Sorting pattern
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->getRecentActivities($project_id, $employee_id, $from, $count, $sorting, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TimesheetentryApi->getRecentActivities: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | int | ID of project to find activities for | |
| employee_id | int | ID of employee to find activities for. Defaults to ID of token owner. | [optional] |
| from | int | From index | [optional] |
| count | int | Number of elements to return | [optional] |
| sorting | string | Sorting pattern | [optional] |
| fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ListResponseActivity
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ListResponseProject getRecentProjects($employee_id, $from, $count, $sorting, $fields)
Find projects with recent activities (timesheet entry registered).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\TimesheetentryApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$employee_id = 56; // int | ID of employee with recent project hours Defaults to ID of token owner.
$from = 56; // int | From index
$count = 56; // int | Number of elements to return
$sorting = "sorting_example"; // string | Sorting pattern
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->getRecentProjects($employee_id, $from, $count, $sorting, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TimesheetentryApi->getRecentProjects: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| employee_id | int | ID of employee with recent project hours Defaults to ID of token owner. | [optional] |
| from | int | From index | [optional] |
| count | int | Number of elements to return | [optional] |
| sorting | string | Sorting pattern | [optional] |
| fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ListResponseProject
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperDouble getTotalHours($employee_id, $start_date, $end_date, $fields)
Find total hours registered on an employee in a specific period.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\TimesheetentryApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$employee_id = 56; // int | ID of employee to find hours for. Defaults to ID of token owner.
$start_date = "start_date_example"; // string | Format is yyyy-MM-dd (from and incl.). Defaults to today.
$end_date = "end_date_example"; // string | Format is yyyy-MM-dd (to and excl.). Defaults to tomorrow.
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->getTotalHours($employee_id, $start_date, $end_date, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TimesheetentryApi->getTotalHours: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| employee_id | int | ID of employee to find hours for. Defaults to ID of token owner. | [optional] |
| start_date | string | Format is yyyy-MM-dd (from and incl.). Defaults to today. | [optional] |
| end_date | string | Format is yyyy-MM-dd (to and excl.). Defaults to tomorrow. | [optional] |
| fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ResponseWrapperDouble
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperTimesheetEntry post($body)
Add new timesheet entry. Only one entry per employee/date/activity/project combination is supported.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\TimesheetentryApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Tripletex\Model\TimesheetEntry(); // \Tripletex\Model\TimesheetEntry | JSON representing the new object to be created. Should not have ID and version set.
try {
$result = $apiInstance->post($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TimesheetentryApi->post: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| body | \Tripletex\Model\TimesheetEntry | JSON representing the new object to be created. Should not have ID and version set. | [optional] |
\Tripletex\Model\ResponseWrapperTimesheetEntry
- Content-Type: application/json; charset=utf-8
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ListResponseTimesheetEntry postList($body)
Add new timesheet entry. Multiple objects for several users can be sent in the same request.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\TimesheetentryApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = array(new \Tripletex\Model\TimesheetEntry()); // \Tripletex\Model\TimesheetEntry[] | List of timesheet entry objects
try {
$result = $apiInstance->postList($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TimesheetentryApi->postList: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| body | \Tripletex\Model\TimesheetEntry[] | List of timesheet entry objects | [optional] |
\Tripletex\Model\ListResponseTimesheetEntry
- Content-Type: application/json; charset=utf-8
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperTimesheetEntry put($id, $body)
Update timesheet entry by ID. Note: Timesheet entry object fields which are present but not set, or set to 0, will be nulled.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\TimesheetentryApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 56; // int | Element ID
$body = new \Tripletex\Model\TimesheetEntry(); // \Tripletex\Model\TimesheetEntry | Partial object describing what should be updated
try {
$result = $apiInstance->put($id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TimesheetentryApi->put: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Element ID | |
| body | \Tripletex\Model\TimesheetEntry | Partial object describing what should be updated | [optional] |
\Tripletex\Model\ResponseWrapperTimesheetEntry
- Content-Type: application/json; charset=utf-8
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ListResponseTimesheetEntry putList($body)
Update timesheet entry. Multiple objects for different users can be sent in the same request.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\TimesheetentryApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = array(new \Tripletex\Model\TimesheetEntry()); // \Tripletex\Model\TimesheetEntry[] | List of timesheet entry objects to update
try {
$result = $apiInstance->putList($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TimesheetentryApi->putList: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| body | \Tripletex\Model\TimesheetEntry[] | List of timesheet entry objects to update | [optional] |
\Tripletex\Model\ListResponseTimesheetEntry
- Content-Type: application/json; charset=utf-8
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\TimesheetEntrySearchResponse search($date_from, $date_to, $id, $employee_id, $project_id, $activity_id, $comment, $from, $count, $sorting, $fields)
Find timesheet entry corresponding with sent data.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\TimesheetentryApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$date_from = "date_from_example"; // string | From and including
$date_to = "date_to_example"; // string | To and excluding
$id = "id_example"; // string | List of IDs
$employee_id = "employee_id_example"; // string | List of IDs
$project_id = "project_id_example"; // string | List of IDs
$activity_id = "activity_id_example"; // string | List of IDs
$comment = "comment_example"; // string | Containing
$from = 56; // int | From index
$count = 56; // int | Number of elements to return
$sorting = "sorting_example"; // string | Sorting pattern
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->search($date_from, $date_to, $id, $employee_id, $project_id, $activity_id, $comment, $from, $count, $sorting, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TimesheetentryApi->search: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| date_from | string | From and including | |
| date_to | string | To and excluding | |
| id | string | List of IDs | [optional] |
| employee_id | string | List of IDs | [optional] |
| project_id | string | List of IDs | [optional] |
| activity_id | string | List of IDs | [optional] |
| comment | string | Containing | [optional] |
| from | int | From index | [optional] |
| count | int | Number of elements to return | [optional] |
| sorting | string | Sorting pattern | [optional] |
| fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\TimesheetEntrySearchResponse
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]