# Fortnox\FortnoxAttendanceTransactionsApi



All URIs are relative to https://api.fortnox.se, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**attendanceTransactionsControllerDoCreate()**](FortnoxAttendanceTransactionsApi.md#attendanceTransactionsControllerDoCreate) | **POST** /3/attendancetransactions | Create a new attendance transaction |
| [**attendanceTransactionsControllerDoDelete()**](FortnoxAttendanceTransactionsApi.md#attendanceTransactionsControllerDoDelete) | **DELETE** /3/attendancetransactions/{id} | Delete an attendance transaction |
| [**attendanceTransactionsControllerDoIndex()**](FortnoxAttendanceTransactionsApi.md#attendanceTransactionsControllerDoIndex) | **GET** /3/attendancetransactions | Lists all attendance transactions |
| [**attendanceTransactionsControllerDoListByIdDateCauseCode()**](FortnoxAttendanceTransactionsApi.md#attendanceTransactionsControllerDoListByIdDateCauseCode) | **GET** /3/attendancetransactions/{id}/{Date}/{Code} | Retrieve attendance transactions |
| [**attendanceTransactionsControllerDoShow()**](FortnoxAttendanceTransactionsApi.md#attendanceTransactionsControllerDoShow) | **GET** /3/attendancetransactions/{id} | Retrieve a specific attendance transaction |
| [**attendanceTransactionsControllerDoUpdate()**](FortnoxAttendanceTransactionsApi.md#attendanceTransactionsControllerDoUpdate) | **PUT** /3/attendancetransactions/{id} | Update a single attendance transaction |


## `attendanceTransactionsControllerDoCreate()`

```php
attendanceTransactionsControllerDoCreate($attendance_transaction): \Fortnox\Model\FortnoxLonAttendanceTransactionsSingleItemWrap
```

Create a new attendance transaction

Create an attendance transaction

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Fortnox\Api\FortnoxAttendanceTransactionsApi(
    // 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()
);
$attendance_transaction = new \Fortnox\Model\FortnoxLonAttendanceTransactionsSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxLonAttendanceTransactionsSinglePayloadItemWrap | Request body for create attendance transaction

try {
    $result = $apiInstance->attendanceTransactionsControllerDoCreate($attendance_transaction);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxAttendanceTransactionsApi->attendanceTransactionsControllerDoCreate: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **attendance_transaction** | [**\Fortnox\Model\FortnoxLonAttendanceTransactionsSinglePayloadItemWrap**](../Model/FortnoxLonAttendanceTransactionsSinglePayloadItemWrap.md)| Request body for create attendance transaction | [optional] |

### Return type

[**\Fortnox\Model\FortnoxLonAttendanceTransactionsSingleItemWrap**](../Model/FortnoxLonAttendanceTransactionsSingleItemWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `attendanceTransactionsControllerDoDelete()`

```php
attendanceTransactionsControllerDoDelete($id)
```

Delete an attendance transaction

Delete an attendance transaction

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Fortnox\Api\FortnoxAttendanceTransactionsApi(
    // 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()
);
$id = 'id_example'; // string | identifies the transaction

try {
    $apiInstance->attendanceTransactionsControllerDoDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxAttendanceTransactionsApi->attendanceTransactionsControllerDoDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| identifies the transaction | |

### Return type

void (empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `attendanceTransactionsControllerDoIndex()`

```php
attendanceTransactionsControllerDoIndex($employeeid, $date): \Fortnox\Model\FortnoxLonAttendanceTransactionsListItemWrap
```

Lists all attendance transactions

Supports query-string parameters <strong>employeeid</strong> and <strong>date</strong> for filtering the result.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Fortnox\Api\FortnoxAttendanceTransactionsApi(
    // 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()
);
$employeeid = 'employeeid_example'; // string | filter by employee id
$date = 'date_example'; // string | filter by date

try {
    $result = $apiInstance->attendanceTransactionsControllerDoIndex($employeeid, $date);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxAttendanceTransactionsApi->attendanceTransactionsControllerDoIndex: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **employeeid** | **string**| filter by employee id | [optional] |
| **date** | **string**| filter by date | [optional] |

### Return type

[**\Fortnox\Model\FortnoxLonAttendanceTransactionsListItemWrap**](../Model/FortnoxLonAttendanceTransactionsListItemWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `attendanceTransactionsControllerDoListByIdDateCauseCode()`

```php
attendanceTransactionsControllerDoListByIdDateCauseCode($id, $date, $code): \Fortnox\Model\FortnoxLonAttendanceTransactionsListItemWrap
```

Retrieve attendance transactions

Retrieves a list of attendance transaction for an employee on a specific date and cause code.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Fortnox\Api\FortnoxAttendanceTransactionsApi(
    // 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()
);
$id = 'id_example'; // string | identifies the employee
$date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | date of the attendance
$code = 'code_example'; // string | status code of the attendance transaction

try {
    $result = $apiInstance->attendanceTransactionsControllerDoListByIdDateCauseCode($id, $date, $code);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxAttendanceTransactionsApi->attendanceTransactionsControllerDoListByIdDateCauseCode: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| identifies the employee | |
| **date** | **\DateTime**| date of the attendance | |
| **code** | **string**| status code of the attendance transaction | |

### Return type

[**\Fortnox\Model\FortnoxLonAttendanceTransactionsListItemWrap**](../Model/FortnoxLonAttendanceTransactionsListItemWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `attendanceTransactionsControllerDoShow()`

```php
attendanceTransactionsControllerDoShow($id): \Fortnox\Model\FortnoxLonAttendanceTransactionsSingleItemWrap
```

Retrieve a specific attendance transaction

Retrieves a specific transaction

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Fortnox\Api\FortnoxAttendanceTransactionsApi(
    // 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()
);
$id = 'id_example'; // string | identifies the transaction

try {
    $result = $apiInstance->attendanceTransactionsControllerDoShow($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxAttendanceTransactionsApi->attendanceTransactionsControllerDoShow: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| identifies the transaction | |

### Return type

[**\Fortnox\Model\FortnoxLonAttendanceTransactionsSingleItemWrap**](../Model/FortnoxLonAttendanceTransactionsSingleItemWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `attendanceTransactionsControllerDoUpdate()`

```php
attendanceTransactionsControllerDoUpdate($id, $attendance_transaction): \Fortnox\Model\FortnoxLonAttendanceTransactionsSingleItemWrap
```

Update a single attendance transaction

Update an attendance transaction

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Fortnox\Api\FortnoxAttendanceTransactionsApi(
    // 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()
);
$id = 'id_example'; // string | identifies the transaction
$attendance_transaction = new \Fortnox\Model\FortnoxLonAttendanceTransactionsSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxLonAttendanceTransactionsSinglePayloadItemWrap | Request body for update attendance transaction

try {
    $result = $apiInstance->attendanceTransactionsControllerDoUpdate($id, $attendance_transaction);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxAttendanceTransactionsApi->attendanceTransactionsControllerDoUpdate: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| identifies the transaction | |
| **attendance_transaction** | [**\Fortnox\Model\FortnoxLonAttendanceTransactionsSinglePayloadItemWrap**](../Model/FortnoxLonAttendanceTransactionsSinglePayloadItemWrap.md)| Request body for update attendance transaction | [optional] |

### Return type

[**\Fortnox\Model\FortnoxLonAttendanceTransactionsSingleItemWrap**](../Model/FortnoxLonAttendanceTransactionsSingleItemWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
