# Fortnox\FortnoxSalaryTransactionsApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**salaryTransactionsControllerDoCreate()**](FortnoxSalaryTransactionsApi.md#salaryTransactionsControllerDoCreate) | **POST** /3/salarytransactions | Create a new salary transaction for an employee |
| [**salaryTransactionsControllerDoDelete()**](FortnoxSalaryTransactionsApi.md#salaryTransactionsControllerDoDelete) | **DELETE** /3/salarytransactions/{SalaryRow} | Delete a single salary transaction |
| [**salaryTransactionsControllerDoIndex()**](FortnoxSalaryTransactionsApi.md#salaryTransactionsControllerDoIndex) | **GET** /3/salarytransactions | List all salary transactions for all employees |
| [**salaryTransactionsControllerDoShow()**](FortnoxSalaryTransactionsApi.md#salaryTransactionsControllerDoShow) | **GET** /3/salarytransactions/{SalaryRow} | Retrieve a single salary transaction |
| [**salaryTransactionsControllerDoUpdate()**](FortnoxSalaryTransactionsApi.md#salaryTransactionsControllerDoUpdate) | **PUT** /3/salarytransactions/{SalaryRow} | Update a salary transaction |


## `salaryTransactionsControllerDoCreate()`

```php
salaryTransactionsControllerDoCreate($salary_transaction): \Fortnox\Model\FortnoxLonSalaryTransactionsSingleItemWrap
```

Create a new salary transaction for an employee

Create a salary transaction

### Example

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



$apiInstance = new Fortnox\Api\FortnoxSalaryTransactionsApi(
    // 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()
);
$salary_transaction = new \Fortnox\Model\FortnoxLonSalaryTransactionsSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxLonSalaryTransactionsSinglePayloadItemWrap | Request body for create salary transaction

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **salary_transaction** | [**\Fortnox\Model\FortnoxLonSalaryTransactionsSinglePayloadItemWrap**](../Model/FortnoxLonSalaryTransactionsSinglePayloadItemWrap.md)| Request body for create salary transaction | [optional] |

### Return type

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

## `salaryTransactionsControllerDoDelete()`

```php
salaryTransactionsControllerDoDelete($salary_row)
```

Delete a single salary transaction

Delete a salary transaction

### Example

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



$apiInstance = new Fortnox\Api\FortnoxSalaryTransactionsApi(
    // 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()
);
$salary_row = 56; // int | identifies the salary transaction

try {
    $apiInstance->salaryTransactionsControllerDoDelete($salary_row);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxSalaryTransactionsApi->salaryTransactionsControllerDoDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **salary_row** | **int**| identifies the salary 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)

## `salaryTransactionsControllerDoIndex()`

```php
salaryTransactionsControllerDoIndex($date, $employee_id): \Fortnox\Model\FortnoxLonSalaryTransactionsListItemWrap
```

List all salary transactions for all employees

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

### Example

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



$apiInstance = new Fortnox\Api\FortnoxSalaryTransactionsApi(
    // 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()
);
$date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | filter on date
$employee_id = 'employee_id_example'; // string | filter on employeeId

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **date** | **\DateTime**| filter on date | [optional] |
| **employee_id** | **string**| filter on employeeId | [optional] |

### Return type

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

## `salaryTransactionsControllerDoShow()`

```php
salaryTransactionsControllerDoShow($salary_row): \Fortnox\Model\FortnoxLonSalaryTransactionsSingleItemWrap
```

Retrieve a single salary transaction

Retrieve a salary transaction

### Example

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



$apiInstance = new Fortnox\Api\FortnoxSalaryTransactionsApi(
    // 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()
);
$salary_row = 56; // int | identifies the salary transaction

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **salary_row** | **int**| identifies the salary transaction | |

### Return type

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

## `salaryTransactionsControllerDoUpdate()`

```php
salaryTransactionsControllerDoUpdate($salary_row, $salary_transaction): \Fortnox\Model\FortnoxLonSalaryTransactionsSingleItemWrap
```

Update a salary transaction

Update a salary transaction

### Example

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



$apiInstance = new Fortnox\Api\FortnoxSalaryTransactionsApi(
    // 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()
);
$salary_row = 56; // int | identifies the salary transaction
$salary_transaction = new \Fortnox\Model\FortnoxLonSalaryTransactionsSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxLonSalaryTransactionsSinglePayloadItemWrap | Request body for update salary transaction

try {
    $result = $apiInstance->salaryTransactionsControllerDoUpdate($salary_row, $salary_transaction);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxSalaryTransactionsApi->salaryTransactionsControllerDoUpdate: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **salary_row** | **int**| identifies the salary transaction | |
| **salary_transaction** | [**\Fortnox\Model\FortnoxLonSalaryTransactionsSinglePayloadItemWrap**](../Model/FortnoxLonSalaryTransactionsSinglePayloadItemWrap.md)| Request body for update salary transaction | [optional] |

### Return type

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