# Create Limo Booking — LimoExpress

> Creates a new limo booking with specified details. See the documentation

- Key: `limoexpress-create-booking`
- Type: Action (Write)
- Version: 0.0.2
- App: LimoExpress (`limoexpress`) — https://pipedream.com/apps/limoexpress.md
- This page (HTML): https://pipedream.com/apps/limoexpress/actions/create-booking
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/limoexpress/actions/create-booking/create-booking.mjs

## Description

Creates a new limo booking with specified details. [See the documentation](https://api.limoexpress.me/api/docs/v1#/Bookings/createBooking)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `bookingTypeId` | `string` | Yes | ID of the booking type. Options are loaded from the connected account. |
| `bookingStatusId` | `string` | No | ID of the booking status. Options are loaded from the connected account. |
| `fromLocationName` | `string` | Yes | The pickup location name. |
| `fromLocationFullAddress` | `string` | Yes | The pickup location full address. |
| `fromLocationLatitude` | `string` | No | The pickup location latitude. |
| `fromLocationLongitude` | `string` | No | The pickup location longitude. |
| `toLocationName` | `string` | Yes | The dropoff location name. |
| `toLocationFullAddress` | `string` | Yes | The dropoff location full address. |
| `toLocationLatitude` | `string` | No | The dropoff location latitude. |
| `toLocationLongitude` | `string` | No | The dropoff location longitude. |
| `pickupTime` | `string` | Yes | The time scheduled for pickup. Format: YYYY-MM-DD HH:MM:SS |
| `expectedDropOffTime` | `string` | No | The expected drop off time. Format: YYYY-MM-DD HH:MM:SS |
| `expectedComebackTime` | `string` | No | The expected comeback time. Format: YYYY-MM-DD HH:MM:SS |
| `vehicleClassId` | `string` | No | ID of the vehicle class to be used for the booking. Options are loaded from the connected account. |
| `vehicleId` | `string` | No | ID of the vehicle to be used for the booking. Vehicle class ID is required. Options are loaded from the connected account. |
| `price` | `string` | No | The price of the booking. |
| `priceType` | `string` | No | The type of price for the booking. |
| `commissionAmount` | `string` | No | The commission amount for the booking. |
| `currencyId` | `string` | No | ID of the currency to be used for the booking. Options are loaded from the connected account. |
| `vatPercentage` | `string` | No | The VAT percentage for the booking. |
| `paymentMethodId` | `string` | No | ID of the payment method for the booking. Options are loaded from the connected account. |
| `distance` | `integer` | No | Number of kilometers/miles that booking will take. |
| `duration` | `string` | No | Number of hours and minutes that booking will take. Format: HH:MM |
| `paid` | `boolean` | No | Flag that says is the booking paid or not. |
| `confirmed` | `boolean` | No | Flag that says is the booking confirmed or not. |
| `roundTrip` | `boolean` | No | Flag that says is the booking a round trip or not. |
| `note` | `string` | No | Note for the dispatcher. |
| `noteForDriver` | `string` | No | Note for the driver. |
| `flightNumber` | `string` | No | Flight number for the booking. |
| `numOfWaitingHours` | `integer` | No | Number of waiting hours. |
| `clientId` | `string` | No | ID of the client for the booking. Options are loaded from the connected account. |
| `waitingBoardText` | `string` | No | Text that will be places on the waiting board. |
| `babySeatCount` | `integer` | No | Number of baby seats that will be used for the booking. |
| `suitcaseCount` | `integer` | No | Number of suitcases that will be used for the booking. |
| `checkpoints` | `string[]` | No | List of objects of checkpoints location and time. Format: [{"location": { "name": string, "full_address": string, "coordinates": { "lat": number, "lng": number } }, "time": "01:14"}] |
| `passengers` | `string[]` | No | List of objects of passengers. **Format: [{"first_name": string, "last_name": string, "phone": string, "email": string, "nationality": string, "passport": string, "country_id": UUID }] |

## 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": "limoexpress",
      },
    },
  },
)

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: "limoexpress-create-booking",
  arguments: {
    bookingTypeId: "Booking Type ID",
    bookingStatusId: "Booking Status 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: "limoexpress-create-booking",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    limoexpress: { authProvisionId: "apn_xxxxxxx" },
    bookingTypeId: "Booking Type ID",
    bookingStatusId: "Booking Status 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": "limoexpress-create-booking",
    "configured_props": {
      "limoexpress": { "authProvisionId": "apn_xxxxxxx" },
      "bookingTypeId": "Booking Type ID",
      "bookingStatusId": "Booking Status ID"
    }
  }'
```

---

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