Category
Generate transaction and contract PDFs on demand.
The document routes convert compact JSON payloads into synchronous PDF files that can be downloaded directly or stored by your own application.
Routes
3 POST
Format
PDF attachments
Best for
Internal workflows
Routes in this family
#| Route | Purpose | Key body fields |
|---|---|---|
| /api/v1/documents/invoice | Generate an invoice PDF. | seller, buyer, items |
| /api/v1/documents/receipt | Generate a receipt PDF. | receivedFrom, amount |
| /api/v1/documents/contract | Generate a contract PDF. | parties, clauses |
POST /api/v1/documents/invoice
#Use invoice when you need a synchronous PDF invoice from a compact JSON payload.
| Parameter | Required | Description |
|---|---|---|
| seller | Yes | Seller object with at least `name`. |
| buyer | Yes | Buyer object with at least `name`. |
| items | Yes | Array of items with `description`, `quantity`, `unitPrice`, and optional `vatRate`. |
| invoiceNumber / issueDate / dueDate / notes | No | Optional invoice metadata fields. |
cURL usage
200 response
Error response
POST /api/v1/documents/receipt
#Use receipt for payment acknowledgements that only need the payer and the amount.
| Parameter | Required | Description |
|---|---|---|
| receivedFrom | Yes | Party object with at least `name`. |
| amount | Yes | Received amount. |
| receiptNumber / issueDate / reason / paymentMethod / notes | No | Optional receipt metadata fields. |
cURL usage
200 response
Error response
POST /api/v1/documents/contract
#Use contract when you need a basic agreement PDF generated from parties and clauses.
| Parameter | Required | Description |
|---|---|---|
| parties | Yes | Array with at least two party objects. |
| clauses | Yes | Array of contract clauses. |
| title / contractNumber / issueDate / notes | No | Optional contract metadata fields. |
cURL usage
200 response
Error response
Document generation is intentionally narrow. Persist the source JSON yourself if you need auditability or re-generation.