# AccountsTiersApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**addAccountTier**](#addaccounttier) | **POST** /accounts/{accountId}/tiers/{tierId} | Add a tier to an account|
|[**getAccountLevels**](#getaccountlevels) | **GET** /accounts/{accountId}/levels | List an account\&#39;s sponsorship levels|
|[**getAccountTiers**](#getaccounttiers) | **GET** /accounts/{accountId}/tiers | List an account\&#39;s tiers|
|[**removeAccountTier**](#removeaccounttier) | **DELETE** /accounts/{accountId}/tiers/{tierId} | Remove a tier from an account|

# **addAccountTier**
> CreateAccount200Response addAccountTier()

Assigns the given membership tier to the specified account and returns the updated account; requires update permission on accounts and tiers.

### Example

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

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

let accountId: string; //The account identifier (default to undefined)
let tierId: string; //The tier identifier (default to undefined)

const { status, data } = await apiInstance.addAccountTier(
    accountId,
    tierId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **accountId** | [**string**] | The account identifier | defaults to undefined|
| **tierId** | [**string**] | The tier identifier | defaults to undefined|


### Return type

**CreateAccount200Response**

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

# **getAccountLevels**
> GetAccountLevels200Response getAccountLevels()

Returns a paginated list of the sponsorship levels the given account is assigned to, with optional search over the level\'s name or description; requires read access to accounts and sponsors.

### Example

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

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

let accountId: string; //The account identifier (default to undefined)
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.getAccountLevels(
    accountId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **accountId** | [**string**] | The account identifier | defaults to undefined|
| **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)

# **getAccountTiers**
> GetAccountTiers200Response getAccountTiers()

Returns a paginated list of the account tiers assigned to the given account, optionally filtered to only \"internal\" or \"external\" tiers, with search over the tier\'s name or description; requires read access to accounts and tiers.

### Example

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

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

let accountId: string; //The account identifier (default to undefined)
let type: 'external' | 'internal'; //Filter by type (optional) (default to undefined)
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.getAccountTiers(
    accountId,
    type,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **accountId** | [**string**] | The account identifier | defaults to undefined|
| **type** | [**&#39;external&#39; | &#39;internal&#39;**]**Array<&#39;external&#39; &#124; &#39;internal&#39;>** | Filter by type | (optional) defaults to undefined|
| **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

**GetAccountTiers200Response**

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

# **removeAccountTier**
> CreateAccount200Response removeAccountTier()

Removes the association between the given tier and account, requiring update permission on both accounts and tiers.

### Example

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

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

let accountId: string; //The account identifier (default to undefined)
let tierId: string; //The tier identifier (default to undefined)

const { status, data } = await apiInstance.removeAccountTier(
    accountId,
    tierId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **accountId** | [**string**] | The account identifier | defaults to undefined|
| **tierId** | [**string**] | The tier identifier | defaults to undefined|


### Return type

**CreateAccount200Response**

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

