# Add Reservation Product — Mews

> Add a product to a reservation. See the documentation

- Key: `mews-add-reservation-product`
- Type: Action (Write)
- Version: 0.0.3
- App: Mews (`mews`) — https://pipedream.com/apps/mews.md
- This page (HTML): https://pipedream.com/apps/mews/actions/add-reservation-product
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/mews/actions/add-reservation-product/add-reservation-product.mjs

## Description

Add a product to a reservation. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/reservations#add-reservation-product)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `reservationId` | `string` | Yes | Identifier of the reservation to add the product to. Options are loaded from the connected account. |
| `serviceIds` | `string[]` | Yes | Identifiers of the services for which the product is available. Options are loaded from the connected account. |
| `productId` | `string` | Yes | Identifier of the Product. See the documentation Options are loaded from the connected account. |
| `count` | `integer` | No | The count of products to be added. If not specified, 1 is the default. |
| `startUtc` | `string` | No | Start time of the product in ISO 8601 format (UTC). Eg. 2025-01-01T00:00:00Z |
| `endUtc` | `string` | No | End time of the product in ISO 8601 format (UTC). Eg. 2025-01-01T00:00:00Z |
| `unitAmountGrossValue` | `string` | No | Gross value of the product. |
| `unitAmountNetValue` | `string` | No | Net value of the product. |
| `unitAmountCurrency` | `string` | No | Currency of the product. See the documentation Options are loaded from the connected account. |
| `unitAmountTaxCodes` | `string[]` | No | Codes of Tax rates to be applied to the item. (Note, you can only define one tax when sending Gross Value. For multiple taxes, use Net Value) Options are loaded from the connected account. |

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

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: "mews-add-reservation-product",
  arguments: {
    reservationId: "Reservation ID",
    serviceIds: ["Service IDs"],
  },
})
```

**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: "mews-add-reservation-product",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    mews: { authProvisionId: "apn_xxxxxxx" },
    reservationId: "Reservation ID",
    serviceIds: ["Service IDs"],
  },
})

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": "mews-add-reservation-product",
    "configured_props": {
      "mews": { "authProvisionId": "apn_xxxxxxx" },
      "reservationId": "Reservation ID",
      "serviceIds": ["Service IDs"]
    }
  }'
```

---

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