# Fortnox\WarehouseCustomDocumentTypeApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**create8()**](WarehouseCustomDocumentTypeApi.md#create8) | **POST** /api/warehouse/documentdeliveries/custom/documenttypes-v1 | Create custom document type |
| [**get11()**](WarehouseCustomDocumentTypeApi.md#get11) | **GET** /api/warehouse/documentdeliveries/custom/documenttypes-v1/{type} | Get custom document type |
| [**getAll6()**](WarehouseCustomDocumentTypeApi.md#getAll6) | **GET** /api/warehouse/documentdeliveries/custom/documenttypes-v1 | List custom document types |


## `create8()`

```php
create8($custom_document_type): int
```

Create custom document type

Create type, if it doesn't already exists. Note that new custom document types are  created automatically when you create custom documents, so normally  you do not need to call this method.   Throws HTTP 400 <code>referenceTypeNotAllowed</code> if the name of the type is not allowed.

### Example

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



$apiInstance = new Fortnox\Api\WarehouseCustomDocumentTypeApi(
    // 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()
);
$custom_document_type = new \Fortnox\Model\WarehouseCustomDocumentType(); // \Fortnox\Model\WarehouseCustomDocumentType | The <code>CustomDocumentType</code>.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **custom_document_type** | [**\Fortnox\Model\WarehouseCustomDocumentType**](../Model/WarehouseCustomDocumentType.md)| The &lt;code&gt;CustomDocumentType&lt;/code&gt;. | [optional] |

### Return type

**int**

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

## `get11()`

```php
get11($type): \Fortnox\Model\WarehouseCustomDocumentType
```

Get custom document type

### Example

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



$apiInstance = new Fortnox\Api\WarehouseCustomDocumentTypeApi(
    // 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()
);
$type = 'type_example'; // string | the name of the reference type

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **type** | **string**| the name of the reference type | |

### Return type

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

## `getAll6()`

```php
getAll6(): \Fortnox\Model\WarehouseCustomDocumentType
```

List custom document types

### Example

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



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

### Parameters

This endpoint does not need any parameter.

### Return type

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