# Fortnox\FortnoxVoucherFileConnectionsApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**voucherFileConnectionControllerDoCreate()**](FortnoxVoucherFileConnectionsApi.md#voucherFileConnectionControllerDoCreate) | **POST** /3/voucherfileconnections | Create a voucher file connection |
| [**voucherFileConnectionControllerDoDelete()**](FortnoxVoucherFileConnectionsApi.md#voucherFileConnectionControllerDoDelete) | **DELETE** /3/voucherfileconnections/{FileId} | Remove a voucher file connection |
| [**voucherFileConnectionControllerDoIndex()**](FortnoxVoucherFileConnectionsApi.md#voucherFileConnectionControllerDoIndex) | **GET** /3/voucherfileconnections | Retrieve a list of voucher file connections |
| [**voucherFileConnectionControllerDoShow()**](FortnoxVoucherFileConnectionsApi.md#voucherFileConnectionControllerDoShow) | **GET** /3/voucherfileconnections/{FileId} | Retrieve a single voucher file connection |


## `voucherFileConnectionControllerDoCreate()`

```php
voucherFileConnectionControllerDoCreate($voucher_file_connection): \Fortnox\Model\FortnoxDaVoucherFileConnectionSingleItemWrap
```

Create a voucher file connection

Create a voucher file connection

### Example

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



$apiInstance = new Fortnox\Api\FortnoxVoucherFileConnectionsApi(
    // 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()
);
$voucher_file_connection = new \Fortnox\Model\FortnoxDaVoucherFileConnectionSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxDaVoucherFileConnectionSinglePayloadItemWrap | Request body for create voucher file connection

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **voucher_file_connection** | [**\Fortnox\Model\FortnoxDaVoucherFileConnectionSinglePayloadItemWrap**](../Model/FortnoxDaVoucherFileConnectionSinglePayloadItemWrap.md)| Request body for create voucher file connection | [optional] |

### Return type

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

## `voucherFileConnectionControllerDoDelete()`

```php
voucherFileConnectionControllerDoDelete($file_id)
```

Remove a voucher file connection

Delete a voucher file connection

### Example

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



$apiInstance = new Fortnox\Api\FortnoxVoucherFileConnectionsApi(
    // 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()
);
$file_id = 'file_id_example'; // string | identifies the voucher file connection

try {
    $apiInstance->voucherFileConnectionControllerDoDelete($file_id);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxVoucherFileConnectionsApi->voucherFileConnectionControllerDoDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **file_id** | **string**| identifies the voucher file connection | |

### 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)

## `voucherFileConnectionControllerDoIndex()`

```php
voucherFileConnectionControllerDoIndex($voucheryear, $voucherdescription, $vouchernumber, $voucherseries): \Fortnox\Model\FortnoxDaVoucherFileConnectionListItemWrap
```

Retrieve a list of voucher file connections

The voucher file connections register can return a list of records or a single record. By specifying a FileId in the URL, a single record will be returned. Not specifying a FileId will return a list of records.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxVoucherFileConnectionsApi(
    // 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()
);
$voucheryear = 56; // int | Voucheryear of voucher file connections to list
$voucherdescription = 'voucherdescription_example'; // string | Voucherdescription of voucher file connections to list
$vouchernumber = 56; // int | Vouchernumber of voucher file connections to list
$voucherseries = 'voucherseries_example'; // string | Voucherseries of voucher file connections to list

try {
    $result = $apiInstance->voucherFileConnectionControllerDoIndex($voucheryear, $voucherdescription, $vouchernumber, $voucherseries);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxVoucherFileConnectionsApi->voucherFileConnectionControllerDoIndex: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **voucheryear** | **int**| Voucheryear of voucher file connections to list | [optional] |
| **voucherdescription** | **string**| Voucherdescription of voucher file connections to list | [optional] |
| **vouchernumber** | **int**| Vouchernumber of voucher file connections to list | [optional] |
| **voucherseries** | **string**| Voucherseries of voucher file connections to list | [optional] |

### Return type

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

## `voucherFileConnectionControllerDoShow()`

```php
voucherFileConnectionControllerDoShow($file_id): \Fortnox\Model\FortnoxDaVoucherFileConnectionSingleItemWrap
```

Retrieve a single voucher file connection

Retrieve a voucher file connection

### Example

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



$apiInstance = new Fortnox\Api\FortnoxVoucherFileConnectionsApi(
    // 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()
);
$file_id = 'file_id_example'; // string | identifies the voucher file connection

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **file_id** | **string**| identifies the voucher file connection | |

### Return type

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