# OrganizationAttributesApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createAccountAttribute**](#createaccountattribute) | **POST** /organization/attributes | Create an account attribute|
|[**deleteAccountAttribute**](#deleteaccountattribute) | **DELETE** /organization/attributes/{attributeId} | Delete an account attribute|
|[**getDashboardAttributes**](#getdashboardattributes) | **GET** /organization/attributes/dashboard | List account attributes shown on dashboards|
|[**getOrganizationAccountAttribute**](#getorganizationaccountattribute) | **GET** /organization/attributes/{attributeId} | Get an account attribute definition|
|[**getOrganizationAccountAttributes**](#getorganizationaccountattributes) | **GET** /organization/attributes | List account attribute definitions|
|[**getRequiredAttributes**](#getrequiredattributes) | **GET** /organization/attributes/required | List required account attributes|
|[**updateAccountAttribute**](#updateaccountattribute) | **PUT** /organization/attributes/{attributeId} | Update an account attribute|

# **createAccountAttribute**
> CreateAccountAttribute200Response createAccountAttribute(accountAttributeCreateInputs)

Creates a new custom account attribute definition for the organization, automatically assigning or shifting sortOrder among existing attributes, and requires the \"update\" permission on \"org\".

### Example

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

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

let accountAttributeCreateInputs: AccountAttributeCreateInputs; //

const { status, data } = await apiInstance.createAccountAttribute(
    accountAttributeCreateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **accountAttributeCreateInputs** | **AccountAttributeCreateInputs**|  | |


### Return type

**CreateAccountAttribute200Response**

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

# **deleteAccountAttribute**
> CreateAccountInvitations200Response deleteAccountAttribute()

Permanently deletes the specified custom account attribute from the organization and re-sequences the sortOrder of the remaining attributes, requiring the \"update\" permission on \"org\".

### Example

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

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

let attributeId: string; //The attribute identifier (default to undefined)

const { status, data } = await apiInstance.deleteAccountAttribute(
    attributeId
);
```

### Parameters

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

# **getDashboardAttributes**
> GetDashboardAttributes200Response getDashboardAttributes()

Returns the account attributes flagged to appear in dashboard widgets that have at least one non-empty value, excluding location-type attributes, optionally filtered by a search term; requires read access to the organization and to dashboards.

### Example

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

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

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

### Parameters
This endpoint does not have any parameters.


### Return type

**GetDashboardAttributes200Response**

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

# **getOrganizationAccountAttribute**
> CreateAccountAttribute200Response getOrganizationAccountAttribute()

Returns the details of a single custom account attribute definition for the organization, identified by attribute ID; requires read access to the organization.

### Example

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

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

let attributeId: string; //The attribute identifier (default to undefined)

const { status, data } = await apiInstance.getOrganizationAccountAttribute(
    attributeId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **attributeId** | [**string**] | The attribute identifier | defaults to undefined|


### Return type

**CreateAccountAttribute200Response**

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

# **getOrganizationAccountAttributes**
> GetOrganizationAccountAttributes200Response getOrganizationAccountAttributes()

Returns a paginated list of custom account attribute definitions configured for the organization, filterable by search term and sortable via orderBy; requires read access to the organization.

### Example

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

const configuration = new Configuration();
const apiInstance = new OrganizationAttributesApi(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.getOrganizationAccountAttributes(
    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

**GetOrganizationAccountAttributes200Response**

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

# **getRequiredAttributes**
> GetDashboardAttributes200Response getRequiredAttributes()

Returns the account attributes marked as required that have at least one non-empty value, optionally filtered by a search term; requires read access to the organization and to dashboards.

### Example

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

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

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

### Parameters
This endpoint does not have any parameters.


### Return type

**GetDashboardAttributes200Response**

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

# **updateAccountAttribute**
> CreateAccountAttribute200Response updateAccountAttribute(accountAttributeUpdateInputs)

Updates the properties of an existing account attribute, such as its label, type, options, or sortOrder (re-sequencing other attributes as needed), and requires the \"update\" permission on \"org\".

### Example

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

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

let attributeId: string; //The attribute identifier (default to undefined)
let accountAttributeUpdateInputs: AccountAttributeUpdateInputs; //

const { status, data } = await apiInstance.updateAccountAttribute(
    attributeId,
    accountAttributeUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **accountAttributeUpdateInputs** | **AccountAttributeUpdateInputs**|  | |
| **attributeId** | [**string**] | The attribute identifier | defaults to undefined|


### Return type

**CreateAccountAttribute200Response**

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

