# BookingsQuestionsChoicesApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createBookingSpaceQuestionChoice**](#createbookingspacequestionchoice) | **POST** /bookings/spaces/{spaceId}/questions/{questionId}/choices | Create a booking space question choice|
|[**deleteBookingSpaceQuestionChoice**](#deletebookingspacequestionchoice) | **DELETE** /bookings/spaces/{spaceId}/questions/{questionId}/choices/{choiceId} | Delete a booking space question choice|
|[**getBookingSpaceQuestionChoice**](#getbookingspacequestionchoice) | **GET** /bookings/spaces/{spaceId}/questions/{questionId}/choices/{choiceId} | Get a booking space question choice|
|[**getBookingSpaceQuestionChoices**](#getbookingspacequestionchoices) | **GET** /bookings/spaces/{spaceId}/questions/{questionId}/choices | List a booking space question\&#39;s choices|
|[**reorderBookingSpaceQuestionChoices**](#reorderbookingspacequestionchoices) | **PUT** /bookings/spaces/{spaceId}/questions/{questionId}/choices/reorder | Reorder a booking question\&#39;s choices|
|[**updateBookingSpaceQuestionChoice**](#updatebookingspacequestionchoice) | **PUT** /bookings/spaces/{spaceId}/questions/{questionId}/choices/{choiceId} | Update a booking space question choice|

# **createBookingSpaceQuestionChoice**
> CreateBookingSpaceQuestionChoice200Response createBookingSpaceQuestionChoice(bookingSpaceQuestionChoiceCreateInputs)

Creates a new selectable choice for a multiple-choice question on a booking space, requires the update bookings permission.

### Example

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

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

let spaceId: string; //The space identifier (default to undefined)
let questionId: string; //The question identifier (default to undefined)
let bookingSpaceQuestionChoiceCreateInputs: BookingSpaceQuestionChoiceCreateInputs; //

const { status, data } = await apiInstance.createBookingSpaceQuestionChoice(
    spaceId,
    questionId,
    bookingSpaceQuestionChoiceCreateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **bookingSpaceQuestionChoiceCreateInputs** | **BookingSpaceQuestionChoiceCreateInputs**|  | |
| **spaceId** | [**string**] | The space identifier | defaults to undefined|
| **questionId** | [**string**] | The question identifier | defaults to undefined|


### Return type

**CreateBookingSpaceQuestionChoice200Response**

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

# **deleteBookingSpaceQuestionChoice**
> CreateAccountInvitations200Response deleteBookingSpaceQuestionChoice()

Permanently deletes a choice from a booking space question by its ID, requires the update bookings permission.

### Example

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

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

let spaceId: string; //The space identifier (default to undefined)
let questionId: string; //The question identifier (default to undefined)
let choiceId: string; //The choice identifier (default to undefined)

const { status, data } = await apiInstance.deleteBookingSpaceQuestionChoice(
    spaceId,
    questionId,
    choiceId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **spaceId** | [**string**] | The space identifier | defaults to undefined|
| **questionId** | [**string**] | The question identifier | defaults to undefined|
| **choiceId** | [**string**] | The choice 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)

# **getBookingSpaceQuestionChoice**
> CreateBookingSpaceQuestionChoice200Response getBookingSpaceQuestionChoice()

Returns a single selectable answer choice for a question on a booking space, identified by place, space, question, and choice ID; requires \"read\" permission on \"bookings\".

### Example

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

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

let spaceId: string; //The space identifier (default to undefined)
let questionId: string; //The question identifier (default to undefined)
let choiceId: string; //The choice identifier (default to undefined)

const { status, data } = await apiInstance.getBookingSpaceQuestionChoice(
    spaceId,
    questionId,
    choiceId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **spaceId** | [**string**] | The space identifier | defaults to undefined|
| **questionId** | [**string**] | The question identifier | defaults to undefined|
| **choiceId** | [**string**] | The choice identifier | defaults to undefined|


### Return type

**CreateBookingSpaceQuestionChoice200Response**

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

# **getBookingSpaceQuestionChoices**
> GetBookingSpaceQuestionChoices200Response getBookingSpaceQuestionChoices()

Returns a paginated list of selectable answer choices for a given question on a booking space, supporting search and ordering; requires \"read\" permission on \"bookings\".

### Example

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

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

let spaceId: string; //The space identifier (default to undefined)
let questionId: string; //The question 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.getBookingSpaceQuestionChoices(
    spaceId,
    questionId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **spaceId** | [**string**] | The space identifier | defaults to undefined|
| **questionId** | [**string**] | The question 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

**GetBookingSpaceQuestionChoices200Response**

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

# **reorderBookingSpaceQuestionChoices**
> ReorderBookingSpaceQuestionChoices200Response reorderBookingSpaceQuestionChoices(reorderBookingSpaceQuestionChoicesRequest)

Sets the display order of a booking space question\'s choices by supplying the full list of choice IDs in the desired sequence, requires the update bookings permission.

### Example

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

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

let spaceId: string; //The space identifier (default to undefined)
let questionId: string; //The question identifier (default to undefined)
let reorderBookingSpaceQuestionChoicesRequest: ReorderBookingSpaceQuestionChoicesRequest; //

const { status, data } = await apiInstance.reorderBookingSpaceQuestionChoices(
    spaceId,
    questionId,
    reorderBookingSpaceQuestionChoicesRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **reorderBookingSpaceQuestionChoicesRequest** | **ReorderBookingSpaceQuestionChoicesRequest**|  | |
| **spaceId** | [**string**] | The space identifier | defaults to undefined|
| **questionId** | [**string**] | The question identifier | defaults to undefined|


### Return type

**ReorderBookingSpaceQuestionChoices200Response**

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

# **updateBookingSpaceQuestionChoice**
> CreateBookingSpaceQuestionChoice200Response updateBookingSpaceQuestionChoice(bookingSpaceQuestionChoiceUpdateInputs)

Updates the details of an existing choice on a booking space question by its ID, requires the update bookings permission.

### Example

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

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

let spaceId: string; //The space identifier (default to undefined)
let questionId: string; //The question identifier (default to undefined)
let choiceId: string; //The choice identifier (default to undefined)
let bookingSpaceQuestionChoiceUpdateInputs: BookingSpaceQuestionChoiceUpdateInputs; //

const { status, data } = await apiInstance.updateBookingSpaceQuestionChoice(
    spaceId,
    questionId,
    choiceId,
    bookingSpaceQuestionChoiceUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **bookingSpaceQuestionChoiceUpdateInputs** | **BookingSpaceQuestionChoiceUpdateInputs**|  | |
| **spaceId** | [**string**] | The space identifier | defaults to undefined|
| **questionId** | [**string**] | The question identifier | defaults to undefined|
| **choiceId** | [**string**] | The choice identifier | defaults to undefined|


### Return type

**CreateBookingSpaceQuestionChoice200Response**

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

