# EventsBenefitsApi

All URIs are relative to *https://admin-api.connected.dev*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**addEventBenefit**](#addeventbenefit) | **POST** /events/{eventId}/benefits/{benefitId} | Add a benefit to an event|
|[**removeEventBenefit**](#removeeventbenefit) | **DELETE** /events/{eventId}/benefits/{benefitId} | Remove a benefit from an event|

# **addEventBenefit**
> CreateBenefit200Response addEventBenefit()

Associates an existing benefit with the given event so it is granted to the event\'s attendees; requires \"update\" permission on both events and benefits.

### Example

```typescript
import {
    EventsBenefitsApi,
    Configuration
} from '@connectedxm/admin-sdk';

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

let eventId: string; //The event identifier (default to undefined)
let benefitId: string; //The benefit identifier (default to undefined)

const { status, data } = await apiInstance.addEventBenefit(
    eventId,
    benefitId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | The event identifier | defaults to undefined|
| **benefitId** | [**string**] | The benefit identifier | defaults to undefined|


### Return type

**CreateBenefit200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

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

# **removeEventBenefit**
> CreateBenefit200Response removeEventBenefit()

Disassociates the specified benefit from the given event so it is no longer granted to the event\'s attendees; requires \"update\" permission on both events and benefits.

### Example

```typescript
import {
    EventsBenefitsApi,
    Configuration
} from '@connectedxm/admin-sdk';

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

let eventId: string; //The event identifier (default to undefined)
let benefitId: string; //The benefit identifier (default to undefined)

const { status, data } = await apiInstance.removeEventBenefit(
    eventId,
    benefitId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | The event identifier | defaults to undefined|
| **benefitId** | [**string**] | The benefit identifier | defaults to undefined|


### Return type

**CreateBenefit200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

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

