# Fortnox\FortnoxInvoicesApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**invoiceControllerDoCreate()**](FortnoxInvoicesApi.md#invoiceControllerDoCreate) | **POST** /3/invoices | Create an invoice |
| [**invoiceControllerDoIndex()**](FortnoxInvoicesApi.md#invoiceControllerDoIndex) | **GET** /3/invoices | Retrieve a list of invoices |
| [**invoiceControllerDoShow()**](FortnoxInvoicesApi.md#invoiceControllerDoShow) | **GET** /3/invoices/{DocumentNumber} | Retrieve a single invoice |
| [**invoiceControllerDoShowAndEinvoice()**](FortnoxInvoicesApi.md#invoiceControllerDoShowAndEinvoice) | **GET** /3/invoices/{DocumentNumber}/einvoice | Send an invoice as e-invoice |
| [**invoiceControllerDoShowAndEmail()**](FortnoxInvoicesApi.md#invoiceControllerDoShowAndEmail) | **GET** /3/invoices/{DocumentNumber}/email | Send an invoice as email |
| [**invoiceControllerDoShowAndEprint()**](FortnoxInvoicesApi.md#invoiceControllerDoShowAndEprint) | **GET** /3/invoices/{DocumentNumber}/eprint | Send an invoice as e-print |
| [**invoiceControllerDoShowAndPreview()**](FortnoxInvoicesApi.md#invoiceControllerDoShowAndPreview) | **GET** /3/invoices/{DocumentNumber}/preview | Preview an invoice |
| [**invoiceControllerDoShowAndPrint()**](FortnoxInvoicesApi.md#invoiceControllerDoShowAndPrint) | **GET** /3/invoices/{DocumentNumber}/print | Print an invoice |
| [**invoiceControllerDoShowAndPrintReminder()**](FortnoxInvoicesApi.md#invoiceControllerDoShowAndPrintReminder) | **GET** /3/invoices/{DocumentNumber}/printreminder | Print an invoice as reminder |
| [**invoiceControllerDoUpdate()**](FortnoxInvoicesApi.md#invoiceControllerDoUpdate) | **PUT** /3/invoices/{DocumentNumber} | Update an invoice |
| [**invoiceControllerDoUpdateAndBookkeep()**](FortnoxInvoicesApi.md#invoiceControllerDoUpdateAndBookkeep) | **PUT** /3/invoices/{DocumentNumber}/bookkeep | Bookkeep an invoice |
| [**invoiceControllerDoUpdateAndCancel()**](FortnoxInvoicesApi.md#invoiceControllerDoUpdateAndCancel) | **PUT** /3/invoices/{DocumentNumber}/cancel | Cancel an invoice |
| [**invoiceControllerDoUpdateAndCredit()**](FortnoxInvoicesApi.md#invoiceControllerDoUpdateAndCredit) | **PUT** /3/invoices/{DocumentNumber}/credit | Credit an invoice |
| [**invoiceControllerDoUpdateAndExternalPrint()**](FortnoxInvoicesApi.md#invoiceControllerDoUpdateAndExternalPrint) | **PUT** /3/invoices/{DocumentNumber}/externalprint | Set an invoice as sent |
| [**invoiceControllerDoUpdateAndWarehouseReady()**](FortnoxInvoicesApi.md#invoiceControllerDoUpdateAndWarehouseReady) | **PUT** /3/invoices/{DocumentNumber}/warehouseready | Set an invoice as done |


## `invoiceControllerDoCreate()`

```php
invoiceControllerDoCreate($invoice_payload): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Create an invoice

An endpoint for creating an invoice. While it is possible to create an invoice without rows, we encourage you to add them if you can.  Omitted values in the payload will be supplied by Predefined values which can be edited in the Fortnox account settings.  Note that Predefined values will always be overwritten by values provided through the API.   Should you have EasyVat enabled, it is mandatory to provide an account in the request should you use a custom VAT rate.   This endpoint can produce errors, some of which may only be relevant for EasyVat. Refer to the table below.  <table>  <caption>Errors that can be raised by this endpoint.</caption>    <tr>     <th>Error Code</th>     <th>HTTP Code</th>     <th>Description</th>     <th>Solution</th>    </tr>    <tr>     <td>2004167</td>     <td>400</td>     <td>An account must be provided when using a custom VAT rate and EasyVat has been enabled.</td>     <td>Supply each row which has a custom VAT rate with an account.</td>    </tr>  </table>   Note: The <b>EuQuarterlyReport</b> property will become obsolete at 2021-12-01.  This property is currently used by the <b>Quarterly</b> report as one of the conditions that determine if an invoice  should be included in the report or not.  A new version of the <b>Quarterly</b> report is released at 2021-12-01. In the new report, this property will not be  used when determining if an invoice should be included in the report or not, with one exception: if the invoice  is created before 2021-12-01, and this property is false, the invoice will be excluded from the report.  For invoices created 2021-12-01 and later, this property will have no effect.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$invoice_payload = new \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap | Request body for create invoice

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

### Parameters

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

### Return type

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

## `invoiceControllerDoIndex()`

```php
invoiceControllerDoIndex($tofinalpaydate, $fromfinalpaydate, $filter, $sortby, $costcenter, $customername, $customernumber, $label, $documentnumber, $fromdate, $todate, $lastmodified, $notcompleted, $ocr, $ourreference, $project, $sent, $externalinvoicereference1, $externalinvoicereference2, $yourreference, $invoicetype, $articlenumber, $articledescription, $currency, $accountnumberfrom, $accountnumberto, $yourordernumber, $credit): \Fortnox\Model\FortnoxKfInvoiceListResponseWrap
```

Retrieve a list of invoices

Get invoices

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$tofinalpaydate = 'tofinalpaydate_example'; // string | Tofinalpaydate of invoices to list
$fromfinalpaydate = 'fromfinalpaydate_example'; // string | Fromfinalpaydate of invoices to list
$filter = 'filter_example'; // string | possibility to filter invoices
$sortby = 'sortby_example'; // string | field to sort returned list on
$costcenter = 'costcenter_example'; // string | Costcenter of invoices to list
$customername = 'customername_example'; // string | Customername of invoices to list
$customernumber = 'customernumber_example'; // string | Customernumber of invoices to list
$label = 'label_example'; // string | Label of invoices to list
$documentnumber = 'documentnumber_example'; // string | Documentnumber of invoices to list
$fromdate = 'fromdate_example'; // string | Fromdate of invoices to list
$todate = 'todate_example'; // string | Todate of invoices to list
$lastmodified = 'lastmodified_example'; // string | Lastmodified of invoices to list
$notcompleted = 'notcompleted_example'; // string | Notcompleted of invoices to list
$ocr = 'ocr_example'; // string | Ocr of invoices to list
$ourreference = 'ourreference_example'; // string | Ourreference of invoices to list
$project = 'project_example'; // string | Project of invoices to list
$sent = 'sent_example'; // string | Sent of invoices to list
$externalinvoicereference1 = 'externalinvoicereference1_example'; // string | Externalinvoicereference1 of invoices to list
$externalinvoicereference2 = 'externalinvoicereference2_example'; // string | Externalinvoicereference2 of invoices to list
$yourreference = 'yourreference_example'; // string | Yourreference of invoices to list
$invoicetype = 'invoicetype_example'; // string | Invoicetype of invoices to list
$articlenumber = 'articlenumber_example'; // string | Articlenumber of invoices to list
$articledescription = 'articledescription_example'; // string | Articledescription of invoices to list
$currency = 'currency_example'; // string | Currency of invoices to list
$accountnumberfrom = 'accountnumberfrom_example'; // string | Accountnumberfrom of invoices to list
$accountnumberto = 'accountnumberto_example'; // string | Accountnumberto of invoices to list
$yourordernumber = 'yourordernumber_example'; // string | Yourordernumber of invoices to list
$credit = 'credit_example'; // string | Credit of invoices to list

try {
    $result = $apiInstance->invoiceControllerDoIndex($tofinalpaydate, $fromfinalpaydate, $filter, $sortby, $costcenter, $customername, $customernumber, $label, $documentnumber, $fromdate, $todate, $lastmodified, $notcompleted, $ocr, $ourreference, $project, $sent, $externalinvoicereference1, $externalinvoicereference2, $yourreference, $invoicetype, $articlenumber, $articledescription, $currency, $accountnumberfrom, $accountnumberto, $yourordernumber, $credit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxInvoicesApi->invoiceControllerDoIndex: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **tofinalpaydate** | **string**| Tofinalpaydate of invoices to list | [optional] |
| **fromfinalpaydate** | **string**| Fromfinalpaydate of invoices to list | [optional] |
| **filter** | **string**| possibility to filter invoices | [optional] |
| **sortby** | **string**| field to sort returned list on | [optional] |
| **costcenter** | **string**| Costcenter of invoices to list | [optional] |
| **customername** | **string**| Customername of invoices to list | [optional] |
| **customernumber** | **string**| Customernumber of invoices to list | [optional] |
| **label** | **string**| Label of invoices to list | [optional] |
| **documentnumber** | **string**| Documentnumber of invoices to list | [optional] |
| **fromdate** | **string**| Fromdate of invoices to list | [optional] |
| **todate** | **string**| Todate of invoices to list | [optional] |
| **lastmodified** | **string**| Lastmodified of invoices to list | [optional] |
| **notcompleted** | **string**| Notcompleted of invoices to list | [optional] |
| **ocr** | **string**| Ocr of invoices to list | [optional] |
| **ourreference** | **string**| Ourreference of invoices to list | [optional] |
| **project** | **string**| Project of invoices to list | [optional] |
| **sent** | **string**| Sent of invoices to list | [optional] |
| **externalinvoicereference1** | **string**| Externalinvoicereference1 of invoices to list | [optional] |
| **externalinvoicereference2** | **string**| Externalinvoicereference2 of invoices to list | [optional] |
| **yourreference** | **string**| Yourreference of invoices to list | [optional] |
| **invoicetype** | **string**| Invoicetype of invoices to list | [optional] |
| **articlenumber** | **string**| Articlenumber of invoices to list | [optional] |
| **articledescription** | **string**| Articledescription of invoices to list | [optional] |
| **currency** | **string**| Currency of invoices to list | [optional] |
| **accountnumberfrom** | **string**| Accountnumberfrom of invoices to list | [optional] |
| **accountnumberto** | **string**| Accountnumberto of invoices to list | [optional] |
| **yourordernumber** | **string**| Yourordernumber of invoices to list | [optional] |
| **credit** | **string**| Credit of invoices to list | [optional] |

### Return type

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

## `invoiceControllerDoShow()`

```php
invoiceControllerDoShow($document_number): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Retrieve a single invoice

Retrieve an invoice

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$document_number = 'document_number_example'; // string | identifies the invoice

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document_number** | **string**| identifies the invoice | |

### Return type

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

## `invoiceControllerDoShowAndEinvoice()`

```php
invoiceControllerDoShowAndEinvoice($document_number): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Send an invoice as e-invoice

Retrieve an invoice

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$document_number = 'document_number_example'; // string | identifies the invoice

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document_number** | **string**| identifies the invoice | |

### Return type

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

## `invoiceControllerDoShowAndEmail()`

```php
invoiceControllerDoShowAndEmail($document_number): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Send an invoice as email

You can use the properties in the EmailInformation to customize the e-mail message on each invoice.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$document_number = 'document_number_example'; // string | identifies the invoice

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document_number** | **string**| identifies the invoice | |

### Return type

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

## `invoiceControllerDoShowAndEprint()`

```php
invoiceControllerDoShowAndEprint($document_number): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Send an invoice as e-print

Retrieve an invoice

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$document_number = 'document_number_example'; // string | identifies the invoice

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document_number** | **string**| identifies the invoice | |

### Return type

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

## `invoiceControllerDoShowAndPreview()`

```php
invoiceControllerDoShowAndPreview($document_number): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Preview an invoice

The difference between this and the print-endpoint is that property Sent is not set to TRUE.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$document_number = 'document_number_example'; // string | identifies the invoice

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document_number** | **string**| identifies the invoice | |

### Return type

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

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/pdf`, `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `invoiceControllerDoShowAndPrint()`

```php
invoiceControllerDoShowAndPrint($document_number): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Print an invoice

Retrieve an invoice

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$document_number = 'document_number_example'; // string | identifies the invoice

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document_number** | **string**| identifies the invoice | |

### Return type

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

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/pdf`, `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `invoiceControllerDoShowAndPrintReminder()`

```php
invoiceControllerDoShowAndPrintReminder($document_number): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Print an invoice as reminder

Retrieve an invoice

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$document_number = 'document_number_example'; // string | identifies the invoice

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document_number** | **string**| identifies the invoice | |

### Return type

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

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/pdf`, `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `invoiceControllerDoUpdate()`

```php
invoiceControllerDoUpdate($document_number, $invoice_payload): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Update an invoice

Note that there are two approaches for updating the rows on an invoice.   If RowId is not specified on any row, the rows will be mapped and updated in the order in which they are set in the array. All rows that should remain on the invoice needs to be provided.   If RowId is specified on one or more rows the following goes: Corresponding row with that id will be updated. The rows without RowId will be interpreted as new rows. If a row should not be updated but remain on the invoice then specify only RowId like { \"RowId\": 123 }, otherwise it will be removed. Note that new RowIds are generated for all rows every time an invoice is updated.   Note: The <b>EuQuarterlyReport</b> property will become obsolete at 2021-12-01.  This property is currently used by the <b>Quarterly</b> report as one of the conditions that determine if an invoice  should be included in the report or not.  A new version of the <b>Quarterly</b> report is released at 2021-12-01. In the new report, this property will not be  used when determining if an invoice should be included in the report or not, with one exception: if the invoice  is created before 2021-12-01, and this property is false, the invoice will be excluded from the report.  For invoices created 2021-12-01 and later, this property will have no effect.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$document_number = 'document_number_example'; // string | identifies the invoice
$invoice_payload = new \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap | Request body for update invoice

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document_number** | **string**| identifies the invoice | |
| **invoice_payload** | [**\Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap**](../Model/FortnoxKfInvoiceSinglePayloadItemWrap.md)| Request body for update invoice | [optional] |

### Return type

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

## `invoiceControllerDoUpdateAndBookkeep()`

```php
invoiceControllerDoUpdateAndBookkeep($document_number, $fortnox_kf_invoice_single_payload_item_wrap): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Bookkeep an invoice

Update an invoice

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$document_number = 'document_number_example'; // string | identifies the invoice
$fortnox_kf_invoice_single_payload_item_wrap = new \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap | Request body for update invoice

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document_number** | **string**| identifies the invoice | |
| **fortnox_kf_invoice_single_payload_item_wrap** | [**\Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap**](../Model/FortnoxKfInvoiceSinglePayloadItemWrap.md)| Request body for update invoice | [optional] |

### Return type

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

## `invoiceControllerDoUpdateAndCancel()`

```php
invoiceControllerDoUpdateAndCancel($document_number, $fortnox_kf_invoice_single_payload_item_wrap): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Cancel an invoice

Update an invoice

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$document_number = 'document_number_example'; // string | identifies the invoice
$fortnox_kf_invoice_single_payload_item_wrap = new \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap | Request body for update invoice

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document_number** | **string**| identifies the invoice | |
| **fortnox_kf_invoice_single_payload_item_wrap** | [**\Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap**](../Model/FortnoxKfInvoiceSinglePayloadItemWrap.md)| Request body for update invoice | [optional] |

### Return type

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

## `invoiceControllerDoUpdateAndCredit()`

```php
invoiceControllerDoUpdateAndCredit($document_number, $fortnox_kf_invoice_single_payload_item_wrap): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Credit an invoice

The created credit invoice will be referenced in the property CreditInvoiceReference.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$document_number = 'document_number_example'; // string | identifies the invoice
$fortnox_kf_invoice_single_payload_item_wrap = new \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap | Request body for update invoice

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document_number** | **string**| identifies the invoice | |
| **fortnox_kf_invoice_single_payload_item_wrap** | [**\Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap**](../Model/FortnoxKfInvoiceSinglePayloadItemWrap.md)| Request body for update invoice | [optional] |

### Return type

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

## `invoiceControllerDoUpdateAndExternalPrint()`

```php
invoiceControllerDoUpdateAndExternalPrint($document_number, $fortnox_kf_invoice_single_payload_item_wrap): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Set an invoice as sent

Use this endpoint to set invoice as sent, without generating an invoice.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$document_number = 'document_number_example'; // string | identifies the invoice
$fortnox_kf_invoice_single_payload_item_wrap = new \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap | Request body for update invoice

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document_number** | **string**| identifies the invoice | |
| **fortnox_kf_invoice_single_payload_item_wrap** | [**\Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap**](../Model/FortnoxKfInvoiceSinglePayloadItemWrap.md)| Request body for update invoice | [optional] |

### Return type

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

## `invoiceControllerDoUpdateAndWarehouseReady()`

```php
invoiceControllerDoUpdateAndWarehouseReady($document_number, $fortnox_kf_invoice_single_payload_item_wrap): \Fortnox\Model\FortnoxKfInvoiceResponseWrap
```

Set an invoice as done

Used for marking a document as ready in the warehouse module. DeliveryState needs to be set to &quot;delivery&quot;.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoicesApi(
    // 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()
);
$document_number = 'document_number_example'; // string | identifies the invoice
$fortnox_kf_invoice_single_payload_item_wrap = new \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap | Request body for update invoice

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document_number** | **string**| identifies the invoice | |
| **fortnox_kf_invoice_single_payload_item_wrap** | [**\Fortnox\Model\FortnoxKfInvoiceSinglePayloadItemWrap**](../Model/FortnoxKfInvoiceSinglePayloadItemWrap.md)| Request body for update invoice | [optional] |

### Return type

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