# Fortnox\FortnoxCustomerReferencesApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**customerReferenceControllerDoCreate()**](FortnoxCustomerReferencesApi.md#customerReferenceControllerDoCreate) | **POST** /3/customerreferences | Create a customer reference row |
| [**customerReferenceControllerDoDelete()**](FortnoxCustomerReferencesApi.md#customerReferenceControllerDoDelete) | **DELETE** /3/customerreferences/{CustomerReferenceRowId} | Delete a customer reference row |
| [**customerReferenceControllerDoIndex()**](FortnoxCustomerReferencesApi.md#customerReferenceControllerDoIndex) | **GET** /3/customerreferences | Retrieve a list of customers reference rows |
| [**customerReferenceControllerDoShow()**](FortnoxCustomerReferencesApi.md#customerReferenceControllerDoShow) | **GET** /3/customerreferences/{CustomerReferenceRowId} | Retrieve a customer reference row |
| [**customerReferenceControllerDoUpdate()**](FortnoxCustomerReferencesApi.md#customerReferenceControllerDoUpdate) | **PUT** /3/customerreferences/{CustomerReferenceRowId} | Update a customer reference row |


## `customerReferenceControllerDoCreate()`

```php
customerReferenceControllerDoCreate($customer_reference_row): \Fortnox\Model\FortnoxKfCustomerReferenceSingleItemWrap
```

Create a customer reference row

</p>  <p>The created customer reference row will be returned if everything succeeded, if there were any problems an error will be returned.</p>

### Example

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



$apiInstance = new Fortnox\Api\FortnoxCustomerReferencesApi(
    // 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()
);
$customer_reference_row = new \Fortnox\Model\FortnoxKfCustomerReferenceRowRowWrap(); // \Fortnox\Model\FortnoxKfCustomerReferenceRowRowWrap | Request body for create customer reference

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **customer_reference_row** | [**\Fortnox\Model\FortnoxKfCustomerReferenceRowRowWrap**](../Model/FortnoxKfCustomerReferenceRowRowWrap.md)| Request body for create customer reference | [optional] |

### Return type

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

## `customerReferenceControllerDoDelete()`

```php
customerReferenceControllerDoDelete($customer_reference_row_id)
```

Delete a customer reference row

</p>  <p>Deletes the customer reference row permanently. If everything succeeded the response will be of the type 204, No content and the response body will be empty.</p>  <p>If there were any problems an error will be returned.</p>  <p>You need to supply the unique customer reference row id of the customer reference row that you want to delete.</p>

### Example

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



$apiInstance = new Fortnox\Api\FortnoxCustomerReferencesApi(
    // 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()
);
$customer_reference_row_id = 'customer_reference_row_id_example'; // string | identifies the customer reference row

try {
    $apiInstance->customerReferenceControllerDoDelete($customer_reference_row_id);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxCustomerReferencesApi->customerReferenceControllerDoDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **customer_reference_row_id** | **string**| identifies the customer reference row | |

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

## `customerReferenceControllerDoIndex()`

```php
customerReferenceControllerDoIndex($customer): \Fortnox\Model\FortnoxKfCustomerReferenceSingleItemWrap
```

Retrieve a list of customers reference rows

</p>

### Example

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



$apiInstance = new Fortnox\Api\FortnoxCustomerReferencesApi(
    // 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()
);
$customer = 'customer_example'; // string | possibility to filter by customer number

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **customer** | **string**| possibility to filter by customer number | [optional] |

### Return type

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

## `customerReferenceControllerDoShow()`

```php
customerReferenceControllerDoShow($customer_reference_row_id): \Fortnox\Model\FortnoxKfCustomerReferenceSingleItemWrap
```

Retrieve a customer reference row

</p>  <p>You need to supply the unique customer reference row id that was returned when the customer reference row was created or retrieved from the list of customer reference rows.</p>

### Example

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



$apiInstance = new Fortnox\Api\FortnoxCustomerReferencesApi(
    // 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()
);
$customer_reference_row_id = 'customer_reference_row_id_example'; // string | identifies the customer reference row

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **customer_reference_row_id** | **string**| identifies the customer reference row | |

### Return type

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

## `customerReferenceControllerDoUpdate()`

```php
customerReferenceControllerDoUpdate($customer_reference_row_id, $customer_reference_row): \Fortnox\Model\FortnoxKfCustomerReferenceSingleItemWrap
```

Update a customer reference row

</p>  <p>The updated customer reference row will be returned if everything succeeded, if there were any problems an error will be returned.</p>  <p>You need to supply the unique customer reference row id of the customer reference row that you want to update.</p>  <p>Only the properties provided in the request body will be updated, properties not provided will be left unchanged.</p>  <p>CustomerNumber cannot be changed by this request.</p>

### Example

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



$apiInstance = new Fortnox\Api\FortnoxCustomerReferencesApi(
    // 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()
);
$customer_reference_row_id = 'customer_reference_row_id_example'; // string | identifies the customer reference row
$customer_reference_row = new \Fortnox\Model\FortnoxKfCustomerReferenceRowRowWrap(); // \Fortnox\Model\FortnoxKfCustomerReferenceRowRowWrap | Request body for update customer reference

try {
    $result = $apiInstance->customerReferenceControllerDoUpdate($customer_reference_row_id, $customer_reference_row);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxCustomerReferencesApi->customerReferenceControllerDoUpdate: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **customer_reference_row_id** | **string**| identifies the customer reference row | |
| **customer_reference_row** | [**\Fortnox\Model\FortnoxKfCustomerReferenceRowRowWrap**](../Model/FortnoxKfCustomerReferenceRowRowWrap.md)| Request body for update customer reference | [optional] |

### Return type

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