# TiersApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createTier**](#createtier) | **POST** /tiers | Create a new account tier|
|[**deleteTier**](#deletetier) | **DELETE** /tiers/{tierId} | Delete an account tier|
|[**getTier**](#gettier) | **GET** /tiers/{tierId} | Get an account tier|
|[**getTierAccounts**](#gettieraccounts) | **GET** /tiers/{tierId}/accounts | List accounts assigned to a tier|
|[**getTierImport**](#gettierimport) | **GET** /tiers/{tierId}/imports/{importId} | Get an account tier import|
|[**getTierImportItems**](#gettierimportitems) | **GET** /tiers/{tierId}/imports/{importId}/items | List rows of an account tier import|
|[**getTierImports**](#gettierimports) | **GET** /tiers/{tierId}/imports | List account tier imports|
|[**getTiers**](#gettiers) | **GET** /tiers | List account tiers|
|[**removeTierAccounts**](#removetieraccounts) | **DELETE** /tiers/{tierId}/accounts | Remove all accounts from a tier|
|[**updateTier**](#updatetier) | **PUT** /tiers/{tierId} | Update an account tier|

# **createTier**
> CreateTier200Response createTier(tierCreateInputs)

Creates a new account tier (membership level) for the organization, used to group accounts for access or pricing purposes; requires the \"read\" and \"create\" permissions on tiers.

### Example

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

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

let tierCreateInputs: TierCreateInputs; //

const { status, data } = await apiInstance.createTier(
    tierCreateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **tierCreateInputs** | **TierCreateInputs**|  | |


### Return type

**CreateTier200Response**

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

# **deleteTier**
> CreateAccountInvitations200Response deleteTier()

Permanently deletes the specified account tier from the organization, requiring the delete permission on tiers.

### Example

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

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

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

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **tierId** | [**string**] | The tier 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)

# **getTier**
> CreateTier200Response getTier()

Returns the details of a single account tier by id; requires read permission on tiers.

### Example

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

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

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

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

### Parameters

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


### Return type

**CreateTier200Response**

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

# **getTierAccounts**
> GetAccounts200Response getTierAccounts()

Returns a paginated list of accounts assigned to the given account tier, supporting search; requires read permission on both tiers and accounts.

### Example

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

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

let tierId: string; //The tier 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.getTierAccounts(
    tierId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **tierId** | [**string**] | The tier 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

**GetAccounts200Response**

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

# **getTierImport**
> GetImport200Response getTierImport()

Returns the details and status of a single account-tier bulk import job by id for the given tier; requires read permission on tiers.

### Example

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

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

let tierId: string; //The tier identifier (default to undefined)
let importId: string; //The import identifier (default to undefined)

const { status, data } = await apiInstance.getTierImport(
    tierId,
    importId
);
```

### Parameters

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


### Return type

**GetImport200Response**

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

# **getTierImportItems**
> GetImportItems200Response getTierImportItems()

Returns a paginated list of individual row items belonging to a given account-tier import job, including their processing status, supporting search; requires read permission on tiers.

### Example

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

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

let tierId: string; //The tier identifier (default to undefined)
let importId: string; //The import identifier (default to undefined)
let status: ImportItemStatus; //Filter by status (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.getTierImportItems(
    tierId,
    importId,
    status,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **tierId** | [**string**] | The tier identifier | defaults to undefined|
| **importId** | [**string**] | The import identifier | defaults to undefined|
| **status** | **ImportItemStatus** | Filter by status | (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

**GetImportItems200Response**

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

# **getTierImports**
> GetImports200Response getTierImports()

Returns a paginated list of bulk import jobs used to assign accounts to the given account tier, supporting search; requires read permission on tiers.

### Example

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

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

let tierId: string; //The tier 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.getTierImports(
    tierId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **tierId** | [**string**] | The tier 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

**GetImports200Response**

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

# **getTiers**
> GetAccountTiers200Response getTiers()

Returns a paginated list of an organization\'s account tiers, optionally filtered by type (external or internal), archived status, and search; requires read permission on tiers.

### Example

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

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

let type: 'external' | 'internal'; //Filter by type (optional) (default to undefined)
let archived: boolean; //Filter by archived (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.getTiers(
    type,
    archived,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

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

# **removeTierAccounts**
> CreateTier200Response removeTierAccounts()

Unassigns every account currently associated with the given tier, clearing its account list entirely, and requires read/update permission on accounts plus read/delete permission on tiers.

### Example

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

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

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

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

### Parameters

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


### Return type

**CreateTier200Response**

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

# **updateTier**
> CreateTier200Response updateTier(tierUpdateInputs)

Updates the fields of an existing account tier identified by tierId, requiring read and update permission on tiers.

### Example

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

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

let tierId: string; //The tier identifier (default to undefined)
let tierUpdateInputs: TierUpdateInputs; //

const { status, data } = await apiInstance.updateTier(
    tierId,
    tierUpdateInputs
);
```

### Parameters

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


### Return type

**CreateTier200Response**

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

