Skip to main content

Pennylane

Prerequisites

  • A PolyDoc account and API key — sign up for free, no credit card required. The free plan includes 150 PDF conversions per month.
  • A Pennylane account with API access — view plans.

Use Case 1: Custom-Branded Invoice PDFs

Replace Pennylane's default invoice layout with a fully custom-branded PDF generated from your own PolyDoc template.
New invoice → Webhook / API poll → Automation tool → PolyDoc API → Email branded PDF

Get Pennylane API access

In your Pennylane account, navigate to Settings → Integrations → API and request API access. Once approved, generate an API token and store it securely.

Screenshot placeholder: /img/guides/pennylane/pennylane-uc1-api-access.png

Detect new invoices

In your automation tool (e.g., Make or Zapier), set up a trigger that detects new Pennylane invoices. Options:

  • Webhook: configure a Pennylane webhook to POST to your automation platform when a new invoice is created
  • Polling: use an HTTP module to periodically call GET /api/external/v1/customer_invoices and filter for new entries
Screenshot placeholder: /img/guides/pennylane/pennylane-uc1-detect-invoices.png

Fetch invoice details

Add an HTTP request to fetch the full invoice details from the Pennylane API:

  • GET /api/external/v1/customer_invoices/:id
  • Header: Authorization: Bearer PENNYLANE_API_TOKEN

The response includes client details, line items, amounts, and dates — everything you need for the PDF template.

Screenshot placeholder: /img/guides/pennylane/pennylane-uc1-fetch-details.png

Generate the PDF with PolyDoc

Add an HTTP request to call the PolyDoc API:

  • URL: https://api.polydoc.tech/pdf/convert
  • Method: POST
  • Header: Authorization = Bearer YOUR_API_KEY (get your key from the Dashboard)
  • Header: X-Sandbox = true
  • Content-Type: application/json
  • Body: JSON mapping Pennylane invoice fields (client name, line items, totals, dates) to your PolyDoc template variables
Screenshot placeholder: /img/guides/pennylane/pennylane-uc1-polydoc-request.png

Send the branded PDF by email

Add a final step to email the generated PDF to your client. Attach the binary PDF from the PolyDoc response and include invoice details in the email subject and body.

Screenshot placeholder: /img/guides/pennylane/pennylane-uc1-send-email.png

Use Case 2: Custom Estimate PDFs

Generate custom-branded estimate PDFs from Pennylane data using your own template.
Pennylane API (fetch estimate) → PolyDoc API → Branded PDF

Retrieve estimate data

Fetch the estimate data from the Pennylane API:

  • GET /api/external/v1/quotes/:id
  • Header: Authorization: Bearer PENNYLANE_API_TOKEN

The response includes client info, line items, validity period, and total amounts.

Screenshot placeholder: /img/guides/pennylane/pennylane-uc2-fetch-estimate.png

Map fields and call PolyDoc

Call the PolyDoc API with the estimate data mapped to your template:

  • URL: https://api.polydoc.tech/pdf/convert
  • Method: POST
  • Headers: Authorization: Bearer YOUR_API_KEY, X-Sandbox: true
  • Body: JSON with estimate fields (client name, items, amounts, dates) mapped to template variables
Screenshot placeholder: /img/guides/pennylane/pennylane-uc2-polydoc-request.png

Deliver the PDF

Deliver the branded PDF — email it to the client, upload it to cloud storage, or attach it back to the Pennylane record via their API.

Screenshot placeholder: /img/guides/pennylane/pennylane-uc2-deliver.png