Invoices API
| Action | Endpoint |
|---|---|
| Fetch Invoices for a Quote | GET/billing/{tenantLocator}/invoices/quotes/{quoteLocator}/list |
| Fetch Invoices for a Policy | GET/billing/{tenantLocator}/invoices/policies/{policyLocator}/list |
| Fetch Invoices for an Account | GET/billing/{tenantLocator}/invoices/accounts/{accountLocator}/list |
| Fetch an Invoice with Its Items | GET/billing/{tenantLocator}/invoices/{locator} |
| Fetch Invoice Details | GET/billing/{tenantLocator}/invoices/{locator}/details |
| Fetch Payments For An Invoice | GET/billing/{tenantLocator}/invoices/{locator}/payments/list |
| Fetch Credits For An Invoice | GET/billing/{tenantLocator}/invoices/{locator}/credits/list |
| Fetch Invoices Targeted By APayment | GET/billing/{tenantLocator}/payments/{locator}/invoices/list |
| Update Invoice | PATCH/billing/{tenantLocator}/invoices/{locator} |
| Settle Negative Or Zero Invoice | POST/billing/{tenantLocator}/invoices/{locator}/settle |
| Fetch Debits For An Invoice | GET/billing/{tenantLocator}/invoices/{invoiceLocator}/debits/list |
| Preview Invoices For Quote | GET/billing/{tenantLocator}/invoices/quotes/{locator}/previewInvoices |
| Preview Invoices For Transaction | GET/billing/{tenantLocator}/invoices/transactions/{locator}/previewInvoices |
| Preview Invoices For Stateless Quote | GET/billing/{tenantLocator}/invoices/quotes/statelessPreview |
| Fetch Invoice With Number | GET/billing/{tenantLocator}/invoices/numbers/{invoiceNumber} |
| Set Invoice Number | POST/billing/{tenantLocator}/invoices/{locator}/number/set |
| Generate Invoice Number | POST/billing/{tenantLocator}/invoices/{locator}/number/generate |
| Initiate Early Invoicing | POST/billing/{tenantLocator}/invoices/earlyInvoicing |
Fetch
Fetch Invoices for a Quote
fetchInvoicesForQuote/billing/{tenantLocator}/invoices/quotes/{quoteLocator}/listParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
quoteLocator | path | ulid | Yes | |
includeZeroAmountInvoices | query | boolean? | No | |
offset | query | integer? | No | |
count | query | integer? | No |
InvoiceListResponseinvoicesread,listLists regular invoices only, including those on an aggregate invoice.
Fetch Invoices for a Policy
fetchInvoicesForPolicy/billing/{tenantLocator}/invoices/policies/{policyLocator}/listParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
policyLocator | path | ulid | Yes | |
includeZeroAmountInvoices | query | boolean? | No | |
offset | query | integer? | No | |
count | query | integer? | No |
InvoiceListResponseinvoicesread,listLists regular invoices only, including those on an aggregate invoice.
Fetch Invoices for an Account
fetchInvoicesForAccount/billing/{tenantLocator}/invoices/accounts/{accountLocator}/listParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
accountLocator | path | ulid | Yes | |
includeZeroAmountInvoices | query | boolean? | No | |
includeContainedInvoices | query | boolean? | No | |
offset | query | integer? | No | |
count | query | integer? | No |
InvoiceListResponseinvoicesread,listReturns aggregate invoices alongside regular invoices. Regular invoices on an aggregate invoice are hidden by default. Pass includeContainedInvoices=true to include them. Discarded aggregate invoices are never listed.
Fetch an Invoice with Its Items
getInvoiceWithItems/billing/{tenantLocator}/invoices/{locator}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
InvoiceResponseinvoicesreadAccepts a regular invoice or an aggregate invoice. An aggregate invoice returns invoiceType set to aggregate and empty invoiceItems. It can also be fetched after it is discarded. Contained regular invoices indicate their parent through aggregateInvoiceLocator.
Required properties
| Property | Type | Description |
|---|---|---|
locator | ulid | |
accountLocator | ulid | |
startTime | datetime | |
endTime | datetime | |
dueTime | datetime | |
currency | string | |
timezone | string | |
invoiceState | Enum building | open | settled | discarded | |
generatedTime | datetime | |
invoiceType | Enum normal | aggregate |
Optional properties
| Property | Type | Description |
|---|---|---|
aggregateInvoiceLocator | ulid? | |
autopayTime | datetime? | |
invoiceNumber | string? | |
settledTime | datetime? | |
totalAmount | number? | |
totalRemainingAmount | number? | |
unsettledTime | datetime? | |
invoiceItems | InvoiceItemResponse[]? | Not included when part of a list response |
Required properties
| Property | Type | Description |
|---|---|---|
locator | ulid | |
invoiceLocator | ulid | |
timezone | string | |
amount | number | |
chargeCategory | string | |
chargeType | string | |
installmentItemLocators | ulid[] | |
transactionLocators | ulid[] |
Optional properties
| Property | Type | Description |
|---|---|---|
policyLocator | ulid? | |
elementStaticLocator | ulid? | |
offsetLocator | ulid? | |
quoteLocator | ulid? | |
elementType | string? | |
remainingAmount | number? | |
settlementTime | datetime? | |
unsettledTime | datetime? |
Fetch Invoice Details
fetchInvoiceDetails/billing/{tenantLocator}/invoices/{locator}/detailsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
InvoiceDetailsResponseinvoicesreadFor an aggregate invoice, returns totalAmount and totalRemainingAmount summed across its contained invoices.
Required properties
| Property | Type | Description |
|---|---|---|
accountLocator | ulid | |
invoiceLocator | ulid | |
startTime | datetime | |
endTime | datetime | |
dueTime | datetime | |
currency | string | |
timezone | string | |
invoiceState | Enum building | open | settled | discarded | |
generatedTime | datetime | |
invoiceType | Enum normal | aggregate | |
totalAmount | number | |
totalRemainingAmount | number | |
invoiceSummaries | InvoiceSummary[] |
Optional properties
| Property | Type | Description |
|---|---|---|
aggregateInvoiceLocator | ulid? | |
autopayTime | datetime? | |
invoiceNumber | string? | |
settledTime | datetime? | |
unsettledTime | datetime? |
Fetch Payments For An Invoice
fetchPaymentsForAnInvoice/billing/{tenantLocator}/invoices/{locator}/payments/listParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes | |
includeReversed | query | boolean? | No | |
offset | query | integer? | No | |
count | query | integer? | No |
PaymentListResponseinvoicesread,listThis endpoint can accept an aggregate invoice locator. Payments applied to the aggregate invoice appear on it as well as on the regular invoices they settled.
Required properties
| Property | Type | Description |
|---|---|---|
listCompleted | boolean | |
items | PaymentResponse[] |
Fetch Credits For An Invoice
fetchCreditsForAnInvoice/billing/{tenantLocator}/invoices/{locator}/credits/listParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes | |
includeReversed | query | boolean? | No | |
offset | query | integer? | No | |
count | query | integer? | No |
CreditListResponseinvoicesread,listFetch Invoices Targeted By APayment
fetchInvoicesTargetedByAPayment/billing/{tenantLocator}/payments/{locator}/invoices/listParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes | |
includeReversed | query | boolean? | No | |
offset | query | integer? | No | |
count | query | integer? | No |
InvoiceListResponsepaymentsread,listRequired properties
| Property | Type | Description |
|---|---|---|
listCompleted | boolean | |
items | InvoiceSummaryView[] |
Required properties
| Property | Type | Description |
|---|---|---|
invoiceItemSummaries | InvoiceItemSummary[] |
Optional properties
| Property | Type | Description |
|---|---|---|
policyLocator | ulid? | |
quoteLocator | ulid? | |
productName | string? |
Required properties
| Property | Type | Description |
|---|---|---|
locator | ulid | |
accountLocator | ulid | |
startTime | datetime | |
endTime | datetime | |
dueTime | datetime | |
currency | string | |
timezone | string | |
invoiceState | Enum building | open | settled | discarded | |
generatedTime | datetime | |
invoiceType | Enum normal | aggregate |
Optional properties
| Property | Type | Description |
|---|---|---|
aggregateInvoiceLocator | ulid? | Only set for regular invoices contained within an aggregate invoice. |
autopayTime | datetime? | |
invoiceNumber | string? | |
settledTime | datetime? | |
totalAmount | number? | |
totalRemainingAmount | number? | |
unsettledTime | datetime? |
Required properties
| Property | Type | Description |
|---|---|---|
amount | number |
Optional properties
| Property | Type | Description |
|---|---|---|
transactionLocator | ulid? | |
transactionCategory | string? | |
transactionEffectiveTime | datetime? | |
transactionType | string? |
Required properties
| Property | Type | Description |
|---|---|---|
elementLocator | ulid | |
installmentItemLocator | ulid | |
installmentLocator | ulid | |
amount | number |
Optional properties
| Property | Type | Description |
|---|---|---|
transactionLocator | ulid? | |
transactionCategory | string? | |
transactionEffectiveTime | datetime? | |
transactionType | string? |
Required properties
| Property | Type | Description |
|---|---|---|
invoiceItemLocator | ulid | |
amount | number | |
chargeCategory | string | |
chargeType | string | |
remainingAmount | number | |
installmentItemSummaries | InstallmentItemSummary[] |
Optional properties
| Property | Type | Description |
|---|---|---|
elementStaticLocator | ulid? | |
elementType | string? | |
flatChargeSummary | FlatChargeSummary? | |
settlementTime | datetime? | |
unsettledTime | datetime? |
Update
Update Invoice
updateInvoice/billing/{tenantLocator}/invoices/{locator}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
Properties
| Property | Type | Description |
|---|---|---|
autopayTime | datetime? | |
suppressAutopay | boolean? |
Negative Invoice Handling
Settle Negative Or Zero Invoice
settleNegativeOrZeroInvoice/billing/{tenantLocator}/invoices/{locator}/settleParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes | |
forced | query | boolean? | No |
invoiceswriteAccepts an open aggregate invoice whose contained open invoices net to zero or less. The system settles its zero and negative contained invoices according to the negative invoice handling setting for the account (Either never, toCreditBalance, or toOpenInvoices. With toOpenInvoices, the credit goes only to open invoices on the same aggregate invoice). If at least one is settled, the system then applies the credit balance in that currency for the account to the positive contained invoices. A settled aggregate invoice, or one whose open invoices net above zero, is rejected.
Fetch Debits For An Invoice
fetchDebitsForAnInvoice/billing/{tenantLocator}/invoices/{invoiceLocator}/debits/listParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
invoiceLocator | path | ulid | Yes | |
includeReversed | query | boolean? | No | |
offset | query | integer? | No | |
count | query | integer? | No |
ListPageResponseDebitResponseinvoicesread,listRequired properties
| Property | Type | Description |
|---|---|---|
listCompleted | boolean | |
items | DebitResponse[] |
Required properties
| Property | Type | Description |
|---|---|---|
invoiceLocator | ulid | |
targetLocator | ulid | |
amount | number | |
targetType | Enum invoice | account | subpayment | invoiceItem |
Optional properties
| Property | Type | Description |
|---|---|---|
reversed | boolean? | |
reversedAt | datetime? |
Required properties
| Property | Type | Description |
|---|---|---|
listCompleted | boolean | |
items | CreditDistributionResponse[] |
Invoice Documents
If you have configured invoicing to generate an invoice document, you can fetch it with the Fetch Invoice Document endpoint.
Invoice Preview
Preview Invoices For Quote
previewInvoicesForQuote/billing/{tenantLocator}/invoices/quotes/{locator}/previewInvoicesParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes | |
includeZeroAmountInvoices | query | boolean? | No | |
count | query | integer? | No |
InvoicePreviewResponse[]invoicesreadPreview Invoices For Transaction
previewInvoicesForTransaction/billing/{tenantLocator}/invoices/transactions/{locator}/previewInvoicesParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes | |
includeZeroAmountInvoices | query | boolean? | No | |
count | query | integer? | No |
InvoicePreviewResponse[]invoicesreadRequired properties
| Property | Type | Description |
|---|---|---|
startTime | datetime | |
endTime | datetime | |
dueTime | datetime | |
generateTime | datetime | |
autopayTime | datetime | |
totalAmount | number | |
installmentLocators | ulid[] | |
invoiceItems | InvoiceItemPreview[] |
Required properties
| Property | Type | Description |
|---|---|---|
elementStaticLocator | ulid | |
amount | number | |
chargeCategory | string | |
chargeType | string | |
elementType | string | |
transactionLocators | ulid[] |
Optional properties
| Property | Type | Description |
|---|---|---|
policyLocator | ulid? | |
quoteLocator | ulid? |
Preview Invoices For Stateless Quote
previewInvoicesForStatelessQuote/billing/{tenantLocator}/invoices/quotes/statelessPreviewParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
quotePreviewRequest | query | QuoteBillingPreviewRequest | Yes | |
includeZeroAmountInvoices | query | boolean? | No | |
count | query | integer? | No |
InvoicePreviewResponse[]invoicesreadNumbering
Fetch Invoice With Number
fetchInvoiceWithNumber/billing/{tenantLocator}/invoices/numbers/{invoiceNumber}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
invoiceNumber | path | string | Yes |
InvoiceResponse[]invoicesreadThis endpoint also works for aggregate invoices.
Set Invoice Number
setInvoiceNumber/billing/{tenantLocator}/invoices/{locator}/number/setParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes | |
invoiceNumber | query | string | Yes |
InvoiceResponseinvoiceswriteThis endpoint also works for aggregate invoices.
Generate Invoice Number
generateInvoiceNumber/billing/{tenantLocator}/invoices/{locator}/number/generateParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
InvoiceResponseinvoiceswriteThis endpoint also works for aggregate invoices.
Early Invoicing
Initiate Early Invoicing
initiateEarlyInvoicing/billing/{tenantLocator}/invoices/earlyInvoicingParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes |
For invoice aggregation:
- The response is unchanged: A
jobLocatorandcandidateInstallmentsCount. The aggregate invoice is created when the job runs, not when the request returns. invoiceDueTime, when provided, becomes thedueTimeof the aggregate invoice as well as thedueTimeof the new regular invoices. Otherwise, the aggregate invoice takes the earliestdueTimeof its contained invoices.- No aggregate invoice is created if the run generates no new regular invoices, even when
includeExistingInvoicesis set totrue. - Sending
includeExistingInvoices: truewithoutaggregateInvoices: trueis not permitted. - Each aggregate invoice created this way emits the same events as those created through
POST /invoices.
Required properties
| Property | Type | Description |
|---|---|---|
aggregateInvoices | boolean | Defaults to false. When true, the job creates an aggregate invoice for each account and currency, containing the regular invoices that were generated. |
ignoreHolds | boolean | |
includeExistingInvoices | boolean | Defaults to false. When true, that aggregate invoice also includes the other open regular invoices for the account in the same currency that are not already on an aggregate invoice. Requires aggregateInvoices: true. |
installmentLocators | ulid[] |
Optional properties
| Property | Type | Description |
|---|---|---|
accountLocator | ulid? | |
policyLocator | ulid? | |
timezone | string? | |
invoiceDueTime | datetime? | |
invoiceThroughTime | datetime? |
Required properties
| Property | Type | Description |
|---|---|---|
jobLocator | ulid | |
candidateInstallmentsCount | integer |