# BookingsQuestionsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**attachBookingSpaceQuestionSearchList**](#attachbookingspacequestionsearchlist) | **PUT** /bookings/spaces/{spaceId}/questions/{questionId}/searchlist | Attach a search list to a booking question|
|[**createBookingSpaceQuestion**](#createbookingspacequestion) | **POST** /bookings/spaces/{spaceId}/questions | Create a booking space question|
|[**deleteBookingSpaceQuestion**](#deletebookingspacequestion) | **DELETE** /bookings/spaces/{spaceId}/questions/{questionId} | Delete a booking space question|
|[**detachBookingSpaceQuestionSearchList**](#detachbookingspacequestionsearchlist) | **DELETE** /bookings/spaces/{spaceId}/questions/{questionId}/searchlist | Detach a search list from a booking question|
|[**getBookingSpaceQuestion**](#getbookingspacequestion) | **GET** /bookings/spaces/{spaceId}/questions/{questionId} | Get a booking space question|
|[**getBookingSpaceQuestions**](#getbookingspacequestions) | **GET** /bookings/spaces/{spaceId}/questions | List a booking space\&#39;s custom questions|
|[**reorderBookingSpaceQuestions**](#reorderbookingspacequestions) | **PUT** /bookings/spaces/{spaceId}/questions/reorder | Reorder a booking space\&#39;s questions|
|[**updateBookingSpaceQuestion**](#updatebookingspacequestion) | **PUT** /bookings/spaces/{spaceId}/questions/{questionId} | Update a booking space question|

# **attachBookingSpaceQuestionSearchList**
> CreateBookingSpaceQuestion200Response attachBookingSpaceQuestionSearchList(attachSearchListInputs)

Links an existing search list to a booking space question so its options are sourced from that list, replacing any previously attached search list; requires update permission on bookings.

### Example

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

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

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

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

### Parameters

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


### Return type

**CreateBookingSpaceQuestion200Response**

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

# **createBookingSpaceQuestion**
> CreateBookingSpaceQuestion200Response createBookingSpaceQuestion(bookingSpaceQuestionCreateInputs)

Creates a new custom question (with optional choices) on a booking space, inserting it at the given sort order among the space\'s existing questions; requires update permission on bookings.

### Example

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

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

let spaceId: string; //The space identifier (default to undefined)
let bookingSpaceQuestionCreateInputs: BookingSpaceQuestionCreateInputs; //

const { status, data } = await apiInstance.createBookingSpaceQuestion(
    spaceId,
    bookingSpaceQuestionCreateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **bookingSpaceQuestionCreateInputs** | **BookingSpaceQuestionCreateInputs**|  | |
| **spaceId** | [**string**] | The space identifier | defaults to undefined|


### Return type

**CreateBookingSpaceQuestion200Response**

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

# **deleteBookingSpaceQuestion**
> CreateAccountInvitations200Response deleteBookingSpaceQuestion()

Permanently deletes a custom question from a booking space and re-sequences the sort order of the remaining questions; requires update permission on bookings.

### Example

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

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

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

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

### Parameters

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

# **detachBookingSpaceQuestionSearchList**
> CreateBookingSpaceQuestion200Response detachBookingSpaceQuestionSearchList()

Removes the search list currently linked to a booking space question, clearing its source of predefined options; requires update permission on bookings.

### Example

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

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

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

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

### Parameters

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


### Return type

**CreateBookingSpaceQuestion200Response**

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

# **getBookingSpaceQuestion**
> CreateBookingSpaceQuestion200Response getBookingSpaceQuestion()

Retrieves a single custom question configured for a booking space, including its label, type, and settings; requires the \"read\" permission on \"bookings\".

### Example

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

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

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

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

### Parameters

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


### Return type

**CreateBookingSpaceQuestion200Response**

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

# **getBookingSpaceQuestions**
> GetBookingSpaceQuestions200Response getBookingSpaceQuestions()

Returns a paginated list of the custom questions configured for a booking space, supporting search over the question\'s name, label, and description and sorting via orderBy; requires the \"read\" permission on \"bookings\".

### Example

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

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

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

### Parameters

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

**GetBookingSpaceQuestions200Response**

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

# **reorderBookingSpaceQuestions**
> ReorderBookingSpaceQuestions200Response reorderBookingSpaceQuestions(reorderBookingSpaceQuestionsRequest)

Sets the display order of all questions on a booking space by supplying the complete ordered list of question IDs; every existing question must be included or the request is rejected, and requires update permission on bookings.

### Example

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

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

let spaceId: string; //The space identifier (default to undefined)
let reorderBookingSpaceQuestionsRequest: ReorderBookingSpaceQuestionsRequest; //

const { status, data } = await apiInstance.reorderBookingSpaceQuestions(
    spaceId,
    reorderBookingSpaceQuestionsRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **reorderBookingSpaceQuestionsRequest** | **ReorderBookingSpaceQuestionsRequest**|  | |
| **spaceId** | [**string**] | The space identifier | defaults to undefined|


### Return type

**ReorderBookingSpaceQuestions200Response**

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

# **updateBookingSpaceQuestion**
> CreateBookingSpaceQuestion200Response updateBookingSpaceQuestion(bookingSpaceQuestionUpdateInputs)

Updates the properties of an existing booking space question, such as its name, label, description, or sort order, moving it among the space\'s other questions if the sort order changes; requires update permission on bookings.

### Example

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

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

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

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

### Parameters

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


### Return type

**CreateBookingSpaceQuestion200Response**

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

