# AccountsAddressesApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createAccountAddress**](#createaccountaddress) | **POST** /accounts/{accountId}/addresses | Create an address for an account|
|[**deleteAccountAddress**](#deleteaccountaddress) | **DELETE** /accounts/{accountId}/addresses/{addressId} | Delete an account\&#39;s address|
|[**getAccountAddress**](#getaccountaddress) | **GET** /accounts/{accountId}/addresses/{addressId} | Get a single account address|
|[**getAccountAddresses**](#getaccountaddresses) | **GET** /accounts/{accountId}/addresses | List an account\&#39;s saved addresses|
|[**updateAccountAddress**](#updateaccountaddress) | **PUT** /accounts/{accountId}/addresses/{addressId} | Update an account\&#39;s address|

# **createAccountAddress**
> CreateAccountAddress200Response createAccountAddress(accountAddressCreateInputs)

Creates a new mailing address on the given account, validating and optionally geocoding the address unless skipValidation is set, and requires update permission on accounts.

### Example

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

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

let accountId: string; //The account identifier (default to undefined)
let accountAddressCreateInputs: AccountAddressCreateInputs; //

const { status, data } = await apiInstance.createAccountAddress(
    accountId,
    accountAddressCreateInputs
);
```

### Parameters

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


### Return type

**CreateAccountAddress200Response**

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

# **deleteAccountAddress**
> CreateAccountInvitations200Response deleteAccountAddress()

Permanently deletes a specific address from the given account, requiring update permission on accounts.

### Example

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

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

let accountId: string; //The account identifier (default to undefined)
let addressId: string; //The address identifier (default to undefined)

const { status, data } = await apiInstance.deleteAccountAddress(
    accountId,
    addressId
);
```

### Parameters

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

# **getAccountAddress**
> CreateAccountAddress200Response getAccountAddress()

Retrieves one saved address belonging to the specified account by its address ID; requires permission to read accounts.

### Example

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

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

let accountId: string; //The account identifier (default to undefined)
let addressId: string; //The address identifier (default to undefined)

const { status, data } = await apiInstance.getAccountAddress(
    accountId,
    addressId
);
```

### Parameters

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


### Return type

**CreateAccountAddress200Response**

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

# **getAccountAddresses**
> GetAccountAddresses200Response getAccountAddresses()

Returns a paginated list of addresses saved to the specified account, supporting search across address line, city, state, and country, and requires permission to read accounts.

### Example

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

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

**GetAccountAddresses200Response**

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

# **updateAccountAddress**
> CreateAccountAddress200Response updateAccountAddress(accountAddressUpdateInputs)

Updates the fields of an existing address on the given account, re-validating the address unless skipValidation is set, and requires update permission on accounts.

### Example

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

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

let accountId: string; //The account identifier (default to undefined)
let addressId: string; //The address identifier (default to undefined)
let accountAddressUpdateInputs: AccountAddressUpdateInputs; //

const { status, data } = await apiInstance.updateAccountAddress(
    accountId,
    addressId,
    accountAddressUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **accountAddressUpdateInputs** | **AccountAddressUpdateInputs**|  | |
| **accountId** | [**string**] | The account identifier | defaults to undefined|
| **addressId** | [**string**] | The address identifier | defaults to undefined|


### Return type

**CreateAccountAddress200Response**

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

