# Fortnox\FortnoxArticleFileConnectionsApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**articleFileConnectionControllerDoCreate()**](FortnoxArticleFileConnectionsApi.md#articleFileConnectionControllerDoCreate) | **POST** /3/articlefileconnections | Create an article file connection |
| [**articleFileConnectionControllerDoDelete()**](FortnoxArticleFileConnectionsApi.md#articleFileConnectionControllerDoDelete) | **DELETE** /3/articlefileconnections/{FileId} | Remove an article file connection |
| [**articleFileConnectionControllerDoIndex()**](FortnoxArticleFileConnectionsApi.md#articleFileConnectionControllerDoIndex) | **GET** /3/articlefileconnections | Retrieve a list of article file connections |
| [**articleFileConnectionControllerDoShow()**](FortnoxArticleFileConnectionsApi.md#articleFileConnectionControllerDoShow) | **GET** /3/articlefileconnections/{FileId} | Retrieve a single article file connection |


## `articleFileConnectionControllerDoCreate()`

```php
articleFileConnectionControllerDoCreate($article_file_connection): \Fortnox\Model\FortnoxDaArticleFileConnectionSingleItemWrap
```

Create an article file connection

Create an article file connection

### Example

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



$apiInstance = new Fortnox\Api\FortnoxArticleFileConnectionsApi(
    // 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()
);
$article_file_connection = new \Fortnox\Model\FortnoxDaArticleFileConnectionSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxDaArticleFileConnectionSinglePayloadItemWrap | Request body for create article file connection

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

### Parameters

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

### Return type

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

## `articleFileConnectionControllerDoDelete()`

```php
articleFileConnectionControllerDoDelete($file_id)
```

Remove an article file connection

Delete an article file connection

### Example

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



$apiInstance = new Fortnox\Api\FortnoxArticleFileConnectionsApi(
    // 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 article file connection

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **file_id** | **string**| identifies the article 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)

## `articleFileConnectionControllerDoIndex()`

```php
articleFileConnectionControllerDoIndex($articlenumber): \Fortnox\Model\FortnoxDaArticleFileConnectionListItemWrap
```

Retrieve a list of article file connections

The article 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\FortnoxArticleFileConnectionsApi(
    // 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()
);
$articlenumber = 'articlenumber_example'; // string | Articlenumber of file connections to list

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **articlenumber** | **string**| Articlenumber of file connections to list | [optional] |

### Return type

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

## `articleFileConnectionControllerDoShow()`

```php
articleFileConnectionControllerDoShow($file_id): \Fortnox\Model\FortnoxDaArticleFileConnectionSingleItemWrap
```

Retrieve a single article file connection

Retrieve an article file connection

### Example

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



$apiInstance = new Fortnox\Api\FortnoxArticleFileConnectionsApi(
    // 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 article file connection

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

### Parameters

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

### Return type

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