Skip to main content

Documents API

Generate, check, download, preview, and deliver invoice documents.

Document endpoints turn receivable state into client-ready invoice output. Regenerate a PDF after invoice content or template changes. Treat download URLs as short-lived credentials.

/v1/receivables/documents

Endpoints and Schemas

MethodPathRequest schemaSuccess response
POST/pdf/generateGeneratePDFRequestGeneratePDFResponse
POST/pdf/batchBatchGeneratePDFRequestBatchGeneratePDFResponse
GET/pdf/{invoiceId}/statusnonePDFStatusResponse
GET/pdf/{invoiceId}/downloadnoneDownloadUrlResponse
GET/preview/{invoiceId}nonePreviewResponse
POST/pdf/{invoiceId}/regeneratenoneRegeneratePDFResponse
POST/emailEmailInvoiceRequestEmailInvoiceResponse
POST/email/scheduleScheduleEmailRequestScheduleEmailResponse

PDF Generation

{
  "invoiceId": "550e8400-e29b-41d4-a716-446655440000",
  "regenerate": false
}

regenerate defaults to false, and the API can then return a document that exists. The response shows if a PDF already existed. It includes invoiceId, invoiceNumber, filePath, and generation time when available.

Batch generation accepts 1–50 invoiceIds. Check each entry in results. A successful batch response does not mean that every requested document got a file path.

Status and Downloads

PDF status is ready or not_generated. The download response returns a pre-signed downloadUrl and expiresAt. Do not persist the URL as a permanent document identifier, send it to analytics, or show it to a different organization. Request a new URL after expiration.

Email Delivery Request

FieldTypeNeededConstraints
invoiceIdUUID stringyesInvoice to deliver.
recipientEmailemail stringyesPrimary recipient.
ccemail arraynoMaximum 10 addresses.
bccemail arraynoMaximum 10 addresses.
subjectstringnoMaximum 500 characters.
bodystringnoMaximum 5,000 characters.
attachPDFbooleannoDefaults to true.
scheduledForISO 8601 date-timeschedule onlyMust represent future delivery time.
{
  "invoiceId": "550e8400-e29b-41d4-a716-446655440000",
  "recipientEmail": "[email protected]",
  "subject": "Invoice INV-0042",
  "body": "Please find the invoice attached.",
  "attachPDF": true
}

Email operations can create external side effects. Disable duplicate submission. Show the final recipients and subject before you send. Do not retry an interrupted request blindly.

We use cookies to improve your experience, analyze traffic, and personalize content.