# List RentableType Availabilities — Booking Experts

> List availabilities of a RentableType you have access to. See the documentation

- Key: `booking_experts-list-rentabletype-availabilities`
- Type: Action (Read-only)
- Version: 1.0.2
- App: Booking Experts (`booking_experts`) — https://pipedream.com/apps/booking-experts.md
- This page (HTML): https://pipedream.com/apps/booking-experts/actions/list-rentabletype-availabilities
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs

## Description

List availabilities of a RentableType you have access to. [See the documentation](https://developers.bookingexperts.com/reference/channel-rentabletype-availabilities-index)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `channelId` | `string` | Yes | The ID of a channel Options are loaded from the connected account. |
| `rentableTypeId` | `string` | Yes | The ID of a rentable type Options are loaded from the connected account. |
| `startDate` | `string` | No | The start date of the availability. Yields availability for the given date range. Format: YYYY-MM-DD |
| `endDate` | `string` | No | The end date of the availability. Will be capped to 2 years in the future. Max LOS is capped to 30. Format: YYYY-MM-DD |
| `fields` | `string[]` | No | Fieldset. A list of attributes to return. See the documentation |
| `include` | `string[]` | No | Includes list. A list of resources to include. See the documentation |
| `multibookSafetyMargin` | `integer` | No | Specifies a custom multibook safety margin (must be a positive number). A common problem that occurs when dealing with accommodations instead of hotelrooms is that a single accommodation must be available for all consecutive days for a given start date and LOS. The safety margin helps to prevent overbookings by transforming the available stock. When specified, the safety margin is subtracted from the actual stock. It is only applied to RentableType availabilities with capacity of 3 or more, as this issue cannot occur otherwise. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "booking_experts",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "booking_experts-list-rentabletype-availabilities",
  arguments: {
    channelId: "Channel ID",
    rentableTypeId: "Rentable Type ID",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "booking_experts-list-rentabletype-availabilities",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    booking_experts: { authProvisionId: "apn_xxxxxxx" },
    channelId: "Channel ID",
    rentableTypeId: "Rentable Type ID",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "booking_experts-list-rentabletype-availabilities",
    "configured_props": {
      "booking_experts": { "authProvisionId": "apn_xxxxxxx" },
      "channelId": "Channel ID",
      "rentableTypeId": "Rentable Type ID"
    }
  }'
```

---

- App: https://pipedream.com/apps/booking-experts.md · All apps: https://pipedream.com/apps
