# GeneralHolidaysApi

All URIs are relative to *http://localhost:8889/api*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**_delete**](#_delete) | **DELETE** /organization/holidays/general/{holidayIdentifier} | Delete holiday|
|[**create**](#create) | **POST** /organization/holidays/general | Create holidays|
|[**getByIdentifier**](#getbyidentifier) | **GET** /organization/holidays/general/{holidayIdentifier} | Get holiday|

# **_delete**
> _delete()


### Example

```typescript
import {
    GeneralHolidaysApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new GeneralHolidaysApi(configuration);

let holidayIdentifier: string; //The ID of the holiday to be deleted. (default to undefined)

const { status, data } = await apiInstance._delete(
    holidayIdentifier
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **holidayIdentifier** | [**string**] | The ID of the holiday to be deleted. | defaults to undefined|


### Return type

void (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**204** | Holidays deleted |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Holiday not found. |  -  |
|**409** | Invalid operation due to conflicting state, the provided ID is not unique. Update holidays to have unique IDs. |  -  |

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

# **create**
> Array<Holiday> create(holiday)


### Example

```typescript
import {
    GeneralHolidaysApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new GeneralHolidaysApi(configuration);

let holiday: Array<Holiday>; //Holiday values used to create multiple holidays.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.create(
    holiday,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **holiday** | **Array<Holiday>**| Holiday values used to create multiple holidays. | |
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**Array<Holiday>**

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | Holidays created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |

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

# **getByIdentifier**
> Holiday getByIdentifier()


### Example

```typescript
import {
    GeneralHolidaysApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new GeneralHolidaysApi(configuration);

let holidayIdentifier: string; //The ID or encodedKey of the holiday. (default to undefined)

const { status, data } = await apiInstance.getByIdentifier(
    holidayIdentifier
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **holidayIdentifier** | [**string**] | The ID or encodedKey of the holiday. | defaults to undefined|


### Return type

**Holiday**

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Holiday returned. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Holiday not found. |  -  |
|**409** | Invalid operation due to conflicting state, the provided ID is not unique. Update holidays to have unique IDs. |  -  |

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

