# Fortnox\WarehousePurchaseOrderApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**batchUpdateResponseState()**](WarehousePurchaseOrderApi.md#batchUpdateResponseState) | **PUT** /api/warehouse/purchaseorders-v1/response | Update response states |
| [**create11()**](WarehousePurchaseOrderApi.md#create11) | **POST** /api/warehouse/purchaseorders-v1 | Create Purchase Order |
| [**get17()**](WarehousePurchaseOrderApi.md#get17) | **GET** /api/warehouse/purchaseorders-v1/{id} | Get Purchase Order |
| [**getAll9()**](WarehousePurchaseOrderApi.md#getAll9) | **GET** /api/warehouse/purchaseorders-v1 | List Purchase Orders |
| [**getAttachedNotes()**](WarehousePurchaseOrderApi.md#getAttachedNotes) | **GET** /api/warehouse/purchaseorders-v1/{id}/notes | Get notes |
| [**getCsvReport()**](WarehousePurchaseOrderApi.md#getCsvReport) | **GET** /api/warehouse/purchaseorders-v1/csv | Get CSV list of Purchase Orders |
| [**getMatchedDocuments1()**](WarehousePurchaseOrderApi.md#getMatchedDocuments1) | **GET** /api/warehouse/purchaseorders-v1/{id}/matches | List matched documents |
| [**sendPurchaseOrder()**](WarehousePurchaseOrderApi.md#sendPurchaseOrder) | **POST** /api/warehouse/purchaseorders-v1/{id}/send | Send purchase order via email |
| [**sendPurchaseOrders()**](WarehousePurchaseOrderApi.md#sendPurchaseOrders) | **POST** /api/warehouse/purchaseorders-v1/sendpurchaseorders | Sends multiple purchase orders via email |
| [**setDropshipManuallyCompleted()**](WarehousePurchaseOrderApi.md#setDropshipManuallyCompleted) | **PUT** /api/warehouse/purchaseorders-v1/{id}/dropshipcomplete | Manually complete dropship order |
| [**setManuallyCompleted()**](WarehousePurchaseOrderApi.md#setManuallyCompleted) | **PUT** /api/warehouse/purchaseorders-v1/{id}/complete | Manually complete Purchase Order |
| [**update6()**](WarehousePurchaseOrderApi.md#update6) | **PUT** /api/warehouse/purchaseorders-v1/{id} | Update Purchase Order |
| [**updatePartial()**](WarehousePurchaseOrderApi.md#updatePartial) | **PATCH** /api/warehouse/purchaseorders-v1/{id}/partial | Partial update Purchase Order |
| [**updateResponseState()**](WarehousePurchaseOrderApi.md#updateResponseState) | **PUT** /api/warehouse/purchaseorders-v1/{id}/response | Update response state |
| [**voidDocument5()**](WarehousePurchaseOrderApi.md#voidDocument5) | **PUT** /api/warehouse/purchaseorders-v1/{id}/void | Void Purchase Order |


## `batchUpdateResponseState()`

```php
batchUpdateResponseState($ids, $response_state_change): \Fortnox\Model\WarehousePurchaseOrder
```

Update response states

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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()
);
$ids = array(56); // int[] | List of purchase order ids.
$response_state_change = new \Fortnox\Model\WarehouseResponseStateChange(); // \Fortnox\Model\WarehouseResponseStateChange | The new response state.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **ids** | [**int[]**](../Model/int.md)| List of purchase order ids. | [optional] |
| **response_state_change** | [**\Fortnox\Model\WarehouseResponseStateChange**](../Model/WarehouseResponseStateChange.md)| The new response state. | [optional] |

### Return type

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

## `create11()`

```php
create11($purchase_order): \Fortnox\Model\WarehousePurchaseOrder
```

Create Purchase Order

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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()
);
$purchase_order = new \Fortnox\Model\WarehousePurchaseOrder(); // \Fortnox\Model\WarehousePurchaseOrder | <code>PurchaseOrder</code> document.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **purchase_order** | [**\Fortnox\Model\WarehousePurchaseOrder**](../Model/WarehousePurchaseOrder.md)| &lt;code&gt;PurchaseOrder&lt;/code&gt; document. | [optional] |

### Return type

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

## `get17()`

```php
get17($id, $ignore_incoming_goods_id): \Fortnox\Model\WarehousePurchaseOrder
```

Get Purchase Order

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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 | Purchase order id.
$ignore_incoming_goods_id = 56; // int | used for calculating the remaining ordered quantity. null will take the received quantity from all incoming goods

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Purchase order id. | |
| **ignore_incoming_goods_id** | **int**| used for calculating the remaining ordered quantity. null will take the received quantity from all incoming goods | [optional] |

### Return type

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

## `getAll9()`

```php
getAll9($q, $supplier_number, $state, $item_id, $purchase_type, $internal_reference, $note): \Fortnox\Model\WarehousePurchaseOrder
```

List Purchase Orders

<p>  List purchase orders matching the given parameters.  </p>  <p>  Sortable fields:  <code>id</code>,  <code>supplier_number</code>,  <code>order_date</code>,  <code>internal_reference</code>,  <code>response_state</code>,  <code>delivery_date</code>  </p>

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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()
);
$q = 'q_example'; // string | Include only documents where `id` or `internalReference`-field contains the given text (case-insensitive).
$supplier_number = 'supplier_number_example'; // string | Include only documents with the given `supplierNumber`.
$state = 'state_example'; // string | Include only documents with the given `purchaseOrderState`.
$item_id = 'item_id_example'; // string | Include only documents with the given `itemId`.
$purchase_type = 'purchase_type_example'; // string | Include only documents with the given `purchaseType`
$internal_reference = 'internal_reference_example'; // string | Include only documents where `internalReference' contains the given text (case-insensitive).
$note = 'note_example'; // string | Include only documents where `note`-field contains the given text (case-insensitive).

try {
    $result = $apiInstance->getAll9($q, $supplier_number, $state, $item_id, $purchase_type, $internal_reference, $note);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WarehousePurchaseOrderApi->getAll9: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **q** | **string**| Include only documents where &#x60;id&#x60; or &#x60;internalReference&#x60;-field contains the given text (case-insensitive). | [optional] |
| **supplier_number** | **string**| Include only documents with the given &#x60;supplierNumber&#x60;. | [optional] |
| **state** | **string**| Include only documents with the given &#x60;purchaseOrderState&#x60;. | [optional] |
| **item_id** | **string**| Include only documents with the given &#x60;itemId&#x60;. | [optional] |
| **purchase_type** | **string**| Include only documents with the given &#x60;purchaseType&#x60; | [optional] |
| **internal_reference** | **string**| Include only documents where &#x60;internalReference&#39; contains the given text (case-insensitive). | [optional] |
| **note** | **string**| Include only documents where &#x60;note&#x60;-field contains the given text (case-insensitive). | [optional] |

### Return type

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

## `getAttachedNotes()`

```php
getAttachedNotes($id): \Fortnox\Model\WarehousePurchaseOrderRowNote
```

Get notes

<p>  Get notes for a purchase order.

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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 | Purchase order id.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Purchase order id. | |

### Return type

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

## `getCsvReport()`

```php
getCsvReport($q, $supplier_number, $state, $item_id, $purchase_type, $internal_reference, $note, $show_purchase_type_column): string
```

Get CSV list of Purchase Orders

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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()
);
$q = 'q_example'; // string | Include only documents where `id` or `internalReference`-field contains the given text (case-insensitive).
$supplier_number = 'supplier_number_example'; // string | Include only documents with the given `supplierNumber`.
$state = 'state_example'; // string | Include only documents with the given `purchaseOrderState`.
$item_id = 'item_id_example'; // string | Include only documents with the given `itemId`.
$purchase_type = 'purchase_type_example'; // string | Include only documents with the given `purchaseType`
$internal_reference = 'internal_reference_example'; // string | Include only documents where `internalReference' contains the given text (case-insensitive).
$note = 'note_example'; // string | Include only documents where `note`-field contains the given text (case-insensitive).
$show_purchase_type_column = True; // bool | True to include the purchase type column, default is false.

try {
    $result = $apiInstance->getCsvReport($q, $supplier_number, $state, $item_id, $purchase_type, $internal_reference, $note, $show_purchase_type_column);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WarehousePurchaseOrderApi->getCsvReport: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **q** | **string**| Include only documents where &#x60;id&#x60; or &#x60;internalReference&#x60;-field contains the given text (case-insensitive). | [optional] |
| **supplier_number** | **string**| Include only documents with the given &#x60;supplierNumber&#x60;. | [optional] |
| **state** | **string**| Include only documents with the given &#x60;purchaseOrderState&#x60;. | [optional] |
| **item_id** | **string**| Include only documents with the given &#x60;itemId&#x60;. | [optional] |
| **purchase_type** | **string**| Include only documents with the given &#x60;purchaseType&#x60; | [optional] |
| **internal_reference** | **string**| Include only documents where &#x60;internalReference&#39; contains the given text (case-insensitive). | [optional] |
| **note** | **string**| Include only documents where &#x60;note&#x60;-field contains the given text (case-insensitive). | [optional] |
| **show_purchase_type_column** | **bool**| True to include the purchase type column, default is false. | [optional] |

### Return type

**string**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `text/csv`

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

## `getMatchedDocuments1()`

```php
getMatchedDocuments1($id): \Fortnox\Model\WarehouseDocumentReference
```

List matched documents

<p>  Get a list of <code>DocumentReference</code> of linked/connected purchase orders to incoming goods and/or invoice document.

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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 | Purchase order id.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Purchase order id. | |

### Return type

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

## `sendPurchaseOrder()`

```php
sendPurchaseOrder($id, $settings)
```

Send purchase order via email

<p>  Sends the purchase order with the specified <code>id</code> to the recipient and sets the purchase order state to SENT

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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 | Purchase order id.
$settings = new \Fortnox\Model\WarehousePurchaseOrderMailSettings(); // \Fortnox\Model\WarehousePurchaseOrderMailSettings | see <code>PurchaseOrderMailSettings</code>

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Purchase order id. | |
| **settings** | [**\Fortnox\Model\WarehousePurchaseOrderMailSettings**](../Model/WarehousePurchaseOrderMailSettings.md)| see &lt;code&gt;PurchaseOrderMailSettings&lt;/code&gt; | [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)

## `sendPurchaseOrders()`

```php
sendPurchaseOrders($purchase_order_ids)
```

Sends multiple purchase orders via email

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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()
);
$purchase_order_ids = array(56); // int[] | List of Purchase order ids.

try {
    $apiInstance->sendPurchaseOrders($purchase_order_ids);
} catch (Exception $e) {
    echo 'Exception when calling WarehousePurchaseOrderApi->sendPurchaseOrders: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **purchase_order_ids** | [**int[]**](../Model/int.md)| List of Purchase order ids. | [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)

## `setDropshipManuallyCompleted()`

```php
setDropshipManuallyCompleted($id): \Fortnox\Model\WarehouseReleaseParentOrder
```

Manually complete dropship order

<p>  The dropship order will be treated as fully received.  Any remaining quantity will be ignored.

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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 | Purchase order id.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Purchase order id. | |

### Return type

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

## `setManuallyCompleted()`

```php
setManuallyCompleted($id)
```

Manually complete Purchase Order

<p>  The purchase order will be treated as fully received.  Any remaining quantity will be ignored.

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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 | Purchase order id.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Purchase order 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)

## `update6()`

```php
update6($id, $purchase_order): \Fortnox\Model\WarehousePurchaseOrder
```

Update Purchase Order

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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 | Purchase order id.
$purchase_order = new \Fortnox\Model\WarehousePurchaseOrder(); // \Fortnox\Model\WarehousePurchaseOrder | The <code>PurchaseOrder</code> document.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Purchase order id. | |
| **purchase_order** | [**\Fortnox\Model\WarehousePurchaseOrder**](../Model/WarehousePurchaseOrder.md)| The &lt;code&gt;PurchaseOrder&lt;/code&gt; document. | [optional] |

### Return type

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

## `updatePartial()`

```php
updatePartial($id, $changes): \Fortnox\Model\WarehousePartialPurchaseOrder
```

Partial update Purchase Order

<p>  Perform a partial update of a purchase order, see <code>PartialPurchaseOrder</code> for possible  fields that are updateable.

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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 | Purchase order id.
$changes = new \Fortnox\Model\WarehousePartialPurchaseOrder(); // \Fortnox\Model\WarehousePartialPurchaseOrder | the changes for the purchase order, see <code>PartialPurchaseOrder</code>

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Purchase order id. | |
| **changes** | [**\Fortnox\Model\WarehousePartialPurchaseOrder**](../Model/WarehousePartialPurchaseOrder.md)| the changes for the purchase order, see &lt;code&gt;PartialPurchaseOrder&lt;/code&gt; | [optional] |

### Return type

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

## `updateResponseState()`

```php
updateResponseState($id, $response_state_change): \Fortnox\Model\WarehousePurchaseOrder
```

Update response state

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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 | Purchase order id.
$response_state_change = new \Fortnox\Model\WarehouseResponseStateChange(); // \Fortnox\Model\WarehouseResponseStateChange | The new response state.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Purchase order id. | |
| **response_state_change** | [**\Fortnox\Model\WarehouseResponseStateChange**](../Model/WarehouseResponseStateChange.md)| The new response state. | [optional] |

### Return type

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

## `voidDocument5()`

```php
voidDocument5($id)
```

Void Purchase Order

### Example

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



$apiInstance = new Fortnox\Api\WarehousePurchaseOrderApi(
    // 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 | Purchase order id.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Purchase order 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)
