Easybill
Prerequisites
- A PolyDoc account and API key — sign up for free, no credit card required. The free plan includes 150 PDF conversions per month.
- An Easybill account with API access — start a free trial.
Use Case 1: Custom-Branded Invoice PDFs
Replace Easybill's default invoice layout with a fully custom-branded PDF generated by PolyDoc, triggered automatically when a new invoice is created.New invoice → Webhook / API poll → Automation tool → PolyDoc API → Email branded PDF
Enable API access in Easybill
Log in to Easybill and go to Settings → API. Generate an API key and copy it. You will use this key to authenticate requests to the Easybill REST API.
/img/guides/easybill/easybill-uc1-api-access.pngDetect new invoices
In your automation tool, create a trigger that detects new invoices. Use either Easybill's Webhook (if supported by your plan) or a scheduled API poll on GET /rest/v1/documents?type=INVOICE filtered by creation date.
/img/guides/easybill/easybill-uc1-detect-invoices.pngFetch invoice details
Add an HTTP step to fetch the full invoice details from GET /rest/v1/documents/{id}. This returns the document data including customer info, positions (line items), totals, and dates.
/img/guides/easybill/easybill-uc1-fetch-details.pngMap data and call PolyDoc
Add an HTTP request 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 Easybill fields (invoice number, customer name, positions, totals) to your PolyDoc template.
/img/guides/easybill/easybill-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 the Easybill data and attach the binary PDF from the PolyDoc response. Run the automation with a test invoice to verify.
/img/guides/easybill/easybill-uc1-deliver-pdf.pngUse Case 2: Custom Quote PDFs
Generate custom-branded quote PDFs from Easybill quote data using PolyDoc.Easybill API (fetch quote) → PolyDoc API → Branded PDF
Retrieve quote data
Use the Easybill API to retrieve the quote: GET /rest/v1/documents/{id}?type=OFFER. This returns the quote details including positions, customer data, and validity dates.
/img/guides/easybill/easybill-uc2-fetch-quote.pngMap fields to your PolyDoc template
Map the Easybill quote fields to your PolyDoc template — e.g. quote number, customer name, line items, subtotal, tax, and total. Structure the JSON body to match your template's expected variables.
/img/guides/easybill/easybill-uc2-map-fields.pngGenerate and send the PDF
Call the PolyDoc API with the mapped data. Attach the resulting PDF to an email or store it in cloud storage. Verify the output matches your branded template.
/img/guides/easybill/easybill-uc2-generate-send.png