# Fortnox\WarehouseStockTransferApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**create5()**](WarehouseStockTransferApi.md#create5) | **POST** /api/warehouse/stocktransfer-v1 | Create a stock transfer document |
| [**get4()**](WarehouseStockTransferApi.md#get4) | **GET** /api/warehouse/stocktransfer-v1/{id} | Get stock transfer document |
| [**release3()**](WarehouseStockTransferApi.md#release3) | **PUT** /api/warehouse/stocktransfer-v1/{id}/release | Release a stock transfer document |
| [**update4()**](WarehouseStockTransferApi.md#update4) | **PUT** /api/warehouse/stocktransfer-v1/{id} | Update a stock transfer document |
| [**voidStockTransfer()**](WarehouseStockTransferApi.md#voidStockTransfer) | **PUT** /api/warehouse/stocktransfer-v1/{id}/void | Void a stock transfer document |


## `create5()`

```php
create5($document): \Fortnox\Model\WarehouseStockTransferDocument
```

Create a stock transfer document

<p>  Outbounds will be reserved in the from-place.  Inbounds are created upon release of the stock transfer document.

### Example

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



$apiInstance = new Fortnox\Api\WarehouseStockTransferApi(
    // 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 = new \Fortnox\Model\WarehouseStockTransferDocument(); // \Fortnox\Model\WarehouseStockTransferDocument | stock transfer document

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **document** | [**\Fortnox\Model\WarehouseStockTransferDocument**](../Model/WarehouseStockTransferDocument.md)| stock transfer document | [optional] |

### Return type

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

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: `application/json`
- **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)

## `get4()`

```php
get4($id): \Fortnox\Model\WarehouseStockTransferDocument
```

Get stock transfer document

### Example

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



$apiInstance = new Fortnox\Api\WarehouseStockTransferApi(
    // 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 | Stock Transfer document id.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Stock Transfer document id. | |

### Return type

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

## `release3()`

```php
release3($id)
```

Release a stock transfer document

<p>  This will deliver all outbounds which are reserved in from-place, and  create inbounds in the to-place.  Nothing happens if you releasr an already released stock transfer document.  <p>  Returns <code>document_is_voided</code> if document is voided.

### Example

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



$apiInstance = new Fortnox\Api\WarehouseStockTransferApi(
    // 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 | Stock Transfer document id.

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

### Parameters

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

## `update4()`

```php
update4($id, $document): \Fortnox\Model\WarehouseStockTransferDocument
```

Update a stock transfer document

### Example

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



$apiInstance = new Fortnox\Api\WarehouseStockTransferApi(
    // 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 | Stock Transfer document id.
$document = new \Fortnox\Model\WarehouseStockTransferDocument(); // \Fortnox\Model\WarehouseStockTransferDocument | The <code>StockTransferDocument</code> document.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Stock Transfer document id. | |
| **document** | [**\Fortnox\Model\WarehouseStockTransferDocument**](../Model/WarehouseStockTransferDocument.md)| The &lt;code&gt;StockTransferDocument&lt;/code&gt; document. | [optional] |

### Return type

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

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: `application/json`
- **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)

## `voidStockTransfer()`

```php
voidStockTransfer($id, $force)
```

Void a stock transfer document

<p>  Voiding a released stock transfer document is not allowed, and  will return <code>cannot_modify_released_document</code>

### Example

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



$apiInstance = new Fortnox\Api\WarehouseStockTransferApi(
    // 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 | Stock Transfer document id.
$force = True; // bool

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| Stock Transfer document id. | |
| **force** | **bool**|  | [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)
