# List Availabilities — Booking Experts

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

- Key: `booking_experts-list-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-availabilities
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/booking_experts/actions/list-availabilities/list-availabilities.mjs

## Description

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

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `fields` | `string[]` | No | Fieldset of attributes to return. See the documentation |
| `include` | `string[]` | No | Includes list of resources to include. See the documentation |
| `channelIds` | `string[]` | No | Specify a list of channel IDs to be used for searching availability. By default, all accessible channels associated to your app will be used. Overriding this may be useful when you have access to multiple channels of the same administration. Options are loaded from the connected account. |
| `includeSemanticSegmentCounts` | `boolean` | No | When true, the amount of results per semantic segment will be added to the metadata |
| `includeAmenityCounts` | `boolean` | No | When true, the amount of results per amenity will be added to the metadata |
| `referrer` | `string` | No | Referrer name. |
| `startDate` | `string` | No | Filter on start date. Expects a date range. Note: date ranges have an exclusive end date. Format: YYYY-MM-DD..YYYY-MM-DD |
| `overlapsDate` | `string` | No | Filter availabilities that (partially) overlap these dates. Format: YYYY-MM-DD..YYYY-MM-DD |
| `includesDate` | `string` | No | Filter availabilities that contain the specified date range. Format: YYYY-MM-DD..YYYY-MM-DD |
| `arrangement` | `string` | No | Filter on availabilities that exactly match the supplied date range. Format: YYYY-MM-DD..YYYY-MM-DD |
| `los` | `string` | No | Filter on length of stay. Format: 1..21 |
| `wday` | `string` | No | Filter on a particular week day |
| `administrationIds` | `string[]` | No | Filter on administrations Options are loaded from the connected account. |
| `rentableTypeIds` | `string[]` | No | Filter on rentable types |
| `excludeRentableTypeIds` | `string[]` | No | Exclude rentable types |
| `rentableSegmentIds` | `string[]` | No | Filter on rentable segments. Options are loaded from the connected account. |
| `excludeRentableSegmentIds` | `string[]` | No | Exclude rentable segments. Options are loaded from the connected account. |
| `amenityIds` | `string[]` | No | Filter on amenities. Options are loaded from the connected account. |
| `discountCampaignId` | `string` | No | Filter on discount campaign ID. Options are loaded from the connected account. |
| `inventoryObjectId` | `string` | No | Filter on inventory object ID. Options are loaded from the connected account. |
| `promotionToken` | `string` | No | Filter on owner promotion token. |
| `countryCodes` | `string[]` | No | Filter on country codes. Specify a comma separated list of ISO 3166-1 alpha-2 country codes. For example: NL,EN,DE. |
| `excludeCountryCodes` | `string[]` | No | Exclude country codes. Specify a comma separated list of ISO 3166-1 alpha-2 country codes. For example: NL,EN,DE. |
| `seniors` | `integer` | No | Filter on number of seniors. |
| `adults` | `integer` | No | Filter on number of adults. |
| `adolescents` | `integer` | No | Filter on number of adolescents. |
| `children` | `integer` | No | Filter on number of children. |
| `babies` | `integer` | No | Filter on number of babies. |
| `pets` | `integer` | No | Filter on number of pets. |
| `price` | `string` | No | Filter on a price range. Format: 100..200 |
| `currency` | `string` | No | Filter on a specific ISO 4217 currency code. By default the prices are returned in the administration's native currency. Results can differ per currency |
| `numberOfBedrooms` | `integer` | No | Filter on type number of bedrooms. |
| `numberOfBeds` | `integer` | No | Filter on type number of beds. |
| `numberOfShowers` | `integer` | No | Filter on type number of showers. |
| `numberOfToilets` | `integer` | No | Filter on type number of toilets. |
| `numberOfBathrooms` | `integer` | No | Filter on type number of bathrooms. |
| `numberOfParkingSpots` | `integer` | No | Filter on type number of parking spots. |
| `numberOfChildBeds` | `integer` | No | Filter on type number of beds. |
| `numberOfChildChairs` | `integer` | No | Filter on type number of child chairs. |
| `sorters` | `string[]` | No | Specify a comma separated list of sorters to apply |
| `losDesc` | `boolean` | No | Boolean specifying the sort direction for the los sorter. When unspecified, ascending order is implied. |
| `losDistanceDesc` | `boolean` | No | Boolean specifying the sort direction for the los_distance sorter. When unspecified, ascending order is implied. |
| `losDistanceLos` | `integer` | No | Length of stay for the los_distance sorter. |
| `startDateDesc` | `boolean` | No | Boolean specifying the sort direction for the start_date sorter. When unspecified, ascending order is implied. |
| `startDateDistanceDesc` | `boolean` | No | Boolean specifying the sort direction for the start_date_distance sorter. When unspecified, ascending order is implied. |
| `startDateDistanceStartDate` | `string` | No | Start date for the start_date_distance sorter. Format: YYYY-MM-DD |
| `arrangementDistanceDesc` | `boolean` | No | Boolean specifying the sort direction for the arrangement_distance sorter. When unspecified, ascending order is implied. |
| `arrangementDistanceArrangement` | `string` | No | Arrangement for the arrangement_distance sorter. Format: YYYY-MM-DD..YYYY-MM-DD |
| `maxGuestsDesc` | `boolean` | No | Boolean specifying the sort direction for the max_guests sorter. When unspecified, ascending order is implied. |
| `highlightedDesc` | `boolean` | No | Boolean specifying the sort direction for the highlighted sorter. When unspecified, ascending order is implied. |
| `allInAmountDesc` | `boolean` | No | Boolean specifying the sort direction for the all_in_amount sorter. When unspecified, ascending order is implied. |
| `amenityIdsMatchScoreDesc` | `boolean` | No | Boolean specifying the sort direction for the amenity_ids_match_score sorter. When unspecified, ascending order is implied. |
| `amenityIdsMatchScoreAmenityIds` | `string[]` | No | Amenity IDs for the amenity_ids_match_score sorter. |
| `avgScoreDesc` | `boolean` | No | Boolean specifying the sort direction for the avg_score sorter. When unspecified, ascending order is implied. |
| `limit` | `string` | No | Specify a limiter here. |
| `availabilitiesLimit` | `integer` | No | Return limit availabilities. |
| `startDatesLimit` | `integer` | No | Limit to the limit best arrival dates. |
| `startDatesAvailabilities` | `integer` | No | Number of availabilities to return. |
| `losLimit` | `integer` | No | Limit to the limit best Length of stay (LOS) values. |
| `losAvailabilities` | `integer` | No | Number of availabilities to return. |
| `categoriesOffset` | `integer` | No | Result offset for the categories limiter, useful for pagination. |
| `categoriesAvailabilities` | `integer` | No | Number of availabilities to return. |
| `rentableTypesLimit` | `integer` | No | Limit to the limit best types. |
| `rentableTypesOffset` | `integer` | No | Result offset for the rentable_types limiter, useful for pagination. |
| `rentableTypesAvailabilities` | `integer` | No | Number of availabilities to return. |
| `administrationsLimit` | `integer` | No | Limit to the limit best administrations. |
| `administrationsRentableTypes` | `integer` | No | Limit to the limit best types. |
| `administrationsAvailabilities` | `integer` | No | Number of availabilities to return. |

## 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-availabilities",
  arguments: {
    fields: ["Fields"],
    include: ["Include"],
  },
})
```

**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-availabilities",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    booking_experts: { authProvisionId: "apn_xxxxxxx" },
    fields: ["Fields"],
    include: ["Include"],
  },
})

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-availabilities",
    "configured_props": {
      "booking_experts": { "authProvisionId": "apn_xxxxxxx" },
      "fields": ["Fields"],
      "include": ["Include"]
    }
  }'
```

---

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