# OrganizationTaxApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createTaxIntegration**](#createtaxintegration) | **POST** /organization/tax/{type} | Create an organization tax integration|
|[**deleteTaxIntegration**](#deletetaxintegration) | **DELETE** /organization/tax/{type} | Delete an organization tax integration|
|[**getEntityUseCodes**](#getentityusecodes) | **GET** /organization/tax/{type}/entity-use-codes | List entity use codes for a tax integration|
|[**getTaxCodes**](#gettaxcodes) | **GET** /organization/tax/{type}/tax-codes | List tax codes for a tax integration|
|[**getTaxIntegration**](#gettaxintegration) | **GET** /organization/tax/{type} | Get an organization tax integration|
|[**getTaxIntegrations**](#gettaxintegrations) | **GET** /organization/tax | List configured tax integrations|
|[**getTaxLog**](#gettaxlog) | **GET** /organization/tax/{type}/logs/{logId} | Get a single tax integration log entry|
|[**getTaxLogs**](#gettaxlogs) | **GET** /organization/tax/{type}/logs | List logs for a tax integration|
|[**testTaxIntegration**](#testtaxintegration) | **POST** /organization/tax/{type}/test | Test a tax integration connection|
|[**toggleTaxIntegration**](#toggletaxintegration) | **PUT** /organization/tax/{type}/toggle | Enable or disable a tax integration|
|[**updateTaxIntegration**](#updatetaxintegration) | **PUT** /organization/tax/{type} | Update a tax integration\&#39;s settings|

# **createTaxIntegration**
> GetTaxIntegration200Response createTaxIntegration(taxIntegrationCreateInputs)

Creates a tax integration of the given type (e.g. Avalara) for the current organization using the supplied credentials/settings, requiring update permission on the org resource.

### Example

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

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

let type: string; //The type identifier (default to undefined)
let taxIntegrationCreateInputs: TaxIntegrationCreateInputs; //

const { status, data } = await apiInstance.createTaxIntegration(
    type,
    taxIntegrationCreateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **taxIntegrationCreateInputs** | **TaxIntegrationCreateInputs**|  | |
| **type** | [**string**] | The type identifier | defaults to undefined|


### Return type

**GetTaxIntegration200Response**

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

# **deleteTaxIntegration**
> CreateAccountInvitations200Response deleteTaxIntegration()

Permanently removes the tax integration of the given type from the current organization, requiring update permission on the org resource.

### Example

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

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

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

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

### Parameters

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

# **getEntityUseCodes**
> GetEntityUseCodes200Response getEntityUseCodes()

Returns the list of entity use codes (exemption/usage classifications) supported by the organization\'s configured tax integration of the given type (e.g. Taxjar, Avalara); requires \"read\" permission on \"org\".

### Example

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

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

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

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

### Parameters

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


### Return type

**GetEntityUseCodes200Response**

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

# **getTaxCodes**
> GetTaxCodes200Response getTaxCodes()

Returns the list of product/service tax codes supported by the organization\'s configured tax integration of the given type (e.g. Taxjar, Avalara); requires \"read\" permission on \"org\".

### Example

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

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

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

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

### Parameters

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


### Return type

**GetTaxCodes200Response**

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

# **getTaxIntegration**
> GetTaxIntegration200Response getTaxIntegration()

Returns the configuration details of the organization\'s tax integration for the given type (e.g. Taxjar, Avalara); requires \"read\" permission on \"org\".

### Example

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

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

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

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

### Parameters

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


### Return type

**GetTaxIntegration200Response**

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

# **getTaxIntegrations**
> GetTaxIntegrations200Response getTaxIntegrations()

Returns the organization\'s configured tax integrations (e.g. Avalara, TaxJar) with their enabled status, requiring the \"read\" permission on \"org\".

### Example

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

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

**GetTaxIntegrations200Response**

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

# **getTaxLog**
> GetTaxLog200Response getTaxLog()

Returns a single log entry for the given tax integration type and log ID, requiring the \"read\" permission on both \"org\" and \"logs\".

### Example

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

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

let type: string; //The type identifier (default to undefined)
let logId: string; //The log identifier (default to undefined)

const { status, data } = await apiInstance.getTaxLog(
    type,
    logId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **type** | [**string**] | The type identifier | defaults to undefined|
| **logId** | [**string**] | The log identifier | defaults to undefined|


### Return type

**GetTaxLog200Response**

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

# **getTaxLogs**
> GetTaxLogs200Response getTaxLogs()

Returns a paginated list of log entries for the tax integration of the given type, supporting page, pageSize, orderBy, and search, and requiring the \"read\" permission on both \"org\" and \"logs\".

### Example

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

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

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

### Parameters

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

**GetTaxLogs200Response**

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

# **testTaxIntegration**
> GetTaxIntegration200Response testTaxIntegration()

Verifies that the organization\'s configured tax integration (TaxJar or Avalara) of the given type has valid credentials by making a live test connection to the provider, requiring update permission on the organization.

### Example

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

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

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

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

### Parameters

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


### Return type

**GetTaxIntegration200Response**

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

# **toggleTaxIntegration**
> GetTaxIntegration200Response toggleTaxIntegration()

Toggles the enabled state of the organization\'s tax integration of the given type, verifying the connection and required tax codes before enabling, and requiring that no other tax integration is currently enabled; requires update permission on the organization.

### Example

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

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

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

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

### Parameters

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


### Return type

**GetTaxIntegration200Response**

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

# **updateTaxIntegration**
> GetTaxIntegration200Response updateTaxIntegration(taxIntegrationUpdateInputs)

Updates configuration for the organization\'s tax integration of the given type, such as sandbox mode, commit behavior, company code, and per-resource tax codes (passes, packages, reservations, add-ons, access, invoices, bookings, coupons); requires update permission on the organization.

### Example

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

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

let type: string; //The type identifier (default to undefined)
let taxIntegrationUpdateInputs: TaxIntegrationUpdateInputs; //

const { status, data } = await apiInstance.updateTaxIntegration(
    type,
    taxIntegrationUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **taxIntegrationUpdateInputs** | **TaxIntegrationUpdateInputs**|  | |
| **type** | [**string**] | The type identifier | defaults to undefined|


### Return type

**GetTaxIntegration200Response**

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

