# Submit Complete Plan Request — White Swan

> Creates a new comprehensive quote request based on the information provided and generates the final quotation without further data requirements. See the documentation

- Key: `white_swan-submit-complete-plan-request`
- Type: Action (Write)
- Version: 0.0.3
- App: White Swan (`white_swan`) — https://pipedream.com/apps/white-swan.md
- This page (HTML): https://pipedream.com/apps/white-swan/actions/submit-complete-plan-request
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/white_swan/actions/submit-complete-plan-request/submit-complete-plan-request.mjs

## Description

Creates a new comprehensive quote request based on the information provided and generates the final quotation without further data requirements. [See the documentation](https://docs.whiteswan.io/partner-knowledge-base/api-documentation/action-calls/submit-complete-plan-request)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | Yes | The full name of the person who the request is made on behalf of. |
| `email` | `string` | Yes | The email of the person who the request is made on behalf of. |
| `policyType` | `string` | Yes | The policy type that this request is made for. |
| `mainGoal` | `string` | Yes | The primary goal of this plan request, either Protection or Accumulation. |
| `residentState` | `string` | Yes | The state in which the insured person is a resident. Example: California |
| `deathBenefitNeeded` | `integer` | Yes | The amount of death benefit that is required for this plan. To opt for the lowest amount possible given a certain premium budget, use 0. |
| `paymentSchedule` | `string` | Yes | How often premiums should be paid on this plan. |
| `gender` | `string` | Yes | Whether the intended insured person is Male or Female. |
| `dateOfBirth` | `string` | Yes | The date of birth of the intended insured person in ISO 8601 format. |
| `healthRating` | `string` | Yes | How the insured person would rate their own general health. |
| `usesTobacco` | `boolean` | Yes | Whether the intended insured person uses tobacco/nicotine products or not. |
| `insuredHeightFeet` | `integer` | Yes | The height in feet of the intended insured person. |
| `insuredHeightInches` | `integer` | Yes | The height in inches of the intended insured person. |
| `insuredWeight` | `integer` | Yes | The weight in pounds of the intended insured person. |
| `prefillInfoId` | `string` | No | If you have already created a pre-fill information you can pass its ID by using this parameter to associate that info with this request. |

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

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: "white_swan-submit-complete-plan-request",
  arguments: {
    name: "Name",
    email: "Email",
  },
})
```

**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: "white_swan-submit-complete-plan-request",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    white_swan: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    email: "Email",
  },
})

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": "white_swan-submit-complete-plan-request",
    "configured_props": {
      "white_swan": { "authProvisionId": "apn_xxxxxxx" },
      "name": "Name",
      "email": "Email"
    }
  }'
```

---

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