Skip to content
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

RoutePurposeKey body fields
/api/v1/documents/invoiceGenerate an invoice PDF.seller, buyer, items
/api/v1/documents/receiptGenerate a receipt PDF.receivedFrom, amount
/api/v1/documents/contractGenerate a contract PDF.parties, clauses

POST /api/v1/documents/invoice

Use invoice when you need a synchronous PDF invoice from a compact JSON payload.

ParameterRequiredDescription
sellerYesSeller object with at least `name`.
buyerYesBuyer object with at least `name`.
itemsYesArray of items with `description`, `quantity`, `unitPrice`, and optional `vatRate`.
invoiceNumber / issueDate / dueDate / notesNoOptional invoice metadata fields.
GNU BashcURL usage
curl -s -X POST https://utils.api.orb3x.com/api/v1/documents/invoice \  -H "Content-Type: application/json" \  -d '{"seller":{"name":"Orb3x, Lda"},"buyer":{"name":"Cliente Exemplo"},"items":[{"description":"Service","quantity":1,"unitPrice":100000,"vatRate":14}]}' \  --output invoice.pdf
GNU Bash200 response
HTTP/1.1 200 OKContent-Type: application/pdfContent-Disposition: attachment; filename="invoice.pdf"
JSONError response
{  "error": {    "code": "INVALID_INVOICE_PAYLOAD",    "message": "Invoice payload must include seller, buyer, and at least one item."  }}

POST /api/v1/documents/receipt

Use receipt for payment acknowledgements that only need the payer and the amount.

ParameterRequiredDescription
receivedFromYesParty object with at least `name`.
amountYesReceived amount.
receiptNumber / issueDate / reason / paymentMethod / notesNoOptional receipt metadata fields.
GNU BashcURL usage
curl -s -X POST https://utils.api.orb3x.com/api/v1/documents/receipt \  -H "Content-Type: application/json" \  -d '{"receivedFrom":{"name":"Cliente Exemplo"},"amount":100000}' \  --output receipt.pdf
GNU Bash200 response
HTTP/1.1 200 OKContent-Type: application/pdfContent-Disposition: attachment; filename="receipt.pdf"
JSONError response
{  "error": {    "code": "INVALID_RECEIPT_PAYLOAD",    "message": "Receipt payload must include receivedFrom and amount."  }}

POST /api/v1/documents/contract

Use contract when you need a basic agreement PDF generated from parties and clauses.

ParameterRequiredDescription
partiesYesArray with at least two party objects.
clausesYesArray of contract clauses.
title / contractNumber / issueDate / notesNoOptional contract metadata fields.
GNU BashcURL usage
curl -s -X POST https://utils.api.orb3x.com/api/v1/documents/contract \  -H "Content-Type: application/json" \  -d '{"parties":[{"name":"Orb3x, Lda"},{"name":"Cliente Exemplo"}],"clauses":["The provider delivers the service.","The client pays within 15 days."]}' \  --output contract.pdf
GNU Bash200 response
HTTP/1.1 200 OKContent-Type: application/pdfContent-Disposition: attachment; filename="contract.pdf"
JSONError response
{  "error": {    "code": "INVALID_CONTRACT_PAYLOAD",    "message": "Contract payload must include at least two parties and one clause."  }}
Document generation is intentionally narrow. Persist the source JSON yourself if you need auditability or re-generation.