# List Bookings — Booking Experts

> Returns a list of bookings for an administration. See the documentation

- Key: `booking_experts-list-bookings`
- Type: Action (Write)
- Version: 1.0.1
- App: Booking Experts (`booking_experts`) — https://pipedream.com/apps/booking-experts.md
- This page (HTML): https://pipedream.com/apps/booking-experts/actions/list-bookings
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/booking_experts/actions/list-bookings/list-bookings.mjs

## Description

Returns a list of bookings for an administration. [See the documentation](https://developers.bookingexperts.com/reference/administration-bookings-index)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `administrationId` | `string` | Yes | The ID of the administration Options are loaded from the connected account. |
| `ownerId` | `string` | No | Filter by owner Options are loaded from the connected account. |
| `administrationChannelId` | `string` | No | Filter by channel Options are loaded from the connected account. |
| `reservationIds` | `string[]` | Yes | Filter by reservation IDs Options are loaded from the connected account. |
| `createdAt` | `string` | No | Filter by created at (ISO 8601 format, e.g., 2024-01-01T00:00:00Z) |
| `updatedAt` | `string` | No | Filter by updated at (ISO 8601 format, e.g., 2024-01-01T00:00:00Z) |
| `page` | `integer` | No | Page number |
| `perPage` | `integer` | No | Number of items per page |
| `filterId` | `string` | No | The ID of a booking Options are loaded from the connected account. |
| `customerIds` | `string[]` | No | Filter by customer IDs Options are loaded from the connected account. |
| `bookingNr` | `string` | No | Filter by booking number Options are loaded from the connected account. |
| `confirmedAt` | `string` | No | Filter by confirmed at (ISO 8601 format, e.g., 2024-01-01T00:00:00Z) |
| `fieldsBooking` | `string[]` | No | Fields to return for the booking |
| `referenceNr` | `string` | No | Filter by reference number |

## 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-bookings",
  arguments: {
    administrationId: "Administration ID",
    ownerId: "Owner 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-bookings",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    booking_experts: { authProvisionId: "apn_xxxxxxx" },
    administrationId: "Administration ID",
    ownerId: "Owner 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-bookings",
    "configured_props": {
      "booking_experts": { "authProvisionId": "apn_xxxxxxx" },
      "administrationId": "Administration ID",
      "ownerId": "Owner ID"
    }
  }'
```

---

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