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.
/img/guides/fastbill/fastbill-uc1-api-credentials.pngSet 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.
/img/guides/fastbill/fastbill-uc1-trigger.pngFetch 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.
/img/guides/fastbill/fastbill-uc1-fetch-invoice.pngCall 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.
/img/guides/fastbill/fastbill-uc1-call-polydoc.pngDeliver 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.
/img/guides/fastbill/fastbill-uc1-deliver-pdf.pngUse 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.
/img/guides/fastbill/fastbill-uc2-trigger.pngFetch 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.
/img/guides/fastbill/fastbill-uc2-fetch-data.pngGenerate 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.
/img/guides/fastbill/fastbill-uc2-generate-pdf.pngStore 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.
/img/guides/fastbill/fastbill-uc2-cloud-storage.png