# The Bookie — Pipedream Connect

> Accounting software

- API slug: `the_bookie` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Business Management
- Website: https://www.thebookie.nl/
- This page (HTML): https://pipedream.com/apps/the-bookie
- Tools: 4 actions · 3 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: the_bookie`

```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": "the_bookie",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Create Contact:
const result = await mcp.callTool({
  name: "the_bookie-create-contact",
  arguments: {
    organisationName: "Organisation Name",
    street: "Street",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a The Bookie endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://backend.thebookie.nl/nl/api/e1/contacts/

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9iYWNrZW5kLnRoZWJvb2tpZS5ubC9ubC9hcGkvZTEvY29udGFjdHMv?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```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: "the_bookie-create-contact",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    the_bookie: { authProvisionId: "apn_xxxxxxx" },
    organisationName: "Organisation Name",
    street: "Street",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (4)

### `the_bookie-create-contact` — Create Contact (Write)

Instantly creates a new contact in the address book. See the documentation

Full schema: https://pipedream.com/apps/the-bookie/actions/create-contact.md

### `the_bookie-create-sales-invoice` — Create Sales Invoice (Write)

Creates a new sales invoice. See the documentation

Full schema: https://pipedream.com/apps/the-bookie/actions/create-sales-invoice.md

### `the_bookie-find-contact` — Find Contacts (Read-only)

Find a contact from the address book. See the documentation

Full schema: https://pipedream.com/apps/the-bookie/actions/find-contact.md

### `the_bookie-list-contact-id-options` — List Contact ID Options (Read-only)

Retrieves available options for the Contact ID field.

Full schema: https://pipedream.com/apps/the-bookie/actions/list-contact-id-options.md

## Triggers (3)

### `the_bookie-new-contact-created` — New Contact Created (Polling)

Emit new event when a contact is created.

Full schema: https://pipedream.com/apps/the-bookie/triggers/new-contact-created.md

### `the_bookie-new-invoice-created` — New Invoice Created (Polling)

Emit new event when a new invoice is created.

Full schema: https://pipedream.com/apps/the-bookie/triggers/new-invoice-created.md

### `the_bookie-new-invoice-paid` — New Invoice Paid (Polling)

Emit new event when the state of an invoice is changed to 'paid'.

Full schema: https://pipedream.com/apps/the-bookie/triggers/new-invoice-paid.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
