# SurveysTranslationsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**deleteSurveyTranslation**](#deletesurveytranslation) | **DELETE** /surveys/{surveyId}/translations/{locale} | Delete a survey\&#39;s translation|
|[**getSurveyTranslation**](#getsurveytranslation) | **GET** /surveys/{surveyId}/translations/{locale} | Get a survey\&#39;s translation for a locale|
|[**getSurveyTranslations**](#getsurveytranslations) | **GET** /surveys/{surveyId}/translations | List a survey\&#39;s translations|
|[**updateSurveyTranslation**](#updatesurveytranslation) | **PUT** /surveys/{surveyId}/translations/{locale} | Create or update a survey\&#39;s translation|

# **deleteSurveyTranslation**
> SyncAccounts200Response deleteSurveyTranslation()

Removes the translated content for a survey in the given locale, leaving the survey\'s default-locale content unaffected; requires the update surveys permission.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let locale: string; //The locale identifier (default to undefined)

const { status, data } = await apiInstance.deleteSurveyTranslation(
    surveyId,
    locale
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **surveyId** | [**string**] | The survey identifier | defaults to undefined|
| **locale** | [**string**] | The locale identifier | defaults to undefined|


### Return type

**SyncAccounts200Response**

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

# **getSurveyTranslation**
> GetSurveyTranslation200Response getSurveyTranslation()

Retrieves the translated text fields for a survey in a specific locale, returning null if no translation exists for that locale, requiring read permission on surveys.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let locale: string; //The locale identifier (default to undefined)

const { status, data } = await apiInstance.getSurveyTranslation(
    surveyId,
    locale
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **surveyId** | [**string**] | The survey identifier | defaults to undefined|
| **locale** | [**string**] | The locale identifier | defaults to undefined|


### Return type

**GetSurveyTranslation200Response**

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

# **getSurveyTranslations**
> GetSurveyTranslations200Response getSurveyTranslations()

Returns a paginated list of the locale translations available for a survey, with optional search and ordering, requiring read permission on surveys.

### Example

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

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

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

### Parameters

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

**GetSurveyTranslations200Response**

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

# **updateSurveyTranslation**
> SyncAccounts200Response updateSurveyTranslation(surveyTranslationUpdateInputs)

Upserts the translated content (such as name and description) for a survey in the given locale, creating the translation if it does not already exist; requires the update surveys permission.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let locale: string; //The locale identifier (default to undefined)
let surveyTranslationUpdateInputs: SurveyTranslationUpdateInputs; //

const { status, data } = await apiInstance.updateSurveyTranslation(
    surveyId,
    locale,
    surveyTranslationUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **surveyTranslationUpdateInputs** | **SurveyTranslationUpdateInputs**|  | |
| **surveyId** | [**string**] | The survey identifier | defaults to undefined|
| **locale** | [**string**] | The locale identifier | defaults to undefined|


### Return type

**SyncAccounts200Response**

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

