# Fortnox\FortnoxPriceListsApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**priceListControllerDoCreate()**](FortnoxPriceListsApi.md#priceListControllerDoCreate) | **POST** /3/pricelists | Create a price list |
| [**priceListControllerDoIndex()**](FortnoxPriceListsApi.md#priceListControllerDoIndex) | **GET** /3/pricelists | Retrieve a list of price lists |
| [**priceListControllerDoShow()**](FortnoxPriceListsApi.md#priceListControllerDoShow) | **GET** /3/pricelists/{Code} | Retrieve a single price list |
| [**priceListControllerDoUpdate()**](FortnoxPriceListsApi.md#priceListControllerDoUpdate) | **PUT** /3/pricelists/{Code} | Update a price list |


## `priceListControllerDoCreate()`

```php
priceListControllerDoCreate($price_list): \Fortnox\Model\FortnoxPriceListSingleItemWrap
```

Create a price list

Create a price list

### Example

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



$apiInstance = new Fortnox\Api\FortnoxPriceListsApi(
    // 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()
);
$price_list = new \Fortnox\Model\FortnoxPriceListSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxPriceListSinglePayloadItemWrap | Request body for create price list

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **price_list** | [**\Fortnox\Model\FortnoxPriceListSinglePayloadItemWrap**](../Model/FortnoxPriceListSinglePayloadItemWrap.md)| Request body for create price list | [optional] |

### Return type

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

## `priceListControllerDoIndex()`

```php
priceListControllerDoIndex(): \Fortnox\Model\FortnoxPriceListListItemWrap
```

Retrieve a list of price lists

The price lists 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\FortnoxPriceListsApi(
    // 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->priceListControllerDoIndex();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxPriceListsApi->priceListControllerDoIndex: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

This endpoint does not need any parameter.

### Return type

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

## `priceListControllerDoShow()`

```php
priceListControllerDoShow($code): \Fortnox\Model\FortnoxPriceListSingleItemWrap
```

Retrieve a single price list

Retrieve a price list

### Example

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



$apiInstance = new Fortnox\Api\FortnoxPriceListsApi(
    // 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 price list

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| identifies the price list | |

### Return type

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

## `priceListControllerDoUpdate()`

```php
priceListControllerDoUpdate($code, $price_list): \Fortnox\Model\FortnoxPriceListSingleItemWrap
```

Update a price list

Update a price list

### Example

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



$apiInstance = new Fortnox\Api\FortnoxPriceListsApi(
    // 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 price list
$price_list = new \Fortnox\Model\FortnoxPriceListSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxPriceListSinglePayloadItemWrap | Request body for update price list

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| identifies the price list | |
| **price_list** | [**\Fortnox\Model\FortnoxPriceListSinglePayloadItemWrap**](../Model/FortnoxPriceListSinglePayloadItemWrap.md)| Request body for update price list | [optional] |

### Return type

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