# Create Offer — Firmao

> Create a new quote/offer. See the documentation

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

## Description

Create a new quote/offer. [See the documentation](https://firmao.net/API-Documentation_EN.pdf)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `number` | `string` | Yes | Unique number of the offer. |
| `type` | `string` | Yes | Type of the offer. |
| `mode` | `string` | Yes | Mode of the offer. |
| `offerDate` | `string` | Yes | Date of the offer. e.g 2012-07-17T00:00:00+02:00 |
| `netPrice` | `string` | No | Net price of the offer. |
| `grossPrice` | `string` | No | Gross price of the offer. |
| `vatPrice` | `string` | No | Value Added Tax price of the offer. |
| `currency` | `string` | No | Currency of the offer. |
| `validFrom` | `string` | No | Date from which the offer is valid. e.g 2012-07-17T00:00:00+02:00 |
| `offerStatus` | `string` | No | Status of the offer. |
| `paymentDate` | `string` | No | Payment date of the offer. e.g 2012-07-17T00:00:00+02:00 |
| `customerAddressPostCode` | `string` | No | Post code of the customer's address. |
| `daysToDueDate` | `integer` | No | Number of days to the due date of the offer. |
| `customer` | `string` | No | Customer ID to be added in an offer Options are loaded from the connected account. |
| `customerAddressCity` | `string` | No | City of the customer's address. |
| `customerAddressCountry` | `string` | No | Country of the customer's address. |
| `customerAddressStreet` | `string` | No | Street of the customer's address. |
| `nipNumber` | `string` | No | NIP number of the customer. |
| `issuingPerson` | `string` | No | Person issuing the offer. |

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

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: "firmao-create-offer",
  arguments: {
    number: "Unique Number",
    type: "Offer Type",
  },
})
```

**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: "firmao-create-offer",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    firmao: { authProvisionId: "apn_xxxxxxx" },
    number: "Unique Number",
    type: "Offer Type",
  },
})

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": "firmao-create-offer",
    "configured_props": {
      "firmao": { "authProvisionId": "apn_xxxxxxx" },
      "number": "Unique Number",
      "type": "Offer Type"
    }
  }'
```

---

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