Quire PDF
v0.2.0Turn JSON into polished PDFs: invoices, receipts, quotes, certificates, or any data.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
render_document Render a PDF document
Render JSON data into a polished PDF (or a PNG preview of one page) and save it to disk. `template` is optional: omit it to auto-detect or use the generic layout. Returns the saved file path, the template used, and page count.
| Parameter | Type | Description |
|---|---|---|
data * | object | The document content as a JSON object. |
format | string | pdf (default) or png (one page, returned as an image too). |
output_path | string | Where to save the file. Default: <template>-<timestamp>.pdf in the working directory. |
page | integer | Page to render when format is png (default 1). |
template | string | Template name from list_templates. Omit to auto-detect. |
test | boolean | Free watermarked test render, not counted against the quota. Use while iterating on the data; omit for the final document. |
validate_document Validate document data
Check data against a template (or see which template would be auto-selected) without rendering. Free; lists every problem with its field path.
| Parameter | Type | Description |
|---|---|---|
data * | object | |
template | string |
list_templates List document templates
List the built-in templates (invoice, receipt, quote, credit-note, statement, certificate, and the generic document layout).
get_template Get a template's fields
Get a template's JSON Schema (required and optional fields) and a complete sample. Use the sample as a starting point for render_document.
| Parameter | Type | Description |
|---|---|---|
name * | string | Template name, e.g. invoice |
get_usage Get render usage
Current plan and renders used this month (requires QUIRE_API_KEY).