# SponsorsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createLevel**](#createlevel) | **POST** /levels | Create a sponsorship level|
|[**deleteLevel**](#deletelevel) | **DELETE** /levels/{levelId} | Delete a sponsorship level|
|[**getLevel**](#getlevel) | **GET** /levels/{sponsorshipLevelId} | Get a sponsorship level|
|[**getLevels**](#getlevels) | **GET** /levels | List sponsorship levels|
|[**updateLevel**](#updatelevel) | **PUT** /levels/{levelId} | Update a sponsorship level|

# **createLevel**
> CreateLevel200Response createLevel(levelCreateInputs)

Creates a new sponsorship level for the organization from the provided details, requiring create permission on sponsors.

### Example

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

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

let levelCreateInputs: LevelCreateInputs; //

const { status, data } = await apiInstance.createLevel(
    levelCreateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **levelCreateInputs** | **LevelCreateInputs**|  | |


### Return type

**CreateLevel200Response**

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json
 - **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)

# **deleteLevel**
> CreateAccountInvitations200Response deleteLevel()

Permanently deletes the specified sponsorship level from the organization, requiring delete permission on sponsors.

### Example

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

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

let levelId: string; //The level identifier (default to undefined)

const { status, data } = await apiInstance.deleteLevel(
    levelId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **levelId** | [**string**] | The level identifier | defaults to undefined|


### Return type

**CreateAccountInvitations200Response**

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

# **getLevel**
> CreateLevel200Response getLevel()

Returns the details of a single sponsorship level by ID; requires \"read\" permission on \"sponsors\".

### Example

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

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

let sponsorshipLevelId: string; //The sponsorshipLevel identifier (default to undefined)

const { status, data } = await apiInstance.getLevel(
    sponsorshipLevelId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **sponsorshipLevelId** | [**string**] | The sponsorshipLevel identifier | defaults to undefined|


### Return type

**CreateLevel200Response**

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

# **getLevels**
> GetAccountLevels200Response getLevels()

Returns a paginated list of the organization\'s sponsorship levels, with support for search and ordering; requires \"read\" permission on \"sponsors\".

### Example

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

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

let page: number; //Page number (optional) (default to 1)
let pageSize: number; //Number of items per page (optional) (default to 25)
let orderBy: string; //Field to order by (optional) (default to undefined)
let search: string; //Search query (optional) (default to undefined)

const { status, data } = await apiInstance.getLevels(
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **pageSize** | [**number**] | Number of items per page | (optional) defaults to 25|
| **orderBy** | [**string**] | Field to order by | (optional) defaults to undefined|
| **search** | [**string**] | Search query | (optional) defaults to undefined|


### Return type

**GetAccountLevels200Response**

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

# **updateLevel**
> CreateLevel200Response updateLevel(levelUpdateInputs)

Updates the details of an existing sponsorship level, such as its name, pricing, or benefits, requiring update permission on sponsors.

### Example

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

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

let levelId: string; //The level identifier (default to undefined)
let levelUpdateInputs: LevelUpdateInputs; //

const { status, data } = await apiInstance.updateLevel(
    levelId,
    levelUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **levelUpdateInputs** | **LevelUpdateInputs**|  | |
| **levelId** | [**string**] | The level identifier | defaults to undefined|


### Return type

**CreateLevel200Response**

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json
 - **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)

