# Fortnox\FortnoxAssetFileConnectionApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**assetFileConnectionControllerDoCreate()**](FortnoxAssetFileConnectionApi.md#assetFileConnectionControllerDoCreate) | **POST** /3/assetfileconnections | Create an asset file connection |
| [**assetFileConnectionControllerDoDelete()**](FortnoxAssetFileConnectionApi.md#assetFileConnectionControllerDoDelete) | **DELETE** /3/assetfileconnections/{FileId} | Remove an asset file connection |
| [**assetFileConnectionControllerDoIndex()**](FortnoxAssetFileConnectionApi.md#assetFileConnectionControllerDoIndex) | **GET** /3/assetfileconnections | Retrieve a list of asset file connections |


## `assetFileConnectionControllerDoCreate()`

```php
assetFileConnectionControllerDoCreate($asset_file_connection): \Fortnox\Model\FortnoxDaAssetFileConnectionSingleItem
```

Create an asset file connection

Create an asset file connection

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetFileConnectionApi(
    // 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()
);
$asset_file_connection = new \Fortnox\Model\FortnoxDaAssetFileConnectionCreatePayload(); // \Fortnox\Model\FortnoxDaAssetFileConnectionCreatePayload | Request body for create asset file connection

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

### Parameters

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

### Return type

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

## `assetFileConnectionControllerDoDelete()`

```php
assetFileConnectionControllerDoDelete($file_id)
```

Remove an asset file connection

Delete an asset file connection

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetFileConnectionApi(
    // 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 | File id of asset file connection to delete

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **file_id** | **string**| File id of asset file connection to delete | |

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

## `assetFileConnectionControllerDoIndex()`

```php
assetFileConnectionControllerDoIndex($assetid): \Fortnox\Model\FortnoxDaAssetFileConnectionListItemWrap
```

Retrieve a list of asset file connections

The asset register can return a list of assets or a single asset. By specifying a FileId in the URL, a single asset 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\FortnoxAssetFileConnectionApi(
    // 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()
);
$assetid = 'assetid_example'; // string | Assetid of asset file connections to list

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **assetid** | **string**| Assetid of asset file connections to list | [optional] |

### Return type

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