# Fortnox\FortnoxTermsOfDeliveriesApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**termsOfDeliveryControllerDoCreate()**](FortnoxTermsOfDeliveriesApi.md#termsOfDeliveryControllerDoCreate) | **POST** /3/termsofdeliveries | Create a terms of delivery |
| [**termsOfDeliveryControllerDoIndex()**](FortnoxTermsOfDeliveriesApi.md#termsOfDeliveryControllerDoIndex) | **GET** /3/termsofdeliveries | Retrieve a list of terms of deliveries |
| [**termsOfDeliveryControllerDoShow()**](FortnoxTermsOfDeliveriesApi.md#termsOfDeliveryControllerDoShow) | **GET** /3/termsofdeliveries/{Code} | Retrieve a single terms of delivery |
| [**termsOfDeliveryControllerDoUpdate()**](FortnoxTermsOfDeliveriesApi.md#termsOfDeliveryControllerDoUpdate) | **PUT** /3/termsofdeliveries/{Code} | Update a terms of delivery |


## `termsOfDeliveryControllerDoCreate()`

```php
termsOfDeliveryControllerDoCreate($term_of_delivery): \Fortnox\Model\FortnoxKfTermsOfDeliverySingleItemWrap
```

Create a terms of delivery

Create a terms of delivery

### Example

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



$apiInstance = new Fortnox\Api\FortnoxTermsOfDeliveriesApi(
    // 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()
);
$term_of_delivery = new \Fortnox\Model\FortnoxKfTermsOfDeliverySinglePayloadItemWrap(); // \Fortnox\Model\FortnoxKfTermsOfDeliverySinglePayloadItemWrap | Request body for create terms of delivery

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **term_of_delivery** | [**\Fortnox\Model\FortnoxKfTermsOfDeliverySinglePayloadItemWrap**](../Model/FortnoxKfTermsOfDeliverySinglePayloadItemWrap.md)| Request body for create terms of delivery | [optional] |

### Return type

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

## `termsOfDeliveryControllerDoIndex()`

```php
termsOfDeliveryControllerDoIndex(): \Fortnox\Model\FortnoxKfTermsOfDeliveryListItemWrap
```

Retrieve a list of terms of deliveries

The terms of deliveries register can return a list of records or a single record. By specifying a Code in the URL, a single record will be returned. Not specifying a Code will return a list of records.

### Example

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



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

### Parameters

This endpoint does not need any parameter.

### Return type

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

## `termsOfDeliveryControllerDoShow()`

```php
termsOfDeliveryControllerDoShow($code): \Fortnox\Model\FortnoxKfTermsOfDeliverySingleItemWrap
```

Retrieve a single terms of delivery

Retrieve a terms of delivery

### Example

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



$apiInstance = new Fortnox\Api\FortnoxTermsOfDeliveriesApi(
    // 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()
);
$code = 'code_example'; // string | identifies the terms of delivery

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| identifies the terms of delivery | |

### Return type

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

## `termsOfDeliveryControllerDoUpdate()`

```php
termsOfDeliveryControllerDoUpdate($code, $terms_of_delivery): \Fortnox\Model\FortnoxKfTermsOfDeliverySingleItemWrap
```

Update a terms of delivery

Update a terms of delivery

### Example

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



$apiInstance = new Fortnox\Api\FortnoxTermsOfDeliveriesApi(
    // 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()
);
$code = 'code_example'; // string | identifies the terms of delivery
$terms_of_delivery = new \Fortnox\Model\FortnoxKfTermsOfDeliverySinglePayloadItemWrap(); // \Fortnox\Model\FortnoxKfTermsOfDeliverySinglePayloadItemWrap | Request body for update terms of delivery

try {
    $result = $apiInstance->termsOfDeliveryControllerDoUpdate($code, $terms_of_delivery);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxTermsOfDeliveriesApi->termsOfDeliveryControllerDoUpdate: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| identifies the terms of delivery | |
| **terms_of_delivery** | [**\Fortnox\Model\FortnoxKfTermsOfDeliverySinglePayloadItemWrap**](../Model/FortnoxKfTermsOfDeliverySinglePayloadItemWrap.md)| Request body for update terms of delivery | [optional] |

### Return type

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