# Fortnox\FortnoxAbsenceTransactionsApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**absenceTransactionsControllerDoCreate()**](FortnoxAbsenceTransactionsApi.md#absenceTransactionsControllerDoCreate) | **POST** /3/absencetransactions | Create a new absence transaction |
| [**absenceTransactionsControllerDoDelete()**](FortnoxAbsenceTransactionsApi.md#absenceTransactionsControllerDoDelete) | **DELETE** /3/absencetransactions/{id} | Delete an absence transaction |
| [**absenceTransactionsControllerDoIndex()**](FortnoxAbsenceTransactionsApi.md#absenceTransactionsControllerDoIndex) | **GET** /3/absencetransactions | Lists all absence transactions |
| [**absenceTransactionsControllerDoListByIdDateCauseCode()**](FortnoxAbsenceTransactionsApi.md#absenceTransactionsControllerDoListByIdDateCauseCode) | **GET** /3/absencetransactions/{id}/{Date}/{Code} | Retrieve absence transactions |
| [**absenceTransactionsControllerDoShow()**](FortnoxAbsenceTransactionsApi.md#absenceTransactionsControllerDoShow) | **GET** /3/absencetransactions/{id} | Retrieve a specific absence transaction |
| [**absenceTransactionsControllerDoUpdate()**](FortnoxAbsenceTransactionsApi.md#absenceTransactionsControllerDoUpdate) | **PUT** /3/absencetransactions/{id} | Update a single absence transaction |


## `absenceTransactionsControllerDoCreate()`

```php
absenceTransactionsControllerDoCreate($absence_transactions_payload): \Fortnox\Model\FortnoxLonAbsenceTransactionsSingleItemWrap
```

Create a new absence transaction

Create an absence transaction

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAbsenceTransactionsApi(
    // 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()
);
$absence_transactions_payload = new \Fortnox\Model\FortnoxLonAbsenceTransactionsSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxLonAbsenceTransactionsSinglePayloadItemWrap | Request body for create absence transaction

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **absence_transactions_payload** | [**\Fortnox\Model\FortnoxLonAbsenceTransactionsSinglePayloadItemWrap**](../Model/FortnoxLonAbsenceTransactionsSinglePayloadItemWrap.md)| Request body for create absence transaction | [optional] |

### Return type

[**\Fortnox\Model\FortnoxLonAbsenceTransactionsSingleItemWrap**](../Model/FortnoxLonAbsenceTransactionsSingleItemWrap.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)

## `absenceTransactionsControllerDoDelete()`

```php
absenceTransactionsControllerDoDelete($id)
```

Delete an absence transaction

Delete an absence transaction

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAbsenceTransactionsApi(
    // 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->absenceTransactionsControllerDoDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxAbsenceTransactionsApi->absenceTransactionsControllerDoDelete: ', $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)

## `absenceTransactionsControllerDoIndex()`

```php
absenceTransactionsControllerDoIndex($employeeid, $date): \Fortnox\Model\FortnoxLonAbsenceTransactionsListItemWrap
```

Lists all absence 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\FortnoxAbsenceTransactionsApi(
    // 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->absenceTransactionsControllerDoIndex($employeeid, $date);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxAbsenceTransactionsApi->absenceTransactionsControllerDoIndex: ', $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\FortnoxLonAbsenceTransactionsListItemWrap**](../Model/FortnoxLonAbsenceTransactionsListItemWrap.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)

## `absenceTransactionsControllerDoListByIdDateCauseCode()`

```php
absenceTransactionsControllerDoListByIdDateCauseCode($id, $date, $code): \Fortnox\Model\FortnoxLonAbsenceTransactionsListItemWrap
```

Retrieve absence transactions

Retrieves a list of absence transactions for an employee on a specific date and cause code.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAbsenceTransactionsApi(
    // 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 | of the absence transaction
$code = 'code_example'; // string | status code of the absence transaction

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

### Parameters

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

### Return type

[**\Fortnox\Model\FortnoxLonAbsenceTransactionsListItemWrap**](../Model/FortnoxLonAbsenceTransactionsListItemWrap.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)

## `absenceTransactionsControllerDoShow()`

```php
absenceTransactionsControllerDoShow($id): \Fortnox\Model\FortnoxLonAbsenceTransactionsSingleItemWrap
```

Retrieve a specific absence transaction

Retrieves a specific transaction

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAbsenceTransactionsApi(
    // 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->absenceTransactionsControllerDoShow($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxAbsenceTransactionsApi->absenceTransactionsControllerDoShow: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

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

### Return type

[**\Fortnox\Model\FortnoxLonAbsenceTransactionsSingleItemWrap**](../Model/FortnoxLonAbsenceTransactionsSingleItemWrap.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)

## `absenceTransactionsControllerDoUpdate()`

```php
absenceTransactionsControllerDoUpdate($id, $absence_transactions_payload): \Fortnox\Model\FortnoxLonAbsenceTransactionsSingleItemWrap
```

Update a single absence transaction

Update an absence transaction

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAbsenceTransactionsApi(
    // 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
$absence_transactions_payload = new \Fortnox\Model\FortnoxLonAbsenceTransactionsSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxLonAbsenceTransactionsSinglePayloadItemWrap | Request body for update absence transaction

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

### Parameters

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

### Return type

[**\Fortnox\Model\FortnoxLonAbsenceTransactionsSingleItemWrap**](../Model/FortnoxLonAbsenceTransactionsSingleItemWrap.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)
