> This page is optimized for agents. Use the linked Markdown pages and llms.txt indexes for related API content.

# Add facilities to or remove facilities from multiple accommodations at once.

> The facilities themselves are changed per accommodation in the background.

- Product: Accommodations
- Section: Accommodation
- Snapshot: Current
- Method: `PATCH`
- Path: `/api/accommodations/facilities`

## Request body

Required: yes  
Content types: `application/json`  

### `action`

Type: `string`  
Required: yes  

Whether the facilities should be added to or removed from the accommodations

### `accommodations`

Type: `number[]`  
Required: yes  

The accommodations to change the facilities of

#### number

Type: `number`  

### `facilitySpecifications`

Type: `number[]`  
Required: yes  

The facility specifications to add or remove

#### number

Type: `number`  

## Execute with TypeScript

Package: `@recranet/sdk`  

```ts
import { RecranetApiClient } from "@recranet/sdk";

const client = new RecranetApiClient({ apiKey: process.env.RECRANET_API_KEY! });

const result = await client.accommodations.patchFacilities({
  action: "<action>",
  accommodations: [0],
  facilitySpecifications: [0],
});
```

## Execute with curl

```bash
curl -X PATCH "https://app.recranet.com/api/accommodations/facilities" \
    -H "X-Api-Key: $RECRANET_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{"action":"<action>","accommodations":[0],"facilitySpecifications":[0]}'
```

## Responses

### Response `200`

Category: success  

Successful response

### Response `400`

Category: client-error  

Bad request

#### `application/json`

##### Example

```json
{
  "statusCode": 400,
  "description": "Bad request",
  "errors": [
    "Bad request"
  ]
}
```

##### Schema

###### object

Type: `object`  

## Related representations

- [Human documentation](/accommodations/methods/patch-facilities/)
- [TypeScript Markdown](/accommodations/methods/patch-facilities.md?lang=typescript)
- [curl Markdown](/accommodations/methods/patch-facilities.md?lang=curl)
- [site llms.txt](/llms.txt)
- [product llms.txt](/accommodations/llms.txt)
- [snapshot llms.txt](/accommodations/llms.txt)
