Generate Invoice Documents Action
Asynchronously generate PDF documents for the invoices associated with an invoice batch run record that are in the Draft or Posted status.
This action uses the ID of the invoice batch run record to find the draft or posted invoices from the batch and to generate the PDF documents for its invoices that are in the Draft or Posted status. This action creates a DocGenerationBatchProcess record that contains the Document Generation Process and Invoice Document records for each of the invoices. This action is available in API version 63.0 and later with Revenue Cloud Billing.
The Generate Invoice Documents action is available in Enterprise, Unlimited, and Developer Editions where Revenue Cloud Billing is enabled. The org must have Billing Docgen enabled and an active Invoice Document Template to generate PDF documents. To use this action, you need either the Billing Operations User or the Billing Admin permission set, along with the Docgen Designer and Docgen Designer Standard User permission sets.
URI: /services/data/v68.0/actions/standard/generateInvoiceDocuments
Formats: JSON, XML
HTTP Methods: POST
Authentication: Authorization: Bearer TOKEN
Where TOKEN is a placeholder for your OAuth access token.
| Input | Type | Description |
|---|---|---|
invoiceBatchRunId | string | Required. ID of the invoice batch run record that created the draft or posted invoices. |
| Output | Type | Description |
|---|---|---|
requestId | string | An alphanumeric string to track the status of the document generation request. |
requestStatus | boolean | Indicates whether the operation is successful (true) or not (false). |
POST
This example shows a sample request for the Generate Invoice Documents action.
This example shows a sample response for the Generate Invoice Documents action.