# Get Rate Prices — Mews

> Get rate pricing information for a specific rate and time period. See the documentation

- Key: `mews-get-rate-prices`
- Type: Action (Read-only)
- Version: 0.0.3
- App: Mews (`mews`) — https://pipedream.com/apps/mews.md
- This page (HTML): https://pipedream.com/apps/mews/actions/get-rate-prices
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/mews/actions/get-rate-prices/get-rate-prices.mjs

## Description

Get rate pricing information for a specific rate and time period. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/rates#get-rate-pricing)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `rateId` | `string` | No | Unique identifier of the Rate. Options are loaded from the connected account. |
| `productId` | `string` | No | Unique identifier of the Product. Options are loaded from the connected account. |
| `firstTimeUnitStartUtc` | `string` | Yes | Start of the time interval, expressed as the timestamp for the start of the first time unit, in UTC timezone ISO 8601 format. |
| `lastTimeUnitStartUtc` | `string` | Yes | End of the time interval, expressed as the timestamp for the start of the last time unit, in UTC timezone ISO 8601 format. The maximum size of time interval depends on the service's time unit: 367 hours if hours, 367 days if days, or 24 months if months. |

## 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-get-rate-prices",
  arguments: {
    rateId: "Rate ID",
    productId: "Product 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: "mews-get-rate-prices",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    mews: { authProvisionId: "apn_xxxxxxx" },
    rateId: "Rate ID",
    productId: "Product 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": "mews-get-rate-prices",
    "configured_props": {
      "mews": { "authProvisionId": "apn_xxxxxxx" },
      "rateId": "Rate ID",
      "productId": "Product ID"
    }
  }'
```

---

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