documents

Generate Document

Generate a business document (PO, Invoice, Quote, etc.).

This endpoint generates a document based on the provided data and returns either the file path (for PDF) or HTML content (for HTML format).

Args: request: Document generation request with type, data, and options

Returns: Response with generation status and output

Raises: HTTPException: If generation fails or PDF requested but WeasyPrint not available

post/documents/generate

Request

  • Base URL: https://api.jeevyfabrication.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.jeevyfabrication.com/documents/generate
  • Auth: none declared

Request body

doc_type'quote_request' | 'po' | 'invoice' | 'quote' | 'work_order' required

Types of business documents that can be generated.

currencystring

Currency symbol

tax_ratenumber

Tax rate as decimal (0-1)

logo_pathstring nullable

Path to company logo image

output_formatstring

Output format: 'html' or 'pdf'

document_namestring nullable

Custom name for the generated document

Response

Successful Response

successboolean required

Whether generation was successful

document_typestring required

Type of document generated

file_pathstring nullable

Path to generated file (if saved)

file_urlstring nullable

URL to download the file

html_contentstring nullable

HTML content (if format=html)

messagestring required

Status message

Changes

No recorded changes to this operation across all 1 revision of this API.