# OmsorgCoreClient\FacilitiesApi

All URIs are relative to http://localhost, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiFacilitiesGet()**](FacilitiesApi.md#apiFacilitiesGet) | **GET** /api/facilities |  |
| [**apiFacilitiesIdDelete()**](FacilitiesApi.md#apiFacilitiesIdDelete) | **DELETE** /api/facilities/{id} |  |
| [**apiFacilitiesIdGet()**](FacilitiesApi.md#apiFacilitiesIdGet) | **GET** /api/facilities/{id} |  |
| [**apiFacilitiesIdPut()**](FacilitiesApi.md#apiFacilitiesIdPut) | **PUT** /api/facilities/{id} |  |
| [**apiFacilitiesPost()**](FacilitiesApi.md#apiFacilitiesPost) | **POST** /api/facilities |  |


## `apiFacilitiesGet()`

```php
apiFacilitiesGet($search, $crm_status, $follow_up_due_only, $page, $page_size): \OmsorgCoreClient\Model\FacilityResponsePagedResponse
```



### Example

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


// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OmsorgCoreClient\Api\FacilitiesApi(
    // 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(),
    $config
);
$search = 'search_example'; // string
$crm_status = 'crm_status_example'; // string
$follow_up_due_only = false; // bool
$page = 1; // int
$page_size = 20; // int

try {
    $result = $apiInstance->apiFacilitiesGet($search, $crm_status, $follow_up_due_only, $page, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacilitiesApi->apiFacilitiesGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **search** | **string**|  | [optional] |
| **crm_status** | **string**|  | [optional] |
| **follow_up_due_only** | **bool**|  | [optional] [default to false] |
| **page** | **int**|  | [optional] [default to 1] |
| **page_size** | **int**|  | [optional] [default to 20] |

### Return type

[**\OmsorgCoreClient\Model\FacilityResponsePagedResponse**](../Model/FacilityResponsePagedResponse.md)

### Authorization

[Bearer](../../README.md#Bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `apiFacilitiesIdDelete()`

```php
apiFacilitiesIdDelete($id)
```



### Example

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


// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OmsorgCoreClient\Api\FacilitiesApi(
    // 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(),
    $config
);
$id = 'id_example'; // string

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**|  | |

### Return type

void (empty response body)

### Authorization

[Bearer](../../README.md#Bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `apiFacilitiesIdGet()`

```php
apiFacilitiesIdGet($id): \OmsorgCoreClient\Model\FacilityResponse
```



### Example

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


// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OmsorgCoreClient\Api\FacilitiesApi(
    // 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(),
    $config
);
$id = 'id_example'; // string

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**|  | |

### Return type

[**\OmsorgCoreClient\Model\FacilityResponse**](../Model/FacilityResponse.md)

### Authorization

[Bearer](../../README.md#Bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `apiFacilitiesIdPut()`

```php
apiFacilitiesIdPut($id, $update_facility_request): \OmsorgCoreClient\Model\FacilityResponse
```



### Example

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


// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OmsorgCoreClient\Api\FacilitiesApi(
    // 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(),
    $config
);
$id = 'id_example'; // string
$update_facility_request = new \OmsorgCoreClient\Model\UpdateFacilityRequest(); // \OmsorgCoreClient\Model\UpdateFacilityRequest

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**|  | |
| **update_facility_request** | [**\OmsorgCoreClient\Model\UpdateFacilityRequest**](../Model/UpdateFacilityRequest.md)|  | [optional] |

### Return type

[**\OmsorgCoreClient\Model\FacilityResponse**](../Model/FacilityResponse.md)

### Authorization

[Bearer](../../README.md#Bearer)

### HTTP request headers

- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `apiFacilitiesPost()`

```php
apiFacilitiesPost($create_facility_request): \OmsorgCoreClient\Model\FacilityResponse
```



### Example

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


// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OmsorgCoreClient\Api\FacilitiesApi(
    // 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(),
    $config
);
$create_facility_request = new \OmsorgCoreClient\Model\CreateFacilityRequest(); // \OmsorgCoreClient\Model\CreateFacilityRequest

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **create_facility_request** | [**\OmsorgCoreClient\Model\CreateFacilityRequest**](../Model/CreateFacilityRequest.md)|  | [optional] |

### Return type

[**\OmsorgCoreClient\Model\FacilityResponse**](../Model/FacilityResponse.md)

### Authorization

[Bearer](../../README.md#Bearer)

### HTTP request headers

- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
