# Fortnox\FortnoxAssetsApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**assetsControllerDoChangeob()**](FortnoxAssetsApi.md#assetsControllerDoChangeob) | **PUT** /3/assets/changeob/{Id} | Change manual OB value of an Asset |
| [**assetsControllerDoCreate()**](FortnoxAssetsApi.md#assetsControllerDoCreate) | **POST** /3/assets | Create an Asset |
| [**assetsControllerDoDelete()**](FortnoxAssetsApi.md#assetsControllerDoDelete) | **DELETE** /3/assets/{Id} | Delete or Void an Asset |
| [**assetsControllerDoDepreciate()**](FortnoxAssetsApi.md#assetsControllerDoDepreciate) | **POST** /3/assets/depreciate | Perform a Depreciation of an Asset |
| [**assetsControllerDoDepreciations()**](FortnoxAssetsApi.md#assetsControllerDoDepreciations) | **GET** /3/assets/depreciations/{ToDate} | Assets depreciation list |
| [**assetsControllerDoIndex()**](FortnoxAssetsApi.md#assetsControllerDoIndex) | **GET** /3/assets | Retrieve a list of assets |
| [**assetsControllerDoScrap()**](FortnoxAssetsApi.md#assetsControllerDoScrap) | **PUT** /3/assets/scrap/{Id} | Scrap an Asset |
| [**assetsControllerDoSell()**](FortnoxAssetsApi.md#assetsControllerDoSell) | **PUT** /3/assets/sell/{Id} | Sell an Asset |
| [**assetsControllerDoShow()**](FortnoxAssetsApi.md#assetsControllerDoShow) | **GET** /3/assets/{Id} | Retrieve a single asset |
| [**assetsControllerDoUpdate()**](FortnoxAssetsApi.md#assetsControllerDoUpdate) | **PUT** /3/assets/{Id} | Update an Asset |
| [**assetsControllerDoWritedown()**](FortnoxAssetsApi.md#assetsControllerDoWritedown) | **PUT** /3/assets/writedown/{Id} | Write down an Asset |
| [**assetsControllerDoWriteup()**](FortnoxAssetsApi.md#assetsControllerDoWriteup) | **PUT** /3/assets/writeup/{Id} | Write up an Asset |


## `assetsControllerDoChangeob()`

```php
assetsControllerDoChangeob($id, $asset): \Fortnox\Model\FortnoxAnlAssetsActionResponse
```

Change manual OB value of an Asset

The updated asset will be returned if everything succeeded, if there were any problems an error will be returned.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetsApi(
    // 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 | Asset ID
$asset = new \Fortnox\Model\FortnoxAnlAssetActionsSingleItem(); // \Fortnox\Model\FortnoxAnlAssetActionsSingleItem | Request body for update asset

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Asset ID | |
| **asset** | [**\Fortnox\Model\FortnoxAnlAssetActionsSingleItem**](../Model/FortnoxAnlAssetActionsSingleItem.md)| Request body for update asset | [optional] |

### Return type

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

## `assetsControllerDoCreate()`

```php
assetsControllerDoCreate($asset): \Fortnox\Model\FortnoxAnlAssetsSingleItemResponseWrap
```

Create an Asset

The created asset will be returned if everything succeeded, if there were any problems an error will be returned.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetsApi(
    // 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 = new \Fortnox\Model\FortnoxAnlAssetsSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxAnlAssetsSinglePayloadItemWrap | Request body for create asset

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

### Parameters

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

### Return type

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

## `assetsControllerDoDelete()`

```php
assetsControllerDoDelete($id, $request)
```

Delete or Void an Asset

By specifying an {Id} in the URL a single &quot;Not active&quot; asset or asset with a type &quot;Not depreciable&quot; can be deleted. By specifying an {Id} in the URL a single &quot;Active&quot; or &quot;Fully depreciated&quot; assets can be voided and in this case in request body voiddate should be provided, otherwise it will use todays date.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetsApi(
    // 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 | Asset number
$request = new \Fortnox\Model\FortnoxDeleteWrap(); // \Fortnox\Model\FortnoxDeleteWrap

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Asset number | |
| **request** | [**\Fortnox\Model\FortnoxDeleteWrap**](../Model/FortnoxDeleteWrap.md)|  | [optional] |

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

## `assetsControllerDoDepreciate()`

```php
assetsControllerDoDepreciate($body): \Fortnox\Model\FortnoxAnlAssetsDepreciationResponseWrap
```

Perform a Depreciation of an Asset

The created vouchers list will be returned if everything succeeded, if there were any problems an error will be returned.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetsApi(
    // 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()
);
$body = new \Fortnox\Model\FortnoxAnlDepreciationWrap(); // \Fortnox\Model\FortnoxAnlDepreciationWrap | Request body for update asset

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **body** | [**\Fortnox\Model\FortnoxAnlDepreciationWrap**](../Model/FortnoxAnlDepreciationWrap.md)| Request body for update asset | [optional] |

### Return type

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

## `assetsControllerDoDepreciations()`

```php
assetsControllerDoDepreciations($to_date): \Fortnox\Model\FortnoxAnlAssetsListItemWrap
```

Assets depreciation list

Retrieves a list of assets to depreciate.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetsApi(
    // 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()
);
$to_date = 'to_date_example'; // string | toDate

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **to_date** | **string**| toDate | |

### Return type

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

## `assetsControllerDoIndex()`

```php
assetsControllerDoIndex($number, $description, $type, $lastmodified): \Fortnox\Model\FortnoxAnlAssetsListItemWrap
```

Retrieve a list of assets

Get assets

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetsApi(
    // 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()
);
$number = 'number_example'; // string | Asset number
$description = 'description_example'; // string | Asset description
$type = 'type_example'; // string | Asset type
$lastmodified = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Filter on last modified date

try {
    $result = $apiInstance->assetsControllerDoIndex($number, $description, $type, $lastmodified);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxAssetsApi->assetsControllerDoIndex: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **number** | **string**| Asset number | [optional] |
| **description** | **string**| Asset description | [optional] |
| **type** | **string**| Asset type | [optional] |
| **lastmodified** | **\DateTime**| Filter on last modified date | [optional] |

### Return type

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

## `assetsControllerDoScrap()`

```php
assetsControllerDoScrap($id, $asset): \Fortnox\Model\FortnoxAnlAssetsActionResponse
```

Scrap an Asset

The updated asset will be returned if everything succeeded, if there were any problems an error will be returned.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetsApi(
    // 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 | Asset ID
$asset = new \Fortnox\Model\FortnoxAnlScrapAssetWrap(); // \Fortnox\Model\FortnoxAnlScrapAssetWrap | Request body for update asset

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Asset ID | |
| **asset** | [**\Fortnox\Model\FortnoxAnlScrapAssetWrap**](../Model/FortnoxAnlScrapAssetWrap.md)| Request body for update asset | [optional] |

### Return type

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

## `assetsControllerDoSell()`

```php
assetsControllerDoSell($id, $asset): \Fortnox\Model\FortnoxAnlAssetsActionResponse
```

Sell an Asset

Partial sell or full sell of an asset.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetsApi(
    // 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 | Asset ID
$asset = new \Fortnox\Model\FortnoxAnlSellAssetWrap(); // \Fortnox\Model\FortnoxAnlSellAssetWrap | Request body for update asset

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Asset ID | |
| **asset** | [**\Fortnox\Model\FortnoxAnlSellAssetWrap**](../Model/FortnoxAnlSellAssetWrap.md)| Request body for update asset | [optional] |

### Return type

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

## `assetsControllerDoShow()`

```php
assetsControllerDoShow($id): \Fortnox\Model\FortnoxAnlAssetsSingleItemResponseWrap
```

Retrieve a single asset

Retrieve an asset

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetsApi(
    // 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 | Asset number

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Asset number | |

### Return type

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

## `assetsControllerDoUpdate()`

```php
assetsControllerDoUpdate($id, $asset): \Fortnox\Model\FortnoxAnlAssetsSingleItemResponseWrap
```

Update an Asset

The updated asset will be returned if everything succeeded, if there were any problems an error will be returned.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetsApi(
    // 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 | Asset ID
$asset = new \Fortnox\Model\FortnoxAnlAssetsSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxAnlAssetsSinglePayloadItemWrap | Request body for update asset

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Asset ID | |
| **asset** | [**\Fortnox\Model\FortnoxAnlAssetsSinglePayloadItemWrap**](../Model/FortnoxAnlAssetsSinglePayloadItemWrap.md)| Request body for update asset | [optional] |

### Return type

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

## `assetsControllerDoWritedown()`

```php
assetsControllerDoWritedown($id, $asset): \Fortnox\Model\FortnoxAnlAssetsActionResponse
```

Write down an Asset

The updated asset will be returned if everything succeeded, if there were any problems an error will be returned.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetsApi(
    // 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 | Asset ID
$asset = new \Fortnox\Model\FortnoxAnlAdjustAssetValueWrap(); // \Fortnox\Model\FortnoxAnlAdjustAssetValueWrap | Request body for update asset

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Asset ID | |
| **asset** | [**\Fortnox\Model\FortnoxAnlAdjustAssetValueWrap**](../Model/FortnoxAnlAdjustAssetValueWrap.md)| Request body for update asset | [optional] |

### Return type

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

## `assetsControllerDoWriteup()`

```php
assetsControllerDoWriteup($id, $asset): \Fortnox\Model\FortnoxAnlAssetsActionResponse
```

Write up an Asset

The updated asset will be returned if everything succeeded, if there were any problems an error will be returned.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetsApi(
    // 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 | Asset ID
$asset = new \Fortnox\Model\FortnoxAnlAdjustAssetValueWrap(); // \Fortnox\Model\FortnoxAnlAdjustAssetValueWrap | Request body for update asset

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Asset ID | |
| **asset** | [**\Fortnox\Model\FortnoxAnlAdjustAssetValueWrap**](../Model/FortnoxAnlAdjustAssetValueWrap.md)| Request body for update asset | [optional] |

### Return type

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