# Fortnox\FortnoxInboxApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**inboxControllerDoCreate()**](FortnoxInboxApi.md#inboxControllerDoCreate) | **POST** /3/inbox | Upload a file |
| [**inboxControllerDoDelete()**](FortnoxInboxApi.md#inboxControllerDoDelete) | **DELETE** /3/inbox/{Id} | Remove a file or folder |
| [**inboxControllerDoIndex()**](FortnoxInboxApi.md#inboxControllerDoIndex) | **GET** /3/inbox | Retrieve the root folder containing files and folders |
| [**inboxControllerDoShow()**](FortnoxInboxApi.md#inboxControllerDoShow) | **GET** /3/inbox/{Id} | Retrieve a single file |


## `inboxControllerDoCreate()`

```php
inboxControllerDoCreate($folder_id, $path, $file): \Fortnox\Model\FortnoxDaInboxFileResponseWrap
```

Upload a file

Upload a file to a specific subdirectory.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInboxApi(
    // 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()
);
$folder_id = 'folder_id_example'; // string | folder id
$path = 'path_example'; // string | path
$file = array('key' => new \stdClass); // object | file

try {
    $result = $apiInstance->inboxControllerDoCreate($folder_id, $path, $file);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxInboxApi->inboxControllerDoCreate: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **folder_id** | **string**| folder id | [optional] |
| **path** | **string**| path | [optional] |
| **file** | [**object**](../Model/object.md)| file | [optional] |

### Return type

[**\Fortnox\Model\FortnoxDaInboxFileResponseWrap**](../Model/FortnoxDaInboxFileResponseWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: `multipart/form-data`
- **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)

## `inboxControllerDoDelete()`

```php
inboxControllerDoDelete($id)
```

Remove a file or folder

Delete a folder

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInboxApi(
    // 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 file to remove

try {
    $apiInstance->inboxControllerDoDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxInboxApi->inboxControllerDoDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| identifies the file to remove | |

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

## `inboxControllerDoIndex()`

```php
inboxControllerDoIndex(): \Fortnox\Model\FortnoxDaInboxFolderResponseWrap
```

Retrieve the root folder containing files and folders

Get folders

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInboxApi(
    // 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()
);

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

### Parameters

This endpoint does not need any parameter.

### Return type

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

## `inboxControllerDoShow()`

```php
inboxControllerDoShow($id): \Fortnox\Model\FortnoxDaInboxFolderResponseWrap
```

Retrieve a single file

Retrieve a folder

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInboxApi(
    // 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 folder

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

### Parameters

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

### Return type

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