# Fortnox\WarehouseIncomingGoodsApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**completed()**](WarehouseIncomingGoodsApi.md#completed) | **PUT** /api/warehouse/incominggoods-v1/{id}/completed | Complete Incoming Goods document |
| [**create9()**](WarehouseIncomingGoodsApi.md#create9) | **POST** /api/warehouse/incominggoods-v1 | Create Incoming Goods document |
| [**get15()**](WarehouseIncomingGoodsApi.md#get15) | **GET** /api/warehouse/incominggoods-v1/{id} | Get Incoming Goods document |
| [**getAll7()**](WarehouseIncomingGoodsApi.md#getAll7) | **GET** /api/warehouse/incominggoods-v1 | List Incoming Goods Documents |
| [**patch()**](WarehouseIncomingGoodsApi.md#patch) | **PATCH** /api/warehouse/incominggoods-v1/{id} | Partial update Incoming Goods document |
| [**release6()**](WarehouseIncomingGoodsApi.md#release6) | **PUT** /api/warehouse/incominggoods-v1/{id}/release | Release Incoming Goods document |
| [**save2()**](WarehouseIncomingGoodsApi.md#save2) | **PUT** /api/warehouse/incominggoods-v1/{id} | Update Incoming Goods document |
| [**voidDocument4()**](WarehouseIncomingGoodsApi.md#voidDocument4) | **PUT** /api/warehouse/incominggoods-v1/{id}/void | Void Incoming Goods document |


## `completed()`

```php
completed($id, $booking_date)
```

Complete Incoming Goods document

Mark a released Incoming Goods document as Completed.  Bookkeeping will be finalized.  A Completed Incoming Goods document cannot be matched against  any more Supplier Invoices.

### Example

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



$apiInstance = new Fortnox\Api\WarehouseIncomingGoodsApi(
    // 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 = 56; // int | Incoming goods document id.
$booking_date = 'booking_date_example'; // string | Date for bookkeeping in format `\"YYYY-MM-DD\"`. Must be between document's release date (inclusive) and today's date (inclusive).

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Incoming goods document id. | |
| **booking_date** | **string**| Date for bookkeeping in format &#x60;\&quot;YYYY-MM-DD\&quot;&#x60;. Must be between document&#39;s release date (inclusive) and today&#39;s date (inclusive). | [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)

## `create9()`

```php
create9($incoming_goods): \Fortnox\Model\WarehouseIncomingGoods
```

Create Incoming Goods document

### Example

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



$apiInstance = new Fortnox\Api\WarehouseIncomingGoodsApi(
    // 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()
);
$incoming_goods = new \Fortnox\Model\WarehouseIncomingGoods(); // \Fortnox\Model\WarehouseIncomingGoods | The <code>IncomingGoods</code> document.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **incoming_goods** | [**\Fortnox\Model\WarehouseIncomingGoods**](../Model/WarehouseIncomingGoods.md)| The &lt;code&gt;IncomingGoods&lt;/code&gt; document. | [optional] |

### Return type

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

## `get15()`

```php
get15($id, $ignore_supplier_invoice_id): \Fortnox\Model\WarehouseIncomingGoods
```

Get Incoming Goods document

### Example

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



$apiInstance = new Fortnox\Api\WarehouseIncomingGoodsApi(
    // 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 = 56; // int | Incoming goods document id.
$ignore_supplier_invoice_id = 56; // int | This Supplier Invoice id will be excluded when calculating the takenQuantity.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Incoming goods document id. | |
| **ignore_supplier_invoice_id** | **int**| This Supplier Invoice id will be excluded when calculating the takenQuantity. | [optional] |

### Return type

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

## `getAll7()`

```php
getAll7($released, $completed, $voided, $supplier_number, $item_id, $note, $delivery_note, $q): \Fortnox\Model\WarehouseIncomingGoodsListRow[]
```

List Incoming Goods Documents

<p>      List incoming goods documents matching the given parameters.  </p>  <p>      Sortable fields:      <code>id</code>,      <code>has_delivery_note</code>,      <code>delivery_note_id</code>,      <code>supplier_number</code>,      <code>date</code>  </p>

### Example

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



$apiInstance = new Fortnox\Api\WarehouseIncomingGoodsApi(
    // 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()
);
$released = True; // bool | `true` to include only released documents.  `false` to include only non-released documents.
$completed = True; // bool | `true` to include only completed documents.  `false` to include only non-completed documents.
$voided = True; // bool | `true` to include only voided documents.  `false` to include only non-voided documents.
$supplier_number = 'supplier_number_example'; // string | Include only documents with the given `supplierNumber`.
$item_id = 'item_id_example'; // string | Include only documents with the given `itemId`.
$note = 'note_example'; // string | Include only documents where `note`-field contains the given text (case-insensitive).
$delivery_note = 'delivery_note_example'; // string | Include only documents where `deliveryNote`-field contains the given text (case-insensitive).
$q = 'q_example'; // string | Include only documents where `id` or `deliveryNote`-field contains the given text (case-insensitive).

try {
    $result = $apiInstance->getAll7($released, $completed, $voided, $supplier_number, $item_id, $note, $delivery_note, $q);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WarehouseIncomingGoodsApi->getAll7: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **released** | **bool**| &#x60;true&#x60; to include only released documents.  &#x60;false&#x60; to include only non-released documents. | [optional] |
| **completed** | **bool**| &#x60;true&#x60; to include only completed documents.  &#x60;false&#x60; to include only non-completed documents. | [optional] |
| **voided** | **bool**| &#x60;true&#x60; to include only voided documents.  &#x60;false&#x60; to include only non-voided documents. | [optional] |
| **supplier_number** | **string**| Include only documents with the given &#x60;supplierNumber&#x60;. | [optional] |
| **item_id** | **string**| Include only documents with the given &#x60;itemId&#x60;. | [optional] |
| **note** | **string**| Include only documents where &#x60;note&#x60;-field contains the given text (case-insensitive). | [optional] |
| **delivery_note** | **string**| Include only documents where &#x60;deliveryNote&#x60;-field contains the given text (case-insensitive). | [optional] |
| **q** | **string**| Include only documents where &#x60;id&#x60; or &#x60;deliveryNote&#x60;-field contains the given text (case-insensitive). | [optional] |

### Return type

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

## `patch()`

```php
patch($id, $incoming_goods): \Fortnox\Model\WarehouseIncomingGoods
```

Partial update Incoming Goods document

Perform a partial update of an <code>IncomingGoods</code> document. The partial update will update  <code>note</code>, <code>deliveryNoteId</code>, <code>supplierName</code> and <code>hasDeliveryNote</code>  It is possible to perform a partial update of a released/completed (TODO: ?) document.

### Example

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



$apiInstance = new Fortnox\Api\WarehouseIncomingGoodsApi(
    // 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 = 56; // int | Incoming goods document id.
$incoming_goods = new \Fortnox\Model\WarehouseIncomingGoods(); // \Fortnox\Model\WarehouseIncomingGoods | the incoming goods document to update. The partial update updates                       <code>note</code>, <code>deliveryNoteId</code>, <code>supplierName</code> and <code>hasDeliveryNote</code>

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Incoming goods document id. | |
| **incoming_goods** | [**\Fortnox\Model\WarehouseIncomingGoods**](../Model/WarehouseIncomingGoods.md)| the incoming goods document to update. The partial update updates                       &lt;code&gt;note&lt;/code&gt;, &lt;code&gt;deliveryNoteId&lt;/code&gt;, &lt;code&gt;supplierName&lt;/code&gt; and &lt;code&gt;hasDeliveryNote&lt;/code&gt; | [optional] |

### Return type

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

## `release6()`

```php
release6($id)
```

Release Incoming Goods document

The document will be locked and bookkept.  The inbound deliveries will affect available stock.

### Example

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



$apiInstance = new Fortnox\Api\WarehouseIncomingGoodsApi(
    // 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 = 56; // int | Incoming goods document id.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Incoming goods document id. | |

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

## `save2()`

```php
save2($id, $incoming_goods): \Fortnox\Model\WarehouseIncomingGoods
```

Update Incoming Goods document

### Example

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



$apiInstance = new Fortnox\Api\WarehouseIncomingGoodsApi(
    // 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 = 56; // int | Incoming goods document id.
$incoming_goods = new \Fortnox\Model\WarehouseIncomingGoods(); // \Fortnox\Model\WarehouseIncomingGoods | The <code>IncomingGoods</code> document.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Incoming goods document id. | |
| **incoming_goods** | [**\Fortnox\Model\WarehouseIncomingGoods**](../Model/WarehouseIncomingGoods.md)| The &lt;code&gt;IncomingGoods&lt;/code&gt; document. | [optional] |

### Return type

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

## `voidDocument4()`

```php
voidDocument4($id)
```

Void Incoming Goods document

Void a document.  If an Incoming Goods document has been Completed, or matched against  Supplier Invoice, it cannot be voided.

### Example

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



$apiInstance = new Fortnox\Api\WarehouseIncomingGoodsApi(
    // 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 = 56; // int | Incoming goods document id.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Incoming goods document id. | |

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