# Fortnox\FortnoxVoucherSeriesApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**voucherSeriesControllerDoCreate()**](FortnoxVoucherSeriesApi.md#voucherSeriesControllerDoCreate) | **POST** /3/voucherseries | Create a voucher series |
| [**voucherSeriesControllerDoIndex()**](FortnoxVoucherSeriesApi.md#voucherSeriesControllerDoIndex) | **GET** /3/voucherseries | Retrieve a list of voucher series |
| [**voucherSeriesControllerDoShow()**](FortnoxVoucherSeriesApi.md#voucherSeriesControllerDoShow) | **GET** /3/voucherseries/{Code} | Retrieve a single voucher series |
| [**voucherSeriesControllerDoUpdate()**](FortnoxVoucherSeriesApi.md#voucherSeriesControllerDoUpdate) | **PUT** /3/voucherseries/{Code} | Update a voucher series |


## `voucherSeriesControllerDoCreate()`

```php
voucherSeriesControllerDoCreate($voucher_series): \Fortnox\Model\FortnoxBfVoucherSeriesSingleItemWrap
```

Create a voucher series

Create a voucher series

### Example

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



$apiInstance = new Fortnox\Api\FortnoxVoucherSeriesApi(
    // 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_series = new \Fortnox\Model\FortnoxBfVoucherSeriesSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxBfVoucherSeriesSinglePayloadItemWrap | Request body for create voucher series

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **voucher_series** | [**\Fortnox\Model\FortnoxBfVoucherSeriesSinglePayloadItemWrap**](../Model/FortnoxBfVoucherSeriesSinglePayloadItemWrap.md)| Request body for create voucher series | [optional] |

### Return type

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

## `voucherSeriesControllerDoIndex()`

```php
voucherSeriesControllerDoIndex(): \Fortnox\Model\FortnoxBfVoucherSeriesListItemWrap
```

Retrieve a list of voucher series

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

### Example

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



$apiInstance = new Fortnox\Api\FortnoxVoucherSeriesApi(
    // 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->voucherSeriesControllerDoIndex();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxVoucherSeriesApi->voucherSeriesControllerDoIndex: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

This endpoint does not need any parameter.

### Return type

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

## `voucherSeriesControllerDoShow()`

```php
voucherSeriesControllerDoShow($code): \Fortnox\Model\FortnoxBfVoucherSeriesSingleItemWrap
```

Retrieve a single voucher series

Retrieve a voucher series

### Example

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



$apiInstance = new Fortnox\Api\FortnoxVoucherSeriesApi(
    // 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()
);
$code = 'code_example'; // string | Code of voucher series to show

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| Code of voucher series to show | |

### Return type

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

## `voucherSeriesControllerDoUpdate()`

```php
voucherSeriesControllerDoUpdate($code, $voucher_series): \Fortnox\Model\FortnoxBfVoucherSeriesSingleItemWrap
```

Update a voucher series

Update a voucher series

### Example

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



$apiInstance = new Fortnox\Api\FortnoxVoucherSeriesApi(
    // 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()
);
$code = 'code_example'; // string | Code of voucher series to update
$voucher_series = new \Fortnox\Model\FortnoxBfVoucherSeriesSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxBfVoucherSeriesSinglePayloadItemWrap | Request body for update voucher series

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| Code of voucher series to update | |
| **voucher_series** | [**\Fortnox\Model\FortnoxBfVoucherSeriesSinglePayloadItemWrap**](../Model/FortnoxBfVoucherSeriesSinglePayloadItemWrap.md)| Request body for update voucher series | [optional] |

### Return type

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