Skip to main content
POST
Generate a PDF

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Schema for generating an invoice PDF

invoice_id
integer
required

The ID of the invoice to generate the PDF for

kind
string
required

The kind of PDF to generate

Allowed value: "INVOICE"
clinic_patient_id
integer | null

The ID of the patient to generate the PDF for, leave blank to include all patients

include_discharge_notes
boolean | null
default:false

Whether to include discharge notes

include_upcoming
boolean | null
default:false

Whether to include upcoming invoices

patient_id
integer | null
deprecated

Deprecated: Use clinic_patient_id instead.

Response

201 - application/json

Created

Schema for the PDF detail view

error
string | null
required

An error message if the PDF generation failed. Null on success.

file_name
string
required

The filename of the generated PDF document.

file_url
string | null
required

A pre-signed URL to download the generated PDF. Null if the PDF is still being generated or generation failed.

key
string
required

The unique key used to identify and retrieve this generated PDF.

name
string
required

A human-readable name describing the type of PDF that was generated.

status
enum<string>
required

The current generation status of the PDF.

Available options:
PENDING,
SUCCESS,
ERROR