# BookingsSpacesApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createBookingSpace**](#createbookingspace) | **POST** /bookings/spaces | Create a booking space|
|[**deleteBookingSpace**](#deletebookingspace) | **DELETE** /bookings/spaces/{spaceId} | Delete a booking space|
|[**updateBookingSpace**](#updatebookingspace) | **PUT** /bookings/spaces/{spaceId} | Update a booking space|

# **createBookingSpace**
> CreateBookingSpace200Response createBookingSpace(bookingSpaceCreateInputs)

Creates a new bookable space optionally linked to any combination of place, event, group, and account parent ids (all null = no parents; still appears in the org-wide list), requires the update bookings permission, and assigns the space a sort order relative to existing spaces if none is provided.

### Example

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

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

let bookingSpaceCreateInputs: BookingSpaceCreateInputs; //

const { status, data } = await apiInstance.createBookingSpace(
    bookingSpaceCreateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **bookingSpaceCreateInputs** | **BookingSpaceCreateInputs**|  | |


### Return type

**CreateBookingSpace200Response**

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

# **deleteBookingSpace**
> CreateAccountInvitations200Response deleteBookingSpace()

Deletes a booking space, requires the update bookings permission, and fails if the space still has existing bookings.

### Example

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

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

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

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

### Parameters

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

# **updateBookingSpace**
> CreateBookingSpace200Response updateBookingSpace(bookingSpaceUpdateInputs)

Updates the attributes of an existing booking space, including optional parent link changes (any combination of place/event/group/account ids; send null to unlink), and requires the update bookings permission.

### Example

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

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

let spaceId: string; //The space identifier (default to undefined)
let bookingSpaceUpdateInputs: BookingSpaceUpdateInputs; //

const { status, data } = await apiInstance.updateBookingSpace(
    spaceId,
    bookingSpaceUpdateInputs
);
```

### Parameters

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


### Return type

**CreateBookingSpace200Response**

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

