Dokaz APIDocs › Invoice PDF

Invoice PDF API: JSON in, PDF out

Most apps eventually need to hand a customer a PDF. Running a headless browser for that is heavy, and hosted PDF services charge for a rendering engine you only use one way. This endpoint takes the invoice as JSON, computes the totals and tax server-side, and returns the PDF bytes.

The layout is fixed and professional: your name and address, the customer, an items table, totals, notes and terms, paginated automatically for long invoices. Send kind: "estimate" or "receipt" to change the document title.

Request

curl -X POST https://api.dokaz.net/v1/invoice/pdf \
  -H "content-type: application/json" \
  -d '{"kind":"invoice","number":"INV-2026-0142","date":"2026-09-06","due":"2026-10-06","currency":"USD","from":{"name":"Northwind Studio LLC","address":["1200 Market Street, Suite 410","San Francisco, CA 94102"],"email":"billing@northwind.studio"},"to":{"name":"Acme Robotics Inc.","address":["42 Foundry Lane","Austin, TX 78701"]},"items":[{"description":"Brand identity design","qty":1,"unit_price":2400,"tax_rate":8.25},{"description":"Front-end implementation (hourly)","qty":32,"unit_price":110,"tax_rate":8.25}],"notes":"Thank you for your business.","terms":"Payment is due within 30 days."}'

The response is application/pdf. Use /v1/invoice/preview with the same body to get the computed totals as JSON first.

Try it live — this runs against the free tier from your browser.

Pricing

100 calls a day are free with no key. Need more? Starter is $9/month for 10,000 calls across every product, key issued instantly.

Questions

Can I use my logo?

The PDF renders a text wordmark (logo_text) rather than an image, which keeps rendering instant and the file tiny. Image logos are on the roadmap for paid plans.

Which currencies are supported?

USD, EUR, GBP, CAD and AUD (case-insensitive). Any other code is rejected with a 400 that lists the accepted ones.

Is the PDF valid for accounting software?

It is a standard PDF 1.4 with embedded standard fonts and passes strict parsers. Text is selectable and searchable.

Related