Skip to main content

FastBill

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 FastBill account with API access — see plans.

Use Case 1: Custom-Branded Invoice PDFs

Generate custom-branded invoice PDFs from FastBill invoice data, triggered by a webhook or automation when a new invoice is created.
FastBill webhook (new invoice) → Automation tool → PolyDoc API → Email branded PDF

Get your FastBill API credentials

Log in to FastBill and navigate to Settings → API. Copy your API Email and API Key. These credentials authenticate requests to the FastBill API using HTTP Basic Auth.

Screenshot placeholder: /img/guides/fastbill/fastbill-uc1-api-credentials.png

Set up a trigger for new invoices

In your automation tool (e.g. Make or n8n), create a trigger for new invoices. Use either a FastBill webhook or a scheduled poll on the FastBill API endpoint invoice.get filtered by creation date.

Screenshot placeholder: /img/guides/fastbill/fastbill-uc1-trigger.png

Fetch invoice details

Fetch the full invoice data from FastBill using the invoice.get API call with the invoice ID. The response includes customer details, line items (products), amounts, and dates.

Screenshot placeholder: /img/guides/fastbill/fastbill-uc1-fetch-invoice.png

Call PolyDoc with mapped invoice data

Add an HTTP request step to call PolyDoc:

  • URL: https://api.polydoc.tech/pdf/convert
  • Method: POST
  • Headers: Authorization = Bearer YOUR_API_KEY (get from the Dashboard), X-Sandbox = true
  • Body: JSON mapping FastBill invoice fields (invoice number, customer, products, totals) to your PolyDoc template.
Screenshot placeholder: /img/guides/fastbill/fastbill-uc1-call-polydoc.png

Deliver the branded PDF

Add an email step to send the branded PDF to the customer. Map the recipient to the customer email from FastBill and attach the binary PDF from the PolyDoc response. Test with a sample invoice to verify.

Screenshot placeholder: /img/guides/fastbill/fastbill-uc1-deliver-pdf.png

Use Case 2: Automated Document Export

Automatically export FastBill documents as custom-branded PDFs to cloud storage whenever a new document is created.
FastBill event → Automation tool → PolyDoc API → Cloud storage

Configure the document trigger

In your automation tool, set up a trigger for new FastBill documents. Use a webhook or a scheduled API poll on invoice.get or estimate.get depending on the document type you want to export.

Screenshot placeholder: /img/guides/fastbill/fastbill-uc2-trigger.png

Fetch document data from FastBill

Fetch the document details from the FastBill API. Extract the fields you need for your PDF template — document number, customer info, line items, and totals.

Screenshot placeholder: /img/guides/fastbill/fastbill-uc2-fetch-data.png

Generate the PDF via PolyDoc

Call the PolyDoc API with the mapped document data (same configuration as Use Case 1). The response contains the binary PDF.

Screenshot placeholder: /img/guides/fastbill/fastbill-uc2-generate-pdf.png

Store in cloud storage

Add a storage step to upload the PDF to Google Drive, Dropbox, or S3. Name the file using the document number (e.g. INV-2026-001.pdf). Test the full flow to confirm files appear in the correct folder.

Screenshot placeholder: /img/guides/fastbill/fastbill-uc2-cloud-storage.png