Bundle one or more of a policy's uninvoiced ledger journal entries into an invoice. Select the entries to invoice with the list uninvoiced ledger entries endpoint.
This route always finalises the invoice, so it is returned in open, with its invoice number allocated and its document queued for rendering. There is no way to create a draft invoice over the API. Only the generate_invoice product module action can, by passing auto_finalise: false.
Invoicing is opt-in per organization: unless the invoicing feature flag is enabled for your organization this endpoint returns 403. It additionally requires the policy to have been migrated to Root's current ledger, since invoicing reads and writes ledger journal entries only.
400Validation error. Examples: a journal entry does not belong to the policy, an entry is already attached to another invoice, journal_entry_ids contains duplicates, or a credit note's net total is not negative.
403Invoicing is not enabled for the organization, or the caller is missing the invoices:create permission.
409The policy has not been migrated to Root's current ledger, so it has no ledger journal entries to invoice.